what does sellonlatbox actually need?
Added by Mark Savenije over 12 years ago
Hi all,
Most files I work with, have rotated pole grids. So a one dimensional rlat and rlon, together with a grid_mapping attribute for specification of the north pole. cdo griddes can extract the grid correctly. Next to that, a two dimensional lon and lat field exists (in the netcdf file that is) which give the longitudes and latitudes for each grid point (together with a coordinates attribute). So actually the grid (or better, the lat/lon's) is specified two times. For some files sellonlatbox works without problems, other files complain about the grid. I have to further analyze the files, perhaps there are other variables on another grid.
My question however: does sellonlatbox works with the rotated pole specification or the lat/lon variables. Can the existence of both specifications lead to problems? I'm still struggling a bit with grids. Also with griddes I sometimes have to remove things (like lat and lon) in order to work properly...
Perhaps somebody can shed some light.
Thanks, Mark
Replies (2)
RE: what does sellonlatbox actually need? - Added by Uwe Schulzweida over 12 years ago
Hi Mark,
Yes, this is a little bit confusing. In principle these data variables have two sets of coordinates. In CDO each variable can have only one set of coordinates even if there are more available. If the netCDF CF attribute coordinates is available then these geographical coordinates are use and the other coordinates are not used with the consequence that they are lost after processing with CDO. Which coordinates are use can be checked with griddes or sinfon. Here is the grid section output of sinfon:
Grid coordinates : 1 : curvilinear > size : dim = 8075 nx = 85 ny = 95 lon : min = -33.3770142 max = 57.9439163 degrees_east lat : min = 26.8568459 max = 71.5399628 degrees_north available : xvals yvalsThe undocumented environment variable IGNORE_ATT_COORDINATES can be set to ignore the coordinates attribute. If this variable is set or the attribute coordinates is not available then the rotated coordinates are used and the geographical coordinates are ignored. In this case the grid section of sinfon looks like:
Grid coordinates : 1 : lonlat > size : dim = 8075 nlon = 85 nlat = 95 rlon : first = -21.6089993 last = 15.3510008 inc = 0.44 degrees rlat : first = -20.5699997 last = 20.7900009 inc = 0.440000534 degrees northpole : lon = -162 lat = 39.25The result of sellonlatbox depends on the used grid coordinates.
Thanks for your question!
Cheers,
Uwe
RE: what does sellonlatbox actually need? - Added by Mark Savenije over 12 years ago
Dear Uwe,
Thanks for your answer, very useful explenation.
Playing further with some datafiles I discovered a variable ym(time) in the header dump. It is treated as a horizontal grid of dimension 1; that is (in this case at least) the reason the sellonlatbox didn't work as expected.
Mark