[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: conservation of surface values according to @DIN operator




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:
Hi Ferret users

I am using a mask at 15" resolution and I calculate the area in km2 with @DIN operator

use mask_15s                             !  variable=mask with 0 and 1
set var/bad=0 mask                       ! 0 is defined as missing value
list mask[x=@din, y=@din] / 1.E06        ! surface in km2

the result is correct : 15805. km2


Now I regrid the mask to 1mn:
let ma0 = mask[gxy=GIN1]

and re-compute integral:
list ma0[x=@din, y=@din] / 1.E06

the result is: 1.695E-06 , so the surface is not the same.

What happens during the regriding % @DIN operator ?

Thanks


characteristics of variable mask:
 GRID GAP1
 name       axis              # pts   start                end
 LONGITUDE LONGITUDE         1020mr   75.502E(75.502)      79.748E(79.748)
 LATITUDE  LATITUDE           480 r   41.419N              43.415N
 LEVEL2    Z (level)            1 r-  0                    0
 TIME3     T (time)             1 r   0                    0
 normal    E
 normal    F

stat mask
 
             MASK
             LONGITUDE: 75.5E(75.5) to 79.8E(79.8)
             LATITUDE: 41.4N to 43.4N
             Z (level): 0
             T (time): 0
             E:  N/A
             F:  N/A
             DATA SET: mask_15s.nc
 
 Total # of data points: 489600 (1020*480*1*1*1*1)
 # flagged as bad  data: 389847
 Minimum value: 1
 Maximum value: 1
 Mean    value: 1 (unweighted average)
 Standard deviation: 0


characteristics of variable ma0
GRID GIN1
name axis # pts start end
LON X 206 r 75.917 79.333
LAT Y 76 r 41.75 43
LEVEL Z 1 r 0 0
M2 TIME 168 r 16-JAN-2001 05:14 17-DEC-2014 04:14
normal E
normal F

stat ma0
MASK[GXY=GIN1]
X: 75.9 to 79.3
Y: 41.7 to 43
Z (level): 0
T (time): 0
E: N/A
F: N/A
DATA SET: mask_15s.nc

Total # of data points: 15656 (206*76*1*1*1*1)
# flagged as bad data: 9555
Minimum value: 1
Maximum value: 1
Mean value: 1 (unweighted average)
Standard deviation: 0


> Francois DELCLAUX
> ------------------------------------------------------------
> UMR HydroSciences - CC 57
> Université Montpellier
> 163 rue Auguste Broussonnet
> 34090  Montpellier      FRANCE
>
> http://www.hydrosciences.org/
> mailto: francois.delclaux@xxxxxxxxxxxxxxxxxxx
> Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74
> ------------------------------------------------------------


--
François DELCLAUX
------------------------------------------------------------
UMR HydroSciences - CC 57
Université Montpellier
163 rue Auguste Broussonnet
34090 Montpellier FRANCE

http://www.hydrosciences.org/
mailto: francois.delclaux@xxxxxxxxxxxxxxxxxxx
Tel : (33) (0)4 67 14 90 11 Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement