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