Project

General

Profile

Converting time from calendar = "360_day" to calendar = "standard"

Added by Ray Bell over 8 years ago

Hi,
Apologies if this has been asked before.
I am trying to do some wave modelling (wavewaveIII) with climate model data which has a '360 day calendar' causing the wave model to moan at me than the date of the file is not the date i'm givinig it.
Is there a way I can convert a netcdf file which has the 360 day calendar to a standard calendar e.g.
1957-04-01 03:00:00 / t=1780714800 (seconds since 1900-01-01 00:00:00) [360 day calendar]
goes to
1957-04-01 03:00:00 / t=1806548400 (seconds since 1900-01-01 00:00:00) [standard calendar]
Here t was calculated as days from 1957-04-01 03 to 1900-01-01 * (606024).
Cheers,
Ray


Replies (7)

RE: Converting time from calendar = "360_day" to calendar = "standard" - Added by Uwe Schulzweida over 8 years ago

It is only possible to overwrite the whole definition of the time axis:

cdo  setreftime,1900-01-01,0,1s  -settaxis,1957-04-01,3:00:00,1day  -setcalendar,standard ifile ofile
The order of the three operators is of significance.

Converting time from calendar = "proleptic_gregorian" to "standard" ruins units format - Added by Nikolaos Frouzakis about 8 years ago

Hello,

I have some WRF and MERRA files both in netcdf format. The WRF have calendar = "proleptic_gregorian" and the MERRA calendar = "standard". I editted the WRF to fit the calendar type of the MERRA files with the -setcalendar command as shown in the above reply. So far so good. The problem is that this also changed the units format from "day as %Y%m%d.%f" to "hours since 2007-01-01 00:00:00". I want to change the unit format back to "day as %Y%m%d.%f" or (even better) to "YYYY:MM:DD HH:MM:SS" but these formats appear to be not acceptable from the cdo command. So, how can I change the units to one of the formats above. Note that the data I want to manipulate are in 10 minutes increaments.

Thanks in advance,

Nikos.

RE: Converting time from calendar = "360_day" to calendar = "standard" - Added by Uwe Schulzweida about 8 years ago

The CDO operator setcalendar change the time axis to a relative format. Use this operator in combination with the CDO option -a to force
an absolute time axis format:

cdo -a setcalendar,standard ifile ofile

RE: Converting time from calendar = "360_day" to calendar = "standard" - Added by Andrea Galletti over 3 years ago

Hello, i have a problem similar to this one but at the same time i'm a complete novice at CDO.

my *.nc files have the issue of being in the calendar_360 format, while i would need them to be in a 365/366 format for my elaborations.

Also, my file is 30 years long at the moment, with daily values over several locations.

for my case, would the line -setcalendar,standard ifile ofile be enough or would i still need to add "day 366" in the (7-8) years where it's needed?
Moreover, how does this work exactly? does it add 5 values per year to my data record? if so, how are these data computed?

is there a set of instructions that would fit my purpose better? (i.e., transform my 30 years with 360 values per year in 30 years with 365-366 values per year)

thank you very much and sorry if my question is trivial or poorly posed (or both!)

regards,

Andrea

RE: Converting time from calendar = "360_day" to calendar = "standard" - Added by Uwe Schulzweida over 3 years ago

Hello Andrea,

There is no possibility to transfer data between different calendars in CDO, sorry.

Cheers,
Uwe

    (1-7/7)