Specify the resolution of new nc file with remapcon
Added by Cat Fitz over 3 years ago
Hi,
I want to 'coarsen' Cmip6 data to a specified resolution (i.e. 10 minute). I know that you can specify the number of Lat and Lon grids in the command:
For example, if I type:
cdo remapcon,r720x360 pr_Amon_CNRM-CM6-1_historical_r3i1p1f2_gr_185001-201412.nc out.nc
my 'out.nc' file is of the size 720x360. I don't know how many gid cells a 10-minute resolution would be. Is there a way to do this?
Many thanks.
Replies (10)
RE: Specify the resolution of new nc file with remapcon - Added by Karin Meier-Fleischer over 3 years ago
Hi Cat,
see https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsection.1.4.2 pre-defined grids (global_).
0.016667 degree = 1' 0.16667 degree = 10'
cdo -remapcon,global_0.16667 pr_Amon_CNRM-CM6-1_historical_r3i1p1f2_gr_185001-201412.nc out.nc
-Karin
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz over 3 years ago
Hi Karen,
Thanks very much for that.
Cat
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz over 3 years ago
Sorry...'Karin'
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz over 3 years ago
Hi, I have a follow up question regarding this topic if that's ok?
Is there a way to 'check' the spatial resolution of an existing nc file? Sort of reverse-engineering the cdo above that specifies the global grid to be 10' or 1'?
Many thanks.
RE: Specify the resolution of new nc file with remapcon - Added by Ralf Mueller over 3 years ago
hi Cat!
you can output a text representation of your grid with
cdo griddes <ifile>or with some real input:
cdo griddes -topo cdo(1) topo: Process started # # gridID 1 # gridtype = lonlat gridsize = 259200 xsize = 720 ysize = 360 xname = lon xlongname = "longitude" xunits = "degrees_east" yname = lat ylongname = "latitude" yunits = "degrees_north" xfirst = -179.75 xinc = 0.5 yfirst = -89.75 yinc = 0.5 cdo(1) topo: cdo griddes: Processed 1 variable [0.00s 42MB].
There is also a verification operator for horizontal grids
cdo verifygrid <ifile>As a test you can use
-topo
againcdo verifygrid -topo cdo(1) topo: Process started cdo verifygrid: Grid consists of 259200 (720x360) cells (type: lonlat), of which cdo verifygrid: 259200 cells have 4 vertices cdo verifygrid: 1440 cells have duplicate vertices cdo verifygrid: lon : -179.75 to 179.75 degrees cdo verifygrid: lat : -89.75 to 89.75 degrees cdo(1) topo: cdo verifygrid: Processed 1 variable [0.38s 86MB].
Hope that helps,
ralf
And, yes - of course you can pick an old topic ;-)
have good weekend
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz over 3 years ago
Hi Ralf,
Thanks for your comprehensive answer.
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz almost 2 years ago
Can you tell me if elevation is taken into account using this cdo for interpolation?
Many thanks.
RE: Specify the resolution of new nc file with remapcon - Added by Ralf Mueller almost 2 years ago
happy new year, cat ;-)
your request seems a but too general. this depends on the specific input file and the interpolation methods you want to use on which variable.
cheers
ralf
RE: Specify the resolution of new nc file with remapcon - Added by Cat Fitz almost 2 years ago
Happy new year to you too:)
Apologies. I used 'remapcon' to regrid a global temperature grid to a more coarse resolution. I suppose what I am asking is if elevation factors in to the 'remapcon' command when being ran for climate variables. I looked at the documentation and saw no mention of elevation being accounted for. It is just a straight interpolation as opposed to one that is dependent on elevation data?
RE: Specify the resolution of new nc file with remapcon - Added by Ralf Mueller almost 2 years ago
In general the elevation of a source or target grid cell has no influence on any horizontal remapping, because in most cases it is simply not given. Depending on the method the location(s), cell area(s) or distance(s) are used to compute the interpolation weights since this information is easily available in the input. 'cell elevation' can be very specific to the model or the input/output resolution. It's not clear what is the right algorithm for desired application, so we have to get to the details first, I guess:
- How exactly to you want to include cell elevation into a horizontal interpolation?
- Maybt it can already be done with the right operator combination
- Maybe it's worth having a new interpolation method for this in CDO (I hereby suggest to call it
remapmeow
in that case)
- Do you have input ready to testing?
- Is there an article published about this, which can be used for reference?
have a nice day - or good night, idk.
cheers
ralf