CDO convert grads to netcdf...time information is lost
Added by dave hill over 3 years ago
Hi, I use CDO to convert grads to .nc. It is amazing and really fast. Here is an example .ctl file:
DSET ^../../outputs/wo_assim/swed.gdat
TITLE SnowModel single-variable output file
UNDEF -9999.0
XDEF 1382 LINEAR 1.00000000 1.00000000
YDEF 2476 LINEAR 1.00000000 1.00000000
#XDEF 1382 LINEAR 0.00000000 100.00000000
#YDEF 2476 LINEAR 0.00000000 100.00000000
#XDEF 1382 LINEAR 0.00000000 0.10000000
#YDEF 2476 LINEAR 0.00000000 0.10000000
#XDEF 1382 LINEAR 487200.00000000 100.00000000
#YDEF 2476 LINEAR 4690100.00000000 100.00000000
#XDEF 1382 LINEAR 487.20000000 0.10000000
#YDEF 2476 LINEAR 4690.10000000 0.10000000
ZDEF 1 LINEAR 1 1
TDEF 365 LINEAR 00Z01sep2018 1dy
VARS 1
swed 0 0 snow-water-equivalent depth (m)
ENDVARS
However, when I then open the .nc file and inspect the time information, I get something like this:
Variables:
time
Size: 365x1
Dimensions: time
Datatype: double
Attributes:
standard_name = 'time'
units = 'hours since 1-1-1 00:00:00'
calendar = 'standard'
axis = 'T'
So, it seems as though the time information is just 'lost.' Am I doing something wrong? Well, clearly, I am...but what? Thanks very much. My data file is a few GB, so I have not attached it here.
Replies (1)
RE: CDO convert grads to netcdf...time information is lost - Added by Uwe Schulzweida over 3 years ago
Hi Dave,
Thanks for the report! This is a bug in CDO and will be fixed in the next release. The information of the reference time seems to be lost since CDO release 1.9.2.
Cheers, Uwe