[Thread Prev][Thread Next][Index]

[ferret_users] Conservative remapping



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