Project

General

Profile

setreftime and settaxis for monthly mean time output

Added by judy hertz over 7 years ago

Greetings!

I have a yearly file with 12 monthly timesteps. It has a proleptic calendar. I want the command ncdump -t -v time $file output to reflect a standard monthly mean date and time:

data:

 time = "1980-01-16 12", "1980-02-15 12", "1980-03-16 12", "1980-04-16", 
    "1980-05-16 12", "1980-06-16", "1980-07-16 12", "1980-08-16 12", 
    "1980-09-16", "1980-10-16 12", "1980-11-16", "1980-12-16 12" ;

Using this command:

cdo setreftime,1980-01-01,0,1s -settaxis,1980-01-16,12:00:00,1mon -setcalendar,standard infile outfile

I can get to this:

data:

 time = "1980-01-16 12", "1980-02-16 12", "1980-03-16 12", "1980-04-16 12", 
    "1980-05-16 12", "1980-06-16 12", "1980-07-16 12", "1980-08-16 12", 
    "1980-09-16 12", "1980-10-16 12", "1980-11-16 12", "1980-12-16 12" ;

Am I using setreftime or settaxis incorrectly, or is there a way to get to my example without disassembling, resetting the months, and reassembling the file?

thanks in advance...