Error when interpolate MPAS grid (unstructured) to LatLon grid
I want to interpolate model forecasts from MPAS grid to LatLon grid, using the following command:
cdo -P 1 -f nc5 -remapbil,r360x181 -setgrid,mpas:x1.10242.grid.nc -selgrid,1 history.2019-09-03_18.00.00.nc a.nc
x1.10242.grid.nc contains MPAS grid information
history.2019-09-03_18.00.00.nc: MPAS forecast that I want to interpolate
I got the error
cdo(1) setgrid: Process started
cdo(2) selgrid: Process started
cdi warning (cdf_check_variables): Unsupported data type (char/string), skipped variable initial_time!
cdi warning (cdf_check_variables): Unsupported data type (char/string), skipped variable xtime!
cdi warning (cdf_check_variables): Unsupported data type (char/string), skipped variable mminlu!
cdi warning (cdf_check_variables): Unsupported data type (char/string), skipped variable densityFunctionCode!
cdo(1) setgrid (Warning): No horizontal grid with 10242 cells found!
cdo remapbil (Abort): Unsupported generic coordinates (Variable: qv)!
| x1.10242.grid.nc (13.4 MB) x1.10242.grid.nc | MPAS grid file | ||
| history.2019-09-03_18.00.00.nc (85.9 MB) history.2019-09-03_18.00.00.nc | MPAS forecast that I want to interpolate |
Replies (4)
RE: Error when interpolate MPAS grid (unstructured) to LatLon grid - Added by Karin Meier-Fleischer 3 days ago
You can not use remapbil for unstructured grids. Further you select the wrong grid, if you want to use the mpas gridfile x1.10242.grid.nc you have to use -selgrid,2.
cdo -f nc5 -remapcon,r360x181 -setgrid,mpas:x1.10242.grid.nc -selgrid,2 history.2019-09-03_18.00.00.nc a.nc
RE: Error when interpolate MPAS grid (unstructured) to LatLon grid - Added by Jia Wang 2 days ago
Thanks. It works.
In future, if I want to use a grid other than grid #1 in "x1.10242.grid.nc". How do I rewrite the command?
RE: Error when interpolate MPAS grid (unstructured) to LatLon grid - Added by Karin Meier-Fleischer 2 days ago
If the grid file contains multiple grid definitions and you want to use the second grid definition for instance, use
-setgrid,x1.10242.grid.nc:2
Have a look at https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsubsection.0.2.6.6:
If the dataset contains more than one grid, the first one is used. Appending :N to the name of the dataset selects the N-th grid
RE: Error when interpolate MPAS grid (unstructured) to LatLon grid - Added by Jia Wang 1 day ago
Thanks Karin.
I encountered a new issue. The files that I have uploaded are on MPAS uniform mesh. The interpolation is fine now.
But when I tried to interpolate MPAS on a variable mesh (the resolutions change across the globe, 60 to 15 km) to a regular lat lon grid, suddenly I have the error:
cdo -f nc5 -remapcon,r360x181 -setgrid,mpas:x4.535554.grid.nc a.nc b.nc
cdo remapcon (Abort): Source grid cell corner coordinates missing!
I checked both grid information files, the one on the uniform mesh and the one on the variable mesh. The information is basically the same. I do not know why the source grid cell corner coordinates can not be found on the variable mesh.
Because the grid file (x4.535554.grid.nc) is large, I have uploaded it to Google Drive https://drive.google.com/file/d/1n70yNHDz7Bre5jo-dV9DXFYdMJeEee7g/view?usp=sharing .
The data file (a.nc) is attached.