source: trunk/procs/mth_decode.pro @ 203

Last change on this file since 203 was 203, checked in by pinsard, 14 years ago

remove trailing blanks

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1;+
2;
3; @categories
4; Calendar
5;
6; @version
7; $Id$
8;
9;-
10
11      mth = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'DJF', 'MAM', 'JJA', 'SON']
12      CASE STRMID(stddev_mth, 0, 2) OF
13         '01': strd = [1]
14         '02': strd = [2]
15         '03': strd = [3]
16         '04': strd = [4]
17         '05': strd = [5]
18         '06': strd = [6]
19         '07': strd = [7]
20         '08': strd = [8]
21         '09': strd = [9]
22         '10': strd = [10]
23         '11': strd = [11]
24         '12': strd = [12]
25         ELSE : CASE STRMID(stddev_mth, 0, 3) OF
26         'DJF': BEGIN & strd = [1, 2, 12] & ntxt = 'DJF' & END
27         'MAM': BEGIN & strd = [3, 4, 5] & ntxt = 'MAM' & END
28         'JJA': BEGIN & strd = [6, 7, 8] & ntxt = 'JJA' & END
29         'SON': BEGIN & strd = [9, 10, 11] & ntxt = 'SON' & END
30            ELSE: CASE STRMID(stddev_mth, 0, 6) OF
31               'JASOND' : BEGIN & strd = [7, 8, 9, 10, 11, 12] & ntxt = 'JASOND' & END
32               'JFMAMJ' : BEGIN & strd = [1, 2, 3, 4, 5, 6] & ntxt = 'JFMAMJ' & END
33            ELSE : BEGIN & strd = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] & ntxt = 'Annual' & END
34            ENDCASE
35         ENDCASE
36      ENDCASE
37
38      nmth = (size(strd))[1]
39      njpt = n_elements((lindgen(jpt))[0:*:12])
40      IF debug_w THEN print, '   nmth,njpt', nmth, njpt
41
42      idxm = lonarr(nmth, njpt)
43
44      FOR imth = 0, nmth-1 DO BEGIN
45         idxm[imth, *]= (lindgen(jpt))[strd[imth]-1:*:12]
46      ENDFOR
47
48      IF nmth EQ 1 THEN ntxt = mth[strd-1]
49
50      print, '    Warning: monthly computation and average for following period: ', ntxt
Note: See TracBrowser for help on using the repository browser.