Project

General

Profile

splitseas

Added by Lili Xia about 8 years ago

Dear all,

Does anyone know how cdo read the time axis from a nc file?

I am currently using splitseas to split a monthly file to seasonal files. At the beginning, I just simply used "cdo splitseas input.nc output". The code splits the file into DJF, MAM, JJA and SON.
And later, very luckily, we found our seasonal files are one month off (instead of DJF, MAM, JJA and SON, they are NDJ, FMA,MJJ,ASO). The season is that the monthly output from CESM labeled the variable "time” one month ahead.
Here is some information from the first monthly file:

double time(time) ;
time:long_name = "time" ;
time:units = "days since 2004-01-01 00:00:00" ;
time:calendar = "noleap" ;
time:bounds = "time_bnds" ;
data:
time = 31 ;
date = 20040201 ;
time_bnds =
0, 31 ;

We have adjusted the time axis using "cdo settunits,days -settaxis,2004-01-01,00:00:00,1month input.nc output1.nc". And then the splitseas works fine.
We just want to know where we can find info about how splitseas read the time axis? Also, we are wondering whether there are other groups having the same problem? Or maybe didn't notice there could be such a mistake?

We have attached a one year test file here.

Best Regards,
Lili


Replies (1)

RE: splitseas - Added by Uwe Schulzweida about 8 years ago

Dear Lili,

Thanks for your post! CDO is using only the verification time. Here is the result of CDO sinfon of your dataset:

   File format : NetCDF2
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter ID
     1 : unknown  CAM      instant       1   1     55296   1  F32  : -1            
   Grid coordinates :
     1 : lonlat                   : points=55296 (288x192)
                              lon : 0 to 358.75 by 1.25 degrees_east  circular
                              lat : -90 to 90 by 0.942408 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  12 steps
     RefTime =  2004-01-01 00:00:00  Units = days  Calendar = 365_day  Bounds = true
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2004-02-01 00:00:00  2004-03-01 00:00:00  2004-04-01 00:00:00  2004-05-01 00:00:00
  2004-06-01 00:00:00  2004-07-01 00:00:00  2004-08-01 00:00:00  2004-09-01 00:00:00
  2004-10-01 00:00:00  2004-11-01 00:00:00  2004-12-01 00:00:00  2005-01-01 00:00:00

The time bounds are ignored in CDO. This will give wrong results because the true months are not identified correctly. For my point of few the verification time is coded wrong in the file because the interpretation is misleading in this case. On the other hand CDO could double check the month from the time bounds and give at least a warning message if it differ from the verification time. I will implement this in the next CDO release!

Cheers,
Uwe

    (1-1/1)