Reputation: 13
As it is shown in this image , my data starts from 1980-01-01 00:00:00. I would like my ref time to be the first time entry i.e. 1980-01-01. But instead the ref time is 1900-01-01 00:00:00. As the calendar is gregorian, i tried to change the calendar to standard format by using these two different commands and both works
ncatted -a calendar,time,o,c,standard in.nc out.nc
or
cdo setcalendar,standard in.nc out.nc
It changes the calendar:gregorian to calendar:standard but ref time is still 1900:01:01 as shown in the pic 2 enter image description here Need help in this regard. I am using cdo, R, and python. How can I correct the ref time ?
Upvotes: 1
Views: 897
Reputation: 8107
you can set the reference time with
cdo setreftime,date in.nc out.nc
See this link for details in the online manual
Just to lastly mention that the reftime
should be arbitrary for most purposes. Usually one only needs to change the ref time if it is specified by a data protocol (i.e. you want to upload model output to a model intercomparison project and they specify that they want a specific reftime) - the fact that the reftime is not the first timeslice's date is usually not an issue, the dates will still be correct.
Upvotes: 1