1 | load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" |
---|
2 | load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" |
---|
3 | load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" |
---|
4 | |
---|
5 | ;*************************************************** |
---|
6 | ; load .ncl.config or .ncl.config.default |
---|
7 | ;*************************************************** |
---|
8 | |
---|
9 | function which_script() |
---|
10 | local script |
---|
11 | begin |
---|
12 | script="profiles" |
---|
13 | return(script) |
---|
14 | end |
---|
15 | |
---|
16 | if (isfilepresent("$PALM_BIN/../../.ncl.config")) then |
---|
17 | loadscript("$PALM_BIN/../../.ncl.config") |
---|
18 | else |
---|
19 | if (isfilepresent("$PALM_BIN/NCL/.ncl.config.default")) then |
---|
20 | loadscript( "$PALM_BIN/NCL/.ncl.config.default") |
---|
21 | else |
---|
22 | palm_bin_path = getenv("PALM_BIN") |
---|
23 | print(" ") |
---|
24 | print("Neither the personal configuration file '.ncl.config' exists in") |
---|
25 | print("~/palm/current_version") |
---|
26 | print("nor the default configuration file '.ncl.config.default' "+\ |
---|
27 | "exists in") |
---|
28 | print(palm_bin_path + "/NCL") |
---|
29 | print(" ") |
---|
30 | exit |
---|
31 | end if |
---|
32 | end if |
---|
33 | |
---|
34 | |
---|
35 | begin |
---|
36 | |
---|
37 | ;*************************************************** |
---|
38 | ; Retrieving the NCL version used |
---|
39 | ;*************************************************** |
---|
40 | |
---|
41 | ncl_version_ch = systemfunc("ncl -V") |
---|
42 | ncl_version = stringtofloat(ncl_version_ch) |
---|
43 | |
---|
44 | ;*************************************************** |
---|
45 | ; Retrieving the double quote character |
---|
46 | ;*************************************************** |
---|
47 | |
---|
48 | dq=str_get_dq() |
---|
49 | |
---|
50 | ;*************************************************** |
---|
51 | ; set up default parameter values and strings |
---|
52 | ;*************************************************** |
---|
53 | |
---|
54 | if (no_files .LT. 1 .OR. no_files .GT. 6) then |
---|
55 | print(" ") |
---|
56 | print("Assign 'no_files' between 1 and 6") |
---|
57 | print(" ") |
---|
58 | exit |
---|
59 | end if |
---|
60 | |
---|
61 | file_in = new(no_files,string) |
---|
62 | file_in_1 = new(no_files,logical) |
---|
63 | start_f_t = new(no_files,integer) |
---|
64 | end_f_t = new(no_files,integer) |
---|
65 | |
---|
66 | if (file_1 .EQ. "File in") then |
---|
67 | print(" ") |
---|
68 | print("Declare 1st input file 'file_1=' in '.ncl.config' or prompt") |
---|
69 | print(" ") |
---|
70 | exit |
---|
71 | else |
---|
72 | file_in(0) = file_1 |
---|
73 | end if |
---|
74 | file_in_1(0) = False |
---|
75 | if (isStrSubset(file_in(0), ".nc"))then |
---|
76 | start_f = -2 |
---|
77 | end_f = -2 |
---|
78 | file_in_1(0) = True |
---|
79 | end if |
---|
80 | if (start_f .EQ. -1)then |
---|
81 | print(" ") |
---|
82 | print("'start_f' must be one of the cyclic numbers (at least 0) "+\ |
---|
83 | "of your input file(s)") |
---|
84 | print(" ") |
---|
85 | exit |
---|
86 | end if |
---|
87 | if (end_f .EQ. -1)then |
---|
88 | print(" ") |
---|
89 | print("'end_f' must be one of the cyclic numbers (at least 0) of "+\ |
---|
90 | "your input file(s)") |
---|
91 | print(" ") |
---|
92 | exit |
---|
93 | end if |
---|
94 | start_f_t(0) = start_f |
---|
95 | end_f_t(0) = end_f |
---|
96 | |
---|
97 | if (no_files .GT. 1) then |
---|
98 | if (file_2 .EQ. "File in") then |
---|
99 | print(" ") |
---|
100 | print("Declare 2nd input file 'file_2=' in '.ncl.config' or prompt") |
---|
101 | print(" ") |
---|
102 | exit |
---|
103 | else |
---|
104 | file_in(1) = file_2 |
---|
105 | end if |
---|
106 | file_in_1(1) = False |
---|
107 | if (isStrSubset(file_in(1), ".nc"))then |
---|
108 | start_f_2 = -2 |
---|
109 | end_f_2 = -2 |
---|
110 | file_in_1(1) = True |
---|
111 | end if |
---|
112 | if (start_f_2 .EQ. -1)then |
---|
113 | print(" ") |
---|
114 | print("'start_f_2' must be one of the cyclic numbers (at least 0) "+\ |
---|
115 | "of your input file(s)") |
---|
116 | print(" ") |
---|
117 | exit |
---|
118 | end if |
---|
119 | if (end_f_2 .EQ. -1)then |
---|
120 | print(" ") |
---|
121 | print("'end_f_2' must be one of the cyclic numbers (at least 0) "+\ |
---|
122 | "of your input file(s)") |
---|
123 | print(" ") |
---|
124 | exit |
---|
125 | end if |
---|
126 | start_f_t(1) = start_f_2 |
---|
127 | end_f_t(1) = end_f_2 |
---|
128 | end if |
---|
129 | |
---|
130 | if (no_files .GT. 2) then |
---|
131 | if (file_3 .EQ. "File in") then |
---|
132 | print(" ") |
---|
133 | print("Declare 3rd input file 'file_3=' in '.ncl.config' or prompt") |
---|
134 | print(" ") |
---|
135 | exit |
---|
136 | else |
---|
137 | file_in(2) = file_3 |
---|
138 | end if |
---|
139 | file_in_1(2) = False |
---|
140 | if (isStrSubset(file_in(2), ".nc"))then |
---|
141 | start_f_3 = -2 |
---|
142 | end_f_3 = -2 |
---|
143 | file_in_1(2) = True |
---|
144 | end if |
---|
145 | if (start_f_3 .EQ. -1)then |
---|
146 | print(" ") |
---|
147 | print("'start_f_3' must be one of the cyclic numbers (at least 0) "+\ |
---|
148 | "of your input file(s)") |
---|
149 | print(" ") |
---|
150 | exit |
---|
151 | end if |
---|
152 | if (end_f_3 .EQ. -1)then |
---|
153 | print(" ") |
---|
154 | print("'end_f_3' must be one of the cyclic numbers (at least 0) "+\ |
---|
155 | "of your input file(s)") |
---|
156 | print(" ") |
---|
157 | exit |
---|
158 | end if |
---|
159 | start_f_t(2) = start_f_3 |
---|
160 | end_f_t(2) = end_f_3 |
---|
161 | end if |
---|
162 | |
---|
163 | if (no_files .GT. 3) then |
---|
164 | if (file_4 .EQ. "File in") then |
---|
165 | print(" ") |
---|
166 | print("Declare 4th input file 'file_4=' in '.ncl.config' or prompt") |
---|
167 | print(" ") |
---|
168 | exit |
---|
169 | else |
---|
170 | file_in(3) = file_4 |
---|
171 | end if |
---|
172 | file_in_1(3) = False |
---|
173 | if (isStrSubset(file_in(3), ".nc"))then |
---|
174 | start_f_4 = -2 |
---|
175 | end_f_4 = -2 |
---|
176 | file_in_1(3) = True |
---|
177 | end if |
---|
178 | if (start_f_4 .EQ. -1)then |
---|
179 | print(" ") |
---|
180 | print("'start_f_4' must be one of the cyclic numbers (at least 0) "+\ |
---|
181 | "of your input file(s)") |
---|
182 | print(" ") |
---|
183 | exit |
---|
184 | end if |
---|
185 | if (end_f_4 .EQ. -1)then |
---|
186 | print(" ") |
---|
187 | print("'end_f_4' must be one of the cyclic numbers (at least 0) "+\ |
---|
188 | "of your input file(s)") |
---|
189 | print(" ") |
---|
190 | exit |
---|
191 | end if |
---|
192 | start_f_t(3) = start_f_4 |
---|
193 | end_f_t(3) = end_f_4 |
---|
194 | end if |
---|
195 | |
---|
196 | if (no_files .GT. 4) then |
---|
197 | if (file_5 .EQ. "File in") then |
---|
198 | print(" ") |
---|
199 | print("Declare 5th input file 'file_5=' in '.ncl.config' or prompt") |
---|
200 | print(" ") |
---|
201 | exit |
---|
202 | else |
---|
203 | file_in(4) = file_5 |
---|
204 | end if |
---|
205 | file_in_1(4) = False |
---|
206 | if (isStrSubset(file_in(4), ".nc"))then |
---|
207 | start_f_5 = -2 |
---|
208 | end_f_5 = -2 |
---|
209 | file_in_1(4) = True |
---|
210 | end if |
---|
211 | if (start_f_5 .EQ. -1)then |
---|
212 | print(" ") |
---|
213 | print("'start_f_5' must be one of the cyclic numbers (at least 0) "+\ |
---|
214 | "of your input file(s)") |
---|
215 | print(" ") |
---|
216 | exit |
---|
217 | end if |
---|
218 | if (end_f_5 .EQ. -1)then |
---|
219 | print(" ") |
---|
220 | print("'end_f_5' must be one of the cyclic numbers (at least 0) "+\ |
---|
221 | "of your input file(s)") |
---|
222 | print(" ") |
---|
223 | exit |
---|
224 | end if |
---|
225 | start_f_t(4) = start_f_5 |
---|
226 | end_f_t(4) = end_f_5 |
---|
227 | end if |
---|
228 | |
---|
229 | if (no_files .GT. 5) then |
---|
230 | if (file_6 .EQ. "File in") then |
---|
231 | print(" ") |
---|
232 | print("Declare 6th input file 'file_6=' in '.ncl.config' or prompt") |
---|
233 | print(" ") |
---|
234 | exit |
---|
235 | else |
---|
236 | file_in(5) = file_6 |
---|
237 | end if |
---|
238 | file_in_1(5) = False |
---|
239 | if (isStrSubset(file_in(5), ".nc"))then |
---|
240 | start_f_6 = -2 |
---|
241 | end_f_6 = -2 |
---|
242 | file_in_1(5) = True |
---|
243 | end if |
---|
244 | if (start_f_6 .EQ. -1)then |
---|
245 | print(" ") |
---|
246 | print("'start_f_6' must be one of the cyclic numbers (at least 0) "+\ |
---|
247 | "of your input file(s)") |
---|
248 | print(" ") |
---|
249 | exit |
---|
250 | end if |
---|
251 | if (end_f_6 .EQ. -1)then |
---|
252 | print(" ") |
---|
253 | print("'end_f_6' must be one of the cyclic numbers (at least 0) "+\ |
---|
254 | "of your input file(s)") |
---|
255 | print(" ") |
---|
256 | exit |
---|
257 | end if |
---|
258 | start_f_t(5) = start_f_6 |
---|
259 | end_f_t(5) = end_f_6 |
---|
260 | end if |
---|
261 | |
---|
262 | |
---|
263 | if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. \ |
---|
264 | format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. \ |
---|
265 | format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \ |
---|
266 | format_out .NE. "png")then |
---|
267 | print(" ") |
---|
268 | print("'format_out = "+format_out+"' is invalid and set to'x11'") |
---|
269 | print(" ") |
---|
270 | format_out="x11" |
---|
271 | end if |
---|
272 | |
---|
273 | if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then |
---|
274 | print(" ") |
---|
275 | print("Output of png files not available") |
---|
276 | print("png output is avaiable with NCL version 5.2.0 and higher ") |
---|
277 | print("NCL version used: " + ncl_version_ch) |
---|
278 | print(" ") |
---|
279 | exit |
---|
280 | end if |
---|
281 | |
---|
282 | if (over .NE. 0 .AND. over .NE. 1) then |
---|
283 | print(" ") |
---|
284 | print("'over'= "+over+" is invalid and set to 0") |
---|
285 | print(" ") |
---|
286 | over = 0 |
---|
287 | end if |
---|
288 | if (no_files .GT. 1) then |
---|
289 | over = 0 |
---|
290 | print(" ") |
---|
291 | print("If you have more than one input file - you cannot overlay "+\ |
---|
292 | "variables: over is set to 0") |
---|
293 | print(" ") |
---|
294 | end if |
---|
295 | |
---|
296 | ;************************************************************************ |
---|
297 | ; check if cross_profiles is defined in file_1 |
---|
298 | ;************************************************************************ |
---|
299 | |
---|
300 | if (isStrSubset(file_in(0), ".nc")) then |
---|
301 | firstfile=addfile(file_1,"r") |
---|
302 | else |
---|
303 | firstfile=addfile(file_in(0) + "." + start_f + ".nc","r") |
---|
304 | end if |
---|
305 | |
---|
306 | cross_check=isatt(firstfile,"cross_profiles") |
---|
307 | |
---|
308 | if (var .EQ. "all") then |
---|
309 | VAR_LIST = firstfile@VAR_LIST |
---|
310 | no_plots = str_fields_count(VAR_LIST, ";") |
---|
311 | else |
---|
312 | no_plots = str_fields_count(var, ",") |
---|
313 | end if |
---|
314 | |
---|
315 | if ((.not. cross_check) .AND. (var .EQ. ",cross_profiles,")) then |
---|
316 | var="all" |
---|
317 | end if |
---|
318 | |
---|
319 | wks_gsn_log = True |
---|
320 | |
---|
321 | ;************************************************************************ |
---|
322 | ; check if cross_profiles can be used |
---|
323 | ;************************************************************************ |
---|
324 | |
---|
325 | if ((var .EQ. ",cross_profiles,") .AND. cross_check .AND. (over .EQ. 0) .AND. (no_files .LT. 2)) then |
---|
326 | c_var_log = 1 |
---|
327 | else |
---|
328 | c_var_log = 0 |
---|
329 | end if |
---|
330 | |
---|
331 | if ((no_rows .EQ. -1) .AND. isatt(firstfile,"no_rows")) then |
---|
332 | no_rows = firstfile@no_rows |
---|
333 | else if ((no_rows .EQ. -1) .AND. .not. isatt(firstfile,"no_rows")) then |
---|
334 | no_rows = 3 |
---|
335 | end if |
---|
336 | end if |
---|
337 | |
---|
338 | if ((no_columns .EQ. -1) .AND. isatt(firstfile,"no_columns")) then |
---|
339 | no_columns = firstfile@no_columns |
---|
340 | else if ((no_columns .EQ. -1) .AND. .not. isatt(firstfile,"no_columns")) then |
---|
341 | no_columns = 2 |
---|
342 | end if |
---|
343 | end if |
---|
344 | |
---|
345 | if (c_var_log .EQ. 1) then |
---|
346 | c_var_str = firstfile@cross_profiles |
---|
347 | |
---|
348 | c_var_all = str_split(c_var_str,";") |
---|
349 | |
---|
350 | c_var_all = ","+c_var_all+"," |
---|
351 | |
---|
352 | ;************************************************************************ |
---|
353 | ; check if an additional combined plot is demanded by the user |
---|
354 | ;************************************************************************ |
---|
355 | |
---|
356 | if ((c_var .EQ. "c_variables") .AND. (number_comb .EQ. -1) .AND. \ |
---|
357 | (combine .EQ. 0)) then |
---|
358 | max_com_i = max(dimsizes(c_var_all)) - 1 |
---|
359 | else |
---|
360 | max_com_i = max(dimsizes(c_var_all)) |
---|
361 | c_var_all_temp = c_var_all |
---|
362 | delete(c_var_all) |
---|
363 | c_var_all = new(max_com_i+1,string) |
---|
364 | c_var_all(0:max_com_i-1) = c_var_all_temp |
---|
365 | delete(c_var_all_temp) |
---|
366 | c_var_all(max_com_i) = c_var |
---|
367 | end if |
---|
368 | number_comb_all = str_fields_count(c_var_all,",") |
---|
369 | |
---|
370 | ;************************************************************************ |
---|
371 | ; currently, more than 3 plots cannot be drawn together |
---|
372 | ;*********************************************************************** |
---|
373 | |
---|
374 | do com_i = 0, max_com_i |
---|
375 | if(number_comb_all(com_i) .GT. 3) then |
---|
376 | c_var_all_temp = c_var_all |
---|
377 | number_comb_all_temp = number_comb_all |
---|
378 | delete(c_var_all) |
---|
379 | delete(number_comb_all) |
---|
380 | max_com_i = max_com_i + 1 |
---|
381 | c_var_all = new(max_com_i+1,string) |
---|
382 | number_comb_all = new(max_com_i+1, integer) |
---|
383 | if (com_i-1 .GT. 0) then |
---|
384 | c_var_all(0:com_i-1) = c_var_all_temp(0:com_i-1) |
---|
385 | number_comb_all(0:com_i-1) = number_comb_all_temp(0:com_i-1) |
---|
386 | end if |
---|
387 | c_var_long = str_split(c_var_all_temp(com_i),",") |
---|
388 | c_var_all(com_i) = "," + c_var_long(0) + "," + c_var_long(1) + "," + c_var_long(2) + "," |
---|
389 | number_comb_all(com_i) = 3 |
---|
390 | c_var_all(com_i + 1) = "," |
---|
391 | do com_j = 3, max(dimsizes(c_var_long)) - 1 |
---|
392 | c_var_all(com_i + 1) = c_var_all(com_i + 1) + c_var_long(com_j) + "," |
---|
393 | end do |
---|
394 | number_comb_all(com_i+1) = max(dimsizes(c_var_long)) - 3 |
---|
395 | c_var_all(com_i+2:max_com_i) = c_var_all_temp(com_i+1:max_com_i-1) |
---|
396 | number_comb_all(com_i+2:max_com_i) = number_comb_all_temp(com_i+1:max_com_i-1) |
---|
397 | delete(c_var_all_temp) |
---|
398 | delete(number_comb_all_temp) |
---|
399 | delete(c_var_long) |
---|
400 | end if |
---|
401 | end do |
---|
402 | |
---|
403 | c_var_plot = new(max_com_i+1,graphic) |
---|
404 | c_var_end_time_step = end_time_step |
---|
405 | c_var_start_time_step = start_time_step |
---|
406 | number_comb_1_log = 0 |
---|
407 | number_comb_23_log = 0 |
---|
408 | else |
---|
409 | max_com_i = 0 |
---|
410 | end if |
---|
411 | |
---|
412 | do com_i = 0,max_com_i |
---|
413 | |
---|
414 | ;************************************************************************ |
---|
415 | ; changes basic properties of the plots according to cross_profiles |
---|
416 | ;************************************************************************ |
---|
417 | |
---|
418 | if (c_var_log .EQ. 1) then |
---|
419 | if (number_comb_all(com_i) .EQ. 1) then |
---|
420 | number_combine= -1 |
---|
421 | combine = 0 |
---|
422 | c_var = "c_variables" |
---|
423 | var = c_var_all(com_i) |
---|
424 | delete(end_time_step) |
---|
425 | delete(start_time_step) |
---|
426 | end_time_step = c_var_end_time_step |
---|
427 | start_time_step= c_var_start_time_step |
---|
428 | if (number_comb_1_log .EQ. 1) then |
---|
429 | delete(var_char) |
---|
430 | end if |
---|
431 | number_comb_1_log=1 |
---|
432 | else |
---|
433 | var = "all" |
---|
434 | number_comb = number_comb_all(com_i) |
---|
435 | combine = 1 |
---|
436 | c_var = c_var_all(com_i) |
---|
437 | delete(end_time_step) |
---|
438 | delete(start_time_step) |
---|
439 | end_time_step = c_var_end_time_step |
---|
440 | start_time_step= c_var_start_time_step |
---|
441 | if ((number_comb_1_log .EQ. 1) .OR. (number_comb_23_log .EQ. 1)) then |
---|
442 | delete(label) |
---|
443 | end if |
---|
444 | if (number_comb_23_log .EQ. 1) then |
---|
445 | delete(plot_o) |
---|
446 | ; delete(label) |
---|
447 | delete(color_o) |
---|
448 | delete(mini) |
---|
449 | delete(maxi) |
---|
450 | delete(plot) |
---|
451 | end if |
---|
452 | number_comb_23_log=1 |
---|
453 | end if |
---|
454 | end if |
---|
455 | |
---|
456 | if (combine .NE. 0 .AND. combine .NE. 1)then |
---|
457 | print(" ") |
---|
458 | print("Your 'combine'= "+combine+" is invalid and set to 0") |
---|
459 | print(" ") |
---|
460 | combine = 0 |
---|
461 | end if |
---|
462 | if (no_files .GT. 1) then |
---|
463 | combine = 0 |
---|
464 | print(" ") |
---|
465 | print("If you have more than one input file you cannot combine "+\ |
---|
466 | "variables: combine is set to 0") |
---|
467 | print(" ") |
---|
468 | end if |
---|
469 | if (combine .EQ. 1 .AND. number_comb .EQ. -1) then |
---|
470 | print(" ") |
---|
471 | print("Set 'number_comb' to 2 or 3 or combine to 0") |
---|
472 | print(" ") |
---|
473 | exit |
---|
474 | end if |
---|
475 | if (combine .EQ. 1)then |
---|
476 | if (number_comb .EQ. -1) then |
---|
477 | print(" ") |
---|
478 | print("Set 'number_comb' to 2 or 3 or combine to 0") |
---|
479 | print(" ") |
---|
480 | exit |
---|
481 | end if |
---|
482 | if (number_comb .NE. 2 .AND. number_comb .NE. 3) then |
---|
483 | print(" ") |
---|
484 | print("Set 'number_comb' to 2 or 3 or combine to 0") |
---|
485 | print(" ") |
---|
486 | exit |
---|
487 | end if |
---|
488 | end if |
---|
489 | if (combine .EQ. 1 .AND. c_var .EQ. "c_variables") then |
---|
490 | print(" ") |
---|
491 | print("Select variables for overlaying ('c_var') or set combine to 0") |
---|
492 | print(" ") |
---|
493 | exit |
---|
494 | end if |
---|
495 | |
---|
496 | if (log_z .NE. 0 .AND. log_z .NE. 1)then |
---|
497 | print(" ") |
---|
498 | print("'log_z'= "+log_z+" is invalid and set to 0") |
---|
499 | print(" ") |
---|
500 | log_z = 0 |
---|
501 | end if |
---|
502 | |
---|
503 | if (norm_z .EQ. 0) then |
---|
504 | print(" ") |
---|
505 | print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0") |
---|
506 | print(" ") |
---|
507 | norm_z = 1.0 |
---|
508 | end if |
---|
509 | |
---|
510 | ;*************************************************** |
---|
511 | ; open input file |
---|
512 | ;*************************************************** |
---|
513 | |
---|
514 | do nof=0,no_files-1 |
---|
515 | |
---|
516 | if (com_i .EQ. 0) |
---|
517 | |
---|
518 | files=new(end_f_t(nof)-start_f_t(nof)+1,string) |
---|
519 | if (file_in_1(nof))then |
---|
520 | if (isfilepresent(file_in(nof)))then |
---|
521 | files(0)=file_in(nof) |
---|
522 | else |
---|
523 | print(" ") |
---|
524 | print("1st input file: '"+file_in(nof)+"' does not exist") |
---|
525 | print(" ") |
---|
526 | exit |
---|
527 | end if |
---|
528 | else |
---|
529 | if (start_f_t(nof) .EQ. 0)then |
---|
530 | if (isfilepresent(file_in(nof)+".nc"))then |
---|
531 | files(0)=file_in(nof)+".nc" |
---|
532 | do i=1,end_f_t(nof) |
---|
533 | if (isfilepresent(file_in(nof)+"."+i+".nc"))then |
---|
534 | files(i)=file_in(nof)+"."+i+".nc" |
---|
535 | else |
---|
536 | print(" ") |
---|
537 | print("Input file: '"+file_in(nof)+"."+i+".nc' does not "+\ |
---|
538 | "exist") |
---|
539 | print(" ") |
---|
540 | exit |
---|
541 | end if |
---|
542 | end do |
---|
543 | else |
---|
544 | print(" ") |
---|
545 | print("Input file: '"+file_in(nof)+".nc' does not exist") |
---|
546 | print(" ") |
---|
547 | exit |
---|
548 | end if |
---|
549 | else |
---|
550 | do i=start_f_t(nof),end_f_t(nof) |
---|
551 | if (isfilepresent(file_in(nof)+"."+i+".nc"))then |
---|
552 | files(i-start_f_t(nof))=file_in(nof)+"."+i+".nc" |
---|
553 | else |
---|
554 | print(" ") |
---|
555 | print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") |
---|
556 | print(" ") |
---|
557 | exit |
---|
558 | end if |
---|
559 | end do |
---|
560 | end if |
---|
561 | end if |
---|
562 | |
---|
563 | f=addfiles(files,"r") |
---|
564 | f_att=addfile(files(0),"r") |
---|
565 | ListSetType(f,"cat") |
---|
566 | |
---|
567 | vNam = getfilevarnames(f_att) |
---|
568 | vType = getfilevartypes(f_att,vNam) |
---|
569 | |
---|
570 | if ((all(vType .eq. "double"))) then ;distinction if data is double or float |
---|
571 | check_vType = True |
---|
572 | else |
---|
573 | check_vType = False |
---|
574 | end if |
---|
575 | |
---|
576 | if (nof .EQ. 0)then |
---|
577 | vNam0=vNam |
---|
578 | end if |
---|
579 | if (nof .NE. 0)then |
---|
580 | if (dim0 .NE. dim)then |
---|
581 | print(" ") |
---|
582 | print("There are 'no_files'="+no_files+" input files but they do "+\ |
---|
583 | "not contain the same variables") |
---|
584 | print(" ") |
---|
585 | exit |
---|
586 | else |
---|
587 | do i=0,dim0-1 |
---|
588 | if (vNam0(i) .NE. vNam(i))then |
---|
589 | print(" ") |
---|
590 | print("There are 'no_files'="+no_files+" input files but "+\ |
---|
591 | "they do not contain the same variables") |
---|
592 | print(" ") |
---|
593 | exit |
---|
594 | end if |
---|
595 | end do |
---|
596 | end if |
---|
597 | end if |
---|
598 | nof=nof+1 |
---|
599 | if (com_i .EQ. 0) then |
---|
600 | print(" ") |
---|
601 | print("Variables in input file "+nof+":") |
---|
602 | print("- "+ vNam) |
---|
603 | print(" ") |
---|
604 | end if |
---|
605 | nof=nof-1 |
---|
606 | dim = dimsizes(vNam) |
---|
607 | dim0=dim |
---|
608 | |
---|
609 | if (dim .EQ. 0) then |
---|
610 | print(" ") |
---|
611 | print("There is no data on file") |
---|
612 | print(" ") |
---|
613 | end if |
---|
614 | |
---|
615 | prof3d = 0 |
---|
616 | do varn = dim-1,0,1 |
---|
617 | if ( isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
618 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
619 | prof3d = 1 |
---|
620 | break |
---|
621 | end if |
---|
622 | end do |
---|
623 | |
---|
624 | end if |
---|
625 | |
---|
626 | if (var .NE. "all") then |
---|
627 | ;rearrange the order of the variables in vNam so that the variables |
---|
628 | ;specified by "var" are in the top of vNam |
---|
629 | |
---|
630 | vNam_static = new((/dim/),string) |
---|
631 | vNam_temp = new((/dim/),string) |
---|
632 | |
---|
633 | var_char = stringtocharacter(var) |
---|
634 | no_char = dimsizes(var_char) |
---|
635 | comma = 0 |
---|
636 | |
---|
637 | do j=0,no_char-1 |
---|
638 | if(var_char(j) .eq. ",") |
---|
639 | comma = comma + 1 |
---|
640 | end if |
---|
641 | end do |
---|
642 | |
---|
643 | if(comma .le. 1) |
---|
644 | print(" ") |
---|
645 | print("The variables 'var="+var+"'" ) |
---|
646 | print("do not exist on your input file;") |
---|
647 | print("be sure to have one comma before and after each variable") |
---|
648 | print(" ") |
---|
649 | exit |
---|
650 | end if |
---|
651 | |
---|
652 | if(comma .gt. dim) |
---|
653 | print(" ") |
---|
654 | print("The variables 'var="+var+"'" ) |
---|
655 | print("do not exist on your input file;") |
---|
656 | print("be sure to have one comma before and after each variable") |
---|
657 | print(" ") |
---|
658 | exit |
---|
659 | end if |
---|
660 | |
---|
661 | indices = new((/comma/),integer) |
---|
662 | comma = 0 |
---|
663 | |
---|
664 | do j=0,no_char-1 |
---|
665 | if(var_char(j) .eq. ",") |
---|
666 | indices(comma) = j |
---|
667 | comma = comma + 1 |
---|
668 | end if |
---|
669 | end do |
---|
670 | |
---|
671 | do j=0,comma-2 |
---|
672 | vNam_temp(j) = charactertostring(\ |
---|
673 | var_char(indices(j)+1:indices(j+1)-1)) |
---|
674 | end do |
---|
675 | |
---|
676 | do j=0,comma-2 |
---|
677 | count_check = 0 |
---|
678 | do varn=0,dim-1 |
---|
679 | if(vNam_temp(j) .ne. vNam(varn)) |
---|
680 | count_check=count_check+1 |
---|
681 | end if |
---|
682 | end do |
---|
683 | |
---|
684 | if(count_check .eq. dim) |
---|
685 | print(" ") |
---|
686 | print("The variables 'var="+var+"'" ) |
---|
687 | print("do not exist on your input file;") |
---|
688 | print("be sure to have one comma before and after each variable") |
---|
689 | print(" ") |
---|
690 | exit |
---|
691 | end if |
---|
692 | |
---|
693 | vNam_static(j) = vNam_temp(comma - 2 - j) |
---|
694 | end do |
---|
695 | |
---|
696 | vNam_temp = vNam_static |
---|
697 | vNam_static = "" |
---|
698 | |
---|
699 | if (prof3d .EQ. 0) then |
---|
700 | i = 0 |
---|
701 | do j=0,dim-1,2 |
---|
702 | vNam_static(j) = vNam_temp(i) |
---|
703 | vNam_static(j+1) = "z" + vNam_static(j) |
---|
704 | i = i+1 |
---|
705 | if(i .eq. comma-1) |
---|
706 | break |
---|
707 | end if |
---|
708 | end do |
---|
709 | |
---|
710 | delete(vNam_temp) |
---|
711 | count_variable = 2*(comma-1) |
---|
712 | else |
---|
713 | i = 0 |
---|
714 | do j=0,dim-1,1 |
---|
715 | vNam_static(j) = vNam_temp(i) |
---|
716 | i = i+1 |
---|
717 | if(i .eq. comma-1) |
---|
718 | break |
---|
719 | end if |
---|
720 | end do |
---|
721 | |
---|
722 | delete(vNam_temp) |
---|
723 | count_variable = comma-1 |
---|
724 | end if |
---|
725 | |
---|
726 | counter = 0 |
---|
727 | counter2 = 0 |
---|
728 | |
---|
729 | do j=0,dim-1 |
---|
730 | counter = 0 |
---|
731 | do i = 0, count_variable - 1 |
---|
732 | if(vNam_static(i) .ne. vNam(j)) |
---|
733 | counter = counter + 1 |
---|
734 | end if |
---|
735 | end do |
---|
736 | |
---|
737 | if (counter .eq. count_variable) |
---|
738 | vNam_static(count_variable + counter2) = vNam(j) |
---|
739 | counter2 = counter2 + 1 |
---|
740 | end if |
---|
741 | end do |
---|
742 | |
---|
743 | vNam = vNam_static |
---|
744 | delete(vNam_static) |
---|
745 | end if |
---|
746 | |
---|
747 | ;---------below steps only for first file -> nof=0 |
---|
748 | if (nof .EQ. 0) then |
---|
749 | |
---|
750 | plot = new(dim,graphic) |
---|
751 | plot_ = new(dim,graphic) |
---|
752 | if (no_files .GT. 1) then |
---|
753 | multi_plot = new((/no_files,dim/),graphic) |
---|
754 | if (check_vType) then |
---|
755 | max_nof = new((/no_files,dim/),double) |
---|
756 | min_nof = new((/no_files,dim/),double) |
---|
757 | else |
---|
758 | max_nof = new((/no_files,dim/),float) |
---|
759 | min_nof = new((/no_files,dim/),float) |
---|
760 | end if |
---|
761 | name = new((/no_files,dim/),string) |
---|
762 | unit_ = new((/no_files,dim/),string) |
---|
763 | end if |
---|
764 | |
---|
765 | if (prof3d .EQ. 0) then |
---|
766 | |
---|
767 | do varn=0,dim-1 |
---|
768 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
769 | isStrSubset( vNam(varn), "NORM")) then |
---|
770 | continue |
---|
771 | end if |
---|
772 | if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_"))then |
---|
773 | z_u = f_att->$vNam(varn+1)$ |
---|
774 | break |
---|
775 | else |
---|
776 | if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then |
---|
777 | z_u = f_att->$vNam(varn+1)$ |
---|
778 | break |
---|
779 | else |
---|
780 | if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then |
---|
781 | z_u = f_att->$vNam(varn+1)$ |
---|
782 | break |
---|
783 | else |
---|
784 | if(vNam(varn) .EQ. "vpt" .OR. isStrSubset(vNam(varn), "vpt_"))then |
---|
785 | z_u = f_att->$vNam(varn+1)$ |
---|
786 | break |
---|
787 | else |
---|
788 | if(vNam(varn) .EQ. "lpt" .OR. isStrSubset(vNam(varn), "lpt_"))then |
---|
789 | z_u = f_att->$vNam(varn+1)$ |
---|
790 | break |
---|
791 | else |
---|
792 | if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then |
---|
793 | z_u = f_att->$vNam(varn+1)$ |
---|
794 | break |
---|
795 | else |
---|
796 | if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then |
---|
797 | z_u = f_att->$vNam(varn+1)$ |
---|
798 | break |
---|
799 | else |
---|
800 | if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then |
---|
801 | z_u = f_att->$vNam(varn+1)$ |
---|
802 | break |
---|
803 | else |
---|
804 | if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then |
---|
805 | z_u = f_att->$vNam(varn+1)$ |
---|
806 | break |
---|
807 | else |
---|
808 | if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then |
---|
809 | z_u = f_att->$vNam(varn+1)$ |
---|
810 | break |
---|
811 | else |
---|
812 | if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then |
---|
813 | z_u = f_att->$vNam(varn+1)$ |
---|
814 | break |
---|
815 | else |
---|
816 | if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then |
---|
817 | |
---|
818 | z_u = f_att->$vNam(varn+1)$ |
---|
819 | break |
---|
820 | else |
---|
821 | if(vNam(varn) .EQ. "es" .OR. \ |
---|
822 | isStrSubset(vNam(varn), "es_") .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then |
---|
823 | z_u = f_att->$vNam(varn+1)$ |
---|
824 | break |
---|
825 | else |
---|
826 | if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then |
---|
827 | z_u = f_att->$vNam(varn+1)$ |
---|
828 | break |
---|
829 | else |
---|
830 | if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then |
---|
831 | z_u = f_att->$vNam(varn+1)$ |
---|
832 | break |
---|
833 | else |
---|
834 | if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then |
---|
835 | z_u = f_att->$vNam(varn+1)$ |
---|
836 | break |
---|
837 | else |
---|
838 | if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_")\ |
---|
839 | .OR. vNam(varn) .EQ. "u*2" .OR. isStrSubset(vNam(varn), "u*2_"))then |
---|
840 | z_u = f_att->$vNam(varn+1)$ |
---|
841 | break |
---|
842 | else |
---|
843 | if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_")\ |
---|
844 | .OR. vNam(varn) .EQ. "v*2" .OR. isStrSubset(vNam(varn), "v*2_"))then |
---|
845 | z_u = f_att->$vNam(varn+1)$ |
---|
846 | break |
---|
847 | else |
---|
848 | if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_")\ |
---|
849 | .OR. vNam(varn) .EQ. "pt*2" .OR. isStrSubset(vNam(varn), "pt*2_"))then |
---|
850 | z_u = f_att->$vNam(varn+1)$ |
---|
851 | break |
---|
852 | else |
---|
853 | if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_")\ |
---|
854 | .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. isStrSubset(vNam(varn), "w*u*u*:dz_"))then |
---|
855 | z_u = f_att->$vNam(varn+1)$ |
---|
856 | break |
---|
857 | else |
---|
858 | if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_")\ |
---|
859 | .OR. vNam(varn) .EQ. "w*p*:dz" .OR. isStrSubset(vNam(varn), "w*p*:dz_"))then |
---|
860 | z_u = f_att->$vNam(varn+1)$ |
---|
861 | break |
---|
862 | else |
---|
863 | if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_")\ |
---|
864 | .OR. vNam(varn) .EQ. "w"+dq+"e:dz" .OR. isStrSubset(vNam(varn), "w"+dq+"e:dz_"))then |
---|
865 | z_u = f_att->$vNam(varn+1)$ |
---|
866 | break |
---|
867 | else |
---|
868 | if(vNam(varn) .EQ. "qs2" .OR. isStrSubset(vNam(varn), "qs2_")\ |
---|
869 | .OR. vNam(varn) .EQ. "q*2" .OR. isStrSubset(vNam(varn), "q*2_"))then |
---|
870 | z_u = f_att->$vNam(varn+1)$ |
---|
871 | break |
---|
872 | end if |
---|
873 | end if |
---|
874 | end if |
---|
875 | end if |
---|
876 | end if |
---|
877 | end if |
---|
878 | end if |
---|
879 | end if |
---|
880 | end if |
---|
881 | end if |
---|
882 | end if |
---|
883 | end if |
---|
884 | end if |
---|
885 | end if |
---|
886 | end if |
---|
887 | end if |
---|
888 | end if |
---|
889 | end if |
---|
890 | end if |
---|
891 | end if |
---|
892 | end if |
---|
893 | end if |
---|
894 | end if |
---|
895 | end do |
---|
896 | |
---|
897 | do varn=0,dim-1 |
---|
898 | if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then |
---|
899 | continue |
---|
900 | end if |
---|
901 | if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_"))then |
---|
902 | z_w = f_att->$vNam(varn+1)$ |
---|
903 | break |
---|
904 | else |
---|
905 | if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_")\ |
---|
906 | .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"u"+dq+"_"))then |
---|
907 | z_w = f_att->$vNam(varn+1)$ |
---|
908 | break |
---|
909 | else |
---|
910 | if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_")\ |
---|
911 | .OR. vNam(varn) .EQ. "w*u*" .OR. isStrSubset(vNam(varn), "w*u*_"))then |
---|
912 | z_w = f_att->$vNam(varn+1)$ |
---|
913 | break |
---|
914 | else |
---|
915 | if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then |
---|
916 | z_w = f_att->$vNam(varn+1)$ |
---|
917 | break |
---|
918 | else |
---|
919 | if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_")\ |
---|
920 | .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"v"+dq+"_"))then |
---|
921 | z_w = f_att->$vNam(varn+1)$ |
---|
922 | break |
---|
923 | else |
---|
924 | if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_")\ |
---|
925 | .OR. vNam(varn) .EQ. "w*v*" .OR. isStrSubset(vNam(varn), "w*v*_"))then |
---|
926 | z_w = f_att->$vNam(varn+1)$ |
---|
927 | break |
---|
928 | else |
---|
929 | if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then |
---|
930 | z_w = f_att->$vNam(varn+1)$ |
---|
931 | break |
---|
932 | else |
---|
933 | if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_")\ |
---|
934 | .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"pt"+dq+"_"))then |
---|
935 | z_w = f_att->$vNam(varn+1)$ |
---|
936 | break |
---|
937 | else |
---|
938 | if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_")\ |
---|
939 | .OR. vNam(varn) .EQ. "w*pt*" .OR. isStrSubset(vNam(varn), "w*pt*_"))then |
---|
940 | z_w = f_att->$vNam(varn+1)$ |
---|
941 | break |
---|
942 | else |
---|
943 | if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpt_"))then |
---|
944 | z_w = f_att->$vNam(varn+1)$ |
---|
945 | break |
---|
946 | else |
---|
947 | if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_")\ |
---|
948 | .OR. vNam(varn) .EQ. "w*pt*BC" .OR. isStrSubset(vNam(varn), "w*pt*BC_"))then |
---|
949 | z_w = f_att->$vNam(varn+1)$ |
---|
950 | break |
---|
951 | else |
---|
952 | if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then |
---|
953 | z_w = f_att->$vNam(varn+1)$ |
---|
954 | break |
---|
955 | else |
---|
956 | if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_")\ |
---|
957 | .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"vpt"+dq+"_"))then |
---|
958 | z_w = f_att->$vNam(varn+1)$ |
---|
959 | break |
---|
960 | else |
---|
961 | if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_")\ |
---|
962 | .OR. vNam(varn) .EQ. "w*vpt*" .OR. isStrSubset(vNam(varn), "w*vpt*_"))then |
---|
963 | z_w = f_att->$vNam(varn+1)$ |
---|
964 | break |
---|
965 | else |
---|
966 | if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then |
---|
967 | z_w = f_att->$vNam(varn+1)$ |
---|
968 | break |
---|
969 | else |
---|
970 | if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_")\ |
---|
971 | .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"q"+dq+"_"))then |
---|
972 | z_w = f_att->$vNam(varn+1)$ |
---|
973 | break |
---|
974 | else |
---|
975 | if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_")\ |
---|
976 | .OR. vNam(varn) .EQ. "w*q*" .OR. isStrSubset(vNam(varn), "w*q*_"))then |
---|
977 | z_w = f_att->$vNam(varn+1)$ |
---|
978 | break |
---|
979 | else |
---|
980 | if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then |
---|
981 | z_w = f_att->$vNam(varn+1)$ |
---|
982 | break |
---|
983 | else |
---|
984 | if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_")\ |
---|
985 | .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"qv"+dq+"_"))then |
---|
986 | z_w = f_att->$vNam(varn+1)$ |
---|
987 | break |
---|
988 | else |
---|
989 | if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_")\ |
---|
990 | .OR. vNam(varn) .EQ. "w*qv*" .OR. isStrSubset(vNam(varn), "w*qv*_"))then |
---|
991 | z_w = f_att->$vNam(varn+1)$ |
---|
992 | break |
---|
993 | else |
---|
994 | if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then |
---|
995 | z_w = f_att->$vNam(varn+1)$ |
---|
996 | break |
---|
997 | else |
---|
998 | if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_")\ |
---|
999 | .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"s"+dq+"_"))then |
---|
1000 | z_w = f_att->$vNam(varn+1)$ |
---|
1001 | break |
---|
1002 | else |
---|
1003 | if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_")\ |
---|
1004 | .OR. vNam(varn) .EQ. "w*s*" .OR. isStrSubset(vNam(varn), "w*s*_"))then |
---|
1005 | z_w = f_att->$vNam(varn+1)$ |
---|
1006 | break |
---|
1007 | else |
---|
1008 | if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then |
---|
1009 | z_w = f_att->$vNam(varn+1)$ |
---|
1010 | break |
---|
1011 | else |
---|
1012 | if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_")\ |
---|
1013 | .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"sa"+dq+"_"))then |
---|
1014 | z_w = f_att->$vNam(varn+1)$ |
---|
1015 | break |
---|
1016 | else |
---|
1017 | if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_")\ |
---|
1018 | .OR. vNam(varn) .EQ. "w*sa*" .OR. isStrSubset(vNam(varn), "w*sa*_"))then |
---|
1019 | z_w = f_att->$vNam(varn+1)$ |
---|
1020 | break |
---|
1021 | else |
---|
1022 | if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then |
---|
1023 | z_w = f_att->$vNam(varn+1)$ |
---|
1024 | break |
---|
1025 | else |
---|
1026 | if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_")\ |
---|
1027 | .OR. vNam(varn) .EQ. "w*e*" .OR. isStrSubset(vNam(varn), "w*e*_"))then |
---|
1028 | z_w = f_att->$vNam(varn+1)$ |
---|
1029 | break |
---|
1030 | else |
---|
1031 | if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_")\ |
---|
1032 | .OR. vNam(varn) .EQ. "w*2" .OR. isStrSubset(vNam(varn), "w*2_"))then |
---|
1033 | z_w = f_att->$vNam(varn+1)$ |
---|
1034 | break |
---|
1035 | else |
---|
1036 | if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_")\ |
---|
1037 | .OR. vNam(varn) .EQ. "w*3" .OR. isStrSubset(vNam(varn), "w*3_"))then |
---|
1038 | z_w = f_att->$vNam(varn+1)$ |
---|
1039 | break |
---|
1040 | else |
---|
1041 | if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then |
---|
1042 | z_w = f_att->$vNam(varn+1)$ |
---|
1043 | break |
---|
1044 | else |
---|
1045 | if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_")\ |
---|
1046 | .OR. vNam(varn) .EQ. "w*2pt*" .OR. isStrSubset(vNam(varn), "w*2pt*_"))then |
---|
1047 | z_w = f_att->$vNam(varn+1)$ |
---|
1048 | break |
---|
1049 | else |
---|
1050 | if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_")\ |
---|
1051 | .OR. vNam(varn) .EQ. "w*pt*2" .OR. isStrSubset(vNam(varn), "w*pt*2_"))then |
---|
1052 | z_w = f_att->$vNam(varn+1)$ |
---|
1053 | break |
---|
1054 | end if |
---|
1055 | end if |
---|
1056 | end if |
---|
1057 | end if |
---|
1058 | end if |
---|
1059 | end if |
---|
1060 | end if |
---|
1061 | end if |
---|
1062 | end if |
---|
1063 | end if |
---|
1064 | end if |
---|
1065 | end if |
---|
1066 | end if |
---|
1067 | end if |
---|
1068 | end if |
---|
1069 | end if |
---|
1070 | end if |
---|
1071 | end if |
---|
1072 | end if |
---|
1073 | end if |
---|
1074 | end if |
---|
1075 | end if |
---|
1076 | end if |
---|
1077 | end if |
---|
1078 | end if |
---|
1079 | end if |
---|
1080 | end if |
---|
1081 | end if |
---|
1082 | end if |
---|
1083 | end if |
---|
1084 | end if |
---|
1085 | end if |
---|
1086 | end if |
---|
1087 | end do |
---|
1088 | |
---|
1089 | if (.not. isvar("z_u") .AND. .not. isvar ("z_w")) then |
---|
1090 | co=0 |
---|
1091 | do varn=0,dim-1 |
---|
1092 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
1093 | isStrSubset( vNam(varn), "NORM")) then |
---|
1094 | check = False |
---|
1095 | else |
---|
1096 | check = True |
---|
1097 | if (var .NE. "all") then |
---|
1098 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
1099 | end if |
---|
1100 | end if |
---|
1101 | if (check)then |
---|
1102 | co=co+1 |
---|
1103 | z = f_att->$vNam(varn+1)$ |
---|
1104 | if (getvardims(z) .EQ. "zu")then |
---|
1105 | z_u = z |
---|
1106 | else |
---|
1107 | if (getvardims(z) .EQ. "zw")then |
---|
1108 | z_w = z |
---|
1109 | end if |
---|
1110 | end if |
---|
1111 | dimz = dimsizes(z) |
---|
1112 | break |
---|
1113 | end if |
---|
1114 | end do |
---|
1115 | if (co .EQ. 0) then |
---|
1116 | print(" ") |
---|
1117 | print("The variables 'var="+var+"'" ) |
---|
1118 | print("do not exist on your input file;") |
---|
1119 | print("be sure to have one comma before and after each variable") |
---|
1120 | print(" ") |
---|
1121 | exit |
---|
1122 | end if |
---|
1123 | end if |
---|
1124 | |
---|
1125 | if (isvar("z_u") ) then |
---|
1126 | dimz = dimsizes(z_u) |
---|
1127 | else |
---|
1128 | if (isvar("z_w"))then |
---|
1129 | dimz = dimsizes(z_w) |
---|
1130 | end if |
---|
1131 | end if |
---|
1132 | |
---|
1133 | else |
---|
1134 | |
---|
1135 | do varn = dim-1,0,1 |
---|
1136 | if (vNam(varn) .EQ. "zu_3d")then |
---|
1137 | z_u = f_att->zu_3d |
---|
1138 | dimz = dimsizes(z_u) |
---|
1139 | else |
---|
1140 | if (vNam(varn) .EQ. "zw_3d")then |
---|
1141 | z_w = f_att->zw_3d |
---|
1142 | dimz = dimsizes(z_w) |
---|
1143 | end if |
---|
1144 | end if |
---|
1145 | if (vNam(varn) .EQ. "x")then |
---|
1146 | x = f_att->x |
---|
1147 | dimx=dimsizes(x) |
---|
1148 | else |
---|
1149 | if (vNam(varn) .EQ. "xu")then |
---|
1150 | x = f_att->xu |
---|
1151 | dimx=dimsizes(x) |
---|
1152 | end if |
---|
1153 | end if |
---|
1154 | if (vNam(varn) .EQ. "y")then |
---|
1155 | y = f_att->y |
---|
1156 | dimy=dimsizes(y) |
---|
1157 | else |
---|
1158 | if (vNam(varn) .EQ. "yv")then |
---|
1159 | y = f_att->yv |
---|
1160 | dimy=dimsizes(y) |
---|
1161 | end if |
---|
1162 | end if |
---|
1163 | end do |
---|
1164 | |
---|
1165 | end if |
---|
1166 | |
---|
1167 | if(.not. isvar("z_u") .AND. .not. isvar("z_w"))then |
---|
1168 | print(" ") |
---|
1169 | print("Program aborts - there are no z-variables available") |
---|
1170 | print("Be sure if 'plot_3d' is set correctly") |
---|
1171 | print(" ") |
---|
1172 | exit |
---|
1173 | end if |
---|
1174 | |
---|
1175 | |
---|
1176 | t_all = f[:]->time |
---|
1177 | nt = dimsizes(t_all) |
---|
1178 | |
---|
1179 | |
---|
1180 | if (nt .EQ. 1)then |
---|
1181 | delta_t=t_all(nt-1)/nt |
---|
1182 | else |
---|
1183 | delta_t=(t_all(nt-1)-t_all(0))/(nt-1) |
---|
1184 | end if |
---|
1185 | |
---|
1186 | ; **************************************************** |
---|
1187 | ; start of time step and different types of mistakes that could be done |
---|
1188 | ; **************************************************** |
---|
1189 | |
---|
1190 | if (start_time_step .EQ. -1.) then |
---|
1191 | delete(start_time_step) |
---|
1192 | start_time_step=t_all(0)/3600 |
---|
1193 | else |
---|
1194 | if (start_time_step .GT. t_all(nt-1)/3600)then |
---|
1195 | print(" ") |
---|
1196 | print("'start_time_step' = "+ start_time_step +"h is greater "+\ |
---|
1197 | "than last time step = " \ |
---|
1198 | + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") |
---|
1199 | print(" ") |
---|
1200 | print("Select another 'start_time_step'") |
---|
1201 | print(" ") |
---|
1202 | exit |
---|
1203 | end if |
---|
1204 | if (start_time_step .LT. t_all(0)/3600)then |
---|
1205 | print(" ") |
---|
1206 | print("'start_time_step' = "+ start_time_step +"h is lower "+\ |
---|
1207 | "than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") |
---|
1208 | print(" ") |
---|
1209 | exit |
---|
1210 | end if |
---|
1211 | end if |
---|
1212 | |
---|
1213 | do i=0,nt-1 |
---|
1214 | if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\ |
---|
1215 | start_time_step .LT. (t_all(i)+delta_t/2)/3600)then |
---|
1216 | st=i |
---|
1217 | break |
---|
1218 | else |
---|
1219 | st=0 |
---|
1220 | end if |
---|
1221 | end do |
---|
1222 | |
---|
1223 | ; **************************************************** |
---|
1224 | ; end of time step and different types of mistakes that could be done |
---|
1225 | ; **************************************************** |
---|
1226 | |
---|
1227 | if (end_time_step .EQ. -1.) then |
---|
1228 | delete(end_time_step) |
---|
1229 | end_time_step = t_all(nt-1)/3600 |
---|
1230 | else |
---|
1231 | if (end_time_step .GT. t_all(nt-1)/3600)then |
---|
1232 | print(" ") |
---|
1233 | print("'end_time_step' = "+ end_time_step +"h is greater "+\ |
---|
1234 | "than last time step = " +\ |
---|
1235 | t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") |
---|
1236 | print(" ") |
---|
1237 | print("Select another 'end_time_step'") |
---|
1238 | print(" ") |
---|
1239 | exit |
---|
1240 | end if |
---|
1241 | if (end_time_step .LT. start_time_step/3600)then |
---|
1242 | print(" ") |
---|
1243 | print("'end_time_step' = "+ end_time_step +"h is lower "+\ |
---|
1244 | "than 'start_time_step' = "+start_time_step+"h") |
---|
1245 | print(" ") |
---|
1246 | print("Select another 'start_time_step' or 'end_time_step'") |
---|
1247 | print(" ") |
---|
1248 | exit |
---|
1249 | end if |
---|
1250 | end if |
---|
1251 | |
---|
1252 | do i=0,nt-1 |
---|
1253 | if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\ |
---|
1254 | end_time_step .LT. (t_all(i)+delta_t/2)/3600)then |
---|
1255 | et=i |
---|
1256 | break |
---|
1257 | else |
---|
1258 | et=0 |
---|
1259 | end if |
---|
1260 | end do |
---|
1261 | |
---|
1262 | delete(start_time_step) |
---|
1263 | start_time_step=round(st,3) |
---|
1264 | delete(end_time_step) |
---|
1265 | end_time_step=round(et,3) |
---|
1266 | |
---|
1267 | no_time = end_time_step-start_time_step+1 |
---|
1268 | |
---|
1269 | ; **************************************************** |
---|
1270 | ; time_stride and different types of mistakes that could be done |
---|
1271 | ; **************************************************** |
---|
1272 | |
---|
1273 | if (time_stride .LT. 1) then |
---|
1274 | print(" ") |
---|
1275 | print("'time_stride' has to be positive and is set to 1") |
---|
1276 | print(" ") |
---|
1277 | time_stride = 1 |
---|
1278 | end if |
---|
1279 | |
---|
1280 | if (time_stride .GT. no_time) then |
---|
1281 | print(" ") |
---|
1282 | print("'time_stride' is greater than number of available "+\ |
---|
1283 | "time steps,") |
---|
1284 | print("=> 'time_stride' is set to 1") |
---|
1285 | time_stride = 1 |
---|
1286 | end if |
---|
1287 | |
---|
1288 | ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents |
---|
1289 | ;the time indices |
---|
1290 | ;to plot |
---|
1291 | np = dimsizes(ti_in) |
---|
1292 | |
---|
1293 | if (com_i .EQ. max_com_i) then |
---|
1294 | print(" ") |
---|
1295 | print("Output of time steps from "+t_all(start_time_step)/3600+\ |
---|
1296 | " h = "+t_all(start_time_step)+" s => index = "+start_time_step) |
---|
1297 | print(" till "+t_all(ti_in(np-1))/3600+" h = "\ |
---|
1298 | +t_all(ti_in(np-1))+" s => index = "+end_time_step) |
---|
1299 | print(" with temporal stride = "+time_stride) |
---|
1300 | print(" ") |
---|
1301 | end if |
---|
1302 | |
---|
1303 | ; **************************************************** |
---|
1304 | ; set up legend and colors |
---|
1305 | ; **************************************************** |
---|
1306 | |
---|
1307 | legend_label=new(np,string) |
---|
1308 | do p=0, np-1 |
---|
1309 | legend_label(p)=sprintf("%6.2f", t_all(ti_in(p))/3600) |
---|
1310 | end do |
---|
1311 | |
---|
1312 | ; *************************************************** |
---|
1313 | ; set up recourses |
---|
1314 | ; *************************************************** |
---|
1315 | |
---|
1316 | res = True |
---|
1317 | res@gsnDraw = False |
---|
1318 | res@gsnFrame = False |
---|
1319 | res@txFont = "helvetica" |
---|
1320 | res@tiMainFont = "helvetica" |
---|
1321 | res@tiXAxisFont = "helvetica" |
---|
1322 | res@tiYAxisFont = "helvetica" |
---|
1323 | res@tmXBLabelFont = "helvetica" |
---|
1324 | res@tmYLLabelFont = "helvetica" |
---|
1325 | res@lgLabelFont = "helvetica" |
---|
1326 | res@tmLabelAutoStride = True |
---|
1327 | |
---|
1328 | |
---|
1329 | if (legend .EQ. 1)then |
---|
1330 | res@pmLegendDisplayMode = "Always" |
---|
1331 | end if |
---|
1332 | |
---|
1333 | res@pmLegendSide = "Right" |
---|
1334 | res@xyExplicitLegendLabels = legend_label |
---|
1335 | res@pmLegendWidthF = 0.12 |
---|
1336 | res@pmLegendHeightF = 0.05*np |
---|
1337 | res@pmLegendParallelPosF = 1.0 |
---|
1338 | res@pmLegendOrthogonalPosF = -0.2625;-1.0 |
---|
1339 | res@lgLabelFontHeightF = font_size_legend |
---|
1340 | res@lgTitleString = "Time (h)" |
---|
1341 | res@lgTitleFontHeightF = font_size |
---|
1342 | res@txFontHeightF = font_size |
---|
1343 | res@tiXAxisFontHeightF = font_size |
---|
1344 | res@tiYAxisFontHeightF = font_size |
---|
1345 | res@tmXBLabelFontHeightF = font_size |
---|
1346 | res@tmYLLabelFontHeightF = font_size |
---|
1347 | res@tiXAxisString = " " |
---|
1348 | res@lgJustification = "TopLeft" |
---|
1349 | |
---|
1350 | if ( black .eq. 0 ) then |
---|
1351 | res@xyLineColors = -(ispan(-237,-2,235/np)) |
---|
1352 | end if |
---|
1353 | if (norm_z .EQ. 1)then |
---|
1354 | res@tiYAxisString = "Height (m)" |
---|
1355 | else |
---|
1356 | res@tiYAxisString = "Height / "+norm_z+" (m)" |
---|
1357 | end if |
---|
1358 | |
---|
1359 | if (log_z .EQ. 1) then |
---|
1360 | res@trYLog = True |
---|
1361 | end if |
---|
1362 | |
---|
1363 | if (dash .EQ. 0 ) then |
---|
1364 | res@xyMonoDashPattern = True |
---|
1365 | else |
---|
1366 | res@xyMonoDashPattern = False |
---|
1367 | if (no_files .GT. 1) |
---|
1368 | res@xyMonoDashPattern = True |
---|
1369 | print(" ") |
---|
1370 | print("If you use more than one file, patterns for different "+\ |
---|
1371 | "timesteps cannot be used") |
---|
1372 | print(" ") |
---|
1373 | end if |
---|
1374 | end if |
---|
1375 | |
---|
1376 | res@tmXBMinorPerMajor = 4 |
---|
1377 | res@tmYLMinorPerMajor = 4 |
---|
1378 | |
---|
1379 | resP = True |
---|
1380 | resP@gsnMaximize = True |
---|
1381 | resP@gsnPanelXWhiteSpacePercent = 3.0 |
---|
1382 | resP@gsnPanelYWhiteSpacePercent = 2.0 |
---|
1383 | resP@txFont = "helvetica" |
---|
1384 | resP@txString = f_att@title |
---|
1385 | resP@txFuncCode = "~" |
---|
1386 | resP@txFontHeightF = 0.015 |
---|
1387 | |
---|
1388 | ; *************************************************** |
---|
1389 | ; set up graphics for plot |
---|
1390 | ; *************************************************** |
---|
1391 | |
---|
1392 | if (combine .EQ. 1) then |
---|
1393 | plot_o = new(number_comb,graphic) |
---|
1394 | label=new(number_comb,string) |
---|
1395 | color_o=new(number_comb,integer) |
---|
1396 | |
---|
1397 | if (check_vType) then |
---|
1398 | mini=new(number_comb,double) |
---|
1399 | maxi=new(number_comb,double) |
---|
1400 | else |
---|
1401 | mini=new(number_comb,float) |
---|
1402 | maxi=new(number_comb,float) |
---|
1403 | end if |
---|
1404 | end if |
---|
1405 | |
---|
1406 | if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then |
---|
1407 | format_out@wkPaperSize = "A4" |
---|
1408 | end if |
---|
1409 | if ( format_out .EQ. "png" ) then |
---|
1410 | format_out@wkWidth = 1000 |
---|
1411 | format_out@wkHeight = 1000 |
---|
1412 | end if |
---|
1413 | |
---|
1414 | if (wks_gsn_log) then |
---|
1415 | wks=gsn_open_wks(format_out,file_out) |
---|
1416 | gsn_define_colormap(wks,"rainbow+white") |
---|
1417 | wks_gsn_log = False |
---|
1418 | end if |
---|
1419 | |
---|
1420 | ; *************************************************** |
---|
1421 | ; set up minimum and maximum height |
---|
1422 | ; *************************************************** |
---|
1423 | |
---|
1424 | if (log_z .EQ. 1)then |
---|
1425 | if (min_z .EQ. -1)then |
---|
1426 | if (isvar("z_u"))then |
---|
1427 | min_z=z_u(1) |
---|
1428 | else |
---|
1429 | min_z=z_w(1) |
---|
1430 | end if |
---|
1431 | else |
---|
1432 | if (isvar("z_w"))then |
---|
1433 | if (min_z .GE. max(z_w) ) then |
---|
1434 | print(" ") |
---|
1435 | print("Minimum of height ('min_z'="+min_z+") is greater "+\ |
---|
1436 | "than available heights (="+max(z_w)+")") |
---|
1437 | print(" ") |
---|
1438 | exit |
---|
1439 | end if |
---|
1440 | else |
---|
1441 | if (min_z .GE. max(z_u) ) then |
---|
1442 | print(" ") |
---|
1443 | print("Minimum of height ('min_z'="+min_z+") is greater "+\ |
---|
1444 | "than available heights (="+max(z_u)+")") |
---|
1445 | print(" ") |
---|
1446 | exit |
---|
1447 | end if |
---|
1448 | end if |
---|
1449 | if (isvar("z_u"))then |
---|
1450 | if (min_z .LT. z_u(1) ) then |
---|
1451 | print(" ") |
---|
1452 | print("Begin height 'min_z' at least at level k=1 (="+\ |
---|
1453 | z_u(1)+"m) due to the logarithmic scale of the y-axis") |
---|
1454 | print(" ") |
---|
1455 | exit |
---|
1456 | end if |
---|
1457 | else |
---|
1458 | if (min_z .LT. z_w(1) ) then |
---|
1459 | print(" ") |
---|
1460 | print("Begin height 'min_z' at least at level k=1 (="+\ |
---|
1461 | z_w(1)+"m) due to the logarithmic scale of the y-axis") |
---|
1462 | print(" ") |
---|
1463 | exit |
---|
1464 | end if |
---|
1465 | end if |
---|
1466 | end if |
---|
1467 | else |
---|
1468 | if (isvar("z_u"))then |
---|
1469 | if (min_z .EQ. -1)then |
---|
1470 | min_z=z_u(0) |
---|
1471 | end if |
---|
1472 | else |
---|
1473 | if (min_z .EQ. -1)then |
---|
1474 | min_z=z_w(0) |
---|
1475 | end if |
---|
1476 | end if |
---|
1477 | |
---|
1478 | if (isvar("z_w"))then |
---|
1479 | if (min_z .GE. max(z_w) ) then |
---|
1480 | print(" ") |
---|
1481 | print("Minimum of height ('min_z'="+min_z+") is greater than "+\ |
---|
1482 | "available heights (="+max(z_w)+")") |
---|
1483 | print(" ") |
---|
1484 | exit |
---|
1485 | end if |
---|
1486 | else |
---|
1487 | if (min_z .EQ. -1)then |
---|
1488 | min_z=z_u(0) |
---|
1489 | end if |
---|
1490 | if (min_z .GE. max(z_u) ) then |
---|
1491 | print(" ") |
---|
1492 | print("Minimum of height ('min_z'="+min_z+") is greater than "+\ |
---|
1493 | "available heights (="+max(z_u)+")") |
---|
1494 | print(" ") |
---|
1495 | exit |
---|
1496 | end if |
---|
1497 | end if |
---|
1498 | end if |
---|
1499 | |
---|
1500 | if (isvar("z_w"))then |
---|
1501 | if (max_z .EQ. -1)then |
---|
1502 | max_z=max(z_w) |
---|
1503 | end if |
---|
1504 | else |
---|
1505 | if (max_z .EQ. -1)then |
---|
1506 | max_z=max(z_u) |
---|
1507 | end if |
---|
1508 | end if |
---|
1509 | |
---|
1510 | if (isvar("z_w"))then |
---|
1511 | if (max_z .GT. max(z_w) ) then |
---|
1512 | print(" ") |
---|
1513 | print("Maximum of height ('max_z'="+max_z+") is greater than "+\ |
---|
1514 | "available heights (="+max(z_w)+")") |
---|
1515 | print(" ") |
---|
1516 | exit |
---|
1517 | end if |
---|
1518 | end if |
---|
1519 | |
---|
1520 | min_z=min_z/norm_z |
---|
1521 | max_z=max_z/norm_z |
---|
1522 | |
---|
1523 | ; *************************************************** |
---|
1524 | ; read data and create plots |
---|
1525 | ; *************************************************** |
---|
1526 | |
---|
1527 | do ti =0,np-1 |
---|
1528 | if( t_all(ti_in(ti)) .lt. 10^36) then |
---|
1529 | start_time_step = ti |
---|
1530 | break |
---|
1531 | end if |
---|
1532 | end do |
---|
1533 | |
---|
1534 | if (log_z .EQ. 1) then |
---|
1535 | if (check_vType) then |
---|
1536 | data = new((/dim,np,dimz-1/),double) |
---|
1537 | data_0 = new((/np,dimz-1/),double) |
---|
1538 | else |
---|
1539 | data = new((/dim,np,dimz-1/),float) |
---|
1540 | data_0 = new((/np,dimz-1/),float) |
---|
1541 | end if |
---|
1542 | data@_FillValue=9.96921e+36 |
---|
1543 | data_0 = 0.1 |
---|
1544 | t = new((/np,dimz-1/),float) |
---|
1545 | t = 0.0 |
---|
1546 | unit = new(dim,string) |
---|
1547 | if (isvar("z_u"))then |
---|
1548 | if (typeof(z_u) .EQ. "double")then |
---|
1549 | z_v = new((/dim,dimz/),double) |
---|
1550 | z_ = new((/dim,dimz-1/),double) |
---|
1551 | else |
---|
1552 | if (typeof(z_u) .EQ. "float")then |
---|
1553 | z_v = new((/dim,dimz/),float) |
---|
1554 | z_ = new((/dim,dimz-1/),float) |
---|
1555 | end if |
---|
1556 | end if |
---|
1557 | else |
---|
1558 | if (isvar("z_w"))then |
---|
1559 | if (typeof(z_w) .EQ. "double")then |
---|
1560 | z_v = new((/dim,dimz/),double) |
---|
1561 | z_ = new((/dim,dimz-1/),double) |
---|
1562 | else |
---|
1563 | if (typeof(z_w) .EQ. "float")then |
---|
1564 | z_v = new((/dim,dimz/),float) |
---|
1565 | z_ = new((/dim,dimz-1/),float) |
---|
1566 | end if |
---|
1567 | end if |
---|
1568 | end if |
---|
1569 | end if |
---|
1570 | else |
---|
1571 | if (check_vType) then |
---|
1572 | data = new((/dim,np,dimz/),double) |
---|
1573 | data_0 = new((/np,dimz/),double) |
---|
1574 | else |
---|
1575 | data = new((/dim,np,dimz/),float) |
---|
1576 | data_0 = new((/np,dimz/),float) |
---|
1577 | end if |
---|
1578 | data@_FillValue=9.96921e+36 |
---|
1579 | data_0 = 0.0 |
---|
1580 | t = new((/np,dimz/),float) |
---|
1581 | t = 0.0 |
---|
1582 | unit = new(dim,string) |
---|
1583 | if (isvar("z_u"))then |
---|
1584 | if (typeof(z_u) .EQ. "double")then |
---|
1585 | z_v = new((/dim,dimz/),double) |
---|
1586 | z_ = new((/dim,dimz/),double) |
---|
1587 | else |
---|
1588 | if (typeof(z_u) .EQ. "float")then |
---|
1589 | z_v = new((/dim,dimz/),float) |
---|
1590 | z_ = new((/dim,dimz/),float) |
---|
1591 | end if |
---|
1592 | end if |
---|
1593 | else |
---|
1594 | if (isvar("z_w"))then |
---|
1595 | if (typeof(z_w) .EQ. "double")then |
---|
1596 | z_v = new((/dim,dimz/),double) |
---|
1597 | z_ = new((/dim,dimz/),double) |
---|
1598 | else |
---|
1599 | if (typeof(z_w) .EQ. "float")then |
---|
1600 | z_v = new((/dim,dimz/),float) |
---|
1601 | z_ = new((/dim,dimz/),float) |
---|
1602 | end if |
---|
1603 | end if |
---|
1604 | end if |
---|
1605 | end if |
---|
1606 | end if |
---|
1607 | |
---|
1608 | end if |
---|
1609 | ;-------above steps only for first file |
---|
1610 | |
---|
1611 | ; *************************************************** |
---|
1612 | ; indicate plot number |
---|
1613 | ; *************************************************** |
---|
1614 | |
---|
1615 | if (combine .EQ. 1) then |
---|
1616 | n = 1 |
---|
1617 | else |
---|
1618 | n = 0 |
---|
1619 | end if |
---|
1620 | |
---|
1621 | if (over .EQ. 1) then |
---|
1622 | plot_u = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1623 | plot_v = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1624 | plot_w = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1625 | plot_pt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1626 | plot_vpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1627 | plot_lpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1628 | plot_q = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1629 | plot_qv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1630 | plot_ql = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1631 | plot_rho = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1632 | plot_s = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1633 | plot_sa = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1634 | plot_e = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1635 | plot_es = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1636 | plot_km = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1637 | plot_kh = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1638 | plot_l = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1639 | plot_wpup = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1640 | plot_wsus = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1641 | plot_wu = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1642 | plot_wpvp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1643 | plot_wsvs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1644 | plot_wv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1645 | plot_wpptp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1646 | plot_wspts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1647 | plot_wpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1648 | plot_wsptsBC = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1649 | plot_wptBC = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1650 | plot_wpvptp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1651 | plot_wsvpts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1652 | plot_wvpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1653 | plot_wpqp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1654 | plot_wsqs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1655 | plot_wq = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1656 | plot_wpqvp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1657 | plot_wsqvs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1658 | plot_wqv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1659 | plot_wpsp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1660 | plot_wsss = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1661 | plot_ws = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1662 | plot_wpsap = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1663 | plot_wssas = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1664 | plot_wsa = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1665 | plot_wses = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1666 | plot_us2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1667 | plot_vs2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1668 | plot_ws2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1669 | plot_pts2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1670 | plot_ws3 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1671 | plot_Sw = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1672 | plot_ws2pts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1673 | plot_wspts2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1674 | plot_wsususodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1675 | plot_wspsodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1676 | plot_wpeodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
1677 | |
---|
1678 | if (check_vType) then |
---|
1679 | miniu = 100000.d |
---|
1680 | maxiu = -100000.d |
---|
1681 | miniv = 100000.d |
---|
1682 | maxiv = -100000.d |
---|
1683 | miniw = 100000.d |
---|
1684 | maxiw = -100000.d |
---|
1685 | minipt = 100000.d |
---|
1686 | maxipt = -100000.d |
---|
1687 | minivpt = 100000.d |
---|
1688 | maxivpt = -100000.d |
---|
1689 | minilpt = 100000.d |
---|
1690 | maxilpt = -100000.d |
---|
1691 | miniq = 100000.d |
---|
1692 | maxiq = -100000.d |
---|
1693 | miniqv = 100000.d |
---|
1694 | maxiqv = -100000.d |
---|
1695 | miniql = 100000.d |
---|
1696 | maxiql = -100000.d |
---|
1697 | minie = 100000.d |
---|
1698 | maxie = -100000.d |
---|
1699 | minies = 100000.d |
---|
1700 | maxies = -100000.d |
---|
1701 | minikm = 100000.d |
---|
1702 | maxikm = -100000.d |
---|
1703 | minikh = 100000.d |
---|
1704 | maxikh = -100000.d |
---|
1705 | miniwpup = 100000.d |
---|
1706 | maxiwpup = -100000.d |
---|
1707 | miniwsus = 100000.d |
---|
1708 | maxiwsus = -100000.d |
---|
1709 | miniwu = 100000.d |
---|
1710 | maxiwu = -100000.d |
---|
1711 | miniwpvp = 100000.d |
---|
1712 | maxiwpvp = -100000.d |
---|
1713 | miniwsvs = 100000.d |
---|
1714 | maxiwsvs = -100000.d |
---|
1715 | miniwv = 100000.d |
---|
1716 | maxiwv = -100000.d |
---|
1717 | miniwpptp = 100000.d |
---|
1718 | maxiwpptp = -100000.d |
---|
1719 | miniwspts = 100000.d |
---|
1720 | maxiwspts = -100000.d |
---|
1721 | miniwpt = 100000.d |
---|
1722 | maxiwpt = -100000.d |
---|
1723 | miniwsptsBC = 100000.d |
---|
1724 | maxiwsptsBC = -100000.d |
---|
1725 | miniwptBC = 100000.d |
---|
1726 | maxiwptBC = -100000.d |
---|
1727 | miniwpvptp = 100000.d |
---|
1728 | maxiwpvptp = -100000.d |
---|
1729 | miniwsvpts = 100000.d |
---|
1730 | maxiwsvpts = -100000.d |
---|
1731 | miniwvpt = 100000.d |
---|
1732 | maxiwvpt = -100000.d |
---|
1733 | miniwpqp = 100000.d |
---|
1734 | maxiwpqp = -100000.d |
---|
1735 | miniwsqs = 100000.d |
---|
1736 | maxiwsqs = -100000.d |
---|
1737 | miniwq = 100000.d |
---|
1738 | maxiwq = -100000.d |
---|
1739 | miniwpqvp = 100000.d |
---|
1740 | maxiwpqvp = -100000.d |
---|
1741 | miniwsqvs = 100000.d |
---|
1742 | maxiwsqvs = -100000.d |
---|
1743 | miniwqv = 100000.d |
---|
1744 | maxiwqv = -100000.d |
---|
1745 | miniwpsp = 100000.d |
---|
1746 | maxiwpsp = -100000.d |
---|
1747 | miniwsss = 100000.d |
---|
1748 | maxiwsss = -100000.d |
---|
1749 | miniws = 100000.d |
---|
1750 | maxiws = -100000.d |
---|
1751 | miniwpsap = 100000.d |
---|
1752 | maxiwpsap = -100000.d |
---|
1753 | miniwssas = 100000.d |
---|
1754 | maxiwssas = -100000.d |
---|
1755 | miniwsa = 100000.d |
---|
1756 | maxiwsa = -100000.d |
---|
1757 | minius2 = 100000.d |
---|
1758 | maxius2 = -100000.d |
---|
1759 | minivs2 = 100000.d |
---|
1760 | maxivs2 = -100000.d |
---|
1761 | miniws2 = 100000.d |
---|
1762 | maxiws2 = -100000.d |
---|
1763 | miniwsususodz = 100000.d |
---|
1764 | maxiwsususodz = -100000.d |
---|
1765 | miniwspsodz = 100000.d |
---|
1766 | maxiwspsodz = -100000.d |
---|
1767 | miniwpeodz = 100000.d |
---|
1768 | maxiwpeodz = -100000.d |
---|
1769 | else |
---|
1770 | miniu = 100000. |
---|
1771 | maxiu = -100000. |
---|
1772 | miniv = 100000. |
---|
1773 | maxiv = -100000. |
---|
1774 | miniw = 100000. |
---|
1775 | maxiw = -100000. |
---|
1776 | minipt = 100000. |
---|
1777 | maxipt = -100000. |
---|
1778 | minivpt = 100000. |
---|
1779 | maxivpt = -100000. |
---|
1780 | minilpt = 100000. |
---|
1781 | maxilpt = -100000. |
---|
1782 | miniq = 100000. |
---|
1783 | maxiq = -100000. |
---|
1784 | miniqv = 100000. |
---|
1785 | maxiqv = -100000. |
---|
1786 | miniql = 100000. |
---|
1787 | maxiql = -100000. |
---|
1788 | minie = 100000. |
---|
1789 | maxie = -100000. |
---|
1790 | minies = 100000. |
---|
1791 | maxies = -100000. |
---|
1792 | minikm = 100000. |
---|
1793 | maxikm = -100000. |
---|
1794 | minikh = 100000. |
---|
1795 | maxikh = -100000. |
---|
1796 | miniwpup = 100000. |
---|
1797 | maxiwpup = -100000. |
---|
1798 | miniwsus = 100000. |
---|
1799 | maxiwsus = -100000. |
---|
1800 | miniwu = 100000. |
---|
1801 | maxiwu = -100000. |
---|
1802 | miniwpvp = 100000. |
---|
1803 | maxiwpvp = -100000. |
---|
1804 | miniwsvs = 100000. |
---|
1805 | maxiwsvs = -100000. |
---|
1806 | miniwv = 100000. |
---|
1807 | maxiwv = -100000. |
---|
1808 | miniwpptp = 100000. |
---|
1809 | maxiwpptp = -100000. |
---|
1810 | miniwspts = 100000. |
---|
1811 | maxiwspts = -100000. |
---|
1812 | miniwpt = 100000. |
---|
1813 | maxiwpt = -100000. |
---|
1814 | miniwsptsBC = 100000. |
---|
1815 | maxiwsptsBC = -100000. |
---|
1816 | miniwptBC = 100000. |
---|
1817 | maxiwptBC = -100000. |
---|
1818 | miniwpvptp = 100000. |
---|
1819 | maxiwpvptp = -100000. |
---|
1820 | miniwsvpts = 100000. |
---|
1821 | maxiwsvpts = -100000. |
---|
1822 | miniwvpt = 100000. |
---|
1823 | maxiwvpt = -100000. |
---|
1824 | miniwpqp = 100000. |
---|
1825 | maxiwpqp = -100000. |
---|
1826 | miniwsqs = 100000. |
---|
1827 | maxiwsqs = -100000. |
---|
1828 | miniwq = 100000. |
---|
1829 | maxiwq = -100000. |
---|
1830 | miniwpqvp = 100000. |
---|
1831 | maxiwpqvp = -100000. |
---|
1832 | miniwsqvs = 100000. |
---|
1833 | maxiwsqvs = -100000. |
---|
1834 | miniwqv = 100000. |
---|
1835 | maxiwqv = -100000. |
---|
1836 | miniwpsp = 100000. |
---|
1837 | maxiwpsp = -100000. |
---|
1838 | miniwsss = 100000. |
---|
1839 | maxiwsss = -100000. |
---|
1840 | miniws = 100000. |
---|
1841 | maxiws = -100000. |
---|
1842 | miniwpsap = 100000. |
---|
1843 | maxiwpsap = -100000. |
---|
1844 | miniwssas = 100000. |
---|
1845 | maxiwssas = -100000. |
---|
1846 | miniwsa = 100000. |
---|
1847 | maxiwsa = -100000. |
---|
1848 | minius2 = 100000. |
---|
1849 | maxius2 = -100000. |
---|
1850 | minivs2 = 100000. |
---|
1851 | maxivs2 = -100000. |
---|
1852 | miniws2 = 100000. |
---|
1853 | maxiws2 = -100000. |
---|
1854 | miniwsususodz = 100000. |
---|
1855 | maxiwsususodz = -100000. |
---|
1856 | miniwspsodz = 100000. |
---|
1857 | maxiwspsodz = -100000. |
---|
1858 | miniwpeodz = 100000. |
---|
1859 | maxiwpeodz = -100000. |
---|
1860 | end if |
---|
1861 | |
---|
1862 | end if |
---|
1863 | |
---|
1864 | if (prof3d .EQ. 1)then |
---|
1865 | |
---|
1866 | if (end_x .EQ. -1) then |
---|
1867 | end_x=dimx-2 |
---|
1868 | end if |
---|
1869 | if (end_y .EQ. -1)then |
---|
1870 | end_y=dimy-2 |
---|
1871 | end if |
---|
1872 | if (start_x .LT. 0)then |
---|
1873 | print(" ") |
---|
1874 | print("'start_x' is lower than 0 and set to 0") |
---|
1875 | print(" ") |
---|
1876 | start_x=0 |
---|
1877 | end if |
---|
1878 | if (start_x .GT. dimx-1)then |
---|
1879 | print(" ") |
---|
1880 | print("'start_x' is greater than available x-range and set to "+\ |
---|
1881 | "maximum of x-range (excluding ghostpoint)") |
---|
1882 | print(" ") |
---|
1883 | start_x=dimx-2 |
---|
1884 | end if |
---|
1885 | if (end_x .EQ. dimx-1)then |
---|
1886 | print(" ") |
---|
1887 | print("'end_x' = "+end_x+" and includes the ghostpoint") |
---|
1888 | print(" ") |
---|
1889 | end if |
---|
1890 | if (end_x .GT. dimx-1)then |
---|
1891 | print(" ") |
---|
1892 | print("'end_x' = "+end_x+" is greater than available x-range and set "+\ |
---|
1893 | "to maximum of x-range (excluding ghostpoint)") |
---|
1894 | print(" ") |
---|
1895 | end_x=dimx-2 |
---|
1896 | end if |
---|
1897 | if (end_x .LT. start_x)then |
---|
1898 | print(" ") |
---|
1899 | print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+\ |
---|
1900 | " and set to maximum of x-range (excluding ghostpoint)") |
---|
1901 | print(" ") |
---|
1902 | end_x=dimx-2 |
---|
1903 | end if |
---|
1904 | if (start_y .LT. 0)then |
---|
1905 | print(" ") |
---|
1906 | print("'start_y' is lower than 0 and set to 0") |
---|
1907 | print(" ") |
---|
1908 | start_y=0 |
---|
1909 | end if |
---|
1910 | if (start_y .GT. dimy-1)then |
---|
1911 | print(" ") |
---|
1912 | print("'start_y' is greater than available y-range and set to "+\ |
---|
1913 | "maximum of y-range (excluding ghostpoint)") |
---|
1914 | print(" ") |
---|
1915 | start_x=dimy-2 |
---|
1916 | end if |
---|
1917 | if (end_y .EQ. dimy-1)then |
---|
1918 | print(" ") |
---|
1919 | print("'end_y' = "+end_y+" and includes the ghostpoint") |
---|
1920 | print(" ") |
---|
1921 | end if |
---|
1922 | if (end_y .GT. dimy-1)then |
---|
1923 | print(" ") |
---|
1924 | print("'end_y' = "+end_y+" is greater than available y-range and "+\ |
---|
1925 | "set to maximum of y-range (excluding ghostpoint)") |
---|
1926 | print(" ") |
---|
1927 | end_x=dimy-2 |
---|
1928 | end if |
---|
1929 | if (end_y .LT. start_y)then |
---|
1930 | print(" ") |
---|
1931 | print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+\ |
---|
1932 | " and set to maximum of y-range (excluding ghostpoint)") |
---|
1933 | print(" ") |
---|
1934 | end_y=dimy-2 |
---|
1935 | end if |
---|
1936 | |
---|
1937 | end if |
---|
1938 | |
---|
1939 | n_o=0 |
---|
1940 | count_var=0 |
---|
1941 | |
---|
1942 | res@xyDashPattern = 1*nof |
---|
1943 | |
---|
1944 | over_remind = False |
---|
1945 | if ( over .eq. 1)then |
---|
1946 | over_remind = True |
---|
1947 | end if |
---|
1948 | |
---|
1949 | do varn = 0,dim-1 |
---|
1950 | |
---|
1951 | check = True |
---|
1952 | |
---|
1953 | if (prof3d .EQ. 0) then |
---|
1954 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
1955 | isStrSubset( vNam(varn), "NORM")) then |
---|
1956 | check = False |
---|
1957 | end if |
---|
1958 | else |
---|
1959 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
1960 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
1961 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
1962 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
1963 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
1964 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
1965 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
1966 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
1967 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
1968 | check = False |
---|
1969 | end if |
---|
1970 | end if |
---|
1971 | |
---|
1972 | if (var .NE. "all") then |
---|
1973 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
1974 | end if |
---|
1975 | |
---|
1976 | if (combine .EQ. 1) then |
---|
1977 | com=isStrSubset(c_var,","+vNam(varn)+"," ) |
---|
1978 | if (com) then |
---|
1979 | if (prof3d .EQ. 0) then |
---|
1980 | temp = f[:]->$vNam(varn)$ |
---|
1981 | temp_att = f_att->$vNam(varn)$ |
---|
1982 | if (log_z .EQ. 1) then |
---|
1983 | do j=0,np-1 |
---|
1984 | data(varn,j,:) = temp(ti_in(j),1:dimz-1) |
---|
1985 | end do |
---|
1986 | else |
---|
1987 | do j=0,np-1 |
---|
1988 | data(varn,j,:) = temp(ti_in(j),0:dimz-1) |
---|
1989 | end do |
---|
1990 | end if |
---|
1991 | else |
---|
1992 | if (log_z .EQ. 1) then |
---|
1993 | do i=1,dimz-1 |
---|
1994 | do j=0,np-1 |
---|
1995 | temp = f[:]->$vNam(varn)$ |
---|
1996 | temp_att = f_att->$vNam(varn)$ |
---|
1997 | data_temp = temp(ti_in(j),i,\ |
---|
1998 | start_y:end_y,start_x:end_x) |
---|
1999 | data(varn,j,i-1) = dim_avg_Wrap(\ |
---|
2000 | dim_avg_Wrap(data_temp)) |
---|
2001 | end do |
---|
2002 | end do |
---|
2003 | else |
---|
2004 | do i=0,dimz-1 |
---|
2005 | do j=0,np-1 |
---|
2006 | temp = f[:]->$vNam(varn)$ |
---|
2007 | temp_att = f_att->$vNam(varn)$ |
---|
2008 | data_temp = temp(ti_in(j),i,\ |
---|
2009 | start_y:end_y,start_x:end_x) |
---|
2010 | data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
2011 | end do |
---|
2012 | end do |
---|
2013 | end if |
---|
2014 | print(" ") |
---|
2015 | print("Variable for combine '"+vNam(varn)+"' is read") |
---|
2016 | print(" ") |
---|
2017 | end if |
---|
2018 | unit(varn) = temp_att@units |
---|
2019 | if (n_o .GT. number_comb-1) then |
---|
2020 | print(" ") |
---|
2021 | print("Set 'number_comb' to the number of overlaying "+\ |
---|
2022 | "variables ('c_var' = "+c_var+")") |
---|
2023 | print(" ") |
---|
2024 | exit |
---|
2025 | end if |
---|
2026 | if (abs(min(data(varn,:,:))) .GT. 10)then |
---|
2027 | min_value = abs(0.01*min(data(varn,:,:))) |
---|
2028 | max_value = abs(0.01*max(data(varn,:,:))) |
---|
2029 | else |
---|
2030 | if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
2031 | abs(max(data(varn,:,:))) .GT. 0.01)then |
---|
2032 | min_value = abs(0.1*max(data(varn,:,:))) |
---|
2033 | max_value = abs(0.1*max(data(varn,:,:))) |
---|
2034 | else |
---|
2035 | if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
2036 | abs(min(data(varn,:,:))) .GT. 0.01)then |
---|
2037 | min_value = abs(0.1*min(data(varn,:,:))) |
---|
2038 | max_value = abs(0.1*min(data(varn,:,:))) |
---|
2039 | else |
---|
2040 | min_value = abs(0.1*min(data(varn,:,:))) |
---|
2041 | max_value = abs(0.1*max(data(varn,:,:))) |
---|
2042 | end if |
---|
2043 | end if |
---|
2044 | end if |
---|
2045 | if (min(data(varn,:,:)) .EQ. 0 .AND. \ |
---|
2046 | max(data(varn,:,:)) .EQ. 0)then |
---|
2047 | min_value = 0.1 |
---|
2048 | max_value = 0.1 |
---|
2049 | end if |
---|
2050 | mini(n_o)=min(data(varn,:,:)) |
---|
2051 | maxi(n_o)=max(data(varn,:,:)) |
---|
2052 | n_o=n_o+1 |
---|
2053 | end if |
---|
2054 | end if |
---|
2055 | |
---|
2056 | if(check) then |
---|
2057 | |
---|
2058 | count_var=count_var+1 |
---|
2059 | |
---|
2060 | if (prof3d .EQ. 0) then |
---|
2061 | temp = f[:]->$vNam(varn)$ |
---|
2062 | temp_att = f_att->$vNam(varn)$ |
---|
2063 | else |
---|
2064 | if (log_z .EQ. 1) then |
---|
2065 | do i=1,dimz-1 |
---|
2066 | do j=0,np-1 |
---|
2067 | temp= f[:]->$vNam(varn)$ |
---|
2068 | temp_att = f_att->$vNam(varn)$ |
---|
2069 | data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x) |
---|
2070 | data(varn,j,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
2071 | delete(data_temp) |
---|
2072 | end do |
---|
2073 | end do |
---|
2074 | else |
---|
2075 | do i=0,dimz-1 |
---|
2076 | do j=0,np-1 |
---|
2077 | temp= f[:]->$vNam(varn)$ |
---|
2078 | temp_att = f_att->$vNam(varn)$ |
---|
2079 | data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x) |
---|
2080 | data_temp!0 = "t" |
---|
2081 | data_temp!1 = "z" |
---|
2082 | data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
2083 | delete(data_temp) |
---|
2084 | end do |
---|
2085 | end do |
---|
2086 | end if |
---|
2087 | print(" ") |
---|
2088 | print("Variable '"+vNam(varn)+"' is read") |
---|
2089 | print(" ") |
---|
2090 | unit(varn) = temp_att@units |
---|
2091 | a=getvardims(temp_att) |
---|
2092 | b=dimsizes(a) |
---|
2093 | end if |
---|
2094 | |
---|
2095 | if (prof3d .EQ. 0) then |
---|
2096 | if (log_z .EQ. 1) then |
---|
2097 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
2098 | unit(varn) = temp_att@units |
---|
2099 | do j=0,np-1 |
---|
2100 | data(varn,j,:) = temp(ti_in(j),1:dimz-1) |
---|
2101 | end do |
---|
2102 | else |
---|
2103 | z = f_att->$vNam(varn+1)$ |
---|
2104 | unit(varn) = temp_att@units |
---|
2105 | do j=0,np-1 |
---|
2106 | data(varn,j,:) = temp(ti_in(j),:) |
---|
2107 | end do |
---|
2108 | end if |
---|
2109 | else |
---|
2110 | do i=0,b-1 |
---|
2111 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
2112 | z_v(varn,:) = z_u |
---|
2113 | if (log_z .EQ. 1) then |
---|
2114 | z = z_v(varn,1:dimz-1) |
---|
2115 | else |
---|
2116 | z = z_v(varn,:) |
---|
2117 | end if |
---|
2118 | else |
---|
2119 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
2120 | z_v(varn,:) = z_w |
---|
2121 | if (log_z .EQ. 1) then |
---|
2122 | z = z_v(varn,1:dimz-1) |
---|
2123 | else |
---|
2124 | z = z_v(varn,:) |
---|
2125 | end if |
---|
2126 | end if |
---|
2127 | end if |
---|
2128 | end do |
---|
2129 | end if |
---|
2130 | |
---|
2131 | if (isStrSubset(data@long_name," SR " ) ) then |
---|
2132 | over = 0 |
---|
2133 | end if |
---|
2134 | |
---|
2135 | if (nof .EQ. 0) then |
---|
2136 | z_(n,:)=z/norm_z |
---|
2137 | z = z_(n,:) |
---|
2138 | else |
---|
2139 | z=z/norm_z |
---|
2140 | end if |
---|
2141 | |
---|
2142 | delta_z = z(2) - z(1) |
---|
2143 | |
---|
2144 | max_z_int=doubletoint(max_z/delta_z) |
---|
2145 | min_z_int=doubletoint(min_z/delta_z) |
---|
2146 | |
---|
2147 | if(max_z_int .eq. min_z_int) |
---|
2148 | print(" ") |
---|
2149 | print("Please increase 'max_z' or decrease 'min_z' so that "+\ |
---|
2150 | "there are") |
---|
2151 | print("at least two layers for the z-axis to plot") |
---|
2152 | print(" ") |
---|
2153 | exit |
---|
2154 | end if |
---|
2155 | |
---|
2156 | if(min_z_int .gt. max_z_int) |
---|
2157 | print(" ") |
---|
2158 | print("'min_z' is greater than 'max_z',") |
---|
2159 | print("please change this") |
---|
2160 | print(" ") |
---|
2161 | exit |
---|
2162 | end if |
---|
2163 | |
---|
2164 | if (max_z_int .ge. dimz-1) |
---|
2165 | max_z_int = dimz-1 |
---|
2166 | if (log_z .EQ. 1) then |
---|
2167 | max_z_int = max_z_int - 1 |
---|
2168 | end if |
---|
2169 | end if |
---|
2170 | |
---|
2171 | if (min_z_int .lt. 0) |
---|
2172 | min_z_int = 0 |
---|
2173 | if (log_z .EQ. 1) then |
---|
2174 | min_z_int = min_z_int + 1 |
---|
2175 | end if |
---|
2176 | end if |
---|
2177 | |
---|
2178 | ;data can contain missing values in case of output of t=0h (inital profiles) |
---|
2179 | ;where no output is possible |
---|
2180 | n_not_ismissing = num(.not.ismissing(data(varn,:,:))) |
---|
2181 | |
---|
2182 | if (n_not_ismissing .GT. 0 ) then |
---|
2183 | |
---|
2184 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then |
---|
2185 | min_value = abs(0.001*min(data(varn,:,min_z_int:max_z_int))) |
---|
2186 | max_value = abs(0.001*max(data(varn,:,min_z_int:max_z_int))) |
---|
2187 | else |
---|
2188 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ |
---|
2189 | abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
2190 | min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
2191 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
2192 | else |
---|
2193 | if (abs(max(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND.\ |
---|
2194 | abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
2195 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
2196 | max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
2197 | else |
---|
2198 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
2199 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
2200 | end if |
---|
2201 | end if |
---|
2202 | end if |
---|
2203 | |
---|
2204 | if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND. \ |
---|
2205 | max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then |
---|
2206 | min_value = 0.1 |
---|
2207 | max_value = 0.1 |
---|
2208 | end if |
---|
2209 | |
---|
2210 | else |
---|
2211 | print(" ") |
---|
2212 | print(vNam(varn) + " contains only missing values") |
---|
2213 | print(" ") |
---|
2214 | end if |
---|
2215 | |
---|
2216 | if (over .EQ. 0) then |
---|
2217 | res@gsnLeftString = " " |
---|
2218 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2219 | res@gsnRightString = " " |
---|
2220 | res@trYMinF = min_z |
---|
2221 | res@trYMaxF = max_z |
---|
2222 | if (xs .EQ. -1) then |
---|
2223 | res@trXMinF = min(data(varn,:,min_z_int:max_z_int))-\ |
---|
2224 | min_value |
---|
2225 | else |
---|
2226 | res@trXMinF = xs |
---|
2227 | end if |
---|
2228 | if (xe .EQ. -1) then |
---|
2229 | res@trXMaxF = max(data(varn,:,min_z_int:max_z_int))+\ |
---|
2230 | max_value |
---|
2231 | else |
---|
2232 | res@trXMaxF = xe |
---|
2233 | end if |
---|
2234 | |
---|
2235 | if (c_var_log .EQ. 1) then |
---|
2236 | if ((mod(com_i, no_rows * no_columns) .EQ. 0) .AND. (no_files .LT. 2))then |
---|
2237 | res@pmLegendDisplayMode = "Always" |
---|
2238 | else |
---|
2239 | res@pmLegendDisplayMode = "Never" |
---|
2240 | end if |
---|
2241 | else |
---|
2242 | if ((mod(no_plots-1-n+combine, no_rows * no_columns) .EQ. 0) .AND. (no_files .LT. 2))then |
---|
2243 | res@pmLegendDisplayMode = "Always" |
---|
2244 | else |
---|
2245 | res@pmLegendDisplayMode = "Never" |
---|
2246 | end if |
---|
2247 | end if |
---|
2248 | |
---|
2249 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2250 | |
---|
2251 | end if |
---|
2252 | |
---|
2253 | |
---|
2254 | if (vNam(varn) .EQ. "u" ) then |
---|
2255 | miniu=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2256 | maxiu=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2257 | if (over .EQ. 1) then |
---|
2258 | res@xyDashPattern = 0 |
---|
2259 | plot_u = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2260 | else |
---|
2261 | res@gsnLeftString = " " |
---|
2262 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2263 | res@gsnRightString = " " |
---|
2264 | if (xs .EQ. -1) then |
---|
2265 | res@trXMinF = miniu |
---|
2266 | else |
---|
2267 | res@trXMinF = xs |
---|
2268 | end if |
---|
2269 | if (xe .EQ. -1) then |
---|
2270 | res@trXMaxF = maxiu |
---|
2271 | else |
---|
2272 | res@trXMaxF = xe |
---|
2273 | end if |
---|
2274 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2275 | end if |
---|
2276 | end if |
---|
2277 | if (vNam(varn) .EQ. "v") then |
---|
2278 | miniv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2279 | maxiv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2280 | if (over .EQ. 1) then |
---|
2281 | res@xyMonoDashPattern = True |
---|
2282 | res@xyDashPattern = 1 |
---|
2283 | plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2284 | else |
---|
2285 | res@gsnLeftString = " " |
---|
2286 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2287 | res@gsnRightString = " " |
---|
2288 | if (xs .EQ. -1) then |
---|
2289 | res@trXMinF = miniv |
---|
2290 | else |
---|
2291 | res@trXMinF = xs |
---|
2292 | end if |
---|
2293 | if (xe .EQ. -1) then |
---|
2294 | res@trXMaxF = maxiv |
---|
2295 | else |
---|
2296 | res@trXMaxF = xe |
---|
2297 | end if |
---|
2298 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2299 | end if |
---|
2300 | end if |
---|
2301 | if (vNam(varn) .EQ. "w") then |
---|
2302 | miniw=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2303 | maxiw=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2304 | if (over .EQ. 1) then |
---|
2305 | res@xyDashPattern = 2 |
---|
2306 | plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2307 | else |
---|
2308 | res@gsnLeftString = " " |
---|
2309 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2310 | res@gsnRightString = " " |
---|
2311 | if (xs .EQ. -1) then |
---|
2312 | res@trXMinF = miniw |
---|
2313 | else |
---|
2314 | res@trXMinF = xs |
---|
2315 | end if |
---|
2316 | if (xe .EQ. -1) then |
---|
2317 | res@trXMaxF = maxiw |
---|
2318 | else |
---|
2319 | res@trXMaxF = xe |
---|
2320 | end if |
---|
2321 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2322 | end if |
---|
2323 | end if |
---|
2324 | |
---|
2325 | if (vNam(varn) .EQ. "pt") then |
---|
2326 | minipt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2327 | maxipt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2328 | if (over .EQ. 1) then |
---|
2329 | res@xyDashPattern = 0 |
---|
2330 | plot_pt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2331 | else |
---|
2332 | res@gsnLeftString = " " |
---|
2333 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2334 | res@gsnRightString = " " |
---|
2335 | if (xs .EQ. -1) then |
---|
2336 | res@trXMinF = minipt |
---|
2337 | else |
---|
2338 | res@trXMinF = xs |
---|
2339 | end if |
---|
2340 | if (xe .EQ. -1) then |
---|
2341 | res@trXMaxF = maxipt |
---|
2342 | else |
---|
2343 | res@trXMaxF = xe |
---|
2344 | end if |
---|
2345 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2346 | end if |
---|
2347 | end if |
---|
2348 | if (vNam(varn) .EQ. "vpt") then |
---|
2349 | minivpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2350 | maxivpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2351 | if (over .EQ. 1) then |
---|
2352 | res@xyDashPattern = 1 |
---|
2353 | plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2354 | else |
---|
2355 | res@gsnLeftString = " " |
---|
2356 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2357 | res@gsnRightString = " " |
---|
2358 | if (xs .EQ. -1) then |
---|
2359 | res@trXMinF = minivpt |
---|
2360 | else |
---|
2361 | res@trXMinF = xs |
---|
2362 | end if |
---|
2363 | if (xe .EQ. -1) then |
---|
2364 | res@trXMaxF = maxivpt |
---|
2365 | else |
---|
2366 | res@trXMaxF = xe |
---|
2367 | end if |
---|
2368 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2369 | end if |
---|
2370 | end if |
---|
2371 | if (vNam(varn) .EQ. "lpt") then |
---|
2372 | minilpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2373 | maxilpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2374 | if (over .EQ. 1) then |
---|
2375 | res@xyDashPattern = 2 |
---|
2376 | plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2377 | else |
---|
2378 | res@gsnLeftString = " " |
---|
2379 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2380 | res@gsnRightString = " " |
---|
2381 | if (xs .EQ. -1) then |
---|
2382 | res@trXMinF = minilpt |
---|
2383 | else |
---|
2384 | res@trXMinF = xs |
---|
2385 | end if |
---|
2386 | if (xe .EQ. -1) then |
---|
2387 | res@trXMaxF = maxilpt |
---|
2388 | else |
---|
2389 | res@trXMaxF = xe |
---|
2390 | end if |
---|
2391 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2392 | end if |
---|
2393 | end if |
---|
2394 | |
---|
2395 | if (vNam(varn) .EQ. "q") then |
---|
2396 | miniq=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2397 | maxiq=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2398 | if (over .EQ. 1) then |
---|
2399 | res@xyDashPattern = 0 |
---|
2400 | plot_q = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2401 | else |
---|
2402 | res@gsnLeftString = " " |
---|
2403 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2404 | res@gsnRightString = " " |
---|
2405 | if (xs .EQ. -1) then |
---|
2406 | res@trXMinF = miniq |
---|
2407 | else |
---|
2408 | res@trXMinF = xs |
---|
2409 | end if |
---|
2410 | if (xe .EQ. -1) then |
---|
2411 | res@trXMaxF = maxiq |
---|
2412 | else |
---|
2413 | res@trXMaxF = xe |
---|
2414 | end if |
---|
2415 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2416 | end if |
---|
2417 | end if |
---|
2418 | if (vNam(varn) .EQ. "qv") then |
---|
2419 | miniqv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2420 | maxiqv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2421 | if (over .EQ. 1) then |
---|
2422 | res@xyDashPattern = 1 |
---|
2423 | plot_qv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2424 | else |
---|
2425 | res@gsnLeftString = " " |
---|
2426 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2427 | res@gsnRightString = " " |
---|
2428 | if (xs .EQ. -1) then |
---|
2429 | res@trXMinF = miniqv |
---|
2430 | else |
---|
2431 | res@trXMinF = xs |
---|
2432 | end if |
---|
2433 | if (xe .EQ. -1) then |
---|
2434 | res@trXMaxF = maxiqv |
---|
2435 | else |
---|
2436 | res@trXMaxF = xe |
---|
2437 | end if |
---|
2438 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2439 | end if |
---|
2440 | end if |
---|
2441 | if (vNam(varn) .EQ. "ql") then |
---|
2442 | miniql=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2443 | maxiql=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2444 | if (over .EQ. 1) then |
---|
2445 | res@xyDashPattern = 2 |
---|
2446 | plot_ql = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2447 | else |
---|
2448 | res@gsnLeftString = " " |
---|
2449 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2450 | res@gsnRightString = " " |
---|
2451 | if (xs .EQ. -1) then |
---|
2452 | res@trXMinF = miniql |
---|
2453 | else |
---|
2454 | res@trXMinF = xs |
---|
2455 | end if |
---|
2456 | if (xe .EQ. -1) then |
---|
2457 | res@trXMaxF = maxiql |
---|
2458 | else |
---|
2459 | res@trXMaxF = xe |
---|
2460 | end if |
---|
2461 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2462 | end if |
---|
2463 | end if |
---|
2464 | |
---|
2465 | if (vNam(varn) .EQ. "e") then |
---|
2466 | minie=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2467 | maxie=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2468 | if (over .EQ. 1) then |
---|
2469 | res@xyDashPattern = 0 |
---|
2470 | plot_e = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2471 | else |
---|
2472 | res@gsnLeftString = " " |
---|
2473 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2474 | res@gsnRightString = " " |
---|
2475 | if (xs .EQ. -1) then |
---|
2476 | res@trXMinF = minie |
---|
2477 | else |
---|
2478 | res@trXMinF = xs |
---|
2479 | end if |
---|
2480 | if (xe .EQ. -1) then |
---|
2481 | res@trXMaxF = maxie |
---|
2482 | else |
---|
2483 | res@trXMaxF = xe |
---|
2484 | end if |
---|
2485 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2486 | end if |
---|
2487 | end if |
---|
2488 | if (vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*") then |
---|
2489 | minies=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2490 | maxies=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2491 | if (over .EQ. 1) then |
---|
2492 | res@xyDashPattern = 1 |
---|
2493 | plot_es = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2494 | else |
---|
2495 | res@gsnLeftString = " " |
---|
2496 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2497 | res@gsnRightString = " " |
---|
2498 | if (xs .EQ. -1) then |
---|
2499 | res@trXMinF = minies |
---|
2500 | else |
---|
2501 | res@trXMinF = xs |
---|
2502 | end if |
---|
2503 | if (xe .EQ. -1) then |
---|
2504 | res@trXMaxF = maxies |
---|
2505 | else |
---|
2506 | res@trXMaxF = xe |
---|
2507 | end if |
---|
2508 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2509 | end if |
---|
2510 | end if |
---|
2511 | |
---|
2512 | if (vNam(varn) .EQ. "km") then |
---|
2513 | minikm=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2514 | maxikm=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2515 | if (over .EQ. 1) then |
---|
2516 | res@xyDashPattern = 0 |
---|
2517 | plot_km = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2518 | else |
---|
2519 | res@gsnLeftString = " " |
---|
2520 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2521 | res@gsnRightString = " " |
---|
2522 | if (xs .EQ. -1) then |
---|
2523 | res@trXMinF = minikm |
---|
2524 | else |
---|
2525 | res@trXMinF = xs |
---|
2526 | end if |
---|
2527 | if (xe .EQ. -1) then |
---|
2528 | res@trXMaxF = maxikm |
---|
2529 | else |
---|
2530 | res@trXMaxF = xe |
---|
2531 | end if |
---|
2532 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2533 | end if |
---|
2534 | end if |
---|
2535 | if (vNam(varn) .EQ. "kh") then |
---|
2536 | minikh=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2537 | maxikh=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2538 | if (over .EQ. 1) then |
---|
2539 | res@xyDashPattern = 1 |
---|
2540 | plot_kh = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2541 | else |
---|
2542 | res@gsnLeftString = " " |
---|
2543 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2544 | res@gsnRightString = " " |
---|
2545 | if (xs .EQ. -1) then |
---|
2546 | res@trXMinF = minikh |
---|
2547 | else |
---|
2548 | res@trXMinF = xs |
---|
2549 | end if |
---|
2550 | if (xe .EQ. -1) then |
---|
2551 | res@trXMaxF = maxikh |
---|
2552 | else |
---|
2553 | res@trXMaxF = xe |
---|
2554 | end if |
---|
2555 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2556 | end if |
---|
2557 | end if |
---|
2558 | |
---|
2559 | if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq) then |
---|
2560 | miniwpup=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2561 | maxiwpup=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2562 | if (over .EQ. 1) then |
---|
2563 | res@xyDashPattern = 0 |
---|
2564 | plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2565 | else |
---|
2566 | res@gsnLeftString = " " |
---|
2567 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2568 | res@gsnRightString = " " |
---|
2569 | if (xs .EQ. -1) then |
---|
2570 | res@trXMinF = miniwpup |
---|
2571 | else |
---|
2572 | res@trXMinF = xs |
---|
2573 | end if |
---|
2574 | if (xe .EQ. -1) then |
---|
2575 | res@trXMaxF = maxiwpup |
---|
2576 | else |
---|
2577 | res@trXMaxF = xe |
---|
2578 | end if |
---|
2579 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2580 | end if |
---|
2581 | end if |
---|
2582 | if (vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "w*u*") then |
---|
2583 | miniwsus=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2584 | maxiwsus=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2585 | if (over .EQ. 1) then |
---|
2586 | res@xyDashPattern = 1 |
---|
2587 | plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2588 | else |
---|
2589 | res@gsnLeftString = " " |
---|
2590 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2591 | res@gsnRightString = " " |
---|
2592 | if (xs .EQ. -1) then |
---|
2593 | res@trXMinF = miniwsus |
---|
2594 | else |
---|
2595 | res@trXMinF = xs |
---|
2596 | end if |
---|
2597 | if (xe .EQ. -1) then |
---|
2598 | res@trXMaxF = maxiwsus |
---|
2599 | else |
---|
2600 | res@trXMaxF = xe |
---|
2601 | end if |
---|
2602 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2603 | end if |
---|
2604 | end if |
---|
2605 | if (vNam(varn) .EQ. "wu") then |
---|
2606 | miniwu=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2607 | maxiwu=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2608 | if (over .EQ. 1) then |
---|
2609 | res@xyDashPattern = 2 |
---|
2610 | plot_wu = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2611 | else |
---|
2612 | res@gsnLeftString = " " |
---|
2613 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2614 | res@gsnRightString = " " |
---|
2615 | if (xs .EQ. -1) then |
---|
2616 | res@trXMinF = miniwu |
---|
2617 | else |
---|
2618 | res@trXMinF = xs |
---|
2619 | end if |
---|
2620 | if (xe .EQ. -1) then |
---|
2621 | res@trXMaxF = maxiwu |
---|
2622 | else |
---|
2623 | res@trXMaxF = xe |
---|
2624 | end if |
---|
2625 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2626 | end if |
---|
2627 | end if |
---|
2628 | |
---|
2629 | if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq) then |
---|
2630 | miniwpvp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2631 | maxiwpvp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2632 | if (over .EQ. 1) then |
---|
2633 | res@xyDashPattern = 0 |
---|
2634 | plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2635 | else |
---|
2636 | res@gsnLeftString = " " |
---|
2637 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2638 | res@gsnRightString = " " |
---|
2639 | if (xs .EQ. -1) then |
---|
2640 | res@trXMinF = miniwpvp |
---|
2641 | else |
---|
2642 | res@trXMinF = xs |
---|
2643 | end if |
---|
2644 | if (xe .EQ. -1) then |
---|
2645 | res@trXMaxF = maxiwpvp |
---|
2646 | else |
---|
2647 | res@trXMaxF = xe |
---|
2648 | end if |
---|
2649 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2650 | end if |
---|
2651 | end if |
---|
2652 | if (vNam(varn) .EQ. "wsvs" .OR. vNam(varn) .EQ. "w*v*") then |
---|
2653 | miniwsvs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2654 | maxiwsvs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2655 | if (over .EQ. 1) then |
---|
2656 | res@xyDashPattern = 1 |
---|
2657 | plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2658 | else |
---|
2659 | res@gsnLeftString = " " |
---|
2660 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2661 | res@gsnRightString = " " |
---|
2662 | if (xs .EQ. -1) then |
---|
2663 | res@trXMinF = miniwsvs |
---|
2664 | else |
---|
2665 | res@trXMinF = xs |
---|
2666 | end if |
---|
2667 | if (xe .EQ. -1) then |
---|
2668 | res@trXMaxF = maxiwsvs |
---|
2669 | else |
---|
2670 | res@trXMaxF = xe |
---|
2671 | end if |
---|
2672 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2673 | end if |
---|
2674 | end if |
---|
2675 | if (vNam(varn) .EQ. "wv") then |
---|
2676 | miniwv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2677 | maxiwv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2678 | if (over .EQ. 1) then |
---|
2679 | res@xyDashPattern = 2 |
---|
2680 | plot_wv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2681 | else |
---|
2682 | res@gsnLeftString = " " |
---|
2683 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2684 | res@gsnRightString = " " |
---|
2685 | if (xs .EQ. -1) then |
---|
2686 | res@trXMinF = miniwv |
---|
2687 | else |
---|
2688 | res@trXMinF = xs |
---|
2689 | end if |
---|
2690 | if (xe .EQ. -1) then |
---|
2691 | res@trXMaxF = maxiwv |
---|
2692 | else |
---|
2693 | res@trXMaxF = xe |
---|
2694 | end if |
---|
2695 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2696 | end if |
---|
2697 | end if |
---|
2698 | |
---|
2699 | if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) \ |
---|
2700 | .EQ. "w"+dq+"pt"+dq) then |
---|
2701 | miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2702 | maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2703 | if (over .EQ. 1) then |
---|
2704 | res@xyDashPattern = 0 |
---|
2705 | plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2706 | else |
---|
2707 | res@gsnLeftString = " " |
---|
2708 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2709 | res@gsnRightString = " " |
---|
2710 | if (xs .EQ. -1) then |
---|
2711 | res@trXMinF = miniwpptp |
---|
2712 | else |
---|
2713 | res@trXMinF = xs |
---|
2714 | end if |
---|
2715 | if (xe .EQ. -1) then |
---|
2716 | res@trXMaxF = maxiwpptp |
---|
2717 | else |
---|
2718 | res@trXMaxF = xe |
---|
2719 | end if |
---|
2720 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2721 | end if |
---|
2722 | end if |
---|
2723 | if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*") then |
---|
2724 | miniwspts=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2725 | maxiwspts=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2726 | if (over .EQ. 1) then |
---|
2727 | res@xyDashPattern = 1 |
---|
2728 | plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2729 | else |
---|
2730 | res@gsnLeftString = " " |
---|
2731 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2732 | res@gsnRightString = " " |
---|
2733 | if (xs .EQ. -1) then |
---|
2734 | res@trXMinF = miniwspts |
---|
2735 | else |
---|
2736 | res@trXMinF = xs |
---|
2737 | end if |
---|
2738 | if (xe .EQ. -1) then |
---|
2739 | res@trXMaxF = maxiwspts |
---|
2740 | else |
---|
2741 | res@trXMaxF = xe |
---|
2742 | end if |
---|
2743 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2744 | end if |
---|
2745 | end if |
---|
2746 | if (vNam(varn) .EQ. "wpt") then |
---|
2747 | miniwpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2748 | maxiwpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2749 | if (over .EQ. 1) then |
---|
2750 | res@xyDashPattern = 2 |
---|
2751 | plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2752 | else |
---|
2753 | res@gsnLeftString = " " |
---|
2754 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2755 | res@gsnRightString = " " |
---|
2756 | if (xs .EQ. -1) then |
---|
2757 | res@trXMinF = miniwpt |
---|
2758 | else |
---|
2759 | res@trXMinF = xs |
---|
2760 | end if |
---|
2761 | if (xe .EQ. -1) then |
---|
2762 | res@trXMaxF = maxiwpt |
---|
2763 | else |
---|
2764 | res@trXMaxF = xe |
---|
2765 | end if |
---|
2766 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2767 | end if |
---|
2768 | end if |
---|
2769 | |
---|
2770 | if (vNam(varn) .EQ. "wsptsBC".OR. vNam(varn) .EQ. "w*pt*BC" ) then |
---|
2771 | miniwsptsBC=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2772 | maxiwsptsBC=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2773 | if (over .EQ. 1) then |
---|
2774 | res@xyDashPattern = 0 |
---|
2775 | plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2776 | else |
---|
2777 | res@gsnLeftString = " " |
---|
2778 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2779 | res@gsnRightString = " " |
---|
2780 | if (xs .EQ. -1) then |
---|
2781 | res@trXMinF = miniwsptsBC |
---|
2782 | else |
---|
2783 | res@trXMinF = xs |
---|
2784 | end if |
---|
2785 | if (xe .EQ. -1) then |
---|
2786 | res@trXMaxF = maxiwsptsBC |
---|
2787 | else |
---|
2788 | res@trXMaxF = xe |
---|
2789 | end if |
---|
2790 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2791 | end if |
---|
2792 | end if |
---|
2793 | if (vNam(varn) .EQ. "wptBC") then |
---|
2794 | miniwptBC=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2795 | maxiwptBC=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2796 | if (over .EQ. 1) then |
---|
2797 | res@xyDashPattern = 1 |
---|
2798 | plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2799 | else |
---|
2800 | res@gsnLeftString = " " |
---|
2801 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2802 | res@gsnRightString = " " |
---|
2803 | if (xs .EQ. -1) then |
---|
2804 | res@trXMinF = miniwptBC |
---|
2805 | else |
---|
2806 | res@trXMinF = xs |
---|
2807 | end if |
---|
2808 | if (xe .EQ. -1) then |
---|
2809 | res@trXMaxF = maxiwptBC |
---|
2810 | else |
---|
2811 | res@trXMaxF = xe |
---|
2812 | end if |
---|
2813 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2814 | end if |
---|
2815 | end if |
---|
2816 | |
---|
2817 | if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) \ |
---|
2818 | .EQ. "w"+dq+"vpt"+dq) then |
---|
2819 | miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2820 | maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2821 | if (over .EQ. 1) then |
---|
2822 | res@xyDashPattern = 0 |
---|
2823 | plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2824 | else |
---|
2825 | res@gsnLeftString = " " |
---|
2826 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2827 | res@gsnRightString = " " |
---|
2828 | if (xs .EQ. -1) then |
---|
2829 | res@trXMinF = miniwpvptp |
---|
2830 | else |
---|
2831 | res@trXMinF = xs |
---|
2832 | end if |
---|
2833 | if (xe .EQ. -1) then |
---|
2834 | res@trXMaxF = maxiwpvptp |
---|
2835 | else |
---|
2836 | res@trXMaxF = xe |
---|
2837 | end if |
---|
2838 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2839 | end if |
---|
2840 | end if |
---|
2841 | if (vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "w*vpt*") then |
---|
2842 | miniwsvpts=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2843 | maxiwsvpts=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2844 | if (over .EQ. 1) then |
---|
2845 | res@xyDashPattern = 1 |
---|
2846 | plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2847 | else |
---|
2848 | res@gsnLeftString = " " |
---|
2849 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2850 | res@gsnRightString = " " |
---|
2851 | if (xs .EQ. -1) then |
---|
2852 | res@trXMinF = miniwsvpts |
---|
2853 | else |
---|
2854 | res@trXMinF = xs |
---|
2855 | end if |
---|
2856 | if (xe .EQ. -1) then |
---|
2857 | res@trXMaxF = maxiwsvpts |
---|
2858 | else |
---|
2859 | res@trXMaxF = xe |
---|
2860 | end if |
---|
2861 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2862 | end if |
---|
2863 | end if |
---|
2864 | if (vNam(varn) .EQ. "wvpt") then |
---|
2865 | miniwvpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2866 | maxiwvpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2867 | if (over .EQ. 1) then |
---|
2868 | res@xyDashPattern = 2 |
---|
2869 | plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2870 | else |
---|
2871 | res@gsnLeftString = " " |
---|
2872 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2873 | res@gsnRightString = " " |
---|
2874 | if (xs .EQ. -1) then |
---|
2875 | res@trXMinF = miniwvpt |
---|
2876 | else |
---|
2877 | res@trXMinF = xs |
---|
2878 | end if |
---|
2879 | if (xe .EQ. -1) then |
---|
2880 | res@trXMaxF = maxiwvpt |
---|
2881 | else |
---|
2882 | res@trXMaxF = xe |
---|
2883 | end if |
---|
2884 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2885 | end if |
---|
2886 | end if |
---|
2887 | |
---|
2888 | if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq) then |
---|
2889 | miniwpqp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2890 | maxiwpqp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2891 | if (over .EQ. 1) then |
---|
2892 | res@xyDashPattern = 0 |
---|
2893 | plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2894 | else |
---|
2895 | res@gsnLeftString = " " |
---|
2896 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2897 | res@gsnRightString = " " |
---|
2898 | if (xs .EQ. -1) then |
---|
2899 | res@trXMinF = miniwpqp |
---|
2900 | else |
---|
2901 | res@trXMinF = xs |
---|
2902 | end if |
---|
2903 | if (xe .EQ. -1) then |
---|
2904 | res@trXMaxF = maxiwpqp |
---|
2905 | else |
---|
2906 | res@trXMaxF = xe |
---|
2907 | end if |
---|
2908 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2909 | end if |
---|
2910 | end if |
---|
2911 | if (vNam(varn) .EQ. "wsqs".OR. vNam(varn) .EQ. "w*s*" ) then |
---|
2912 | miniwsqs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2913 | maxiwsqs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2914 | if (over .EQ. 1) then |
---|
2915 | res@xyDashPattern = 1 |
---|
2916 | plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2917 | else |
---|
2918 | res@gsnLeftString = " " |
---|
2919 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2920 | res@gsnRightString = " " |
---|
2921 | if (xs .EQ. -1) then |
---|
2922 | res@trXMinF = miniwsqs |
---|
2923 | else |
---|
2924 | res@trXMinF = xs |
---|
2925 | end if |
---|
2926 | if (xe .EQ. -1) then |
---|
2927 | res@trXMaxF = maxiwsqs |
---|
2928 | else |
---|
2929 | res@trXMaxF = xe |
---|
2930 | end if |
---|
2931 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2932 | end if |
---|
2933 | end if |
---|
2934 | if (vNam(varn) .EQ. "wq") then |
---|
2935 | miniwq=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2936 | maxiwq=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2937 | if (over .EQ. 1) then |
---|
2938 | res@xyDashPattern = 2 |
---|
2939 | plot_wq = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2940 | else |
---|
2941 | res@gsnLeftString = " " |
---|
2942 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2943 | res@gsnRightString = " " |
---|
2944 | if (xs .EQ. -1) then |
---|
2945 | res@trXMinF = miniwq |
---|
2946 | else |
---|
2947 | res@trXMinF = xs |
---|
2948 | end if |
---|
2949 | if (xe .EQ. -1) then |
---|
2950 | res@trXMaxF = maxiwq |
---|
2951 | else |
---|
2952 | res@trXMaxF = xe |
---|
2953 | end if |
---|
2954 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2955 | end if |
---|
2956 | end if |
---|
2957 | |
---|
2958 | if (vNam(varn) .EQ. "wpqvp" .OR. \ |
---|
2959 | vNam(varn) .EQ. "w"+dq+"qv"+dq) then |
---|
2960 | miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2961 | maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2962 | if (over .EQ. 1) then |
---|
2963 | res@xyDashPattern = 0 |
---|
2964 | plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2965 | else |
---|
2966 | res@gsnLeftString = " " |
---|
2967 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2968 | res@gsnRightString = " " |
---|
2969 | if (xs .EQ. -1) then |
---|
2970 | res@trXMinF = miniwpqvp |
---|
2971 | else |
---|
2972 | res@trXMinF = xs |
---|
2973 | end if |
---|
2974 | if (xe .EQ. -1) then |
---|
2975 | res@trXMaxF = maxiwpqvp |
---|
2976 | else |
---|
2977 | res@trXMaxF = xe |
---|
2978 | end if |
---|
2979 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2980 | end if |
---|
2981 | end if |
---|
2982 | if (vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "w*qv*") then |
---|
2983 | miniwsqvs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
2984 | maxiwsqvs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
2985 | if (over .EQ. 1) then |
---|
2986 | res@xyDashPattern = 1 |
---|
2987 | plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
2988 | else |
---|
2989 | res@gsnLeftString = " " |
---|
2990 | res@tiXAxisString = "("+unit(varn)+")" |
---|
2991 | res@gsnRightString = " " |
---|
2992 | if (xs .EQ. -1) then |
---|
2993 | res@trXMinF = miniwsqvs |
---|
2994 | else |
---|
2995 | res@trXMinF = xs |
---|
2996 | end if |
---|
2997 | if (xe .EQ. -1) then |
---|
2998 | res@trXMaxF = maxiwsqvs |
---|
2999 | else |
---|
3000 | res@trXMaxF = xe |
---|
3001 | end if |
---|
3002 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3003 | end if |
---|
3004 | end if |
---|
3005 | if (vNam(varn) .EQ. "wqv") then |
---|
3006 | miniwqv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3007 | maxiwqv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3008 | if (over .EQ. 1) then |
---|
3009 | res@xyDashPattern = 2 |
---|
3010 | plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3011 | else |
---|
3012 | res@gsnLeftString = " " |
---|
3013 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3014 | res@gsnRightString = " " |
---|
3015 | if (xs .EQ. -1) then |
---|
3016 | res@trXMinF = miniwqv |
---|
3017 | else |
---|
3018 | res@trXMinF = xs |
---|
3019 | end if |
---|
3020 | if (xe .EQ. -1) then |
---|
3021 | res@trXMaxF = maxiwqv |
---|
3022 | else |
---|
3023 | res@trXMaxF = xe |
---|
3024 | end if |
---|
3025 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3026 | end if |
---|
3027 | end if |
---|
3028 | |
---|
3029 | if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq) then |
---|
3030 | miniwpsp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3031 | maxiwpsp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3032 | if (over .EQ. 1) then |
---|
3033 | res@xyDashPattern = 0 |
---|
3034 | plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3035 | else |
---|
3036 | res@gsnLeftString = " " |
---|
3037 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3038 | res@gsnRightString = " " |
---|
3039 | if (xs .EQ. -1) then |
---|
3040 | res@trXMinF = miniwpsp |
---|
3041 | else |
---|
3042 | res@trXMinF = xs |
---|
3043 | end if |
---|
3044 | if (xe .EQ. -1) then |
---|
3045 | res@trXMaxF = maxiwpsp |
---|
3046 | else |
---|
3047 | res@trXMaxF = xe |
---|
3048 | end if |
---|
3049 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3050 | end if |
---|
3051 | end if |
---|
3052 | if (vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "w*s*" ) then |
---|
3053 | miniwsss=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3054 | maxiwsss=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3055 | if (over .EQ. 1) then |
---|
3056 | res@xyDashPattern = 1 |
---|
3057 | plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3058 | else |
---|
3059 | res@gsnLeftString = " " |
---|
3060 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3061 | res@gsnRightString = " " |
---|
3062 | if (xs .EQ. -1) then |
---|
3063 | res@trXMinF = miniwsss |
---|
3064 | else |
---|
3065 | res@trXMinF = xs |
---|
3066 | end if |
---|
3067 | if (xe .EQ. -1) then |
---|
3068 | res@trXMaxF = maxiwsss |
---|
3069 | else |
---|
3070 | res@trXMaxF = xe |
---|
3071 | end if |
---|
3072 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3073 | end if |
---|
3074 | end if |
---|
3075 | if (vNam(varn) .EQ. "ws") then |
---|
3076 | miniws=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3077 | maxiws=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3078 | if (over .EQ. 1) then |
---|
3079 | res@xyDashPattern = 2 |
---|
3080 | plot_ws = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3081 | else |
---|
3082 | res@gsnLeftString = " " |
---|
3083 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3084 | res@gsnRightString = " " |
---|
3085 | if (xs .EQ. -1) then |
---|
3086 | res@trXMinF = miniws |
---|
3087 | else |
---|
3088 | res@trXMinF = xs |
---|
3089 | end if |
---|
3090 | if (xe .EQ. -1) then |
---|
3091 | res@trXMaxF = maxiws |
---|
3092 | else |
---|
3093 | res@trXMaxF = xe |
---|
3094 | end if |
---|
3095 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3096 | end if |
---|
3097 | end if |
---|
3098 | |
---|
3099 | if (vNam(varn) .EQ. "wpsap" .OR. \ |
---|
3100 | vNam(varn) .EQ. "w"+dq+"sa"+dq) then |
---|
3101 | miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3102 | maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3103 | if (over .EQ. 1) then |
---|
3104 | res@xyDashPattern = 0 |
---|
3105 | plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3106 | else |
---|
3107 | res@gsnLeftString = " " |
---|
3108 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3109 | res@gsnRightString = " " |
---|
3110 | if (xs .EQ. -1) then |
---|
3111 | res@trXMinF = miniwpsap |
---|
3112 | else |
---|
3113 | res@trXMinF = xs |
---|
3114 | end if |
---|
3115 | if (xe .EQ. -1) then |
---|
3116 | res@trXMaxF = maxiwpsap |
---|
3117 | else |
---|
3118 | res@trXMaxF = xe |
---|
3119 | end if |
---|
3120 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3121 | end if |
---|
3122 | end if |
---|
3123 | if (vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "w*sa*") then |
---|
3124 | miniwssas=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3125 | maxiwssas=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3126 | if (over .EQ. 1) then |
---|
3127 | res@xyDashPattern = 1 |
---|
3128 | plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3129 | else |
---|
3130 | res@gsnLeftString = " " |
---|
3131 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3132 | res@gsnRightString = " " |
---|
3133 | if (xs .EQ. -1) then |
---|
3134 | res@trXMinF = miniwssas |
---|
3135 | else |
---|
3136 | res@trXMinF = xs |
---|
3137 | end if |
---|
3138 | if (xe .EQ. -1) then |
---|
3139 | res@trXMaxF = maxiwssas |
---|
3140 | else |
---|
3141 | res@trXMaxF = xe |
---|
3142 | end if |
---|
3143 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3144 | end if |
---|
3145 | end if |
---|
3146 | if (vNam(varn) .EQ. "wsa") then |
---|
3147 | miniwsa=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3148 | maxiwsa=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3149 | if (over .EQ. 1) then |
---|
3150 | res@xyDashPattern = 2 |
---|
3151 | plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3152 | else |
---|
3153 | res@gsnLeftString = " " |
---|
3154 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3155 | res@gsnRightString = " " |
---|
3156 | if (xs .EQ. -1) then |
---|
3157 | res@trXMinF = miniwsa |
---|
3158 | else |
---|
3159 | res@trXMinF = xs |
---|
3160 | end if |
---|
3161 | if (xe .EQ. -1) then |
---|
3162 | res@trXMaxF = maxiwsa |
---|
3163 | else |
---|
3164 | res@trXMaxF = xe |
---|
3165 | end if |
---|
3166 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3167 | end if |
---|
3168 | end if |
---|
3169 | |
---|
3170 | if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "u*2") then |
---|
3171 | minius2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3172 | maxius2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3173 | if (over .EQ. 1) then |
---|
3174 | res@xyDashPattern = 0 |
---|
3175 | plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3176 | else |
---|
3177 | res@gsnLeftString = " " |
---|
3178 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3179 | res@gsnRightString = " " |
---|
3180 | if (xs .EQ. -1) then |
---|
3181 | res@trXMinF = minius2 |
---|
3182 | else |
---|
3183 | res@trXMinF = xs |
---|
3184 | end if |
---|
3185 | if (xe .EQ. -1) then |
---|
3186 | res@trXMaxF = maxius2 |
---|
3187 | else |
---|
3188 | res@trXMaxF = xe |
---|
3189 | end if |
---|
3190 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3191 | end if |
---|
3192 | end if |
---|
3193 | if (vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "v*2") then |
---|
3194 | minivs2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3195 | maxivs2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3196 | if (over .EQ. 1) then |
---|
3197 | res@xyDashPattern = 1 |
---|
3198 | plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3199 | else |
---|
3200 | res@gsnLeftString = " " |
---|
3201 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3202 | res@gsnRightString = " " |
---|
3203 | if (xs .EQ. -1) then |
---|
3204 | res@trXMinF = minivs2 |
---|
3205 | else |
---|
3206 | res@trXMinF = xs |
---|
3207 | end if |
---|
3208 | if (xe .EQ. -1) then |
---|
3209 | res@trXMaxF = maxivs2 |
---|
3210 | else |
---|
3211 | res@trXMaxF = xe |
---|
3212 | end if |
---|
3213 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3214 | end if |
---|
3215 | end if |
---|
3216 | if (vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "w*2") then |
---|
3217 | miniws2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3218 | maxiws2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3219 | if (over .EQ. 1) then |
---|
3220 | res@xyDashPattern = 2 |
---|
3221 | plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3222 | else |
---|
3223 | res@gsnLeftString = " " |
---|
3224 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3225 | res@gsnRightString = " " |
---|
3226 | if (xs .EQ. -1) then |
---|
3227 | res@trXMinF = miniws2 |
---|
3228 | else |
---|
3229 | res@trXMinF = xs |
---|
3230 | end if |
---|
3231 | if (xe .EQ. -1) then |
---|
3232 | res@trXMaxF = maxiws2 |
---|
3233 | else |
---|
3234 | res@trXMaxF = xe |
---|
3235 | end if |
---|
3236 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3237 | end if |
---|
3238 | end if |
---|
3239 | |
---|
3240 | if (vNam(varn) .EQ. "wsususodz" .OR. \ |
---|
3241 | vNam(varn) .EQ. "w*u*u*:dz") then |
---|
3242 | miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3243 | maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3244 | if (over .EQ. 1) then |
---|
3245 | res@xyDashPattern = 0 |
---|
3246 | plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3247 | else |
---|
3248 | res@gsnLeftString = " " |
---|
3249 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3250 | res@gsnRightString = " " |
---|
3251 | if (xs .EQ. -1) then |
---|
3252 | res@trXMinF = miniwsususodz |
---|
3253 | else |
---|
3254 | res@trXMinF = xs |
---|
3255 | end if |
---|
3256 | if (xe .EQ. -1) then |
---|
3257 | res@trXMaxF = maxiwsususodz |
---|
3258 | else |
---|
3259 | res@trXMaxF = xe |
---|
3260 | end if |
---|
3261 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3262 | end if |
---|
3263 | end if |
---|
3264 | if (vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "w*p*:dz") then |
---|
3265 | miniwspsodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3266 | maxiwspsodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3267 | if (over .EQ. 1) then |
---|
3268 | res@xyDashPattern = 1 |
---|
3269 | plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3270 | else |
---|
3271 | res@gsnLeftString = " " |
---|
3272 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3273 | res@gsnRightString = " " |
---|
3274 | if (xs .EQ. -1) then |
---|
3275 | res@trXMinF = miniwspsodz |
---|
3276 | else |
---|
3277 | res@trXMinF = xs |
---|
3278 | end if |
---|
3279 | if (xe .EQ. -1) then |
---|
3280 | res@trXMaxF = maxiwspsodz |
---|
3281 | else |
---|
3282 | res@trXMaxF = xe |
---|
3283 | end if |
---|
3284 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3285 | end if |
---|
3286 | end if |
---|
3287 | if (vNam(varn) .EQ. "wpeodz" .OR. \ |
---|
3288 | vNam(varn) .EQ. "w"+dq+"p:dz") then |
---|
3289 | miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3290 | maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3291 | if (over .EQ. 1) then |
---|
3292 | res@xyDashPattern = 2 |
---|
3293 | plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3294 | else |
---|
3295 | res@gsnLeftString = " " |
---|
3296 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3297 | res@gsnRightString = " " |
---|
3298 | if (xs .EQ. -1) then |
---|
3299 | res@trXMinF = miniwpeodz |
---|
3300 | else |
---|
3301 | res@trXMinF = xs |
---|
3302 | end if |
---|
3303 | if (xe .EQ. -1) then |
---|
3304 | res@trXMaxF = maxiwpeodz |
---|
3305 | else |
---|
3306 | res@trXMaxF = xe |
---|
3307 | end if |
---|
3308 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3309 | end if |
---|
3310 | end if |
---|
3311 | |
---|
3312 | ; *************************************************** |
---|
3313 | ; legend for each plot |
---|
3314 | ; *************************************************** |
---|
3315 | |
---|
3316 | if (over .EQ. 0) then |
---|
3317 | |
---|
3318 | label = vNam(varn) |
---|
3319 | |
---|
3320 | lgres1 = True |
---|
3321 | lgMonoDashIndex = False |
---|
3322 | lgres1@lgDashIndexes = (/0,1,2/) |
---|
3323 | lgres1@lgLabelFont = "helvetica" |
---|
3324 | lgres1@lgLabelFontHeightF = font_size_legend * 10.0 * 0.7 |
---|
3325 | lgres1@vpWidthF = 0.12 |
---|
3326 | lgres1@vpHeightF = 0.1 / 3.0 + 0.01 |
---|
3327 | |
---|
3328 | lbid = gsn_create_legend(wks,1,label,lgres1) |
---|
3329 | |
---|
3330 | amres = True |
---|
3331 | amres@amParallelPosF = -0.5 |
---|
3332 | amres@amOrthogonalPosF = -0.5 |
---|
3333 | amres@amJust = "TopLeft" |
---|
3334 | |
---|
3335 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3336 | |
---|
3337 | end if |
---|
3338 | |
---|
3339 | if (no_files .GT. 1) then |
---|
3340 | print("nof="+nof+" und n="+n) |
---|
3341 | multi_plot(nof,n)=plot(n) |
---|
3342 | max_nof(nof,n)=max(data(varn,:,min_z_int:max_z_int)) |
---|
3343 | min_nof(nof,n)=min(data(varn,:,min_z_int:max_z_int)) |
---|
3344 | name(nof,n) =vNam(varn) |
---|
3345 | unit_(nof,n) =unit(varn) |
---|
3346 | end if |
---|
3347 | if (over .EQ. 0) then |
---|
3348 | n=n+1 |
---|
3349 | end if |
---|
3350 | if (prof3d .EQ. 0)then |
---|
3351 | varn=varn+1 |
---|
3352 | end if |
---|
3353 | delete(temp) |
---|
3354 | delete(temp_att) |
---|
3355 | end if |
---|
3356 | end do |
---|
3357 | if (no_files .GT. 1) then |
---|
3358 | delete(vNam) |
---|
3359 | delete(files) |
---|
3360 | end if |
---|
3361 | |
---|
3362 | end do |
---|
3363 | |
---|
3364 | ;#########ENDE DO LOOP FOR no_files GT 1############# |
---|
3365 | |
---|
3366 | if (isStrSubset(data@long_name," SR " ) .and. over_remind) then |
---|
3367 | print(" ") |
---|
3368 | print("If you have outputs of statistic regions you cannot overlay "+\ |
---|
3369 | "variables;") |
---|
3370 | print("'over' is set to 0" ) |
---|
3371 | print(" ") |
---|
3372 | over = 0 |
---|
3373 | end if |
---|
3374 | |
---|
3375 | if (count_var .EQ. 0) then |
---|
3376 | print(" ") |
---|
3377 | print("The variables 'var="+var+"'" ) |
---|
3378 | print("do not exist on your input file;") |
---|
3379 | print("be sure to have one comma before and after each variable") |
---|
3380 | print(" ") |
---|
3381 | exit |
---|
3382 | end if |
---|
3383 | |
---|
3384 | if (no_files .GT. 1) then |
---|
3385 | multi_legend=new(6,string) |
---|
3386 | string_len=new(6,integer) |
---|
3387 | multi_dash=new(no_files,string) |
---|
3388 | multi_legend(0)=" "+name_legend_1 |
---|
3389 | string_len(0)=strlen(multi_legend(0)) |
---|
3390 | multi_legend(1)=" "+name_legend_2 |
---|
3391 | string_len(1)=strlen(multi_legend(1)) |
---|
3392 | multi_legend(2)=" "+name_legend_3 |
---|
3393 | string_len(2)=strlen(multi_legend(2)) |
---|
3394 | multi_legend(3)=" "+name_legend_4 |
---|
3395 | string_len(3)=strlen(multi_legend(3)) |
---|
3396 | multi_legend(4)=" "+name_legend_5 |
---|
3397 | string_len(4)=strlen(multi_legend(4)) |
---|
3398 | multi_legend(5)=" "+name_legend_6 |
---|
3399 | string_len(5)=strlen(multi_legend(5)) |
---|
3400 | do ml=1,no_files |
---|
3401 | multi_dash(ml-1)=ml-1 |
---|
3402 | end do |
---|
3403 | delete(plot) |
---|
3404 | plot = new(dim,graphic) |
---|
3405 | do pl=0,n-1 |
---|
3406 | plot0 = new(1,graphic) |
---|
3407 | res@trXMinF = min(min_nof(:,pl)) |
---|
3408 | res@trXMaxF = max(max_nof(:,pl)) |
---|
3409 | res@gsnLeftString = " "; name(0,pl) |
---|
3410 | res@gsnRightString = " ";unit_(0,pl) |
---|
3411 | res@tiXAxisString = "(" + unit_(0,pl) + ")" |
---|
3412 | data_0(:,:) = min(min_nof(:,pl)) |
---|
3413 | |
---|
3414 | if (mod(no_plots - pl + 1, no_rows * no_columns) .EQ. 2) then |
---|
3415 | res@pmLegendDisplayMode = "Always" |
---|
3416 | else |
---|
3417 | res@pmLegendDisplayMode = "Never" |
---|
3418 | end if |
---|
3419 | |
---|
3420 | plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res) |
---|
3421 | |
---|
3422 | ; *************************************************** |
---|
3423 | ; legend for combined plot |
---|
3424 | ; *************************************************** |
---|
3425 | |
---|
3426 | if (mod(no_plots - pl + 1, no_rows * no_columns) .EQ. 2)then |
---|
3427 | lgres = True |
---|
3428 | lgMonoDashIndex = False |
---|
3429 | lgres@lgLabelFont = "helvetica" |
---|
3430 | lgres@lgLabelFontHeightF = font_size_legend * 10.0 |
---|
3431 | lgres@vpWidthF = max(string_len)*0.02;0.015 |
---|
3432 | lgres@vpHeightF = 0.03*no_files |
---|
3433 | lgres@lgDashIndexes = multi_dash(no_files-1:0) |
---|
3434 | lbid = gsn_create_legend(\ |
---|
3435 | wks,no_files,multi_legend(no_files-1:0),lgres) |
---|
3436 | |
---|
3437 | amres = True |
---|
3438 | amres@amParallelPosF = -0.5 |
---|
3439 | amres@amOrthogonalPosF = -0.55 |
---|
3440 | amres@amJust = "BottomLeft" |
---|
3441 | annoid1 = gsn_add_annotation(plot0,lbid,amres) |
---|
3442 | end if |
---|
3443 | |
---|
3444 | do plo=0,no_files-1 |
---|
3445 | overlay(plot0,multi_plot(plo,pl)) |
---|
3446 | plot(pl)=plot0 |
---|
3447 | end do |
---|
3448 | delete(plot0) |
---|
3449 | end do |
---|
3450 | end if |
---|
3451 | |
---|
3452 | if (count_var .EQ. 0) then |
---|
3453 | print(" ") |
---|
3454 | print("Select a variable 'var=' or use the default value") |
---|
3455 | print(" ") |
---|
3456 | print("Your selection '"+var+"' does not exist on the input file") |
---|
3457 | print(" ") |
---|
3458 | exit |
---|
3459 | end if |
---|
3460 | |
---|
3461 | if (over .EQ. 1 ) then |
---|
3462 | |
---|
3463 | overlay(plot_u,plot_v) |
---|
3464 | overlay(plot_u,plot_w) |
---|
3465 | u=0 |
---|
3466 | overlay(plot_pt,plot_vpt) |
---|
3467 | overlay(plot_pt,plot_lpt) |
---|
3468 | pt=0 |
---|
3469 | overlay(plot_q,plot_qv) |
---|
3470 | overlay(plot_q,plot_ql) |
---|
3471 | q=0 |
---|
3472 | overlay(plot_e,plot_es) |
---|
3473 | e=0 |
---|
3474 | overlay(plot_km,plot_kh) |
---|
3475 | km=0 |
---|
3476 | overlay(plot_wpup,plot_wsus) |
---|
3477 | overlay(plot_wpup,plot_wu) |
---|
3478 | wpup=0 |
---|
3479 | overlay(plot_wpvp,plot_wsvs) |
---|
3480 | overlay(plot_wpvp,plot_wv) |
---|
3481 | wpvp=0 |
---|
3482 | overlay(plot_wpptp,plot_wspts) |
---|
3483 | overlay(plot_wpptp,plot_wpt) |
---|
3484 | wpptp=0 |
---|
3485 | overlay(plot_wsptsBC,plot_wptBC) |
---|
3486 | wsptsBC=0 |
---|
3487 | overlay(plot_wpvptp,plot_wsvpts) |
---|
3488 | overlay(plot_wpvptp,plot_wvpt) |
---|
3489 | wpvptp=0 |
---|
3490 | overlay(plot_wpqp,plot_wsqs) |
---|
3491 | overlay(plot_wpqp,plot_wq) |
---|
3492 | wpqp=0 |
---|
3493 | overlay(plot_wpqvp,plot_wsqvs) |
---|
3494 | overlay(plot_wpqvp,plot_wqv) |
---|
3495 | wpqvp=0 |
---|
3496 | overlay(plot_wpsp,plot_wsss) |
---|
3497 | overlay(plot_wpsp,plot_ws) |
---|
3498 | wpsp=0 |
---|
3499 | overlay(plot_wpsap,plot_wssas) |
---|
3500 | overlay(plot_wpsap,plot_wsa) |
---|
3501 | wpsap=0 |
---|
3502 | overlay(plot_us2,plot_vs2) |
---|
3503 | overlay(plot_us2,plot_ws2) |
---|
3504 | us2=0 |
---|
3505 | overlay(plot_wsususodz,plot_wspsodz) |
---|
3506 | overlay(plot_wsususodz,plot_wpeodz) |
---|
3507 | wsususodz=0 |
---|
3508 | |
---|
3509 | end if |
---|
3510 | |
---|
3511 | if (over .EQ. 1) then |
---|
3512 | |
---|
3513 | do varn = 0,dim-1 |
---|
3514 | |
---|
3515 | check = True |
---|
3516 | |
---|
3517 | if (prof3d .EQ. 0) then |
---|
3518 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
3519 | isStrSubset( vNam(varn), "NORM")) then |
---|
3520 | check = False |
---|
3521 | end if |
---|
3522 | else |
---|
3523 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
3524 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
3525 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
3526 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
3527 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
3528 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
3529 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
3530 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
3531 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
3532 | check = False |
---|
3533 | end if |
---|
3534 | end if |
---|
3535 | |
---|
3536 | if (var .NE. "all") then |
---|
3537 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
3538 | end if |
---|
3539 | |
---|
3540 | if (check)then |
---|
3541 | |
---|
3542 | if (prof3d .EQ. 0) then |
---|
3543 | if (log_z .EQ. 1) then |
---|
3544 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
3545 | else |
---|
3546 | z = f_att->$vNam(varn+1)$ |
---|
3547 | end if |
---|
3548 | else |
---|
3549 | do i=0,b-1 |
---|
3550 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
3551 | z_v(varn,:) = z_u |
---|
3552 | if (log_z .EQ. 1) then |
---|
3553 | z = z_v(varn,1:dimz-1) |
---|
3554 | else |
---|
3555 | z = z_v(varn,:) |
---|
3556 | end if |
---|
3557 | else |
---|
3558 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
3559 | z_v(varn,:) = z_w |
---|
3560 | if (log_z .EQ. 1) then |
---|
3561 | z = z_v(varn,1:dimz-1) |
---|
3562 | else |
---|
3563 | z = z_v(varn,:) |
---|
3564 | end if |
---|
3565 | end if |
---|
3566 | end if |
---|
3567 | end do |
---|
3568 | end if |
---|
3569 | |
---|
3570 | z=z/norm_z |
---|
3571 | |
---|
3572 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then |
---|
3573 | min_value = abs(0.01*min(data(varn,:,min_z_int:max_z_int))) |
---|
3574 | max_value = abs(0.01*max(data(varn,:,min_z_int:max_z_int))) |
---|
3575 | else |
---|
3576 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ |
---|
3577 | abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
3578 | min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
3579 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
3580 | else |
---|
3581 | if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
3582 | abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
3583 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
3584 | max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
3585 | else |
---|
3586 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
3587 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
3588 | end if |
---|
3589 | end if |
---|
3590 | end if |
---|
3591 | if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND.\ |
---|
3592 | max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then |
---|
3593 | min_value = 0.1 |
---|
3594 | max_value = 0.1 |
---|
3595 | end if |
---|
3596 | |
---|
3597 | res@gsnLeftString = vNam(varn) |
---|
3598 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3599 | res@gsnRightString = " " |
---|
3600 | res@trYMinF = min_z |
---|
3601 | res@trYMaxF = max_z |
---|
3602 | res@xyDashPattern = 0 |
---|
3603 | |
---|
3604 | if (xs .EQ. -1) then |
---|
3605 | res@trXMinF = min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
3606 | else |
---|
3607 | res@trXMinF = xs |
---|
3608 | end if |
---|
3609 | if (xe .EQ. -1) then |
---|
3610 | res@trXMaxF = max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
3611 | else |
---|
3612 | res@trXMaxF = xe |
---|
3613 | end if |
---|
3614 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3615 | |
---|
3616 | if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. \ |
---|
3617 | vNam(varn) .EQ. "w") then |
---|
3618 | if (u .EQ. 0) then |
---|
3619 | res@gsnLeftString = "u, v and w" |
---|
3620 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3621 | res@gsnRightString = " " |
---|
3622 | if (xs .EQ. -1) then |
---|
3623 | res@trXMinF = min((/miniu,miniv,miniw/)) |
---|
3624 | else |
---|
3625 | res@trXMinF = xs |
---|
3626 | end if |
---|
3627 | if (xe .EQ. -1) then |
---|
3628 | res@trXMaxF = max((/maxiu,maxiv,maxiw/)) |
---|
3629 | else |
---|
3630 | res@trXMaxF = xe |
---|
3631 | end if |
---|
3632 | if (vNam(varn) .EQ. "v")then |
---|
3633 | res@xyDashPattern = 1 |
---|
3634 | end if |
---|
3635 | if (vNam(varn) .EQ. "w")then |
---|
3636 | res@xyDashPattern = 2 |
---|
3637 | end if |
---|
3638 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3639 | |
---|
3640 | ; *************************************************** |
---|
3641 | ; legend for overlaid plot |
---|
3642 | ; *************************************************** |
---|
3643 | |
---|
3644 | lgres = True |
---|
3645 | lgMonoDashIndex = False |
---|
3646 | lgres@lgLabelFont = "helvetica" |
---|
3647 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3648 | lgres@vpWidthF = 0.07 |
---|
3649 | lgres@vpHeightF = 0.12 |
---|
3650 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3651 | lbid = gsn_create_legend(wks,3,(/"u","v","w"/),lgres) |
---|
3652 | |
---|
3653 | amres = True |
---|
3654 | amres@amParallelPosF = 0.88 |
---|
3655 | amres@amOrthogonalPosF = 0.33 |
---|
3656 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3657 | overlay(plot(n),plot_u) |
---|
3658 | u=1 |
---|
3659 | else |
---|
3660 | if (prof3d .EQ. 0)then |
---|
3661 | varn=varn+1 |
---|
3662 | end if |
---|
3663 | continue |
---|
3664 | end if |
---|
3665 | end if |
---|
3666 | |
---|
3667 | if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. \ |
---|
3668 | vNam(varn) .EQ. "lpt") then |
---|
3669 | if (pt .EQ. 0) then |
---|
3670 | res@gsnLeftString = "pt, vpt and lpt" |
---|
3671 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3672 | res@gsnRightString = " " |
---|
3673 | if (xs .EQ. -1) then |
---|
3674 | res@trXMinF = min((/minipt,minivpt,minilpt/)) |
---|
3675 | else |
---|
3676 | res@trXMinF = xs |
---|
3677 | end if |
---|
3678 | if (xe .EQ. -1) then |
---|
3679 | res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) |
---|
3680 | else |
---|
3681 | res@trXMaxF = xe |
---|
3682 | end if |
---|
3683 | if (vNam(varn) .EQ. "vpt")then |
---|
3684 | res@xyDashPattern = 1 |
---|
3685 | end if |
---|
3686 | if (vNam(varn) .EQ. "lpt")then |
---|
3687 | res@xyDashPattern = 2 |
---|
3688 | end if |
---|
3689 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3690 | |
---|
3691 | ; *************************************************** |
---|
3692 | ; legend for overlaid plot |
---|
3693 | ; *************************************************** |
---|
3694 | |
---|
3695 | lgres = True |
---|
3696 | lgMonoDashIndex = False |
---|
3697 | lgres@lgLabelFont = "helvetica" |
---|
3698 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3699 | lgres@vpWidthF = 0.07 |
---|
3700 | lgres@vpHeightF = 0.12 |
---|
3701 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3702 | lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres) |
---|
3703 | amres = True |
---|
3704 | amres@amParallelPosF = 0.88 |
---|
3705 | amres@amOrthogonalPosF = 0.33 |
---|
3706 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3707 | overlay(plot(n),plot_pt) |
---|
3708 | pt=1 |
---|
3709 | else |
---|
3710 | if (prof3d .EQ. 0)then |
---|
3711 | varn=varn+1 |
---|
3712 | end if |
---|
3713 | continue |
---|
3714 | end if |
---|
3715 | end if |
---|
3716 | if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. \ |
---|
3717 | vNam(varn) .EQ. "ql") then |
---|
3718 | if (q .EQ. 0) then |
---|
3719 | res@gsnLeftString = "q, qv and ql" |
---|
3720 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3721 | res@gsnRightString = " " |
---|
3722 | if (xs .EQ. -1) then |
---|
3723 | res@trXMinF = min((/miniq,miniqv,miniql/)) |
---|
3724 | else |
---|
3725 | res@trXMinF = xs |
---|
3726 | end if |
---|
3727 | if (xe .EQ. -1) then |
---|
3728 | res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) |
---|
3729 | else |
---|
3730 | res@trXMaxF = xe |
---|
3731 | end if |
---|
3732 | if (vNam(varn) .EQ. "qv")then |
---|
3733 | res@xyDashPattern = 1 |
---|
3734 | end if |
---|
3735 | if (vNam(varn) .EQ. "ql")then |
---|
3736 | res@xyDashPattern = 2 |
---|
3737 | end if |
---|
3738 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3739 | |
---|
3740 | ; *************************************************** |
---|
3741 | ; legend for overlaid plot |
---|
3742 | ; *************************************************** |
---|
3743 | |
---|
3744 | lgres = True |
---|
3745 | lgMonoDashIndex = False |
---|
3746 | lgres@lgLabelFont = "helvetica" |
---|
3747 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3748 | lgres@vpWidthF = 0.07 |
---|
3749 | lgres@vpHeightF = 0.12 |
---|
3750 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3751 | lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres) |
---|
3752 | |
---|
3753 | amres = True |
---|
3754 | amres@amParallelPosF = 0.88 |
---|
3755 | amres@amOrthogonalPosF = 0.33 |
---|
3756 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3757 | overlay(plot(n),plot_q) |
---|
3758 | q=1 |
---|
3759 | else |
---|
3760 | if (prof3d .EQ. 0)then |
---|
3761 | varn=varn+1 |
---|
3762 | end if |
---|
3763 | continue |
---|
3764 | end if |
---|
3765 | end if |
---|
3766 | |
---|
3767 | if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. \ |
---|
3768 | vNam(varn) .EQ. "e*" ) then |
---|
3769 | if (e .EQ. 0) then |
---|
3770 | res@gsnLeftString = "e and e*" |
---|
3771 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3772 | res@gsnRightString = " " |
---|
3773 | if (xs .EQ. -1) then |
---|
3774 | res@trXMinF = min((/minie,minies/)) |
---|
3775 | else |
---|
3776 | res@trXMinF = xs |
---|
3777 | end if |
---|
3778 | if (xe .EQ. -1) then |
---|
3779 | res@trXMaxF = max((/maxie,maxies/)) |
---|
3780 | else |
---|
3781 | res@trXMaxF = xe |
---|
3782 | end if |
---|
3783 | if (vNam(varn) .EQ. "es")then |
---|
3784 | res@xyDashPattern = 1 |
---|
3785 | end if |
---|
3786 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3787 | |
---|
3788 | ; *************************************************** |
---|
3789 | ; legend for overlaid plot |
---|
3790 | ; *************************************************** |
---|
3791 | |
---|
3792 | lgres = True |
---|
3793 | lgMonoDashIndex = False |
---|
3794 | lgres@lgLabelFont = "helvetica" |
---|
3795 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3796 | lgres@vpWidthF = 0.07 |
---|
3797 | lgres@vpHeightF = 0.08 |
---|
3798 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3799 | lbid = gsn_create_legend(wks,2,(/"e","e*"/),lgres) |
---|
3800 | |
---|
3801 | amres = True |
---|
3802 | amres@amParallelPosF = 0.88 |
---|
3803 | amres@amOrthogonalPosF = 0.365 |
---|
3804 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3805 | overlay(plot(n),plot_e) |
---|
3806 | e=1 |
---|
3807 | else |
---|
3808 | if (prof3d .EQ. 0)then |
---|
3809 | varn=varn+1 |
---|
3810 | end if |
---|
3811 | continue |
---|
3812 | end if |
---|
3813 | end if |
---|
3814 | if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then |
---|
3815 | if (km .EQ. 0) then |
---|
3816 | res@gsnLeftString = "km and kh" |
---|
3817 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3818 | res@gsnRightString = " " |
---|
3819 | if (xs .EQ. -1) then |
---|
3820 | res@trXMinF = min((/minikm,minikh/)) |
---|
3821 | else |
---|
3822 | res@trXMinF = xs |
---|
3823 | end if |
---|
3824 | if (xe .EQ. -1) then |
---|
3825 | res@trXMaxF = max((/maxikm,maxikh/)) |
---|
3826 | else |
---|
3827 | res@trXMaxF = xe |
---|
3828 | end if |
---|
3829 | if (vNam(varn) .EQ. "kh")then |
---|
3830 | res@xyDashPattern = 1 |
---|
3831 | end if |
---|
3832 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3833 | |
---|
3834 | ; *************************************************** |
---|
3835 | ; legend for overlaid plot |
---|
3836 | ; *************************************************** |
---|
3837 | |
---|
3838 | lgres = True |
---|
3839 | lgMonoDashIndex = False |
---|
3840 | lgres@lgLabelFont = "helvetica" |
---|
3841 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3842 | lgres@vpWidthF = 0.07 |
---|
3843 | lgres@vpHeightF = 0.08 |
---|
3844 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3845 | lbid = gsn_create_legend(wks,2,(/"km","kh"/),lgres) |
---|
3846 | |
---|
3847 | amres = True |
---|
3848 | amres@amParallelPosF = 0.88 |
---|
3849 | amres@amOrthogonalPosF = 0.365 |
---|
3850 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3851 | overlay(plot(n),plot_km) |
---|
3852 | km=1 |
---|
3853 | else |
---|
3854 | if (prof3d .EQ. 0)then |
---|
3855 | varn=varn+1 |
---|
3856 | end if |
---|
3857 | continue |
---|
3858 | end if |
---|
3859 | end if |
---|
3860 | |
---|
3861 | if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. \ |
---|
3862 | vNam(varn) .EQ. "wu" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. \ |
---|
3863 | vNam(varn) .EQ. "w*u*") then |
---|
3864 | if (wpup .EQ. 0) then |
---|
3865 | res@gsnLeftString = "w"+dq+"u"+dq+", w*u* and wu" |
---|
3866 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3867 | res@gsnRightString = " " |
---|
3868 | if (xs .EQ. -1) then |
---|
3869 | res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) |
---|
3870 | else |
---|
3871 | res@trXMinF = xs |
---|
3872 | end if |
---|
3873 | if (xe .EQ. -1) then |
---|
3874 | res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) |
---|
3875 | else |
---|
3876 | res@trXMaxF = xe |
---|
3877 | end if |
---|
3878 | if (vNam(varn) .EQ. "wsus")then |
---|
3879 | res@xyDashPattern = 1 |
---|
3880 | end if |
---|
3881 | if (vNam(varn) .EQ. "wu")then |
---|
3882 | res@xyDashPattern = 2 |
---|
3883 | end if |
---|
3884 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3885 | |
---|
3886 | ; *************************************************** |
---|
3887 | ; legend for overlaid plot |
---|
3888 | ; *************************************************** |
---|
3889 | |
---|
3890 | lgres = True |
---|
3891 | lgMonoDashIndex = False |
---|
3892 | lgres@lgLabelFont = "helvetica" |
---|
3893 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3894 | lgres@vpWidthF = 0.08 |
---|
3895 | lgres@vpHeightF = 0.12 |
---|
3896 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3897 | lbid = gsn_create_legend(\ |
---|
3898 | wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres) |
---|
3899 | |
---|
3900 | amres = True |
---|
3901 | amres@amParallelPosF = 0.88 |
---|
3902 | amres@amOrthogonalPosF = 0.33 |
---|
3903 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3904 | overlay(plot(n),plot_wpup) |
---|
3905 | wpup=1 |
---|
3906 | else |
---|
3907 | if (prof3d .EQ. 0)then |
---|
3908 | varn=varn+1 |
---|
3909 | end if |
---|
3910 | continue |
---|
3911 | end if |
---|
3912 | end if |
---|
3913 | if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR. \ |
---|
3914 | vNam(varn) .EQ. "wv" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. \ |
---|
3915 | vNam(varn) .EQ. "w*v*") then |
---|
3916 | if (wpvp .EQ. 0) then |
---|
3917 | res@gsnLeftString = "w"+dq+"v"+dq+", w*v* and wv" |
---|
3918 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3919 | res@gsnRightString = " " |
---|
3920 | if (xs .EQ. -1) then |
---|
3921 | res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) |
---|
3922 | else |
---|
3923 | res@trXMinF = xs |
---|
3924 | end if |
---|
3925 | if (xe .EQ. -1) then |
---|
3926 | res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) |
---|
3927 | else |
---|
3928 | res@trXMaxF = xe |
---|
3929 | end if |
---|
3930 | if (vNam(varn) .EQ. "wsvs")then |
---|
3931 | res@xyDashPattern = 1 |
---|
3932 | end if |
---|
3933 | if (vNam(varn) .EQ. "wv")then |
---|
3934 | res@xyDashPattern = 2 |
---|
3935 | end if |
---|
3936 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3937 | |
---|
3938 | ; *************************************************** |
---|
3939 | ; legend for overlaid plot |
---|
3940 | ; *************************************************** |
---|
3941 | |
---|
3942 | lgres = True |
---|
3943 | lgMonoDashIndex = False |
---|
3944 | lgres@lgLabelFont = "helvetica" |
---|
3945 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3946 | lgres@vpWidthF = 0.08 |
---|
3947 | lgres@vpHeightF = 0.12 |
---|
3948 | lgres@lgDashIndexes = (/0,1,2/) |
---|
3949 | lbid = gsn_create_legend(\ |
---|
3950 | wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres) |
---|
3951 | |
---|
3952 | amres = True |
---|
3953 | amres@amParallelPosF = 0.88 |
---|
3954 | amres@amOrthogonalPosF = 0.33 |
---|
3955 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
3956 | overlay(plot(n),plot_wpvp) |
---|
3957 | wpvp=1 |
---|
3958 | else |
---|
3959 | if (prof3d .EQ. 0)then |
---|
3960 | varn=varn+1 |
---|
3961 | end if |
---|
3962 | continue |
---|
3963 | end if |
---|
3964 | end if |
---|
3965 | if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. \ |
---|
3966 | vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR.\ |
---|
3967 | vNam(varn) .EQ. "w*pt*") then |
---|
3968 | if (wpptp .EQ. 0) then |
---|
3969 | res@gsnLeftString = "w"+dq+"pt"+dq+", w*pt* and wpt" |
---|
3970 | res@tiXAxisString = "("+unit(varn)+")" |
---|
3971 | res@gsnRightString = " " |
---|
3972 | if (xs .EQ. -1) then |
---|
3973 | res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) |
---|
3974 | else |
---|
3975 | res@trXMinF = xs |
---|
3976 | end if |
---|
3977 | if (xe .EQ. -1) then |
---|
3978 | res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) |
---|
3979 | else |
---|
3980 | res@trXMaxF = xe |
---|
3981 | end if |
---|
3982 | if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*")then |
---|
3983 | res@xyDashPattern = 1 |
---|
3984 | end if |
---|
3985 | if (vNam(varn) .EQ. "wpt")then |
---|
3986 | res@xyDashPattern = 2 |
---|
3987 | end if |
---|
3988 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
3989 | |
---|
3990 | ; *************************************************** |
---|
3991 | ; legend for overlaid plot |
---|
3992 | ; *************************************************** |
---|
3993 | |
---|
3994 | lgres = True |
---|
3995 | lgMonoDashIndex = False |
---|
3996 | lgres@lgLabelFont = "helvetica" |
---|
3997 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
3998 | lgres@vpWidthF = 0.09 |
---|
3999 | lgres@vpHeightF = 0.12 |
---|
4000 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4001 | lbid = gsn_create_legend(\ |
---|
4002 | wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres) |
---|
4003 | |
---|
4004 | amres = True |
---|
4005 | amres@amParallelPosF = 0.88 |
---|
4006 | amres@amOrthogonalPosF = 0.33 |
---|
4007 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4008 | overlay(plot(n),plot_wpptp) |
---|
4009 | wpptp=1 |
---|
4010 | else |
---|
4011 | if (prof3d .EQ. 0)then |
---|
4012 | varn=varn+1 |
---|
4013 | end if |
---|
4014 | continue |
---|
4015 | end if |
---|
4016 | end if |
---|
4017 | if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR.\ |
---|
4018 | vNam(varn) .EQ. "w*pt*BC") then |
---|
4019 | if (wsptsBC .EQ. 0) then |
---|
4020 | res@gsnLeftString = "w*pt*BC and wptBC" |
---|
4021 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4022 | res@gsnRightString = " " |
---|
4023 | if (xs .EQ. -1) then |
---|
4024 | res@trXMinF = min((/miniwsptsBC,miniwptBC/)) |
---|
4025 | else |
---|
4026 | res@trXMinF = xs |
---|
4027 | end if |
---|
4028 | if (xe .EQ. -1) then |
---|
4029 | res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) |
---|
4030 | else |
---|
4031 | res@trXMaxF = xe |
---|
4032 | end if |
---|
4033 | if (vNam(varn) .EQ. "wptBC")then |
---|
4034 | res@xyDashPattern = 1 |
---|
4035 | end if |
---|
4036 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4037 | |
---|
4038 | ; *************************************************** |
---|
4039 | ; legend for overlaid plot |
---|
4040 | ; *************************************************** |
---|
4041 | |
---|
4042 | lgres = True |
---|
4043 | lgMonoDashIndex = False |
---|
4044 | lgres@lgLabelFont = "helvetica" |
---|
4045 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4046 | lgres@vpWidthF = 0.1 |
---|
4047 | lgres@vpHeightF = 0.12 |
---|
4048 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4049 | lbid = gsn_create_legend(\ |
---|
4050 | wks,3,(/"w*pt*BC","wptBC"/),lgres) |
---|
4051 | |
---|
4052 | amres = True |
---|
4053 | amres@amParallelPosF = 0.88 |
---|
4054 | amres@amOrthogonalPosF = 0.33 |
---|
4055 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4056 | overlay(plot(n),plot_wsptsBC) |
---|
4057 | wsptsBC=1 |
---|
4058 | else |
---|
4059 | if (prof3d .EQ. 0)then |
---|
4060 | varn=varn+1 |
---|
4061 | end if |
---|
4062 | continue |
---|
4063 | end if |
---|
4064 | end if |
---|
4065 | if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. \ |
---|
4066 | vNam(varn) .EQ. "wvpt" .OR. vNam(varn) .EQ. \ |
---|
4067 | "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then |
---|
4068 | if (wpvptp .EQ. 0) then |
---|
4069 | res@gsnLeftString = "w"+dq+"vpt"+dq+", w*vpt* and wvpt" |
---|
4070 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4071 | res@gsnRightString = " " |
---|
4072 | if (xs .EQ. -1) then |
---|
4073 | res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) |
---|
4074 | else |
---|
4075 | res@trXMinF = xs |
---|
4076 | end if |
---|
4077 | if (xe .EQ. -1) then |
---|
4078 | res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) |
---|
4079 | else |
---|
4080 | res@trXMaxF = xe |
---|
4081 | end if |
---|
4082 | if (vNam(varn) .EQ. "wsvpts")then |
---|
4083 | res@xyDashPattern = 1 |
---|
4084 | end if |
---|
4085 | if (vNam(varn) .EQ. "wvpt")then |
---|
4086 | res@xyDashPattern = 2 |
---|
4087 | end if |
---|
4088 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4089 | |
---|
4090 | ; *************************************************** |
---|
4091 | ; legend for overlaid plot |
---|
4092 | ; *************************************************** |
---|
4093 | |
---|
4094 | lgres = True |
---|
4095 | lgMonoDashIndex = False |
---|
4096 | lgres@lgLabelFont = "helvetica" |
---|
4097 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4098 | lgres@vpWidthF = 0.1 |
---|
4099 | lgres@vpHeightF = 0.12 |
---|
4100 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4101 | lbid = gsn_create_legend(\ |
---|
4102 | wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres) |
---|
4103 | amres = True |
---|
4104 | amres@amParallelPosF = 0.88 |
---|
4105 | amres@amOrthogonalPosF = 0.33 |
---|
4106 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4107 | overlay(plot(n),plot_wpvptp) |
---|
4108 | wpvptp=1 |
---|
4109 | else |
---|
4110 | if (prof3d .EQ. 0)then |
---|
4111 | varn=varn+1 |
---|
4112 | end if |
---|
4113 | continue |
---|
4114 | end if |
---|
4115 | end if |
---|
4116 | if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. \ |
---|
4117 | vNam(varn) .EQ. "wq" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. \ |
---|
4118 | vNam(varn) .EQ. "w*q*") then |
---|
4119 | if (wpqp .EQ. 0) then |
---|
4120 | res@gsnLeftString = "w"+dq+"q"+dq+", w*q* and wq" |
---|
4121 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4122 | res@gsnRightString = " " |
---|
4123 | if (xs .EQ. -1) then |
---|
4124 | res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) |
---|
4125 | else |
---|
4126 | res@trXMinF = xs |
---|
4127 | end if |
---|
4128 | if (xe .EQ. -1) then |
---|
4129 | res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) |
---|
4130 | else |
---|
4131 | res@trXMaxF = xe |
---|
4132 | end if |
---|
4133 | if (vNam(varn) .EQ. "wsqs")then |
---|
4134 | res@xyDashPattern = 1 |
---|
4135 | end if |
---|
4136 | if (vNam(varn) .EQ. "wq")then |
---|
4137 | res@xyDashPattern = 2 |
---|
4138 | end if |
---|
4139 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4140 | |
---|
4141 | ; *************************************************** |
---|
4142 | ; legend for overlaid plot |
---|
4143 | ; *************************************************** |
---|
4144 | |
---|
4145 | lgres = True |
---|
4146 | lgMonoDashIndex = False |
---|
4147 | lgres@lgLabelFont = "helvetica" |
---|
4148 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4149 | lgres@vpWidthF = 0.08 |
---|
4150 | lgres@vpHeightF = 0.12 |
---|
4151 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4152 | lbid = gsn_create_legend(\ |
---|
4153 | wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres) |
---|
4154 | |
---|
4155 | amres = True |
---|
4156 | amres@amParallelPosF = 0.88 |
---|
4157 | amres@amOrthogonalPosF = 0.33 |
---|
4158 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4159 | overlay(plot(n),plot_wpqp) |
---|
4160 | wpqp=1 |
---|
4161 | else |
---|
4162 | if (prof3d .EQ. 0)then |
---|
4163 | varn=varn+1 |
---|
4164 | end if |
---|
4165 | continue |
---|
4166 | end if |
---|
4167 | end if |
---|
4168 | if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. \ |
---|
4169 | vNam(varn) .EQ. "wqv" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR.\ |
---|
4170 | vNam(varn) .EQ. "w*qv*") then |
---|
4171 | if (wpqvp .EQ. 0) then |
---|
4172 | res@gsnLeftString ="w"+dq+"qv"+dq+" , w*qv* and wqv" |
---|
4173 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4174 | res@gsnRightString = " " |
---|
4175 | if (xs .EQ. -1) then |
---|
4176 | res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) |
---|
4177 | else |
---|
4178 | res@trXMinF = xs |
---|
4179 | end if |
---|
4180 | if (xe .EQ. -1) then |
---|
4181 | res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) |
---|
4182 | else |
---|
4183 | res@trXMaxF = xe |
---|
4184 | end if |
---|
4185 | if (vNam(varn) .EQ. "wsqvs")then |
---|
4186 | res@xyDashPattern = 1 |
---|
4187 | end if |
---|
4188 | if (vNam(varn) .EQ. "wqv")then |
---|
4189 | res@xyDashPattern = 2 |
---|
4190 | end if |
---|
4191 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4192 | |
---|
4193 | ; *************************************************** |
---|
4194 | ; legend for overlaid plot |
---|
4195 | ; *************************************************** |
---|
4196 | |
---|
4197 | lgres = True |
---|
4198 | lgMonoDashIndex = False |
---|
4199 | lgres@lgLabelFont = "helvetica" |
---|
4200 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4201 | lgres@vpWidthF = 0.09 |
---|
4202 | lgres@vpHeightF = 0.12 |
---|
4203 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4204 | lbid = gsn_create_legend(\ |
---|
4205 | wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres) |
---|
4206 | |
---|
4207 | amres = True |
---|
4208 | amres@amParallelPosF = 0.88 |
---|
4209 | amres@amOrthogonalPosF = 0.33 |
---|
4210 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4211 | overlay(plot(n),plot_wpqvp) |
---|
4212 | wpqvp=1 |
---|
4213 | else |
---|
4214 | if (prof3d .EQ. 0)then |
---|
4215 | varn=varn+1 |
---|
4216 | end if |
---|
4217 | continue |
---|
4218 | end if |
---|
4219 | end if |
---|
4220 | if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. \ |
---|
4221 | vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR.\ |
---|
4222 | vNam(varn) .EQ. "w*s*") then |
---|
4223 | if (wpsp .EQ. 0) then |
---|
4224 | res@gsnLeftString = "w"+dq+"s"+dq+", w*s* and ws" |
---|
4225 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4226 | res@gsnRightString = " " |
---|
4227 | if (xs .EQ. -1) then |
---|
4228 | res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) |
---|
4229 | else |
---|
4230 | res@trXMinF = xs |
---|
4231 | end if |
---|
4232 | if (xe .EQ. -1) then |
---|
4233 | res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) |
---|
4234 | else |
---|
4235 | res@trXMaxF = xe |
---|
4236 | end if |
---|
4237 | if (vNam(varn) .EQ. "wsss")then |
---|
4238 | res@xyDashPattern = 1 |
---|
4239 | end if |
---|
4240 | if (vNam(varn) .EQ. "ws")then |
---|
4241 | res@xyDashPattern = 2 |
---|
4242 | end if |
---|
4243 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4244 | |
---|
4245 | ; *************************************************** |
---|
4246 | ; legend for overlaid plot |
---|
4247 | ; *************************************************** |
---|
4248 | |
---|
4249 | lgres = True |
---|
4250 | lgMonoDashIndex = False |
---|
4251 | lgres@lgLabelFont = "helvetica" |
---|
4252 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4253 | lgres@vpWidthF = 0.08 |
---|
4254 | lgres@vpHeightF = 0.12 |
---|
4255 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4256 | lbid = gsn_create_legend(\ |
---|
4257 | wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres) |
---|
4258 | |
---|
4259 | amres = True |
---|
4260 | amres@amParallelPosF = 0.88 |
---|
4261 | amres@amOrthogonalPosF = 0.33 |
---|
4262 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4263 | overlay(plot(n),plot_wpsp) |
---|
4264 | wpsp=1 |
---|
4265 | else |
---|
4266 | if (prof3d .EQ. 0)then |
---|
4267 | varn=varn+1 |
---|
4268 | end if |
---|
4269 | continue |
---|
4270 | end if |
---|
4271 | end if |
---|
4272 | if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. \ |
---|
4273 | vNam(varn) .EQ. "wsa" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR.\ |
---|
4274 | vNam(varn) .EQ. "w*sa*") then |
---|
4275 | if (wpsap .EQ. 0) then |
---|
4276 | res@gsnLeftString = "w"+dq+"sa"+dq+", w*sa* and wsa" |
---|
4277 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4278 | res@gsnRightString = " " |
---|
4279 | if (xs .EQ. -1) then |
---|
4280 | res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) |
---|
4281 | else |
---|
4282 | res@trXMinF = xs |
---|
4283 | end if |
---|
4284 | if (xe .EQ. -1) then |
---|
4285 | res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) |
---|
4286 | else |
---|
4287 | res@trXMaxF = xe |
---|
4288 | end if |
---|
4289 | if (vNam(varn) .EQ. "wssas")then |
---|
4290 | res@xyDashPattern = 1 |
---|
4291 | end if |
---|
4292 | if (vNam(varn) .EQ. "wsa")then |
---|
4293 | res@xyDashPattern = 2 |
---|
4294 | end if |
---|
4295 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4296 | |
---|
4297 | ; *************************************************** |
---|
4298 | ; legend for overlaid plot |
---|
4299 | ; *************************************************** |
---|
4300 | |
---|
4301 | lgres = True |
---|
4302 | lgMonoDashIndex = False |
---|
4303 | lgres@lgLabelFont = "helvetica" |
---|
4304 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4305 | lgres@vpWidthF = 0.09 |
---|
4306 | lgres@vpHeightF = 0.12 |
---|
4307 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4308 | lbid = gsn_create_legend(\ |
---|
4309 | wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres) |
---|
4310 | amres = True |
---|
4311 | amres@amParallelPosF = 0.88 |
---|
4312 | amres@amOrthogonalPosF = 0.33 |
---|
4313 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4314 | overlay(plot(n),plot_wpsap) |
---|
4315 | wpsap=1 |
---|
4316 | else |
---|
4317 | if (prof3d .EQ. 0)then |
---|
4318 | varn=varn+1 |
---|
4319 | end if |
---|
4320 | continue |
---|
4321 | end if |
---|
4322 | end if |
---|
4323 | |
---|
4324 | if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. \ |
---|
4325 | vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "u*2" .OR. \ |
---|
4326 | vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then |
---|
4327 | if (us2 .EQ. 0) then |
---|
4328 | res@gsnLeftString = "u*2, v*2 and w*2" |
---|
4329 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4330 | res@gsnRightString = " " |
---|
4331 | if (xs .EQ. -1) then |
---|
4332 | res@trXMinF = min((/minius2,minivs2,miniws2/)) |
---|
4333 | else |
---|
4334 | res@trXMinF = xs |
---|
4335 | end if |
---|
4336 | if (xe .EQ. -1) then |
---|
4337 | res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) |
---|
4338 | else |
---|
4339 | res@trXMaxF = xe |
---|
4340 | end if |
---|
4341 | if (vNam(varn) .EQ. "vs2")then |
---|
4342 | res@xyDashPattern = 1 |
---|
4343 | end if |
---|
4344 | if (vNam(varn) .EQ. "ws2")then |
---|
4345 | res@xyDashPattern = 2 |
---|
4346 | end if |
---|
4347 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4348 | |
---|
4349 | ; *************************************************** |
---|
4350 | ; legend for overlaid plot |
---|
4351 | ; *************************************************** |
---|
4352 | |
---|
4353 | lgres = True |
---|
4354 | lgMonoDashIndex = False |
---|
4355 | lgres@lgLabelFont = "helvetica" |
---|
4356 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4357 | lgres@vpWidthF = 0.07 |
---|
4358 | lgres@vpHeightF = 0.12 |
---|
4359 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4360 | lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres) |
---|
4361 | amres = True |
---|
4362 | amres@amParallelPosF = 0.88 |
---|
4363 | amres@amOrthogonalPosF = 0.33 |
---|
4364 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4365 | overlay(plot(n),plot_us2) |
---|
4366 | us2=1 |
---|
4367 | else |
---|
4368 | if (prof3d .EQ. 0)then |
---|
4369 | varn=varn+1 |
---|
4370 | end if |
---|
4371 | continue |
---|
4372 | end if |
---|
4373 | end if |
---|
4374 | |
---|
4375 | if (vNam(varn) .EQ. "wsususodz" .OR. \ |
---|
4376 | vNam(varn) .EQ. "wspsodz" .OR. \ |
---|
4377 | vNam(varn) .EQ. "wpeodz" .OR. \ |
---|
4378 | vNam(varn) .EQ. "w*u*u*:dz" .OR. \ |
---|
4379 | vNam(varn) .EQ. "w*p*:dz" .OR. \ |
---|
4380 | vNam(varn) .EQ. "w"+dq+"e:dz") then |
---|
4381 | if (wsususodz .EQ. 0) then |
---|
4382 | res@gsnLeftString = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz" |
---|
4383 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4384 | res@gsnRightString = " " |
---|
4385 | if (xs .EQ. -1) then |
---|
4386 | res@trXMinF = min((/miniwsususodz,\ |
---|
4387 | miniwspsodz,miniwpeodz/)) |
---|
4388 | else |
---|
4389 | res@trXMinF = xs |
---|
4390 | end if |
---|
4391 | if (xe .EQ. -1) then |
---|
4392 | res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,\ |
---|
4393 | maxiwpeodz/)) |
---|
4394 | else |
---|
4395 | res@trXMaxF = xe |
---|
4396 | end if |
---|
4397 | if (vNam(varn) .EQ. "wspsodz")then |
---|
4398 | res@xyDashPattern = 1 |
---|
4399 | end if |
---|
4400 | if (vNam(varn) .EQ. "wpeodz")then |
---|
4401 | res@xyDashPattern = 2 |
---|
4402 | end if |
---|
4403 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4404 | |
---|
4405 | ; *************************************************** |
---|
4406 | ; legend for overlaid plot |
---|
4407 | ; *************************************************** |
---|
4408 | |
---|
4409 | lgres = True |
---|
4410 | lgMonoDashIndex = False |
---|
4411 | lgres@lgLabelFont = "helvetica" |
---|
4412 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
4413 | lgres@vpWidthF = 0.12 |
---|
4414 | lgres@vpHeightF = 0.12 |
---|
4415 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4416 | lbid = gsn_create_legend(\ |
---|
4417 | wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres) |
---|
4418 | amres = True |
---|
4419 | amres@amParallelPosF = 0.88 |
---|
4420 | amres@amOrthogonalPosF = 0.33 |
---|
4421 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
4422 | overlay(plot(n),plot_wsususodz) |
---|
4423 | wsususodz=1 |
---|
4424 | else |
---|
4425 | if (prof3d .EQ. 0)then |
---|
4426 | varn=varn+1 |
---|
4427 | end if |
---|
4428 | continue |
---|
4429 | end if |
---|
4430 | end if |
---|
4431 | n=n+1 |
---|
4432 | if (prof3d .EQ. 0)then |
---|
4433 | varn=varn+1 |
---|
4434 | end if |
---|
4435 | end if |
---|
4436 | end do |
---|
4437 | end if |
---|
4438 | |
---|
4439 | if (com_i .NE. 0) then |
---|
4440 | delete(com_var_avail) |
---|
4441 | end if |
---|
4442 | com_var_avail=new(count_var,string) |
---|
4443 | |
---|
4444 | if (combine .EQ. 1) then |
---|
4445 | co=0 |
---|
4446 | n_o=0 |
---|
4447 | do varn = 0,dim-1 |
---|
4448 | |
---|
4449 | check = True |
---|
4450 | |
---|
4451 | if (prof3d .EQ. 0) then |
---|
4452 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
4453 | isStrSubset( vNam(varn), "NORM")) then |
---|
4454 | check = False |
---|
4455 | end if |
---|
4456 | else |
---|
4457 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
4458 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
4459 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
4460 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
4461 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
4462 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
4463 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
4464 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
4465 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
4466 | check = False |
---|
4467 | end if |
---|
4468 | end if |
---|
4469 | |
---|
4470 | if (var .NE. "all") then |
---|
4471 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
4472 | end if |
---|
4473 | |
---|
4474 | if (check)then |
---|
4475 | |
---|
4476 | if (prof3d .EQ. 0) then |
---|
4477 | if (log_z .EQ. 1) then |
---|
4478 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
4479 | else |
---|
4480 | z = f_att->$vNam(varn+1)$ |
---|
4481 | end if |
---|
4482 | else |
---|
4483 | do i=0,b-1 |
---|
4484 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
4485 | z_v(varn,:) = z_u |
---|
4486 | if (log_z .EQ. 1) then |
---|
4487 | z = z_v(varn,1:dimz-1) |
---|
4488 | else |
---|
4489 | z = z_v(varn,:) |
---|
4490 | end if |
---|
4491 | else |
---|
4492 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
4493 | z_v(varn,:) = z_w |
---|
4494 | if (log_z .EQ. 1) then |
---|
4495 | z = z_v(varn,1:dimz-1) |
---|
4496 | else |
---|
4497 | z = z_v(varn,:) |
---|
4498 | end if |
---|
4499 | end if |
---|
4500 | end if |
---|
4501 | end do |
---|
4502 | end if |
---|
4503 | |
---|
4504 | z=z/norm_z |
---|
4505 | |
---|
4506 | com_var_avail(n_o)=vNam(varn) |
---|
4507 | |
---|
4508 | com=isStrSubset( c_var,","+vNam(varn)+"," ) |
---|
4509 | if (com)then |
---|
4510 | co = co+1 |
---|
4511 | if (n_o .EQ. 1) then |
---|
4512 | res@xyDashPattern = 1 |
---|
4513 | else |
---|
4514 | if (n_o .EQ. 2) then |
---|
4515 | res@xyDashPattern = 2 |
---|
4516 | else |
---|
4517 | res@xyDashPattern = 0 |
---|
4518 | res@gsnLeftString = " " ; "Combined Plot of "+c_var_name |
---|
4519 | res@tiXAxisString = "("+unit(varn)+")" |
---|
4520 | res@gsnRightString = " " |
---|
4521 | if (xs .EQ. -1) then |
---|
4522 | res@trXMinF = min(mini) |
---|
4523 | else |
---|
4524 | res@trXMinF = xs |
---|
4525 | end if |
---|
4526 | if (xe .EQ. -1) then |
---|
4527 | res@trXMaxF = max(maxi) |
---|
4528 | else |
---|
4529 | res@trXMaxF = xe |
---|
4530 | end if |
---|
4531 | end if |
---|
4532 | end if |
---|
4533 | label(n_o)=vNam(varn) |
---|
4534 | color_o(n_o)=237 |
---|
4535 | plot_o(n_o)=gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
4536 | n_o=n_o+1 |
---|
4537 | end if |
---|
4538 | if (prof3d .EQ. 0)then |
---|
4539 | varn=varn+1 |
---|
4540 | end if |
---|
4541 | end if |
---|
4542 | end do |
---|
4543 | |
---|
4544 | if(number_comb .EQ. 2)then |
---|
4545 | if (co .EQ. 2)then |
---|
4546 | overlay(plot_o(0),plot_o(1)) |
---|
4547 | else |
---|
4548 | print(" ") |
---|
4549 | print("combining is not possible,") |
---|
4550 | print("'c_var'(= "+c_var+") must include two variables of "+\ |
---|
4551 | "the general plots = ") |
---|
4552 | print("- "+com_var_avail) |
---|
4553 | print("be sure to have one comma before and after the variable") |
---|
4554 | print(" ") |
---|
4555 | exit |
---|
4556 | end if |
---|
4557 | end if |
---|
4558 | if(number_comb .EQ. 3)then |
---|
4559 | if (co .EQ. 3)then |
---|
4560 | overlay(plot_o(0),plot_o(1)) |
---|
4561 | overlay(plot_o(0),plot_o(2)) |
---|
4562 | else |
---|
4563 | print(" ") |
---|
4564 | print("combining is not possible,") |
---|
4565 | print("'c_var'(= "+c_var+") must include three variables of "+\ |
---|
4566 | "the general plots = ") |
---|
4567 | print("- "+com_var_avail) |
---|
4568 | print("be sure to have one comma before and after the variable") |
---|
4569 | print(" ") |
---|
4570 | exit |
---|
4571 | end if |
---|
4572 | end if |
---|
4573 | |
---|
4574 | ; *************************************************** |
---|
4575 | ; legend for combined plot |
---|
4576 | ; *************************************************** |
---|
4577 | |
---|
4578 | lgres = True |
---|
4579 | lgMonoDashIndex = False |
---|
4580 | lgres@lgDashIndexes = (/0,1,2/) |
---|
4581 | lgres@lgLabelFont = "helvetica" |
---|
4582 | lgres@vpWidthF = 0.12 |
---|
4583 | lgres@vpHeightF = 0.1 * number_comb / 3.0 + 0.01 |
---|
4584 | lgres@lgLabelFontHeightF = 10.0 * font_size_legend * ((number_comb \ |
---|
4585 | - 2.0) * 0.35 + 0.65) |
---|
4586 | |
---|
4587 | lbid = gsn_create_legend(wks,number_comb,label,lgres) |
---|
4588 | |
---|
4589 | amres = True |
---|
4590 | amres@amParallelPosF = -0.5 |
---|
4591 | amres@amOrthogonalPosF = -0.5 |
---|
4592 | amres@amJust = "TopLeft" |
---|
4593 | |
---|
4594 | annoid1 = gsn_add_annotation(plot_o(0),lbid,amres) |
---|
4595 | |
---|
4596 | plot(0) = plot_o(0) |
---|
4597 | |
---|
4598 | end if |
---|
4599 | |
---|
4600 | if (c_var_log .EQ. 1) then |
---|
4601 | c_var_plot(com_i) = plot(0) |
---|
4602 | end if |
---|
4603 | |
---|
4604 | end do |
---|
4605 | |
---|
4606 | ; *************************************************** |
---|
4607 | ; merge plots onto one page |
---|
4608 | ; *************************************************** |
---|
4609 | |
---|
4610 | if (c_var_log .EQ. 1) then |
---|
4611 | delete(plot_) |
---|
4612 | plot_=new(max_com_i+1,graphic) |
---|
4613 | plot_=c_var_plot |
---|
4614 | n = max_com_i + 1 |
---|
4615 | else |
---|
4616 | do m=0,n-1 |
---|
4617 | plot_(m)=plot(n-1-m) |
---|
4618 | end do |
---|
4619 | end if |
---|
4620 | |
---|
4621 | no_frames = 0 |
---|
4622 | |
---|
4623 | if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \ |
---|
4624 | n .gt. no_rows*no_columns) then |
---|
4625 | gsn_panel(wks,plot_,(/n,1/),resP) |
---|
4626 | print(" ") |
---|
4627 | print("Outputs to .eps or .epsi have only one frame") |
---|
4628 | print(" ") |
---|
4629 | else |
---|
4630 | do i = 0,n-1, no_rows*no_columns |
---|
4631 | if( (i+no_rows*no_columns) .gt. (n-1)) then |
---|
4632 | gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP) |
---|
4633 | no_frames = no_frames + 1 |
---|
4634 | else |
---|
4635 | gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),\ |
---|
4636 | (/no_rows,no_columns/),resP) |
---|
4637 | no_frames = no_frames + 1 |
---|
4638 | end if |
---|
4639 | end do |
---|
4640 | end if |
---|
4641 | |
---|
4642 | |
---|
4643 | if (format_out .EQ. "png" ) then |
---|
4644 | png_output = new((/no_frames/), string) |
---|
4645 | j = 0 |
---|
4646 | |
---|
4647 | if (no_frames .eq. 1) then |
---|
4648 | if (ncl_version .GE. 6 ) then |
---|
4649 | png_output(0) = file_out+".png" |
---|
4650 | else |
---|
4651 | png_output(0) = file_out+".00000"+1+".png" |
---|
4652 | end if |
---|
4653 | ;using imagemagick's convert for reducing the white |
---|
4654 | ;space around the plot |
---|
4655 | cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ |
---|
4656 | png_output(0) + " " + png_output(0) |
---|
4657 | system(cmd) |
---|
4658 | else |
---|
4659 | |
---|
4660 | do i=0, no_frames-1 |
---|
4661 | j = i + 1 |
---|
4662 | if (j .LE. 9) then |
---|
4663 | png_output(i) = file_out+".00000"+j+".png" |
---|
4664 | end if |
---|
4665 | if (j .GT. 9 .AND. j .LE. 99) then |
---|
4666 | png_output(i) = file_out+".0000"+j+".png" |
---|
4667 | end if |
---|
4668 | if (j .GT. 99 .AND. j .LE. 999) then |
---|
4669 | png_output(i) = file_out+".000"+j+".png" |
---|
4670 | end if |
---|
4671 | if (j .GT. 999) then |
---|
4672 | png_output(i) = file_out+".00"+j+".png" |
---|
4673 | end if |
---|
4674 | |
---|
4675 | ;using imagemagick's convert for reducing the white |
---|
4676 | ;space around the plot |
---|
4677 | cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ |
---|
4678 | png_output(i) + " " + png_output(i) |
---|
4679 | system(cmd) |
---|
4680 | end do |
---|
4681 | end if |
---|
4682 | |
---|
4683 | print(" ") |
---|
4684 | print("Output to: "+ png_output) |
---|
4685 | print(" ") |
---|
4686 | else |
---|
4687 | print(" ") |
---|
4688 | print("Output to: " + file_out +"."+ format_out) |
---|
4689 | print(" ") |
---|
4690 | end if |
---|
4691 | |
---|
4692 | end |
---|