[Thread Prev][Thread Next][Index]

extracting certain months from multi-year monthly data without NANvalue



Dear Ferret users,

Although this question asked before, I could not manage to find 
the solution from the mail archieve replies.  

I have below one dimensional 12 years time series,

yes? show grid pc1
    GRID (G001)
 name       axis              # pts   start                end
 XAX       X                    1 r   1                    1
 normal    Y
 normal    Z
 TAX       TIME               144 r   15-JAN-1982 00:00    15-DEC-1993
11:21


I want to obtain 36(12*3) value by extracting only the certain months
(Jan,Feb,Mar) from all the years. I could find a dirty solution, however
this has 144 points with a NaN value for unwanted months as shown below,
with the command

define axis/t=15-JAN-1982:15-DEC-1993:1/units=months tax
let bad_seasonal = IF MOD(T[gt=tax],12) LT 3 THEN pc1[gt=tax] else
(-1E+34)

 15-JAN-1982 /   1:  0.587
 14-FEB-1982 /   2:  0.681
 16-MAR-1982 /   3:  0.267
 16-APR-1982 /   4:   ....
 16-MAY-1982 /   5:   ....
 16-JUN-1982 /   6:   ....
 16-JUL-1982 /   7:   ....
 16-AUG-1982 /   8:   ....
 15-SEP-1982 /   9:   ....
 15-OCT-1982 /  10:   ....
 15-NOV-1982 /  11:   ....
 15-DEC-1982 /  12:   ....
 15-JAN-1983 /  13:  3.053
 14-FEB-1983 /  14:  0.701
 17-MAR-1983 /  15:  0.301
 16-APR-1983 /  16:   ....
 16-MAY-1983 /  17:   ....
 16-JUN-1983 /  18:   ....
 16-JUL-1983 /  19:   ....
 16-AUG-1983 /  20:   ....
 15-SEP-1983 /  21:   ....
 16-OCT-1983 /  22:   ....
 15-NOV-1983 /  23:   ....
 16-DEC-1983 /  24:   ....
 15-JAN-1984 /  25:  0.778
 14-FEB-1984 /  26:  0.242
 16-MAR-1984 /  27: -0.971
 .
 .
 .
 .

Could you please help, how can I extract certain months from multi-year
monthly data without NaN value for unwanted values.

I guess that the correct solution must be obtained by using modulos
axis, however I couldnt reach my goal.

Thanks in advance
Murat
-- 

               \ ||| /
               ( o o )
  __________oOO__(_)__OOo___________________________________________
  |________|_______|________|________|________|________|_______|____
  Murat Gunduz |________|________|_______|________|________|________
  Orta Dogu Teknik Universitesi, Deniz Bilimleri Enstitusu ______|__
  Institute of Marine Sciences, Middle East Technical University____
  P.K. 28 Erdemli - Mersin 33731 Turkey_______|______|_______|______
  Tel: +90-324-521-2406 Fax: +90-324-521-2327___|________|_______|__
  e-mail:  gunduz@ims.metu.edu.tr, e125434@metu.edu.tr_______|______
  ___________________________________________________________|______
                || ||
               ooO Ooo



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement