[Thread Prev][Thread Next][Index]

[ferret_users] seasonal averages



I'm trying to compute averages in groups of 3 months: avg(jan,feb,mar),avg(apr,may,jun), etc

It seems to work, sortof. For example, the first avg = 4.11, but if you calculate the average by hand of 2+3.1+7 you get 4.03 not 4.11. The next group of 3 months is 11.9+36.9+77.8 and the average is 42.2 not 42.55
What am I missing?

Thanks,

Steve
use pre
show data
    currently SET data sets:
   1> ./pre.nc  (default)
name     title                             I         J         K         L
PRE Precipitation 1:720 1:360 ... 1:1200

*define axis/edges/t=1-jan-1901:31-dec-1901/npoints=`4` myaxis*
!-> define axis/edges/t=1-jan-1901:31-dec-1901/npoints=4 myaxis
*let pre2=pre[gt=myaxis@ave]*
*list/x=97.25/y=33.25 pre[l=1:12]*
            VARIABLE : Precipitation (mm/month)
            FILENAME : pre.nc
            SUBSET   : 12 points (TIME)
            LONGITUDE: 97.2E
            LATITUDE : 33.2N
                   97.25E
                   555
15-JAN-1901 /  1:   2.00
14-FEB-1901 /  2:   3.10
17-MAR-1901 /  3:   7.00
16-APR-1901 /  4:  11.90
16-MAY-1901 /  5:  36.90
16-JUN-1901 /  6:  77.80
16-JUL-1901 /  7:  75.60
16-AUG-1901 /  8:  57.20
15-SEP-1901 /  9:  64.00
16-OCT-1901 / 10:  22.70
15-NOV-1901 / 11:   3.90
16-DEC-1901 / 12:   1.90
*list/x=97.25/y=33.25 pre2*
            VARIABLE : PRE[GT=MYAXIS@AVE]
            FILENAME : pre.nc
            SUBSET   : 4 points (TIME)
            LONGITUDE: 97.2E
            LATITUDE : 33.2N
                  97.25E
                  555
15-FEB-1901 / 1:   4.11
17-MAY-1901 / 2:  42.55
16-AUG-1901 / 3:  65.54
15-NOV-1901 / 4:   9.52


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement