[Thread Prev][Thread Next][Index]
Re: extracting certain months from multi-year monthly data without NANvalue
Hi Murat,
Could this be a job for the COMPRESSL function? (see user guide)
define axis/t=15-JAN-1982:15-DEC-1993:1/units=months tax
let bad_seasonal = compressl(IF MOD(T[gt=tax],12) LT 3 THEN T[gt=tax])
! I've used T as a dummy variable here
list bad_seasonal
1 / 1: 972.
2 / 2: 973.
3 / 3: 974.
4 / 4: 984.
5 / 5: 985.
6 / 6: 986.
...
31 / 31: 1092.
32 / 32: 1093.
33 / 33: 1094.
34 / 34: 1104.
35 / 35: 1105.
36 / 36: 1106.
37 / 37: ....
38 / 38: ....
39 / 39: ....
where we see that COMPRESSL has packed the "good" values (JFM) into the
first 36 slots. You could then for example
list list bad_seasonal[l=1:36@ave]
to get the JFM average, but I'm not sure what other calculations you
might have in mind.
Hope this helps,
Mick
|____Mick.Spillane@noaa.gov____|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement