Calculate hourly average, across 4 daily timesteps, across 29 years
Added by Chris Gilroy about 9 years ago
Hey guys, I have 01-01-1981 through 12-31-2010 in one file. Each date has 4 timesteps (00, 06, 12, 18) and also includes the 7 leapyears worth of data. I'm looking to take each 00z from the 29 years and average. 06z and average, etc.
I'm expecting the result to be 1464tdefs. t1=01-01-YYYY-00z (doesn't matter on the YYYY), t2=01-01-YYYY-06z ... t1463=12-31-YYYY-12z, t1464=12-31-YYYY-18z but I can't figure out a way to achieve this. I'm currently running yhouravg and it's slowly scrolling through every time-step, but I don't think this is going to ultimately do exactly what I'm looking for.
Replies (3)
RE: Calculate hourly average, across 4 daily timesteps, across 29 years - Added by Chris Gilroy about 9 years ago
Update, so it finally got done and this is what sinfo gives:
RefTime = 1980-12-31 18:00:00 Units = hours Calendar = proleptic_gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2011-01-01 00:00:00 2010-01-01 06:00:00 2010-01-01 12:00:00 2010-01-01 18:00:00 2010-01-02 00:00:00 2010-01-02 06:00:00 2010-01-02 12:00:00 2010-01-02 18:00:00 ... 2010-02-28 00:00:00 2010-02-28 06:00:00 2010-02-28 12:00:00 2010-02-28 18:00:00 2008-02-29 00:00:00 2008-02-29 06:00:00 2008-02-29 12:00:00 2008-02-29 18:00:00 2010-03-01 00:00:00 2010-03-01 06:00:00 2010-03-01 12:00:00 2010-03-01 18:00:00 ... 2010-12-29 00:00:00 2010-12-29 06:00:00 2010-12-29 12:00:00 2010-12-29 18:00:00 2010-12-30 00:00:00 2010-12-30 06:00:00 2010-12-30 12:00:00 2010-12-30 18:00:00 2010-12-31 00:00:00 2010-12-31 06:00:00 2010-12-31 12:00:00 2010-12-31 18:00:00 cdo sinfo: Processed 1 variable over 1464 timesteps ( 0.96s )
Which is definitely not how I expected it to produce.
Also, is there some sort of oddity with the way CDO produces the output file? g2ctl ifile >ofile shows tdef 4149 linear 00Z29feb2008 6hr?
RE: Calculate hourly average, across 4 daily timesteps, across 29 years - Added by Chris Gilroy about 9 years ago
Sorry (can't edit?) gradsdes outputs:
* Generated by CDO operator gradsdes * DSET ^work.grib2 DTYPE GRIB2 INDEX ^work.grib2.idx XDEF 720 LINEAR 0.000000 0.500000 YDEF 361 LINEAR -90.000000 0.500000 ZDEF 1 LEVELS 500 TDEF 1464 LINEAR 00:00Z01jan2011 1hr TITLE work.grib2 720x361 grid OPTIONS yrev UNDEF -9e+33 VARS 1 gh 0 99 Geopotential Height [gpm] ENDVARS
And if I run gribmap and then grads it starts at jan 1 2011 and d hg cannot contour?
RE: Calculate hourly average, across 4 daily timesteps, across 29 years - Added by Ralf Mueller almost 9 years ago
What did you actually call on the command line?