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