Hi Wim-Paul -
For 5-day data, taking the average of values that fall within a given
month would introduce some aliasing.
Perhaps a better way to do this would be to interpolate the data to
daily, then smooth with a monthly filter, then subsample at the 15th
day of each month:
define axis/t=tstart:tend:1/t0=.../unit=day tday ! choose tstart,tend
as the time limits of the data
let tempfl = temp[gt=tday] ! interpolate (linearly by default)
let tempflsm = tempfl[l=@spz:31] ! a filter with half-power point of
about 37 days
define
axis/t=15-monthstart-yrstart:15-monthend:yrend:1/t0=.../unit=month
tmon ! will get the warning below
! *** NOTE: /UNIT=MONTHS is ambiguous ... using 1/12 of 365.2425 days
let tempmon=tempflsm[gt=tmon] ! subsample to monthly
Billy K
On Dec 22, 2006, at 7:21 AM, Wim-Paul Breugem wrote:
Dear ferret users,
I have a dataset of 5-day means. The corresponding dates on
a standard calender are given for the third day of the 5-day interval.
As an example I show you here a subset of the data:
yes? list/i=1/j=1/k=1/l=1:20 temp
03-JAN-1958 12 / 1: 19.04
08-JAN-1958 12 / 2: 20.35
13-JAN-1958 12 / 3: 21.18
18-JAN-1958 12 / 4: 21.57
23-JAN-1958 12 / 5: 21.53
28-JAN-1958 12 / 6: 21.75
02-FEB-1958 12 / 7: 21.94
07-FEB-1958 12 / 8: 22.03
12-FEB-1958 12 / 9: 22.39
17-FEB-1958 12 / 10: 22.48
22-FEB-1958 12 / 11: 22.43
27-FEB-1958 12 / 12: 22.63
04-MAR-1958 12 / 13: 22.92
09-MAR-1958 12 / 14: 23.00
14-MAR-1958 12 / 15: 22.98
19-MAR-1958 12 / 16: 22.99
24-MAR-1958 12 / 17: 23.01
29-MAR-1958 12 / 18: 23.08
03-APR-1958 12 / 19: 23.10
08-APR-1958 12 / 20: 23.15
Does anybody know how to calculate from this the corresponding monthly
means? Thus, how do I obtain the monthly means for Jan 1958, Feb
1958, etc.?
Note that the 5-day means are usually not aligned with the edges of the
months, so the 5-day means should not all have the same weight in the
monthly averaging.
I'm looking forward to a solution for this problem!
With best regards,
Wim-Paul Breugem
--Wim-Paul Breugem KNMI, Oceanographic Research Dep.
P.O. Box 201, 3730 AE De Bilt
The Netherlands
tel./fax: +31-30-2206700/2202570
homepage: http://www.knmi.nl/~breugem
-----------------------------------------------------------------------------------------------------------------------------------
Zie ook/see also: http://www.knmi.nl/maildisclaimer.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA
william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/