Project

General

Profile

function remapcon

Added by Badia Moragas over 11 years ago

Dear everybody,

I want to remap an emissions file (non-rotated) to my model grid (lat-lon rotated). So I use this cdo command:

cdo remapcon2,grid_rot_nmmb grid_tno_setgrid.nc test.nc

Where grid_rot_nmmb is:

gridtype = lonlat
xname = lon
yname = lat
xunits = degrees
yunits = degrees
xsize = 339
ysize = 309
xfirst = -33
xinc = 0.2
yfirst = -25
yinc = 0.2
xnpole = -169
ynpole = 44

After this remapping I compare the mass of my pollutants and change, so I suspect that this command: remapcon2 is not conservative:
3.51578e+06 > 2.55739e+06

Original emissions file:
cdo output -selvar,NOx -fldsum grid_tno_setgrid.nc
cdo output: Started child process "selvar,NOx -fldsum grid_tno_setgrid.nc (pipe1.1)".
cdo(2) selname: Started child process "fldsum grid_tno_setgrid.nc (pipe2.1)".
3.51578e+06

File after remapping in my model grid:
cdo output -selvar,NOx -fldsum test.nc
cdo output: Started child process "selvar,NOx -fldsum test_con_w.nc (pipe1.1)".
cdo(2) selname: Started child process "fldsum test_con_w.nc (pipe2.1)".
2.55739e+06

I am doing something wrong?

Thank you very much,

Alba


Replies (3)

RE: function remapcon - Added by Uwe Schulzweida over 11 years ago

Hi Alba,

The CDO operator fldsum summed the values of all grid points. To get the global mass the input field have to be scaled to the grid box. For remapcon the input field have to be scaled to the size of each grid box. You have to dived the input field by the input grid cell areas, do the remapping and multiply the the result with the output grid cell areas:

cdo div ifile -gridarea ifile tmp1
cdo remapcon2,ogrid tmp1 tmp2
cdo mul tmp2 -gridarea tmp2 ofile.nc
Or in one command line:
cdo mul -remapcon2,ogrid -div ifile -gridarea ifile -gridarea -random,ogrid ofile.nc
Best regards,
Uwe

RE: function remapcon - Added by Badia Moragas over 11 years ago

Thank you very much Uwe!!

So how I can check the global mass (to know if the conservative remap is ok) of each grid?

cdo output -fldsum ofile.nc
1.97342e+07

cdo output -fldsum ifile.nc
3.51578e+06

Or I have to do "cdo div" for each grid?

All the best,

Alba

RE: function remapcon - Added by Badia Moragas over 11 years ago

If I dividem, this is what I get:

cdo div ifile -gridarea ifile idiv
cdo output -fldsum idiv
0.0580639

cdo div ofile -gridarea ofile odiv
cdo output -fldsum odiv
0.0402245

    (1-3/3)