Project

General

Profile

convert daily to monthly

Added by mubashar dogar almost 12 years ago

I'm converting a daily file in monthly with cdo cdo monavg nswrs.sfc.gauss.1948.nc mon.nswrs.sfc.gauss.1948.nc Now when I opened the monthly file in GrADS it has correct 12 monthly values but wrong time convention. It is displaying time in GrADS as following

ga-> set t 1
Time values set: 1948:1:31:0 1948:1:31:0
ga-> set t 2
Time values set: 1948:3:2:0 1948:3:2:0
ga-> set t 3
Time values set: 1948:3:31:0 1948:3:31:0
ga-> set t 4
Time values set: 1948:5:1:0 1948:5:1:0

You could try cdo monthavg command on the attached daily file and then open it in GrADS to see the time problem. Please suggest me how can I handle this issue? I am using cdo/1.5.4 version

Thanks,

Mubashar


Replies (2)

RE: convert daily to monthly - Added by Jaison-Thomas Ambadan almost 12 years ago

Hi,

I'm not sure if this is a CDO problem. My guess is, it is due to the GrADS handling of the calender (366 days, leap year), may be due to different conventions?, I don't know. Anyway, you can "hard-code" the time-stamps and units with CDO after the averaging process:

cdo -settaxis,1948-01-01,00:00:00,1month -monavg nswrs.sfc.gauss.1948.nc monavg.nc

Now it will work in GrADS!

Cheers,
J.

RE: convert daily to monthly - Added by Uwe Schulzweida almost 12 years ago

As far as I know GrADS needs a constant time increment. A workaround is to set the day of month less than 29, e.g. 15:

cdo setday,15 -monavg nswrs.sfc.gauss.1948.nc  result.nc

Regards,
Uwe

    (1-2/2)