Hi Francois, It's not the integration that's causing the problem here but the bilinear interpolation from the fine grid to the coarse grid (GIN1). @LIN is the default interpolation and we don't want it here. You'll typically have many fine grid points within the bounds of a coarse cell. Now, if the four points contributing to the interpolation to the fine grid are all 1 then, of course, you get 1 as the value on the coarse grid signifying that all points are good. BUT, if there are any masked points within the cell's boundaries then this results in an overestimate of the contributions to this cell. The reverse also applies but there is no guarantee that things cancel out. Have a look at shade maps of mask and ma0 to see what is happening. How to fix: We want an area weighted contribution of all the points on the fine grid. 1) DON'T mask the zeros in the mask variable. We want them for weighting correctly. 2) Use the @AVE regridding to get the correct area weighting. use mask_15s let ma0=mask[gyx=GIN1@AVE] list ma0[x=@din,y=@din]/1.e6 should do the trick. See also http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/Grids-Regions/GRIDS#_VPID_198 Cheers, Russ On 25/10/16 23:04, Francois Delclaux wrote:
|