1 | ;+ |
---|
2 | ; |
---|
3 | ; @file_comments |
---|
4 | ; |
---|
5 | ; @categories |
---|
6 | ; test |
---|
7 | ; |
---|
8 | ; @keyword IMAGE |
---|
9 | ; |
---|
10 | ; @examples |
---|
11 | ; |
---|
12 | ; To run test with Levitus temperature on a regular 1x1 grid : |
---|
13 | ; IDL> @tst_initlev |
---|
14 | ; IDL> tst_pltt_zero |
---|
15 | ; |
---|
16 | ; @todo |
---|
17 | ; |
---|
18 | ; use routine in the name of images instead of hardcoded names |
---|
19 | ; |
---|
20 | ; @history |
---|
21 | ; |
---|
22 | ; - fplod 20130802T093208Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
23 | ; |
---|
24 | ; * creation from tst_pltt.pro |
---|
25 | ; to solve :: |
---|
26 | ; |
---|
27 | ; % L.96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro rev. 378: |
---|
28 | ; % Warning: constant filed, same value everywhere : 0.0000000! |
---|
29 | ; % READ: End of file encountered. Unit: 0, File: <stdin> |
---|
30 | ; % Execution halted at: REPORT 106 /Users/sflod/SAXO_DIR/SRC/Utilities/report.pro |
---|
31 | ; % DETERMINEMINMAX 96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro |
---|
32 | ; % PLTT 359 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro |
---|
33 | ; % STD_TS_T 71 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_t.pro |
---|
34 | ; % STD_TS_ALL 54 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_all.pro |
---|
35 | ; % $MAIN$ |
---|
36 | ; |
---|
37 | ; ask for batch session and use read statement when asking for next plot only in interactive mode |
---|
38 | ; |
---|
39 | ; @version |
---|
40 | ; $Id$ |
---|
41 | ; |
---|
42 | ;- |
---|
43 | PRO tst_pltt_zero, IMAGE=image |
---|
44 | ; |
---|
45 | compile_opt idl2, strictarrsubs |
---|
46 | ; |
---|
47 | @cm_4mesh |
---|
48 | @cm_4cal |
---|
49 | @cm_general |
---|
50 | ; |
---|
51 | ; figure 2: regular grid |
---|
52 | ; |
---|
53 | CASE jpi*key_stride[0]+jpj*key_stride[1] OF |
---|
54 | 180+148:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' |
---|
55 | 360+180:file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' |
---|
56 | 720+510:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' |
---|
57 | ENDCASE |
---|
58 | file = isafile(file, title = 'Where is '+file+' ?', /lookalldir) |
---|
59 | IF size(file, /type) NE 7 THEN stop |
---|
60 | ; |
---|
61 | dummy = '' |
---|
62 | cnt = 1 |
---|
63 | ; |
---|
64 | ; -1/1 xt plot |
---|
65 | ; |
---|
66 | IF key_onearth THEN domdef, 20, 380, -1, 1, 0, gdept[0] $ |
---|
67 | ELSE domdef, min(glamt), max(glamf), jpj/2-1, jpj/2+1, 0, gdept[0] |
---|
68 | ; |
---|
69 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
70 | zero_data = temp |
---|
71 | zero_data.arr = 0. |
---|
72 | |
---|
73 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
74 | help, jpt, time |
---|
75 | pltt, zero_data |
---|
76 | if keyword_set(image) then begin |
---|
77 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
78 | ENDIF ELSE BEGIN |
---|
79 | IF key_batch EQ 0 THEN BEGIN |
---|
80 | read, dummy, prompt = 'press stop for the next plot' |
---|
81 | ENDIF |
---|
82 | ENDELSE |
---|
83 | cnt = cnt + 1 |
---|
84 | ; |
---|
85 | pltt, zero_data, /nocontour |
---|
86 | if keyword_set(image) then begin |
---|
87 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
88 | ENDIF ELSE BEGIN |
---|
89 | IF key_batch EQ 0 THEN BEGIN |
---|
90 | read, dummy, prompt = 'press stop for the next plot' |
---|
91 | ENDIF |
---|
92 | ENDELSE |
---|
93 | cnt = cnt + 1 |
---|
94 | |
---|
95 | pltt, zero_data, /color_c |
---|
96 | if keyword_set(image) then begin |
---|
97 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
98 | ENDIF ELSE BEGIN |
---|
99 | IF key_batch EQ 0 THEN BEGIN |
---|
100 | read, dummy, prompt = 'press stop for the next plot' |
---|
101 | ENDIF |
---|
102 | ENDELSE |
---|
103 | cnt = cnt + 1 |
---|
104 | ; |
---|
105 | pltt, zero_data, /nofill |
---|
106 | if keyword_set(image) then begin |
---|
107 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
108 | ENDIF ELSE BEGIN |
---|
109 | IF key_batch EQ 0 THEN BEGIN |
---|
110 | read, dummy, prompt = 'press stop for the next plot' |
---|
111 | ENDIF |
---|
112 | ENDELSE |
---|
113 | cnt = cnt + 1 |
---|
114 | ; |
---|
115 | ; equatorial plot |
---|
116 | ; |
---|
117 | IF key_onearth THEN BEGIN |
---|
118 | a = abs(gphit[0, *]) |
---|
119 | yind = where(a EQ min(a)) |
---|
120 | domdef, 20, 380, yind[0], yind[n_elements(yind)-1] $ |
---|
121 | , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex |
---|
122 | ENDIF ELSE BEGIN |
---|
123 | domdef, min(glamt), max(glamf), jpj/2, jpj/2 $ |
---|
124 | , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex |
---|
125 | ENDELSE |
---|
126 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
127 | zero_data = temp |
---|
128 | zero_data.arr = 0. |
---|
129 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
130 | pltt, zero_data |
---|
131 | if keyword_set(image) then begin |
---|
132 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
133 | ENDIF ELSE BEGIN |
---|
134 | IF key_batch EQ 0 THEN BEGIN |
---|
135 | read, dummy, prompt = 'press stop for the next plot' |
---|
136 | ENDIF |
---|
137 | ENDELSE |
---|
138 | cnt = cnt + 1 |
---|
139 | ; |
---|
140 | ; yt plot along the column that contain the largest latitude |
---|
141 | ; |
---|
142 | IF key_onearth THEN BEGIN |
---|
143 | ind = where(gphit EQ max(gphit)) |
---|
144 | ind = ind[0] MOD jpi |
---|
145 | domdef, ind, ind, -90, 90, gdept[0], gdept[0], gridtype = 'T', /xindex |
---|
146 | ENDIF ELSE BEGIN |
---|
147 | domdef, jpi/2, jpi/2, min(gphit), max(gphif), gdept[0], gdept[0], gridtype = 'T', /xindex |
---|
148 | ENDELSE |
---|
149 | |
---|
150 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
151 | zero_data = temp |
---|
152 | zero_data.arr = 0. |
---|
153 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
154 | pltt, zero_data |
---|
155 | |
---|
156 | if keyword_set(image) then begin |
---|
157 | saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
158 | ENDIF |
---|
159 | cnt = cnt + 1 |
---|
160 | |
---|
161 | end |
---|