add lon/lat to an existing netCDF
Added by Florian Rothe over 9 years ago
Hello everyone,
I want to add the variables lon/lat to an existing netCDF-file with data from a time series.
So, I want to extend the time series to space. In each time step, all cells of the grid should have the (same) value of that time step.
Can this be done with CDO?
If yes, what operator can I use? I couldn't find the right one.
Thanks in advance for your help!
Florian
Replies (2)
RE: add lon/lat to an existing netCDF - Added by Uwe Schulzweida over 9 years ago
Try the CDO operator enlarge: https://code.zmaw.de/projects/cdo/embedded/index.html#x1-2370002.6.13
RE: add lon/lat to an existing netCDF - Added by Florian Rothe over 9 years ago
Hello Uwe,
thanks for your answer. I tried "enlarge" with a .txt file as input for the grid. the text file contains the information about the lonlat grid which I want to have in the output file:
gridtype = lonlat
gridsize = 1036800
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
xsize = 1440
ysize = 720
xfirst = -179.875
xinc = 0.25
yfirst = 89.875
yinc = -0.25
But when I press enter with this command, CDO crashes and does not proceed with this command.
Do you know a reason why? As far as I can see there is no mistake in my gridfile.
Thanks for your help
Florian