[Thread Prev][Thread Next][Index]

Re: annual average from monthly mean for precise 365-day years.



Hi Wei,

Your methods 3 and 4 give differing answers presumably (I havn't rerun your
script lines) because for the even integer argument 12 in "l=@sbx:12" Ferret
actually extends the smoothing window width to 13 and gives a weight of 0.5
to each of the end points.  This is explained in the Users Guide description
of @SBX -- it is to avoid "shifting" the data through a non-symmetrical
smoothing window.

When you examine carefully what the :12 stride is doing it is a bit more
complex than you might at first think. If "*" are points on axis tax and "|"
represent the boundaries between grid cells

        11  12  13  14  15  16  17  18  19  20  21  22  23  24  25
  tax: | * | * | * | * | * | * | * | * | * | * | * | * | * | * | * |
tax 1:big:12     X                       |                       X

you see that the cell boundaries on the 1:big:12 axis actually split cell 19
from tax in half.

The best/right way to perform annual averaging is to define the desired
result axis so its cell boundaries exactly align with the cells of the source
axis. Your Method 2 looks like this approach. I have modified your Method 2
just slightly and plotted it using the V5.3 PLOT/STEP style to illustrate

     define axis/edges/t=1:25:1/unit=months tax
     let newtaux = T[GT=tax]
     plot/step newtaux
     define axis/edges/t=1:25:12/UNITS=months tann
     let tauxx=newtaux[gt=tann]
     plot/step/over tauxx

btw: Ferret V5.3 includes support for non-Gregorian axes, such as constant
365 day years.

    - steve

========================

Wei Cheng wrote:

> Hi Steve,
>
> I found a message between you and Gary Strand in the mail archive in 1999
> which suggests that this question might be brought to you directly.
> I am analyzing the NCAR CCM3 output which treats every year as precisely
> 365 day. The task seems to be simple enough: get annual averages from
> monthly means. I tried the following ways:
>
> ! method 1
> define axis/T="16-jan-1900":"16-dec-2000":30.44/units=days tax
> LET newtaux = stresx[GT=tax@asn]
> DEFINE AXIS/T="1-jul-1900":"1-jul-2000":365.25/UNITS=days tann
> let tauxx=newtaux[gt=tann@ave]
>
> ! method 2
> define axis/edges/t=1:1212:1/unit=months tax
> let newtaux = stresx[GT=tax@asn]
> define axis/edges/t=1:1212:12/UNITS=months tann
> let tauxx=newtaux[gt=tann@ave]
>
> ! method 3
> define axis/edges/t=1:1212:1/unit=months tax
> LET newtaux = stresx[GT=tax@asn]
> let tauxx=newtaux[l=1:1212:12@ave]
>
> ! method 4
> define axis/edges/t=1:1212:1/unit=months tax
> LET newtaux = stresx[GT=tax@asn]
> let a=newtaux[l=@sbx:12]
> let tauxx=a[l=7:1207:12]
>
> Each method seems to give me a different answer. I am especially
> puzzled by why there are differences between method 3 and 4. And,
> why, say, var[l=1:36:12@ave] only gives two (instead of three)
> non-bad values.
>
> I will appreciate any suggestions from you.
>
> Wei
>
> __________________________________________________
>  Wei Cheng
>  School of Oceanography, University of Washington
>  Campus Box 357940, Seattle, WA 98195
>  Tel: (206) 543-0686  Fax: (206) 685-3354
> __________________________________________________

--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744

GIF image


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement