[Thread Prev][Thread Next][Index]

monthly averages from daily

I have daily NetCDF data with a time dimension defined as "hours since...". The time variable
thus goes in  increments of 24 hours. How do I compute monthly averages from these
daily data.
I tried the following but it doesn't give the expected results:

   use tmax
   set region/x=-100/y=40
   def axis/t0=01-jan-1979/t="01-JAN-1979":"31-dec-1979"/npoints=12 mtax
   def grid/t=mtax mgrid
   let mtmax = tmax[gt=mgrid@ave
   list mtmax
list mtmax
             DATA SET : Daily NCEP/DOE Reanalysis 2
             FILENAME : tmax.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 99.4W(-99.4)
             LATITUDE : 41N
             Z (m)    : 2
 01-JAN-1979 /  1:  262.8
 03-FEB-1979 /  2:  268.3
 31-DEC-1979 / 12:  279.0

But if I compute the ave for just january 1979 I get this:

 yes? list tmax[t=1-jan-1979:31-jan-1979@ave]
             TIME     : 01-JAN-1979 00:00 to 31-JAN-1979 00:00 (averaged)

This calendar business is very confusing! I've looked at many examples in the archives but still am confused about this.
For instance, does FERRET handle leap years so that the number of days in FEB is correct?
  Steve Knox
  Natural Resource Ecology Laboratory
  Colorado State University
  Fort Collins, CO 80523-1499

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement