[Thread Prev][Thread Next][Index]

Re: [ferret_users] Conservative remapping



Hi Markus,
If you use the @AVE regridding transformation to regrid between grids that are defined with units of longitude and latitude, Ferret applies the latitude correction.  This is documented here:

4.2.4.1 Regridding transformations  (at http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/Grids-Regions/GRIDS#_VPID_198)
@AVE—averaging

Computes the length-weighted average of all points on the source grid that lie partly or completely within each grid cell of the destination grid. If any portion of a source grid cell containing data overlaps a given destination grid cell, then data from that source cell contributes to the destination cell, weighted by the fraction of the destination cell overlapped by the source cell. The source data are treated as continuous, extending to the edges of the grid cells.

Note: When @AVE is applied simultaneously to the X and Y axes, where X and Y are longitude and latitude, respectively, an area-weighted average (weighted by cos(latitude)) is used. The @AVE transformation is unique in this respect. In multiple axis applications other than X and Y @AVE will be applied sequentially to the axes, computing the "average of the average." ...

-Ansley

On 5/22/2012 4:58 AM, markus.mingel@xxxxxxxxx wrote:
Dear All,

I would regrid a variable defined in gC/m2 on a regular grid to a new regular 
grid; since the variable is a flux, I should use a mass conservation. Iin order 
to have a variable independent by the cell area I tried to multiply the 
variable by the area before the regridding, and then I divided by the new area 
after the regridding, however when I check the global value on the new grid 
this is not the expected value.
Here a sample code:

USE npp.nc

DEFINE AXIS/X=-179.5:179.5:1 xaxis
DEFINE AXIS/Y=-89.5:89.5:1   yaxis
DEFINE GRID/X=xaxis/Y=yaxis  reg_grid

let dummy = y[gy=yaxis] + x[gx=xaxis]

! Computing the area of the new grid

LET r=6370*1000		! radius of earth in m
LET pi=atan(1.)*4.
LET deg2rad=pi/180.
LET deg2km=1000*2*pi*r/360.

LET Final_area=xbox[g=dummy]*ybox[g=dummy]*cos(y[g=dummy]*deg2rad)
*deg2km*deg2km*1e-6
LET Original_area=xbox[g=npp]*ybox[g=npp]*cos(y[g=npp]*deg2rad)
*deg2km*deg2km*1e-6

let npp_partial  = npp * Original_area
let npp_new     = npp[G=reg_grid]
let npp_final     = npp_new /  Final_area

The global value of npp is 106 Pg, while  npp_final has a much lower value.
Any suggestions?

Best
Markus

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

Privacy Policy | Disclaimer | Accessibility Statement