Project

General

Profile

Regridding to model grid

Added by Anne Moree almost 6 years ago

Hello,

I need to regrid a 2D field (128x64 lonxlat for 12 time steps) to a model grid (180x193 lonxlat), which are both attached to this message.
A example 2D field that is already in the right format, is also attached (INPDUST_mhw.nc).

The model grid is not straightforward as far as I can see, and needs to be put in 'CDO grid' (manual section 1.3.2.4) format first.
I would in the end like to do something like this:

cdo -s remapbil,modelgrid_CDO dust.nc 2D_on_model_grid.nc

I am struggling to make the CDO grid from the information I have:
- Is it indeed curvilinear (when I do sinfon on grid.nc I get generic and when I do it on INPDUST I get curvilinear)?
- Can modelgrid_CDO be a netcdf file? If yes, what is exactly needed for CDO to understand it? I.e. I probably need to rename some variables/dimensions?

Thank you for your help!
Anne

grid.nc (18 MB) grid.nc model grid
DustFlux_Lambert2015_LGM.nc (386 KB) DustFlux_Lambert2015_LGM.nc 2D field that needs regridding
INPDUST_mhw.nc (2.12 MB) INPDUST_mhw.nc example

Replies (2)

RE: Regridding to model grid - Added by Uwe Schulzweida almost 6 years ago

The coordinate units of the input file doesn't follow the NetCDF CF convention. Here is an example to changed it with the NCO operator ncatted:

ncatted -a units,lat,o,c,"degrees_north"  -a units,lon,o,c,"degrees_east" DustFlux_Lambert2015_LGM.nc infile
Then you can use the following command for the interpolation:
cdo remapbil,INPDUST_mhw.nc infile outfile

RE: Regridding to model grid - Added by Anne Moree almost 6 years ago

Thank you very much Uwe, this did the trick!

    (1-2/2)