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