cdo setattribute (Warning): Variable >time< not found!
Added by Jeisson Javier Leal Rojas over 2 years ago
Hi.
I have attached a nc file
When I do cdo -setattribute,time@units="days since 2020-01-21 00:00:00" pr_2020-01-21.nc TEST.nc
I've got this messages, including a Warning:
cdo setattribute (Warning): Variable >time< not found! cdo setattribute: Processed 5040000 values from 1 variable over 1 timestep [0.13s 85MB].
I do not see changes in the new created file.
When I do ncdump- h, This is the result I've got in both files pr_2020-01-21.nc and TEST.nc
dimensions:
time = UNLIMITED ; // (1 currently)
lon = 3600 ;
lat = 1400 ;
variables:
int time(time) ;
time:standard_name = "time" ;
time:units = "seconds since 1970-01-01" ;
time:calendar = "proleptic_gregorian" ;
time:axis = "T" ;
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
float pr(time, lat, lon) ;
pr:long_name = "precipitation flux" ;
pr:units = "kg m-2 s-1" ;
pr:cell_methods = "time: mean cell: mean" ;
pr:component = "atmo" ;
pr:vgrid = "surface" ;
Why is stating the there id not Variable time??
| pr_2020-01-21.nc (19.4 MB) pr_2020-01-21.nc |
Replies (2)
RE: cdo setattribute (Warning): Variable >time< not found! - Added by Karin Meier-Fleischer over 2 years ago
Hi Jeisson,
time is not a normal variable it is a dimension variable which CDO can't change. You can use NCO's ncatted:
ncatted -a units,time,o,c,"days since 2020-01-21 00:00:00" pr_2020-01-21.nc TEST.nc
RE: cdo setattribute (Warning): Variable >time< not found! - Added by Jeisson Javier Leal Rojas over 2 years ago
Hi
Thank you for the reply.
I've got a bit confused because when I did ncdump time is shown as a dimension and as a variable as well.
I will keep this in mind.
Cheers!