[Thread Prev][Thread Next][Index]
Re: annual average from monthly mean for precise 365-day years.
Hi Wei,
I'm not sure what problem you are describing. Here is an example of averaging 24
months of data into 2 annual averages:
/export/home/ja3/hankin/tmp> ferret
NOAA/PMEL TMAP
Program FERRET
Version 5.22 - 07/27/00
17-Mar-01 14:03
yes? define axis/t=1-jan-1980:1-jan-1982/npoints=24/edges t24months
yes? let my_var = T[gt=t24months]
yes? define axis/t=1-jan-1980:1-jan-1982/npoints=2/edges t2years
yes? list my_var[gt=t2years@ave]
T[GT=T24MONTHS]
regrid: 8772 hour on T@AVE
JUL-1980 / 1: 696546.
JUL-1981 / 2: 705318.
Will this approach work for you?
- steve
P.S. Note that to simplify the example I have used equal-length months. See Ref
Sec4.2. DEFINE AXIS and the FAQ at
http://ferret.wrc.noaa.gov/Ferret/FAQ/analysis/annual_from_monthly.html for details
on creating exact calendar months and years.
==============
Wei Cheng wrote:
> > 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
>
> Hi, Steve,
>
> Thanks very much! Still, I have one last problem:
>
> In your above example, if number "25" is replaced by "24",
> and, if line
>
> "let tauxx=newtaux[gt=tann]"
>
> is replaced by
>
> "let tauxx=newtaux[gt=tann@ave]"
>
> By "list tauxx", we can see that the last point in tauxx is a bad value.
> This must be due to using @ave, plus the fact that now the total data
> point is an even number (24 instead of 25).
>
> How can I get the last point in tauxx back (it should still exist)?
> In climate studies, number of months is even for multiple whole
> year's data (how unlucky it is that each year has 12 months). But
> lucky, we have you!
>
> Thanks again.
>
> Wei
--
| NOAA/PMEL | ph. (206) 526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744
| Seattle, WA 98115-0070 | hankin@pmel.noaa.gov
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement