Atmospheric Toolbox

Regrid question after spatial-bin

Hi, sir, I have a question about how data was regrided after spatial-bin in harp. I’m processing another s5p-L2 data which is retrieved from different algorithm, it has different data structure with S5p that harp tool handled. I looked up relevant question on forum and know spatial-bin is average all values in target grid when data don’t have lat/lon -bounds.

I try to regrid using IDW (interpolate unknow point with a weighted average of nearest 10 points), but it interpolates all area including where has no CH4(Fig. 1, the point is filtered CH4 data), then I choose KDTree method(interpolate unknow point using average of data within a R circle ), but result has too many blank area(Fig.2)
image

image

so how do you regrid and get results to avoid too many blank area or don’t interpolate NAN area? Thank you, any suggestions will help.

Here is the python code

If you only have the center point coordinates of the satellite pixels then this is a fundamental problem.
Using center points is usually only applicable if your target grid resolution is much smaller than that of the satellite data itself.

If you don’t want the problems that you mention then the only solution is to make sure that you do have lat/lon bounds variables. And then perform a spatial regridding that takes this satellite pixel size into account (as HARP does with its area weighted averaging).