[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 | |
---|
[324] | 1012 | if (nt .EQ. 1)then |
---|
| 1013 | delta_t=t_all(nt-1)/nt |
---|
| 1014 | else |
---|
[827] | 1015 | delta_t_array = new(nt-1,double) |
---|
| 1016 | |
---|
| 1017 | do i=0,nt-2 |
---|
| 1018 | delta_t_array(i) = t_all(i+1)-t_all(i) |
---|
| 1019 | end do |
---|
| 1020 | |
---|
| 1021 | delta_t = min(delta_t_array) |
---|
| 1022 | delete(delta_t_array) |
---|
[324] | 1023 | end if |
---|
[174] | 1024 | |
---|
[827] | 1025 | |
---|
[154] | 1026 | ; **************************************************** |
---|
| 1027 | ; start of time step and different types of mistakes that could be done |
---|
| 1028 | ; **************************************************** |
---|
[175] | 1029 | |
---|
[190] | 1030 | if (start_time_step .EQ. -1.) then |
---|
| 1031 | start_time_step=t_all(0)/3600 |
---|
[154] | 1032 | else |
---|
[175] | 1033 | if (start_time_step .GT. t_all(nt-1)/3600)then |
---|
[154] | 1034 | print(" ") |
---|
[566] | 1035 | print("'start_time_step' = "+ start_time_step +"h is greater "+\ |
---|
| 1036 | "than last time step = " \ |
---|
| 1037 | + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") |
---|
[154] | 1038 | print(" ") |
---|
[218] | 1039 | print("Select another 'start_time_step'") |
---|
[162] | 1040 | print(" ") |
---|
[154] | 1041 | exit |
---|
| 1042 | end if |
---|
[175] | 1043 | if (start_time_step .LT. t_all(0)/3600)then |
---|
[154] | 1044 | print(" ") |
---|
[566] | 1045 | print("'start_time_step' = "+ start_time_step +"h is lower "+\ |
---|
| 1046 | "than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") |
---|
[190] | 1047 | print(" ") |
---|
[154] | 1048 | exit |
---|
| 1049 | end if |
---|
| 1050 | end if |
---|
[175] | 1051 | |
---|
[218] | 1052 | do i=0,nt-1 |
---|
[566] | 1053 | if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\ |
---|
| 1054 | start_time_step .LT. (t_all(i)+delta_t/2)/3600)then |
---|
[162] | 1055 | st=i |
---|
| 1056 | break |
---|
[769] | 1057 | else |
---|
| 1058 | st=0 |
---|
[162] | 1059 | end if |
---|
| 1060 | end do |
---|
[174] | 1061 | |
---|
[154] | 1062 | ; **************************************************** |
---|
| 1063 | ; end of time step and different types of mistakes that could be done |
---|
| 1064 | ; **************************************************** |
---|
| 1065 | |
---|
[190] | 1066 | if (end_time_step .EQ. -1.) then |
---|
| 1067 | end_time_step = t_all(nt-1)/3600 |
---|
[154] | 1068 | else |
---|
[175] | 1069 | if (end_time_step .GT. t_all(nt-1)/3600)then |
---|
[154] | 1070 | print(" ") |
---|
[566] | 1071 | print("'end_time_step' = "+ end_time_step +"h is greater "+\ |
---|
| 1072 | "than last time step = " +\ |
---|
| 1073 | t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") |
---|
[154] | 1074 | print(" ") |
---|
[218] | 1075 | print("Select another 'end_time_step'") |
---|
[162] | 1076 | print(" ") |
---|
[154] | 1077 | exit |
---|
| 1078 | end if |
---|
[175] | 1079 | if (end_time_step .LT. start_time_step/3600)then |
---|
[154] | 1080 | print(" ") |
---|
[566] | 1081 | print("'end_time_step' = "+ end_time_step +"h is lower "+\ |
---|
| 1082 | "than 'start_time_step' = "+start_time_step+"h") |
---|
[154] | 1083 | print(" ") |
---|
[218] | 1084 | print("Select another 'start_time_step' or 'end_time_step'") |
---|
[162] | 1085 | print(" ") |
---|
[154] | 1086 | exit |
---|
| 1087 | end if |
---|
[162] | 1088 | end if |
---|
[175] | 1089 | |
---|
[174] | 1090 | do i=0,nt-1 |
---|
[566] | 1091 | if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\ |
---|
| 1092 | end_time_step .LT. (t_all(i)+delta_t/2)/3600)then |
---|
[162] | 1093 | et=i |
---|
| 1094 | break |
---|
[769] | 1095 | else |
---|
| 1096 | et=0 |
---|
[154] | 1097 | end if |
---|
[162] | 1098 | end do |
---|
[769] | 1099 | |
---|
[162] | 1100 | delete(start_time_step) |
---|
| 1101 | start_time_step=round(st,3) |
---|
| 1102 | delete(end_time_step) |
---|
| 1103 | end_time_step=round(et,3) |
---|
[351] | 1104 | |
---|
| 1105 | no_time = end_time_step-start_time_step+1 |
---|
[324] | 1106 | |
---|
[351] | 1107 | ; **************************************************** |
---|
| 1108 | ; time_stride and different types of mistakes that could be done |
---|
| 1109 | ; **************************************************** |
---|
| 1110 | |
---|
[518] | 1111 | if (time_stride .LT. 1) then |
---|
[351] | 1112 | print(" ") |
---|
| 1113 | print("'time_stride' has to be positive and is set to 1") |
---|
| 1114 | print(" ") |
---|
| 1115 | time_stride = 1 |
---|
| 1116 | end if |
---|
| 1117 | |
---|
[769] | 1118 | if (time_stride .GT. no_time) then |
---|
[351] | 1119 | print(" ") |
---|
[769] | 1120 | print("'time_stride' is greater than number of available "+\ |
---|
[566] | 1121 | "time steps,") |
---|
[518] | 1122 | print("=> 'time_stride' is set to 1") |
---|
| 1123 | time_stride = 1 |
---|
[351] | 1124 | end if |
---|
| 1125 | |
---|
[566] | 1126 | ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents |
---|
| 1127 | ;the time indices |
---|
| 1128 | ;to plot |
---|
[351] | 1129 | np = dimsizes(ti_in) |
---|
| 1130 | |
---|
[175] | 1131 | print(" ") |
---|
[566] | 1132 | print("Output of time steps from "+t_all(start_time_step)/3600+\ |
---|
| 1133 | " h = "+t_all(start_time_step)+" s => index = "+start_time_step) |
---|
| 1134 | print(" till "+t_all(ti_in(np-1))/3600+" h = "\ |
---|
| 1135 | +t_all(ti_in(np-1))+" s => index = "+end_time_step) |
---|
[351] | 1136 | print(" with temporal stride = "+time_stride) |
---|
[175] | 1137 | print(" ") |
---|
| 1138 | |
---|
[351] | 1139 | |
---|
[154] | 1140 | ; **************************************************** |
---|
| 1141 | ; set up legend and colors |
---|
| 1142 | ; **************************************************** |
---|
| 1143 | |
---|
[566] | 1144 | legend_label=new(np,string) |
---|
[351] | 1145 | do p=0, np-1 |
---|
[566] | 1146 | legend_label(p)=sprintf("%6.2f", t_all(ti_in(p))/3600) |
---|
[154] | 1147 | end do |
---|
| 1148 | |
---|
| 1149 | ; *************************************************** |
---|
| 1150 | ; set up recourses |
---|
| 1151 | ; *************************************************** |
---|
| 1152 | |
---|
[175] | 1153 | res = True |
---|
[154] | 1154 | res@gsnDraw = False |
---|
| 1155 | res@gsnFrame = False |
---|
| 1156 | res@txFont = "helvetica" |
---|
| 1157 | res@tiMainFont = "helvetica" |
---|
| 1158 | res@tiXAxisFont = "helvetica" |
---|
| 1159 | res@tiYAxisFont = "helvetica" |
---|
| 1160 | res@tmXBLabelFont = "helvetica" |
---|
| 1161 | res@tmYLLabelFont = "helvetica" |
---|
| 1162 | res@lgLabelFont = "helvetica" |
---|
| 1163 | res@tmLabelAutoStride = True |
---|
[219] | 1164 | if (legend .EQ. 1)then |
---|
[782] | 1165 | res@pmLegendDisplayMode = "Always" |
---|
[219] | 1166 | end if |
---|
[731] | 1167 | |
---|
[154] | 1168 | res@pmLegendSide = "Top" |
---|
| 1169 | res@xyExplicitLegendLabels = legend_label |
---|
[161] | 1170 | res@pmLegendParallelPosF = 1.15 |
---|
| 1171 | res@pmLegendOrthogonalPosF = -1.0 |
---|
[154] | 1172 | res@pmLegendWidthF = 0.12 |
---|
[351] | 1173 | res@pmLegendHeightF = 0.05*np |
---|
[782] | 1174 | res@lgLabelFontHeightF = font_size_legend |
---|
| 1175 | res@lgTitleString = "Time (h)" |
---|
| 1176 | res@lgTitleFontHeightF = font_size |
---|
| 1177 | res@txFontHeightF = font_size |
---|
| 1178 | res@tiXAxisFontHeightF = font_size |
---|
| 1179 | res@tiYAxisFontHeightF = font_size |
---|
| 1180 | res@tmXBLabelFontHeightF = font_size |
---|
| 1181 | res@tmYLLabelFontHeightF = font_size |
---|
| 1182 | res@tiXAxisString = " " |
---|
[175] | 1183 | if ( black .eq. 0 ) then |
---|
[250] | 1184 | res@xyLineColors = -(ispan(-237,-2,235/np)) |
---|
[175] | 1185 | end if |
---|
[218] | 1186 | if (norm_z .EQ. 1)then |
---|
[782] | 1187 | res@tiYAxisString = "Height (m)" |
---|
[175] | 1188 | else |
---|
[782] | 1189 | res@tiYAxisString = "Height / "+norm_z+" (m)" |
---|
[175] | 1190 | end if |
---|
| 1191 | |
---|
[218] | 1192 | if (log_z .EQ. 1) then |
---|
[175] | 1193 | res@trYLog = True |
---|
| 1194 | end if |
---|
| 1195 | |
---|
[190] | 1196 | if (dash .EQ. 0 ) then |
---|
[782] | 1197 | res@xyMonoDashPattern = True |
---|
[175] | 1198 | else |
---|
[782] | 1199 | res@xyMonoDashPattern = False |
---|
[175] | 1200 | if (no_files .GT. 1) |
---|
[782] | 1201 | res@xyMonoDashPattern = True |
---|
[175] | 1202 | print(" ") |
---|
[566] | 1203 | print("If you use more than one file, patterns for different "+\ |
---|
| 1204 | "timesteps cannot be used") |
---|
[175] | 1205 | print(" ") |
---|
[190] | 1206 | end if |
---|
[154] | 1207 | end if |
---|
[250] | 1208 | |
---|
[218] | 1209 | res@tmXBMinorPerMajor = 4 |
---|
| 1210 | res@tmYLMinorPerMajor = 4 |
---|
[154] | 1211 | |
---|
| 1212 | resP = True |
---|
| 1213 | resP@txFont = "helvetica" |
---|
[874] | 1214 | resP@txString = f_att@title |
---|
[154] | 1215 | resP@txFuncCode = "~" |
---|
[218] | 1216 | resP@txFontHeightF = 0.015 |
---|
[154] | 1217 | |
---|
| 1218 | ; *************************************************** |
---|
[161] | 1219 | ; set up graphics for plot |
---|
[154] | 1220 | ; *************************************************** |
---|
[161] | 1221 | |
---|
[154] | 1222 | if (combine .EQ. 1) then |
---|
[190] | 1223 | plot_o = new(number_comb,graphic) |
---|
[161] | 1224 | label=new(number_comb,string) |
---|
| 1225 | color_o=new(number_comb,integer) |
---|
[593] | 1226 | |
---|
| 1227 | if (check_vType) then |
---|
| 1228 | mini=new(number_comb,double) |
---|
| 1229 | maxi=new(number_comb,double) |
---|
| 1230 | else |
---|
| 1231 | mini=new(number_comb,float) |
---|
| 1232 | maxi=new(number_comb,float) |
---|
| 1233 | end if |
---|
[154] | 1234 | end if |
---|
[190] | 1235 | |
---|
[532] | 1236 | if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then |
---|
| 1237 | format_out@wkPaperSize = "A4" |
---|
| 1238 | end if |
---|
| 1239 | if ( format_out .EQ. "png" ) then |
---|
| 1240 | format_out@wkWidth = 1000 |
---|
| 1241 | format_out@wkHeight = 1000 |
---|
| 1242 | end if |
---|
| 1243 | |
---|
[154] | 1244 | wks=gsn_open_wks(format_out,file_out) |
---|
| 1245 | gsn_define_colormap(wks,"rainbow+white") |
---|
[161] | 1246 | |
---|
[154] | 1247 | ; *************************************************** |
---|
| 1248 | ; set up minimum and maximum height |
---|
[175] | 1249 | ; *************************************************** |
---|
[154] | 1250 | |
---|
[218] | 1251 | if (log_z .EQ. 1)then |
---|
[190] | 1252 | if (min_z .EQ. -1)then |
---|
[175] | 1253 | if (isvar("z_u"))then |
---|
| 1254 | min_z=z_u(1) |
---|
| 1255 | else |
---|
| 1256 | min_z=z_w(1) |
---|
[190] | 1257 | end if |
---|
[175] | 1258 | else |
---|
[190] | 1259 | if (isvar("z_w"))then |
---|
| 1260 | if (min_z .GE. max(z_w) ) then |
---|
[175] | 1261 | print(" ") |
---|
[566] | 1262 | print("Minimum of height ('min_z'="+min_z+") is greater "+\ |
---|
| 1263 | "than available heights (="+max(z_w)+")") |
---|
[175] | 1264 | print(" ") |
---|
| 1265 | exit |
---|
[190] | 1266 | end if |
---|
| 1267 | else |
---|
| 1268 | if (min_z .GE. max(z_u) ) then |
---|
| 1269 | print(" ") |
---|
[566] | 1270 | print("Minimum of height ('min_z'="+min_z+") is greater "+\ |
---|
| 1271 | "than available heights (="+max(z_u)+")") |
---|
[190] | 1272 | print(" ") |
---|
| 1273 | exit |
---|
| 1274 | end if |
---|
| 1275 | end if |
---|
| 1276 | if (isvar("z_u"))then |
---|
| 1277 | if (min_z .LT. z_u(1) ) then |
---|
| 1278 | print(" ") |
---|
[566] | 1279 | print("Begin height 'min_z' at least at level k=1 (="+\ |
---|
| 1280 | z_u(1)+"m) due to the logarithmic scale of the y-axis") |
---|
[190] | 1281 | print(" ") |
---|
| 1282 | exit |
---|
[175] | 1283 | end if |
---|
[190] | 1284 | else |
---|
| 1285 | if (min_z .LT. z_w(1) ) then |
---|
[175] | 1286 | print(" ") |
---|
[566] | 1287 | print("Begin height 'min_z' at least at level k=1 (="+\ |
---|
| 1288 | z_w(1)+"m) due to the logarithmic scale of the y-axis") |
---|
[175] | 1289 | print(" ") |
---|
| 1290 | exit |
---|
[190] | 1291 | end if |
---|
[175] | 1292 | end if |
---|
[190] | 1293 | end if |
---|
| 1294 | else |
---|
| 1295 | if (isvar("z_u"))then |
---|
| 1296 | if (min_z .EQ. -1)then |
---|
| 1297 | min_z=z_u(0) |
---|
| 1298 | end if |
---|
[175] | 1299 | else |
---|
[190] | 1300 | if (min_z .EQ. -1)then |
---|
| 1301 | min_z=z_w(0) |
---|
| 1302 | end if |
---|
| 1303 | end if |
---|
[342] | 1304 | |
---|
[190] | 1305 | if (isvar("z_w"))then |
---|
| 1306 | if (min_z .GE. max(z_w) ) then |
---|
[175] | 1307 | print(" ") |
---|
[566] | 1308 | print("Minimum of height ('min_z'="+min_z+") is greater than "+\ |
---|
| 1309 | "available heights (="+max(z_w)+")") |
---|
[175] | 1310 | print(" ") |
---|
| 1311 | exit |
---|
| 1312 | end if |
---|
[190] | 1313 | else |
---|
| 1314 | if (min_z .EQ. -1)then |
---|
| 1315 | min_z=z_u(0) |
---|
[175] | 1316 | end if |
---|
[190] | 1317 | if (min_z .GE. max(z_u) ) then |
---|
[154] | 1318 | print(" ") |
---|
[566] | 1319 | print("Minimum of height ('min_z'="+min_z+") is greater than "+\ |
---|
| 1320 | "available heights (="+max(z_u)+")") |
---|
[154] | 1321 | print(" ") |
---|
| 1322 | exit |
---|
| 1323 | end if |
---|
| 1324 | end if |
---|
[190] | 1325 | end if |
---|
| 1326 | |
---|
| 1327 | if (isvar("z_w"))then |
---|
| 1328 | if (max_z .EQ. -1)then |
---|
| 1329 | max_z=max(z_w) |
---|
| 1330 | end if |
---|
[154] | 1331 | else |
---|
[190] | 1332 | if (max_z .EQ. -1)then |
---|
| 1333 | max_z=max(z_u) |
---|
| 1334 | end if |
---|
| 1335 | end if |
---|
| 1336 | |
---|
| 1337 | if (isvar("z_w"))then |
---|
| 1338 | if (max_z .GT. max(z_w) ) then |
---|
[154] | 1339 | print(" ") |
---|
[566] | 1340 | print("Maximum of height ('max_z'="+max_z+") is greater than "+\ |
---|
| 1341 | "available heights (="+max(z_w)+")") |
---|
[154] | 1342 | print(" ") |
---|
| 1343 | exit |
---|
| 1344 | end if |
---|
| 1345 | end if |
---|
| 1346 | |
---|
[218] | 1347 | min_z=min_z/norm_z |
---|
| 1348 | max_z=max_z/norm_z |
---|
[175] | 1349 | |
---|
[154] | 1350 | ; *************************************************** |
---|
| 1351 | ; read data and create plots |
---|
| 1352 | ; *************************************************** |
---|
| 1353 | |
---|
[351] | 1354 | do ti =0,np-1 |
---|
| 1355 | if( t_all(ti_in(ti)) .lt. 10^36) then |
---|
[154] | 1356 | start_time_step = ti |
---|
| 1357 | break |
---|
| 1358 | end if |
---|
| 1359 | end do |
---|
[175] | 1360 | |
---|
[585] | 1361 | if (log_z .EQ. 1) then |
---|
| 1362 | if (check_vType) then |
---|
| 1363 | data = new((/dim,np,dimz-1/),double) |
---|
| 1364 | data_0 = new((/np,dimz-1/),double) |
---|
| 1365 | else |
---|
| 1366 | data = new((/dim,np,dimz-1/),float) |
---|
| 1367 | data_0 = new((/np,dimz-1/),float) |
---|
| 1368 | end if |
---|
[347] | 1369 | data@_FillValue=9.96921e+36 |
---|
[175] | 1370 | data_0 = 0.1 |
---|
[351] | 1371 | t = new((/np,dimz-1/),float) |
---|
[175] | 1372 | t = 0.0 |
---|
| 1373 | unit = new(dim,string) |
---|
| 1374 | if (isvar("z_u"))then |
---|
| 1375 | if (typeof(z_u) .EQ. "double")then |
---|
| 1376 | z_v = new((/dim,dimz/),double) |
---|
| 1377 | z_ = new((/dim,dimz-1/),double) |
---|
| 1378 | else |
---|
| 1379 | if (typeof(z_u) .EQ. "float")then |
---|
| 1380 | z_v = new((/dim,dimz/),float) |
---|
| 1381 | z_ = new((/dim,dimz-1/),float) |
---|
| 1382 | end if |
---|
| 1383 | end if |
---|
| 1384 | else |
---|
| 1385 | if (isvar("z_w"))then |
---|
| 1386 | if (typeof(z_w) .EQ. "double")then |
---|
| 1387 | z_v = new((/dim,dimz/),double) |
---|
| 1388 | z_ = new((/dim,dimz-1/),double) |
---|
| 1389 | else |
---|
| 1390 | if (typeof(z_w) .EQ. "float")then |
---|
| 1391 | z_v = new((/dim,dimz/),float) |
---|
| 1392 | z_ = new((/dim,dimz-1/),float) |
---|
| 1393 | end if |
---|
| 1394 | end if |
---|
| 1395 | end if |
---|
| 1396 | end if |
---|
| 1397 | else |
---|
[585] | 1398 | if (check_vType) then |
---|
| 1399 | data = new((/dim,np,dimz/),double) |
---|
| 1400 | data_0 = new((/np,dimz/),double) |
---|
| 1401 | else |
---|
| 1402 | data = new((/dim,np,dimz/),float) |
---|
| 1403 | data_0 = new((/np,dimz/),float) |
---|
| 1404 | end if |
---|
| 1405 | data@_FillValue=9.96921e+36 |
---|
[175] | 1406 | data_0 = 0.0 |
---|
[351] | 1407 | t = new((/np,dimz/),float) |
---|
[175] | 1408 | t = 0.0 |
---|
| 1409 | unit = new(dim,string) |
---|
| 1410 | if (isvar("z_u"))then |
---|
| 1411 | if (typeof(z_u) .EQ. "double")then |
---|
| 1412 | z_v = new((/dim,dimz/),double) |
---|
| 1413 | z_ = new((/dim,dimz/),double) |
---|
| 1414 | else |
---|
| 1415 | if (typeof(z_u) .EQ. "float")then |
---|
| 1416 | z_v = new((/dim,dimz/),float) |
---|
| 1417 | z_ = new((/dim,dimz/),float) |
---|
| 1418 | end if |
---|
| 1419 | end if |
---|
| 1420 | else |
---|
| 1421 | if (isvar("z_w"))then |
---|
| 1422 | if (typeof(z_w) .EQ. "double")then |
---|
| 1423 | z_v = new((/dim,dimz/),double) |
---|
| 1424 | z_ = new((/dim,dimz/),double) |
---|
| 1425 | else |
---|
| 1426 | if (typeof(z_w) .EQ. "float")then |
---|
| 1427 | z_v = new((/dim,dimz/),float) |
---|
| 1428 | z_ = new((/dim,dimz/),float) |
---|
| 1429 | end if |
---|
| 1430 | end if |
---|
| 1431 | end if |
---|
| 1432 | end if |
---|
| 1433 | end if |
---|
[157] | 1434 | |
---|
[175] | 1435 | end if |
---|
[566] | 1436 | ;-------above steps only for first file |
---|
[175] | 1437 | |
---|
| 1438 | ; *************************************************** |
---|
| 1439 | ; indicate plot number |
---|
| 1440 | ; *************************************************** |
---|
| 1441 | |
---|
| 1442 | if (combine .EQ. 1) then |
---|
| 1443 | n = 1 |
---|
| 1444 | else |
---|
| 1445 | n = 0 |
---|
| 1446 | end if |
---|
| 1447 | |
---|
[161] | 1448 | if (over .EQ. 1) then |
---|
| 1449 | plot_u = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1450 | plot_v = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1451 | plot_w = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
[585] | 1452 | plot_pt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
[161] | 1453 | plot_vpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1454 | plot_lpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1455 | plot_q = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1456 | plot_qv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1457 | plot_ql = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1458 | plot_rho = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1459 | plot_s = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1460 | plot_sa = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1461 | plot_e = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1462 | plot_es = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1463 | plot_km = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1464 | plot_kh = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1465 | plot_l = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1466 | plot_wpup = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1467 | plot_wsus = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1468 | plot_wu = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1469 | plot_wpvp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1470 | plot_wsvs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1471 | plot_wv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1472 | plot_wpptp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1473 | plot_wspts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1474 | plot_wpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1475 | plot_wsptsBC = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1476 | plot_wptBC = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1477 | plot_wpvptp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1478 | plot_wsvpts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1479 | plot_wvpt = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1480 | plot_wpqp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1481 | plot_wsqs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1482 | plot_wq = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1483 | plot_wpqvp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1484 | plot_wsqvs = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1485 | plot_wqv = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1486 | plot_wpsp = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1487 | plot_wsss = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1488 | plot_ws = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1489 | plot_wpsap = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1490 | plot_wssas = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1491 | plot_wsa = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1492 | plot_wses = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1493 | plot_us2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1494 | plot_vs2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1495 | plot_ws2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1496 | plot_pts2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1497 | plot_ws3 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1498 | plot_Sw = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1499 | plot_ws2pts = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1500 | plot_wspts2 = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1501 | plot_wsususodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1502 | plot_wspsodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
| 1503 | plot_wpeodz = gsn_csm_xy(wks,t,data_0(:,:),res) |
---|
[585] | 1504 | |
---|
| 1505 | if (check_vType) then |
---|
| 1506 | miniu = 100000.d |
---|
| 1507 | maxiu = -100000.d |
---|
| 1508 | miniv = 100000.d |
---|
| 1509 | maxiv = -100000.d |
---|
| 1510 | miniw = 100000.d |
---|
| 1511 | maxiw = -100000.d |
---|
| 1512 | minipt = 100000.d |
---|
| 1513 | maxipt = -100000.d |
---|
| 1514 | minivpt = 100000.d |
---|
| 1515 | maxivpt = -100000.d |
---|
| 1516 | minilpt = 100000.d |
---|
| 1517 | maxilpt = -100000.d |
---|
| 1518 | miniq = 100000.d |
---|
| 1519 | maxiq = -100000.d |
---|
| 1520 | miniqv = 100000.d |
---|
| 1521 | maxiqv = -100000.d |
---|
| 1522 | miniql = 100000.d |
---|
| 1523 | maxiql = -100000.d |
---|
| 1524 | minie = 100000.d |
---|
| 1525 | maxie = -100000.d |
---|
| 1526 | minies = 100000.d |
---|
| 1527 | maxies = -100000.d |
---|
| 1528 | minikm = 100000.d |
---|
| 1529 | maxikm = -100000.d |
---|
| 1530 | minikh = 100000.d |
---|
| 1531 | maxikh = -100000.d |
---|
| 1532 | miniwpup = 100000.d |
---|
| 1533 | maxiwpup = -100000.d |
---|
| 1534 | miniwsus = 100000.d |
---|
| 1535 | maxiwsus = -100000.d |
---|
| 1536 | miniwu = 100000.d |
---|
| 1537 | maxiwu = -100000.d |
---|
| 1538 | miniwpvp = 100000.d |
---|
| 1539 | maxiwpvp = -100000.d |
---|
| 1540 | miniwsvs = 100000.d |
---|
| 1541 | maxiwsvs = -100000.d |
---|
| 1542 | miniwv = 100000.d |
---|
| 1543 | maxiwv = -100000.d |
---|
| 1544 | miniwpptp = 100000.d |
---|
| 1545 | maxiwpptp = -100000.d |
---|
| 1546 | miniwspts = 100000.d |
---|
| 1547 | maxiwspts = -100000.d |
---|
| 1548 | miniwpt = 100000.d |
---|
| 1549 | maxiwpt = -100000.d |
---|
| 1550 | miniwsptsBC = 100000.d |
---|
| 1551 | maxiwsptsBC = -100000.d |
---|
| 1552 | miniwptBC = 100000.d |
---|
| 1553 | maxiwptBC = -100000.d |
---|
| 1554 | miniwpvptp = 100000.d |
---|
| 1555 | maxiwpvptp = -100000.d |
---|
| 1556 | miniwsvpts = 100000.d |
---|
| 1557 | maxiwsvpts = -100000.d |
---|
| 1558 | miniwvpt = 100000.d |
---|
| 1559 | maxiwvpt = -100000.d |
---|
| 1560 | miniwpqp = 100000.d |
---|
| 1561 | maxiwpqp = -100000.d |
---|
| 1562 | miniwsqs = 100000.d |
---|
| 1563 | maxiwsqs = -100000.d |
---|
| 1564 | miniwq = 100000.d |
---|
| 1565 | maxiwq = -100000.d |
---|
| 1566 | miniwpqvp = 100000.d |
---|
| 1567 | maxiwpqvp = -100000.d |
---|
| 1568 | miniwsqvs = 100000.d |
---|
| 1569 | maxiwsqvs = -100000.d |
---|
| 1570 | miniwqv = 100000.d |
---|
| 1571 | maxiwqv = -100000.d |
---|
| 1572 | miniwpsp = 100000.d |
---|
| 1573 | maxiwpsp = -100000.d |
---|
| 1574 | miniwsss = 100000.d |
---|
| 1575 | maxiwsss = -100000.d |
---|
| 1576 | miniws = 100000.d |
---|
| 1577 | maxiws = -100000.d |
---|
| 1578 | miniwpsap = 100000.d |
---|
| 1579 | maxiwpsap = -100000.d |
---|
| 1580 | miniwssas = 100000.d |
---|
| 1581 | maxiwssas = -100000.d |
---|
| 1582 | miniwsa = 100000.d |
---|
| 1583 | maxiwsa = -100000.d |
---|
| 1584 | minius2 = 100000.d |
---|
| 1585 | maxius2 = -100000.d |
---|
| 1586 | minivs2 = 100000.d |
---|
| 1587 | maxivs2 = -100000.d |
---|
| 1588 | miniws2 = 100000.d |
---|
| 1589 | maxiws2 = -100000.d |
---|
| 1590 | miniwsususodz = 100000.d |
---|
| 1591 | maxiwsususodz = -100000.d |
---|
| 1592 | miniwspsodz = 100000.d |
---|
| 1593 | maxiwspsodz = -100000.d |
---|
| 1594 | miniwpeodz = 100000.d |
---|
| 1595 | maxiwpeodz = -100000.d |
---|
| 1596 | else |
---|
| 1597 | miniu = 100000. |
---|
| 1598 | maxiu = -100000. |
---|
| 1599 | miniv = 100000. |
---|
| 1600 | maxiv = -100000. |
---|
| 1601 | miniw = 100000. |
---|
| 1602 | maxiw = -100000. |
---|
| 1603 | minipt = 100000. |
---|
| 1604 | maxipt = -100000. |
---|
| 1605 | minivpt = 100000. |
---|
| 1606 | maxivpt = -100000. |
---|
| 1607 | minilpt = 100000. |
---|
| 1608 | maxilpt = -100000. |
---|
| 1609 | miniq = 100000. |
---|
| 1610 | maxiq = -100000. |
---|
| 1611 | miniqv = 100000. |
---|
| 1612 | maxiqv = -100000. |
---|
| 1613 | miniql = 100000. |
---|
| 1614 | maxiql = -100000. |
---|
| 1615 | minie = 100000. |
---|
| 1616 | maxie = -100000. |
---|
| 1617 | minies = 100000. |
---|
| 1618 | maxies = -100000. |
---|
| 1619 | minikm = 100000. |
---|
| 1620 | maxikm = -100000. |
---|
| 1621 | minikh = 100000. |
---|
| 1622 | maxikh = -100000. |
---|
| 1623 | miniwpup = 100000. |
---|
| 1624 | maxiwpup = -100000. |
---|
| 1625 | miniwsus = 100000. |
---|
| 1626 | maxiwsus = -100000. |
---|
| 1627 | miniwu = 100000. |
---|
| 1628 | maxiwu = -100000. |
---|
| 1629 | miniwpvp = 100000. |
---|
| 1630 | maxiwpvp = -100000. |
---|
| 1631 | miniwsvs = 100000. |
---|
| 1632 | maxiwsvs = -100000. |
---|
| 1633 | miniwv = 100000. |
---|
| 1634 | maxiwv = -100000. |
---|
| 1635 | miniwpptp = 100000. |
---|
| 1636 | maxiwpptp = -100000. |
---|
| 1637 | miniwspts = 100000. |
---|
| 1638 | maxiwspts = -100000. |
---|
| 1639 | miniwpt = 100000. |
---|
| 1640 | maxiwpt = -100000. |
---|
| 1641 | miniwsptsBC = 100000. |
---|
| 1642 | maxiwsptsBC = -100000. |
---|
| 1643 | miniwptBC = 100000. |
---|
| 1644 | maxiwptBC = -100000. |
---|
| 1645 | miniwpvptp = 100000. |
---|
| 1646 | maxiwpvptp = -100000. |
---|
| 1647 | miniwsvpts = 100000. |
---|
| 1648 | maxiwsvpts = -100000. |
---|
| 1649 | miniwvpt = 100000. |
---|
| 1650 | maxiwvpt = -100000. |
---|
| 1651 | miniwpqp = 100000. |
---|
| 1652 | maxiwpqp = -100000. |
---|
| 1653 | miniwsqs = 100000. |
---|
| 1654 | maxiwsqs = -100000. |
---|
| 1655 | miniwq = 100000. |
---|
| 1656 | maxiwq = -100000. |
---|
| 1657 | miniwpqvp = 100000. |
---|
| 1658 | maxiwpqvp = -100000. |
---|
| 1659 | miniwsqvs = 100000. |
---|
| 1660 | maxiwsqvs = -100000. |
---|
| 1661 | miniwqv = 100000. |
---|
| 1662 | maxiwqv = -100000. |
---|
| 1663 | miniwpsp = 100000. |
---|
| 1664 | maxiwpsp = -100000. |
---|
| 1665 | miniwsss = 100000. |
---|
| 1666 | maxiwsss = -100000. |
---|
| 1667 | miniws = 100000. |
---|
| 1668 | maxiws = -100000. |
---|
| 1669 | miniwpsap = 100000. |
---|
| 1670 | maxiwpsap = -100000. |
---|
| 1671 | miniwssas = 100000. |
---|
| 1672 | maxiwssas = -100000. |
---|
| 1673 | miniwsa = 100000. |
---|
| 1674 | maxiwsa = -100000. |
---|
| 1675 | minius2 = 100000. |
---|
| 1676 | maxius2 = -100000. |
---|
| 1677 | minivs2 = 100000. |
---|
| 1678 | maxivs2 = -100000. |
---|
| 1679 | miniws2 = 100000. |
---|
| 1680 | maxiws2 = -100000. |
---|
| 1681 | miniwsususodz = 100000. |
---|
| 1682 | maxiwsususodz = -100000. |
---|
| 1683 | miniwspsodz = 100000. |
---|
| 1684 | maxiwspsodz = -100000. |
---|
| 1685 | miniwpeodz = 100000. |
---|
| 1686 | maxiwpeodz = -100000. |
---|
| 1687 | end if |
---|
| 1688 | |
---|
[161] | 1689 | end if |
---|
[218] | 1690 | |
---|
| 1691 | if (prof3d .EQ. 1)then |
---|
| 1692 | |
---|
| 1693 | if (end_x .EQ. -1) then |
---|
| 1694 | end_x=dimx-2 |
---|
| 1695 | end if |
---|
| 1696 | if (end_y .EQ. -1)then |
---|
| 1697 | end_y=dimy-2 |
---|
| 1698 | end if |
---|
| 1699 | if (start_x .LT. 0)then |
---|
| 1700 | print(" ") |
---|
| 1701 | print("'start_x' is lower than 0 and set to 0") |
---|
| 1702 | print(" ") |
---|
| 1703 | start_x=0 |
---|
| 1704 | end if |
---|
| 1705 | if (start_x .GT. dimx-1)then |
---|
| 1706 | print(" ") |
---|
[566] | 1707 | print("'start_x' is greater than available x-range and set to "+\ |
---|
| 1708 | "maximum of x-range (excluding ghostpoint)") |
---|
[218] | 1709 | print(" ") |
---|
| 1710 | start_x=dimx-2 |
---|
| 1711 | end if |
---|
| 1712 | if (end_x .EQ. dimx-1)then |
---|
| 1713 | print(" ") |
---|
| 1714 | print("'end_x' = "+end_x+" and includes the ghostpoint") |
---|
| 1715 | print(" ") |
---|
| 1716 | end if |
---|
| 1717 | if (end_x .GT. dimx-1)then |
---|
| 1718 | print(" ") |
---|
[566] | 1719 | print("'end_x' = "+end_x+" is greater than available x-range and set "+\ |
---|
| 1720 | "to maximum of x-range (excluding ghostpoint)") |
---|
[218] | 1721 | print(" ") |
---|
| 1722 | end_x=dimx-2 |
---|
| 1723 | end if |
---|
| 1724 | if (end_x .LT. start_x)then |
---|
| 1725 | print(" ") |
---|
[566] | 1726 | print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+\ |
---|
| 1727 | " and set to maximum of x-range (excluding ghostpoint)") |
---|
[218] | 1728 | print(" ") |
---|
| 1729 | end_x=dimx-2 |
---|
| 1730 | end if |
---|
| 1731 | if (start_y .LT. 0)then |
---|
| 1732 | print(" ") |
---|
| 1733 | print("'start_y' is lower than 0 and set to 0") |
---|
| 1734 | print(" ") |
---|
| 1735 | start_y=0 |
---|
| 1736 | end if |
---|
| 1737 | if (start_y .GT. dimy-1)then |
---|
| 1738 | print(" ") |
---|
[566] | 1739 | print("'start_y' is greater than available y-range and set to "+\ |
---|
| 1740 | "maximum of y-range (excluding ghostpoint)") |
---|
[218] | 1741 | print(" ") |
---|
| 1742 | start_x=dimy-2 |
---|
| 1743 | end if |
---|
| 1744 | if (end_y .EQ. dimy-1)then |
---|
| 1745 | print(" ") |
---|
| 1746 | print("'end_y' = "+end_y+" and includes the ghostpoint") |
---|
| 1747 | print(" ") |
---|
| 1748 | end if |
---|
| 1749 | if (end_y .GT. dimy-1)then |
---|
| 1750 | print(" ") |
---|
[566] | 1751 | print("'end_y' = "+end_y+" is greater than available y-range and "+\ |
---|
| 1752 | "set to maximum of y-range (excluding ghostpoint)") |
---|
[218] | 1753 | print(" ") |
---|
| 1754 | end_x=dimy-2 |
---|
| 1755 | end if |
---|
| 1756 | if (end_y .LT. start_y)then |
---|
| 1757 | print(" ") |
---|
[566] | 1758 | print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+\ |
---|
| 1759 | " and set to maximum of y-range (excluding ghostpoint)") |
---|
[218] | 1760 | print(" ") |
---|
| 1761 | end_y=dimy-2 |
---|
| 1762 | end if |
---|
| 1763 | |
---|
| 1764 | end if |
---|
| 1765 | |
---|
[161] | 1766 | n_o=0 |
---|
[162] | 1767 | count_var=0 |
---|
[250] | 1768 | |
---|
[219] | 1769 | res@xyDashPattern = 1*nof |
---|
[347] | 1770 | |
---|
[353] | 1771 | over_remind = False |
---|
| 1772 | if ( over .eq. 1)then |
---|
| 1773 | over_remind = True |
---|
| 1774 | end if |
---|
[250] | 1775 | |
---|
[161] | 1776 | do varn = 0,dim-1 |
---|
[174] | 1777 | |
---|
| 1778 | check = True |
---|
[161] | 1779 | |
---|
[174] | 1780 | if (prof3d .EQ. 0) then |
---|
[566] | 1781 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 1782 | isStrSubset( vNam(varn), "NORM")) then |
---|
[174] | 1783 | check = False |
---|
| 1784 | end if |
---|
[154] | 1785 | else |
---|
[566] | 1786 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 1787 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
| 1788 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
| 1789 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
| 1790 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
| 1791 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
| 1792 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
| 1793 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
| 1794 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
[174] | 1795 | check = False |
---|
| 1796 | end if |
---|
| 1797 | end if |
---|
| 1798 | |
---|
[190] | 1799 | if (var .NE. "all") then |
---|
[174] | 1800 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
[154] | 1801 | end if |
---|
[161] | 1802 | |
---|
| 1803 | if (combine .EQ. 1) then |
---|
| 1804 | com=isStrSubset(c_var,","+vNam(varn)+"," ) |
---|
[175] | 1805 | if (com) then |
---|
[347] | 1806 | if (prof3d .EQ. 0) then |
---|
| 1807 | temp = f[:]->$vNam(varn)$ |
---|
[218] | 1808 | temp_att = f_att->$vNam(varn)$ |
---|
| 1809 | if (log_z .EQ. 1) then |
---|
[351] | 1810 | do j=0,np-1 |
---|
| 1811 | data(varn,j,:) = temp(ti_in(j),1:dimz-1) |
---|
| 1812 | end do |
---|
[175] | 1813 | else |
---|
[351] | 1814 | do j=0,np-1 |
---|
| 1815 | data(varn,j,:) = temp(ti_in(j),0:dimz-1) |
---|
| 1816 | end do |
---|
[175] | 1817 | end if |
---|
[174] | 1818 | else |
---|
[218] | 1819 | if (log_z .EQ. 1) then |
---|
[175] | 1820 | do i=1,dimz-1 |
---|
[351] | 1821 | do j=0,np-1 |
---|
[513] | 1822 | temp = f[:]->$vNam(varn)$ |
---|
[218] | 1823 | temp_att = f_att->$vNam(varn)$ |
---|
[566] | 1824 | data_temp = temp(ti_in(j),i,\ |
---|
| 1825 | start_y:end_y,start_x:end_x) |
---|
| 1826 | data(varn,j,i-1) = dim_avg_Wrap(\ |
---|
| 1827 | dim_avg_Wrap(data_temp)) |
---|
[175] | 1828 | end do |
---|
[174] | 1829 | end do |
---|
[175] | 1830 | else |
---|
| 1831 | do i=0,dimz-1 |
---|
[351] | 1832 | do j=0,np-1 |
---|
[513] | 1833 | temp = f[:]->$vNam(varn)$ |
---|
[218] | 1834 | temp_att = f_att->$vNam(varn)$ |
---|
[566] | 1835 | data_temp = temp(ti_in(j),i,\ |
---|
| 1836 | start_y:end_y,start_x:end_x) |
---|
[351] | 1837 | data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
[175] | 1838 | end do |
---|
| 1839 | end do |
---|
| 1840 | end if |
---|
[174] | 1841 | print(" ") |
---|
| 1842 | print("Variable for combine '"+vNam(varn)+"' is read") |
---|
| 1843 | print(" ") |
---|
| 1844 | end if |
---|
[218] | 1845 | unit(varn) = temp_att@units |
---|
[161] | 1846 | if (n_o .GT. number_comb-1) then |
---|
| 1847 | print(" ") |
---|
[566] | 1848 | print("Set 'number_comb' to the number of overlaying "+\ |
---|
| 1849 | "variables ('c_var' = "+c_var+")") |
---|
[161] | 1850 | print(" ") |
---|
| 1851 | exit |
---|
| 1852 | end if |
---|
[324] | 1853 | if (abs(min(data(varn,:,:))) .GT. 10)then |
---|
| 1854 | min_value = abs(0.01*min(data(varn,:,:))) |
---|
| 1855 | max_value = abs(0.01*max(data(varn,:,:))) |
---|
| 1856 | else |
---|
[566] | 1857 | if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
| 1858 | abs(max(data(varn,:,:))) .GT. 0.01)then |
---|
[324] | 1859 | min_value = abs(0.1*max(data(varn,:,:))) |
---|
| 1860 | max_value = abs(0.1*max(data(varn,:,:))) |
---|
| 1861 | else |
---|
[566] | 1862 | if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
| 1863 | abs(min(data(varn,:,:))) .GT. 0.01)then |
---|
[324] | 1864 | min_value = abs(0.1*min(data(varn,:,:))) |
---|
| 1865 | max_value = abs(0.1*min(data(varn,:,:))) |
---|
| 1866 | else |
---|
| 1867 | min_value = abs(0.1*min(data(varn,:,:))) |
---|
| 1868 | max_value = abs(0.1*max(data(varn,:,:))) |
---|
| 1869 | end if |
---|
| 1870 | end if |
---|
| 1871 | end if |
---|
[566] | 1872 | if (min(data(varn,:,:)) .EQ. 0 .AND. \ |
---|
| 1873 | max(data(varn,:,:)) .EQ. 0)then |
---|
[324] | 1874 | min_value = 0.1 |
---|
| 1875 | max_value = 0.1 |
---|
| 1876 | end if |
---|
[161] | 1877 | mini(n_o)=min(data(varn,:,:)) |
---|
| 1878 | maxi(n_o)=max(data(varn,:,:)) |
---|
| 1879 | n_o=n_o+1 |
---|
| 1880 | end if |
---|
| 1881 | end if |
---|
| 1882 | |
---|
| 1883 | if(check) then |
---|
[342] | 1884 | |
---|
[162] | 1885 | count_var=count_var+1 |
---|
[174] | 1886 | |
---|
[347] | 1887 | if (prof3d .EQ. 0) then |
---|
| 1888 | temp = f[:]->$vNam(varn)$ |
---|
[218] | 1889 | temp_att = f_att->$vNam(varn)$ |
---|
[174] | 1890 | else |
---|
[218] | 1891 | if (log_z .EQ. 1) then |
---|
[175] | 1892 | do i=1,dimz-1 |
---|
[351] | 1893 | do j=0,np-1 |
---|
| 1894 | temp= f[:]->$vNam(varn)$ |
---|
[218] | 1895 | temp_att = f_att->$vNam(varn)$ |
---|
[351] | 1896 | data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x) |
---|
| 1897 | data(varn,j,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
[342] | 1898 | delete(data_temp) |
---|
[175] | 1899 | end do |
---|
[174] | 1900 | end do |
---|
[175] | 1901 | else |
---|
| 1902 | do i=0,dimz-1 |
---|
[351] | 1903 | do j=0,np-1 |
---|
| 1904 | temp= f[:]->$vNam(varn)$ |
---|
[218] | 1905 | temp_att = f_att->$vNam(varn)$ |
---|
[351] | 1906 | data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x) |
---|
[218] | 1907 | data_temp!0 = "t" |
---|
| 1908 | data_temp!1 = "z" |
---|
[351] | 1909 | data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) |
---|
[342] | 1910 | delete(data_temp) |
---|
[175] | 1911 | end do |
---|
| 1912 | end do |
---|
| 1913 | end if |
---|
[174] | 1914 | print(" ") |
---|
| 1915 | print("Variable '"+vNam(varn)+"' is read") |
---|
| 1916 | print(" ") |
---|
[218] | 1917 | unit(varn) = temp_att@units |
---|
| 1918 | a=getvardims(temp_att) |
---|
[174] | 1919 | b=dimsizes(a) |
---|
| 1920 | end if |
---|
[218] | 1921 | |
---|
[174] | 1922 | if (prof3d .EQ. 0) then |
---|
[218] | 1923 | if (log_z .EQ. 1) then |
---|
| 1924 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
| 1925 | unit(varn) = temp_att@units |
---|
[351] | 1926 | do j=0,np-1 |
---|
| 1927 | data(varn,j,:) = temp(ti_in(j),1:dimz-1) |
---|
| 1928 | end do |
---|
[175] | 1929 | else |
---|
[218] | 1930 | z = f_att->$vNam(varn+1)$ |
---|
| 1931 | unit(varn) = temp_att@units |
---|
[351] | 1932 | do j=0,np-1 |
---|
| 1933 | data(varn,j,:) = temp(ti_in(j),:) |
---|
| 1934 | end do |
---|
[175] | 1935 | end if |
---|
[174] | 1936 | else |
---|
[218] | 1937 | do i=0,b-1 |
---|
[175] | 1938 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
[174] | 1939 | z_v(varn,:) = z_u |
---|
[218] | 1940 | if (log_z .EQ. 1) then |
---|
[175] | 1941 | z = z_v(varn,1:dimz-1) |
---|
| 1942 | else |
---|
| 1943 | z = z_v(varn,:) |
---|
| 1944 | end if |
---|
[174] | 1945 | else |
---|
[175] | 1946 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
[174] | 1947 | z_v(varn,:) = z_w |
---|
[218] | 1948 | if (log_z .EQ. 1) then |
---|
[175] | 1949 | z = z_v(varn,1:dimz-1) |
---|
| 1950 | else |
---|
| 1951 | z = z_v(varn,:) |
---|
| 1952 | end if |
---|
[174] | 1953 | end if |
---|
| 1954 | end if |
---|
| 1955 | end do |
---|
| 1956 | end if |
---|
[353] | 1957 | |
---|
| 1958 | if (isStrSubset(data@long_name," SR " ) ) then |
---|
| 1959 | over = 0 |
---|
| 1960 | end if |
---|
[236] | 1961 | |
---|
[175] | 1962 | if (nof .EQ. 0) then |
---|
[218] | 1963 | z_(n,:)=z/norm_z |
---|
[175] | 1964 | z = z_(n,:) |
---|
| 1965 | else |
---|
[218] | 1966 | z=z/norm_z |
---|
[175] | 1967 | end if |
---|
[353] | 1968 | |
---|
[731] | 1969 | delta_z = z(2) - z(1) |
---|
[353] | 1970 | |
---|
| 1971 | max_z_int=doubletoint(max_z/delta_z) |
---|
| 1972 | min_z_int=doubletoint(min_z/delta_z) |
---|
| 1973 | |
---|
| 1974 | if(max_z_int .eq. min_z_int) |
---|
| 1975 | print(" ") |
---|
[566] | 1976 | print("Please increase 'max_z' or decrease 'min_z' so that "+\ |
---|
| 1977 | "there are") |
---|
[353] | 1978 | print("at least two layers for the z-axis to plot") |
---|
| 1979 | print(" ") |
---|
| 1980 | exit |
---|
| 1981 | end if |
---|
| 1982 | |
---|
| 1983 | if(min_z_int .gt. max_z_int) |
---|
| 1984 | print(" ") |
---|
| 1985 | print("'min_z' is greater than 'max_z',") |
---|
| 1986 | print("please change this") |
---|
| 1987 | print(" ") |
---|
| 1988 | exit |
---|
| 1989 | end if |
---|
| 1990 | |
---|
[585] | 1991 | if (max_z_int .ge. dimz-1) |
---|
[353] | 1992 | max_z_int = dimz-1 |
---|
[375] | 1993 | if (log_z .EQ. 1) then |
---|
| 1994 | max_z_int = max_z_int - 1 |
---|
| 1995 | end if |
---|
[353] | 1996 | end if |
---|
| 1997 | |
---|
[375] | 1998 | if (min_z_int .lt. 0) |
---|
[353] | 1999 | min_z_int = 0 |
---|
[375] | 2000 | if (log_z .EQ. 1) then |
---|
| 2001 | min_z_int = min_z_int + 1 |
---|
| 2002 | end if |
---|
[353] | 2003 | end if |
---|
[518] | 2004 | |
---|
[769] | 2005 | |
---|
| 2006 | ;data can contain missing values in case of output of t=0h (inital profiles) |
---|
| 2007 | ;where no output is possible |
---|
| 2008 | n_not_ismissing = num(.not.ismissing(data(varn,:,:))) |
---|
| 2009 | |
---|
| 2010 | if (n_not_ismissing .GT. 0 ) then |
---|
| 2011 | |
---|
| 2012 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then |
---|
| 2013 | min_value = abs(0.001*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 2014 | max_value = abs(0.001*max(data(varn,:,min_z_int:max_z_int))) |
---|
| 2015 | else |
---|
| 2016 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ |
---|
| 2017 | abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
| 2018 | min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
| 2019 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
| 2020 | else |
---|
| 2021 | if (abs(max(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND.\ |
---|
| 2022 | abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
| 2023 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 2024 | max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 2025 | else |
---|
| 2026 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 2027 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
| 2028 | end if |
---|
| 2029 | end if |
---|
| 2030 | end if |
---|
[518] | 2031 | |
---|
[769] | 2032 | if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND. \ |
---|
| 2033 | max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then |
---|
| 2034 | min_value = 0.1 |
---|
| 2035 | max_value = 0.1 |
---|
| 2036 | end if |
---|
[523] | 2037 | |
---|
[769] | 2038 | else |
---|
| 2039 | print(" ") |
---|
| 2040 | print(vNam(varn) + " contains only missing values") |
---|
| 2041 | print(" ") |
---|
| 2042 | end if |
---|
| 2043 | |
---|
[161] | 2044 | if (over .EQ. 0) then |
---|
| 2045 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2046 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2047 | res@gsnRightString = " " |
---|
[161] | 2048 | res@trYMinF = min_z |
---|
[162] | 2049 | res@trYMaxF = max_z |
---|
[190] | 2050 | if (xs .EQ. -1) then |
---|
[566] | 2051 | res@trXMinF = min(data(varn,:,min_z_int:max_z_int))-\ |
---|
| 2052 | min_value |
---|
[162] | 2053 | else |
---|
[523] | 2054 | res@trXMinF = xs |
---|
[162] | 2055 | end if |
---|
[190] | 2056 | if (xe .EQ. -1) then |
---|
[566] | 2057 | res@trXMaxF = max(data(varn,:,min_z_int:max_z_int))+\ |
---|
| 2058 | max_value |
---|
[162] | 2059 | else |
---|
| 2060 | res@trXMaxF = xe |
---|
[175] | 2061 | end if |
---|
[161] | 2062 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[353] | 2063 | end if |
---|
| 2064 | |
---|
| 2065 | |
---|
| 2066 | if (vNam(varn) .EQ. "u" ) then |
---|
| 2067 | miniu=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2068 | maxiu=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2069 | if (over .EQ. 1) then |
---|
| 2070 | res@xyDashPattern = 0 |
---|
[175] | 2071 | plot_u = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2072 | else |
---|
| 2073 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2074 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2075 | res@gsnRightString = " " |
---|
[324] | 2076 | if (xs .EQ. -1) then |
---|
[190] | 2077 | res@trXMinF = miniu |
---|
[162] | 2078 | else |
---|
| 2079 | res@trXMinF = xs |
---|
| 2080 | end if |
---|
[190] | 2081 | if (xe .EQ. -1) then |
---|
| 2082 | res@trXMaxF = maxiu |
---|
[162] | 2083 | else |
---|
| 2084 | res@trXMaxF = xe |
---|
| 2085 | end if |
---|
[175] | 2086 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2087 | end if |
---|
| 2088 | end if |
---|
[353] | 2089 | if (vNam(varn) .EQ. "v") then |
---|
| 2090 | miniv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2091 | maxiv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2092 | if (over .EQ. 1) then |
---|
[250] | 2093 | res@xyMonoDashPattern = True |
---|
[161] | 2094 | res@xyDashPattern = 1 |
---|
[175] | 2095 | plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2096 | else |
---|
| 2097 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2098 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2099 | res@gsnRightString = " " |
---|
[324] | 2100 | if (xs .EQ. -1) then |
---|
[190] | 2101 | res@trXMinF = miniv |
---|
[162] | 2102 | else |
---|
| 2103 | res@trXMinF = xs |
---|
| 2104 | end if |
---|
[190] | 2105 | if (xe .EQ. -1) then |
---|
[324] | 2106 | res@trXMaxF = maxiv |
---|
[162] | 2107 | else |
---|
| 2108 | res@trXMaxF = xe |
---|
| 2109 | end if |
---|
[175] | 2110 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2111 | end if |
---|
| 2112 | end if |
---|
| 2113 | if (vNam(varn) .EQ. "w") then |
---|
[353] | 2114 | miniw=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2115 | maxiw=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2116 | if (over .EQ. 1) then |
---|
[250] | 2117 | res@xyDashPattern = 2 |
---|
[175] | 2118 | plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2119 | else |
---|
| 2120 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2121 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2122 | res@gsnRightString = " " |
---|
[190] | 2123 | if (xs .EQ. -1) then |
---|
| 2124 | res@trXMinF = miniw |
---|
[162] | 2125 | else |
---|
| 2126 | res@trXMinF = xs |
---|
| 2127 | end if |
---|
[190] | 2128 | if (xe .EQ. -1) then |
---|
[324] | 2129 | res@trXMaxF = maxiw |
---|
[162] | 2130 | else |
---|
| 2131 | res@trXMaxF = xe |
---|
| 2132 | end if |
---|
[175] | 2133 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2134 | end if |
---|
| 2135 | end if |
---|
[154] | 2136 | |
---|
[161] | 2137 | if (vNam(varn) .EQ. "pt") then |
---|
[353] | 2138 | minipt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2139 | maxipt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2140 | if (over .EQ. 1) then |
---|
| 2141 | res@xyDashPattern = 0 |
---|
[175] | 2142 | plot_pt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2143 | else |
---|
| 2144 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2145 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2146 | res@gsnRightString = " " |
---|
[190] | 2147 | if (xs .EQ. -1) then |
---|
| 2148 | res@trXMinF = minipt |
---|
[162] | 2149 | else |
---|
| 2150 | res@trXMinF = xs |
---|
| 2151 | end if |
---|
[324] | 2152 | if (xe .EQ. -1) then |
---|
[190] | 2153 | res@trXMaxF = maxipt |
---|
[162] | 2154 | else |
---|
| 2155 | res@trXMaxF = xe |
---|
| 2156 | end if |
---|
[175] | 2157 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2158 | end if |
---|
| 2159 | end if |
---|
| 2160 | if (vNam(varn) .EQ. "vpt") then |
---|
[353] | 2161 | minivpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2162 | maxivpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2163 | if (over .EQ. 1) then |
---|
| 2164 | res@xyDashPattern = 1 |
---|
[175] | 2165 | plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2166 | else |
---|
| 2167 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2168 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2169 | res@gsnRightString = " " |
---|
[190] | 2170 | if (xs .EQ. -1) then |
---|
[324] | 2171 | res@trXMinF = minivpt |
---|
[162] | 2172 | else |
---|
| 2173 | res@trXMinF = xs |
---|
| 2174 | end if |
---|
[324] | 2175 | if (xe .EQ. -1) then |
---|
[190] | 2176 | res@trXMaxF = maxivpt |
---|
[162] | 2177 | else |
---|
| 2178 | res@trXMaxF = xe |
---|
[190] | 2179 | end if |
---|
[175] | 2180 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2181 | end if |
---|
| 2182 | end if |
---|
| 2183 | if (vNam(varn) .EQ. "lpt") then |
---|
[353] | 2184 | minilpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2185 | maxilpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2186 | if (over .EQ. 1) then |
---|
| 2187 | res@xyDashPattern = 2 |
---|
[175] | 2188 | plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2189 | else |
---|
| 2190 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2191 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2192 | res@gsnRightString = " " |
---|
[190] | 2193 | if (xs .EQ. -1) then |
---|
| 2194 | res@trXMinF = minilpt |
---|
[162] | 2195 | else |
---|
| 2196 | res@trXMinF = xs |
---|
| 2197 | end if |
---|
[190] | 2198 | if (xe .EQ. -1) then |
---|
[324] | 2199 | res@trXMaxF = maxilpt |
---|
[162] | 2200 | else |
---|
| 2201 | res@trXMaxF = xe |
---|
| 2202 | end if |
---|
[175] | 2203 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2204 | end if |
---|
| 2205 | end if |
---|
| 2206 | |
---|
| 2207 | if (vNam(varn) .EQ. "q") then |
---|
[353] | 2208 | miniq=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2209 | maxiq=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2210 | if (over .EQ. 1) then |
---|
| 2211 | res@xyDashPattern = 0 |
---|
[175] | 2212 | plot_q = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2213 | else |
---|
| 2214 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2215 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2216 | res@gsnRightString = " " |
---|
[190] | 2217 | if (xs .EQ. -1) then |
---|
[418] | 2218 | res@trXMinF = miniq |
---|
[162] | 2219 | else |
---|
| 2220 | res@trXMinF = xs |
---|
| 2221 | end if |
---|
[190] | 2222 | if (xe .EQ. -1) then |
---|
[418] | 2223 | res@trXMaxF = maxiq |
---|
[162] | 2224 | else |
---|
| 2225 | res@trXMaxF = xe |
---|
| 2226 | end if |
---|
[175] | 2227 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2228 | end if |
---|
| 2229 | end if |
---|
| 2230 | if (vNam(varn) .EQ. "qv") then |
---|
[353] | 2231 | miniqv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2232 | maxiqv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2233 | if (over .EQ. 1) then |
---|
| 2234 | res@xyDashPattern = 1 |
---|
[175] | 2235 | plot_qv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2236 | else |
---|
| 2237 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2238 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2239 | res@gsnRightString = " " |
---|
[190] | 2240 | if (xs .EQ. -1) then |
---|
[418] | 2241 | res@trXMinF = miniqv |
---|
[162] | 2242 | else |
---|
| 2243 | res@trXMinF = xs |
---|
| 2244 | end if |
---|
[324] | 2245 | if (xe .EQ. -1) then |
---|
[418] | 2246 | res@trXMaxF = maxiqv |
---|
[162] | 2247 | else |
---|
| 2248 | res@trXMaxF = xe |
---|
| 2249 | end if |
---|
[175] | 2250 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2251 | end if |
---|
| 2252 | end if |
---|
| 2253 | if (vNam(varn) .EQ. "ql") then |
---|
[353] | 2254 | miniql=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2255 | maxiql=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2256 | if (over .EQ. 1) then |
---|
| 2257 | res@xyDashPattern = 2 |
---|
[175] | 2258 | plot_ql = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2259 | else |
---|
| 2260 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2261 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2262 | res@gsnRightString = " " |
---|
[190] | 2263 | if (xs .EQ. -1) then |
---|
| 2264 | res@trXMinF = miniql |
---|
[162] | 2265 | else |
---|
| 2266 | res@trXMinF = xs |
---|
| 2267 | end if |
---|
[324] | 2268 | if (xe .EQ. -1) then |
---|
[190] | 2269 | res@trXMaxF = maxiql |
---|
[162] | 2270 | else |
---|
| 2271 | res@trXMaxF = xe |
---|
| 2272 | end if |
---|
[175] | 2273 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2274 | end if |
---|
| 2275 | end if |
---|
| 2276 | |
---|
| 2277 | if (vNam(varn) .EQ. "e") then |
---|
[353] | 2278 | minie=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2279 | maxie=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2280 | if (over .EQ. 1) then |
---|
| 2281 | res@xyDashPattern = 0 |
---|
[175] | 2282 | plot_e = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2283 | else |
---|
| 2284 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2285 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2286 | res@gsnRightString = " " |
---|
[190] | 2287 | if (xs .EQ. -1) then |
---|
| 2288 | res@trXMinF = minie |
---|
[162] | 2289 | else |
---|
| 2290 | res@trXMinF = xs |
---|
| 2291 | end if |
---|
[324] | 2292 | if (xe .EQ. -1) then |
---|
[190] | 2293 | res@trXMaxF = maxie |
---|
[162] | 2294 | else |
---|
| 2295 | res@trXMaxF = xe |
---|
| 2296 | end if |
---|
[175] | 2297 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2298 | end if |
---|
| 2299 | end if |
---|
[526] | 2300 | if (vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*") then |
---|
[353] | 2301 | minies=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2302 | maxies=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2303 | if (over .EQ. 1) then |
---|
| 2304 | res@xyDashPattern = 1 |
---|
[175] | 2305 | plot_es = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2306 | else |
---|
| 2307 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2308 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2309 | res@gsnRightString = " " |
---|
[324] | 2310 | if (xs .EQ. -1) then |
---|
[190] | 2311 | res@trXMinF = minies |
---|
[162] | 2312 | else |
---|
| 2313 | res@trXMinF = xs |
---|
| 2314 | end if |
---|
[190] | 2315 | if (xe .EQ. -1) then |
---|
[324] | 2316 | res@trXMaxF = maxies |
---|
[162] | 2317 | else |
---|
| 2318 | res@trXMaxF = xe |
---|
| 2319 | end if |
---|
[175] | 2320 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2321 | end if |
---|
| 2322 | end if |
---|
| 2323 | |
---|
| 2324 | if (vNam(varn) .EQ. "km") then |
---|
[353] | 2325 | minikm=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2326 | maxikm=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2327 | if (over .EQ. 1) then |
---|
| 2328 | res@xyDashPattern = 0 |
---|
[175] | 2329 | plot_km = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2330 | else |
---|
| 2331 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2332 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2333 | res@gsnRightString = " " |
---|
[324] | 2334 | if (xs .EQ. -1) then |
---|
[190] | 2335 | res@trXMinF = minikm |
---|
[162] | 2336 | else |
---|
| 2337 | res@trXMinF = xs |
---|
| 2338 | end if |
---|
[324] | 2339 | if (xe .EQ. -1) then |
---|
[190] | 2340 | res@trXMaxF = maxikm |
---|
[162] | 2341 | else |
---|
| 2342 | res@trXMaxF = xe |
---|
| 2343 | end if |
---|
[175] | 2344 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2345 | end if |
---|
| 2346 | end if |
---|
| 2347 | if (vNam(varn) .EQ. "kh") then |
---|
[353] | 2348 | minikh=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2349 | maxikh=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2350 | if (over .EQ. 1) then |
---|
| 2351 | res@xyDashPattern = 1 |
---|
[175] | 2352 | plot_kh = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2353 | else |
---|
| 2354 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2355 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2356 | res@gsnRightString = " " |
---|
[190] | 2357 | if (xs .EQ. -1) then |
---|
| 2358 | res@trXMinF = minikh |
---|
[162] | 2359 | else |
---|
| 2360 | res@trXMinF = xs |
---|
| 2361 | end if |
---|
[324] | 2362 | if (xe .EQ. -1) then |
---|
[190] | 2363 | res@trXMaxF = maxikh |
---|
[162] | 2364 | else |
---|
| 2365 | res@trXMaxF = xe |
---|
| 2366 | end if |
---|
[175] | 2367 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2368 | end if |
---|
| 2369 | end if |
---|
| 2370 | |
---|
[526] | 2371 | if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq) then |
---|
[353] | 2372 | miniwpup=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2373 | maxiwpup=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2374 | if (over .EQ. 1) then |
---|
| 2375 | res@xyDashPattern = 0 |
---|
[175] | 2376 | plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2377 | else |
---|
| 2378 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2379 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2380 | res@gsnRightString = " " |
---|
[190] | 2381 | if (xs .EQ. -1) then |
---|
| 2382 | res@trXMinF = miniwpup |
---|
[162] | 2383 | else |
---|
| 2384 | res@trXMinF = xs |
---|
| 2385 | end if |
---|
[324] | 2386 | if (xe .EQ. -1) then |
---|
[190] | 2387 | res@trXMaxF = maxiwpup |
---|
[162] | 2388 | else |
---|
| 2389 | res@trXMaxF = xe |
---|
| 2390 | end if |
---|
[175] | 2391 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2392 | end if |
---|
| 2393 | end if |
---|
[526] | 2394 | if (vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "w*u*") then |
---|
[353] | 2395 | miniwsus=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2396 | maxiwsus=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2397 | if (over .EQ. 1) then |
---|
| 2398 | res@xyDashPattern = 1 |
---|
[175] | 2399 | plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2400 | else |
---|
| 2401 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2402 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2403 | res@gsnRightString = " " |
---|
[190] | 2404 | if (xs .EQ. -1) then |
---|
| 2405 | res@trXMinF = miniwsus |
---|
[162] | 2406 | else |
---|
| 2407 | res@trXMinF = xs |
---|
| 2408 | end if |
---|
[324] | 2409 | if (xe .EQ. -1) then |
---|
[190] | 2410 | res@trXMaxF = maxiwsus |
---|
[162] | 2411 | else |
---|
| 2412 | res@trXMaxF = xe |
---|
| 2413 | end if |
---|
[175] | 2414 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2415 | end if |
---|
| 2416 | end if |
---|
| 2417 | if (vNam(varn) .EQ. "wu") then |
---|
[353] | 2418 | miniwu=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2419 | maxiwu=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2420 | if (over .EQ. 1) then |
---|
| 2421 | res@xyDashPattern = 2 |
---|
[175] | 2422 | plot_wu = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2423 | else |
---|
| 2424 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2425 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2426 | res@gsnRightString = " " |
---|
[324] | 2427 | if (xs .EQ. -1) then |
---|
[190] | 2428 | res@trXMinF = miniwu |
---|
[162] | 2429 | else |
---|
| 2430 | res@trXMinF = xs |
---|
| 2431 | end if |
---|
[324] | 2432 | if (xe .EQ. -1) then |
---|
[190] | 2433 | res@trXMaxF = maxiwu |
---|
[162] | 2434 | else |
---|
| 2435 | res@trXMaxF = xe |
---|
| 2436 | end if |
---|
[175] | 2437 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2438 | end if |
---|
| 2439 | end if |
---|
| 2440 | |
---|
[526] | 2441 | if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq) then |
---|
[353] | 2442 | miniwpvp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2443 | maxiwpvp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2444 | if (over .EQ. 1) then |
---|
| 2445 | res@xyDashPattern = 0 |
---|
[175] | 2446 | plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2447 | else |
---|
| 2448 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2449 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2450 | res@gsnRightString = " " |
---|
[190] | 2451 | if (xs .EQ. -1) then |
---|
| 2452 | res@trXMinF = miniwpvp |
---|
[162] | 2453 | else |
---|
| 2454 | res@trXMinF = xs |
---|
| 2455 | end if |
---|
[324] | 2456 | if (xe .EQ. -1) then |
---|
[190] | 2457 | res@trXMaxF = maxiwpvp |
---|
[162] | 2458 | else |
---|
| 2459 | res@trXMaxF = xe |
---|
| 2460 | end if |
---|
[175] | 2461 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2462 | end if |
---|
| 2463 | end if |
---|
[526] | 2464 | if (vNam(varn) .EQ. "wsvs" .OR. vNam(varn) .EQ. "w*v*") then |
---|
[353] | 2465 | miniwsvs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2466 | maxiwsvs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2467 | if (over .EQ. 1) then |
---|
| 2468 | res@xyDashPattern = 1 |
---|
[175] | 2469 | plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2470 | else |
---|
| 2471 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2472 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2473 | res@gsnRightString = " " |
---|
[324] | 2474 | if (xs .EQ. -1) then |
---|
[190] | 2475 | res@trXMinF = miniwsvs |
---|
[162] | 2476 | else |
---|
| 2477 | res@trXMinF = xs |
---|
| 2478 | end if |
---|
[324] | 2479 | if (xe .EQ. -1) then |
---|
[190] | 2480 | res@trXMaxF = maxiwsvs |
---|
[162] | 2481 | else |
---|
| 2482 | res@trXMaxF = xe |
---|
| 2483 | end if |
---|
[175] | 2484 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2485 | end if |
---|
| 2486 | end if |
---|
| 2487 | if (vNam(varn) .EQ. "wv") then |
---|
[353] | 2488 | miniwv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2489 | maxiwv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2490 | if (over .EQ. 1) then |
---|
| 2491 | res@xyDashPattern = 2 |
---|
[175] | 2492 | plot_wv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2493 | else |
---|
| 2494 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2495 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2496 | res@gsnRightString = " " |
---|
[190] | 2497 | if (xs .EQ. -1) then |
---|
| 2498 | res@trXMinF = miniwv |
---|
[162] | 2499 | else |
---|
| 2500 | res@trXMinF = xs |
---|
| 2501 | end if |
---|
[190] | 2502 | if (xe .EQ. -1) then |
---|
| 2503 | res@trXMaxF = maxiwv |
---|
[162] | 2504 | else |
---|
| 2505 | res@trXMaxF = xe |
---|
| 2506 | end if |
---|
[175] | 2507 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2508 | end if |
---|
| 2509 | end if |
---|
| 2510 | |
---|
[566] | 2511 | if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) \ |
---|
| 2512 | .EQ. "w"+dq+"pt"+dq) then |
---|
[353] | 2513 | miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2514 | maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2515 | if (over .EQ. 1) then |
---|
| 2516 | res@xyDashPattern = 0 |
---|
[175] | 2517 | plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2518 | else |
---|
| 2519 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2520 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2521 | res@gsnRightString = " " |
---|
[190] | 2522 | if (xs .EQ. -1) then |
---|
| 2523 | res@trXMinF = miniwpptp |
---|
[162] | 2524 | else |
---|
| 2525 | res@trXMinF = xs |
---|
| 2526 | end if |
---|
[190] | 2527 | if (xe .EQ. -1) then |
---|
| 2528 | res@trXMaxF = maxiwpptp |
---|
[162] | 2529 | else |
---|
| 2530 | res@trXMaxF = xe |
---|
| 2531 | end if |
---|
[175] | 2532 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2533 | end if |
---|
| 2534 | end if |
---|
[526] | 2535 | if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*") then |
---|
[353] | 2536 | miniwspts=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2537 | maxiwspts=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2538 | if (over .EQ. 1) then |
---|
| 2539 | res@xyDashPattern = 1 |
---|
[175] | 2540 | plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2541 | else |
---|
| 2542 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2543 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2544 | res@gsnRightString = " " |
---|
[190] | 2545 | if (xs .EQ. -1) then |
---|
| 2546 | res@trXMinF = miniwspts |
---|
[162] | 2547 | else |
---|
| 2548 | res@trXMinF = xs |
---|
| 2549 | end if |
---|
[190] | 2550 | if (xe .EQ. -1) then |
---|
| 2551 | res@trXMaxF = maxiwspts |
---|
[162] | 2552 | else |
---|
| 2553 | res@trXMaxF = xe |
---|
| 2554 | end if |
---|
[175] | 2555 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2556 | end if |
---|
| 2557 | end if |
---|
[347] | 2558 | if (vNam(varn) .EQ. "wpt") then |
---|
[353] | 2559 | miniwpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2560 | maxiwpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2561 | if (over .EQ. 1) then |
---|
| 2562 | res@xyDashPattern = 2 |
---|
[175] | 2563 | plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2564 | else |
---|
| 2565 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2566 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2567 | res@gsnRightString = " " |
---|
[190] | 2568 | if (xs .EQ. -1) then |
---|
| 2569 | res@trXMinF = miniwpt |
---|
[162] | 2570 | else |
---|
| 2571 | res@trXMinF = xs |
---|
| 2572 | end if |
---|
[190] | 2573 | if (xe .EQ. -1) then |
---|
| 2574 | res@trXMaxF = maxiwpt |
---|
[162] | 2575 | else |
---|
| 2576 | res@trXMaxF = xe |
---|
| 2577 | end if |
---|
[175] | 2578 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2579 | end if |
---|
| 2580 | end if |
---|
| 2581 | |
---|
[526] | 2582 | if (vNam(varn) .EQ. "wsptsBC".OR. vNam(varn) .EQ. "w*pt*BC" ) then |
---|
[353] | 2583 | miniwsptsBC=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2584 | maxiwsptsBC=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2585 | if (over .EQ. 1) then |
---|
| 2586 | res@xyDashPattern = 0 |
---|
[175] | 2587 | plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2588 | else |
---|
| 2589 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2590 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2591 | res@gsnRightString = " " |
---|
[190] | 2592 | if (xs .EQ. -1) then |
---|
| 2593 | res@trXMinF = miniwsptsBC |
---|
[162] | 2594 | else |
---|
| 2595 | res@trXMinF = xs |
---|
| 2596 | end if |
---|
[190] | 2597 | if (xe .EQ. -1) then |
---|
| 2598 | res@trXMaxF = maxiwsptsBC |
---|
[162] | 2599 | else |
---|
| 2600 | res@trXMaxF = xe |
---|
[190] | 2601 | end if |
---|
[175] | 2602 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2603 | end if |
---|
| 2604 | end if |
---|
| 2605 | if (vNam(varn) .EQ. "wptBC") then |
---|
[353] | 2606 | miniwptBC=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2607 | maxiwptBC=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2608 | if (over .EQ. 1) then |
---|
| 2609 | res@xyDashPattern = 1 |
---|
[175] | 2610 | plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2611 | else |
---|
| 2612 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2613 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2614 | res@gsnRightString = " " |
---|
[190] | 2615 | if (xs .EQ. -1) then |
---|
| 2616 | res@trXMinF = miniwptBC |
---|
[162] | 2617 | else |
---|
| 2618 | res@trXMinF = xs |
---|
| 2619 | end if |
---|
[190] | 2620 | if (xe .EQ. -1) then |
---|
| 2621 | res@trXMaxF = maxiwptBC |
---|
[162] | 2622 | else |
---|
| 2623 | res@trXMaxF = xe |
---|
| 2624 | end if |
---|
[175] | 2625 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2626 | end if |
---|
| 2627 | end if |
---|
| 2628 | |
---|
[566] | 2629 | if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) \ |
---|
| 2630 | .EQ. "w"+dq+"vpt"+dq) then |
---|
[353] | 2631 | miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2632 | maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2633 | if (over .EQ. 1) then |
---|
| 2634 | res@xyDashPattern = 0 |
---|
[175] | 2635 | plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2636 | else |
---|
| 2637 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2638 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2639 | res@gsnRightString = " " |
---|
[190] | 2640 | if (xs .EQ. -1) then |
---|
| 2641 | res@trXMinF = miniwpvptp |
---|
[162] | 2642 | else |
---|
| 2643 | res@trXMinF = xs |
---|
| 2644 | end if |
---|
[190] | 2645 | if (xe .EQ. -1) then |
---|
| 2646 | res@trXMaxF = maxiwpvptp |
---|
[162] | 2647 | else |
---|
| 2648 | res@trXMaxF = xe |
---|
[190] | 2649 | end if |
---|
[175] | 2650 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2651 | end if |
---|
| 2652 | end if |
---|
[526] | 2653 | if (vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "w*vpt*") then |
---|
[353] | 2654 | miniwsvpts=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2655 | maxiwsvpts=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2656 | if (over .EQ. 1) then |
---|
| 2657 | res@xyDashPattern = 1 |
---|
[175] | 2658 | plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2659 | else |
---|
| 2660 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2661 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2662 | res@gsnRightString = " " |
---|
[190] | 2663 | if (xs .EQ. -1) then |
---|
| 2664 | res@trXMinF = miniwsvpts |
---|
[162] | 2665 | else |
---|
| 2666 | res@trXMinF = xs |
---|
| 2667 | end if |
---|
[190] | 2668 | if (xe .EQ. -1) then |
---|
| 2669 | res@trXMaxF = maxiwsvpts |
---|
[162] | 2670 | else |
---|
| 2671 | res@trXMaxF = xe |
---|
[190] | 2672 | end if |
---|
[175] | 2673 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2674 | end if |
---|
| 2675 | end if |
---|
| 2676 | if (vNam(varn) .EQ. "wvpt") then |
---|
[353] | 2677 | miniwvpt=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2678 | maxiwvpt=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2679 | if (over .EQ. 1) then |
---|
| 2680 | res@xyDashPattern = 2 |
---|
[175] | 2681 | plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2682 | else |
---|
| 2683 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2684 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2685 | res@gsnRightString = " " |
---|
[190] | 2686 | if (xs .EQ. -1) then |
---|
| 2687 | res@trXMinF = miniwvpt |
---|
[162] | 2688 | else |
---|
| 2689 | res@trXMinF = xs |
---|
| 2690 | end if |
---|
[190] | 2691 | if (xe .EQ. -1) then |
---|
| 2692 | res@trXMaxF = maxiwvpt |
---|
[162] | 2693 | else |
---|
| 2694 | res@trXMaxF = xe |
---|
| 2695 | end if |
---|
[175] | 2696 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2697 | end if |
---|
| 2698 | end if |
---|
| 2699 | |
---|
[526] | 2700 | if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq) then |
---|
[353] | 2701 | miniwpqp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2702 | maxiwpqp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2703 | if (over .EQ. 1) then |
---|
| 2704 | res@xyDashPattern = 0 |
---|
[175] | 2705 | plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2706 | else |
---|
| 2707 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2708 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2709 | res@gsnRightString = " " |
---|
[190] | 2710 | if (xs .EQ. -1) then |
---|
| 2711 | res@trXMinF = miniwpqp |
---|
[162] | 2712 | else |
---|
| 2713 | res@trXMinF = xs |
---|
| 2714 | end if |
---|
[190] | 2715 | if (xe .EQ. -1) then |
---|
| 2716 | res@trXMaxF = maxiwpqp |
---|
[162] | 2717 | else |
---|
| 2718 | res@trXMaxF = xe |
---|
| 2719 | end if |
---|
[175] | 2720 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2721 | end if |
---|
| 2722 | end if |
---|
[526] | 2723 | if (vNam(varn) .EQ. "wsqs".OR. vNam(varn) .EQ. "w*s*" ) then |
---|
[353] | 2724 | miniwsqs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2725 | maxiwsqs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2726 | if (over .EQ. 1) then |
---|
| 2727 | res@xyDashPattern = 1 |
---|
[175] | 2728 | plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2729 | else |
---|
| 2730 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2731 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2732 | res@gsnRightString = " " |
---|
[190] | 2733 | if (xs .EQ. -1) then |
---|
| 2734 | res@trXMinF = miniwsqs |
---|
[162] | 2735 | else |
---|
| 2736 | res@trXMinF = xs |
---|
| 2737 | end if |
---|
[190] | 2738 | if (xe .EQ. -1) then |
---|
| 2739 | res@trXMaxF = maxiwsqs |
---|
[162] | 2740 | else |
---|
| 2741 | res@trXMaxF = xe |
---|
| 2742 | end if |
---|
[175] | 2743 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2744 | end if |
---|
| 2745 | end if |
---|
| 2746 | if (vNam(varn) .EQ. "wq") then |
---|
[353] | 2747 | miniwq=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2748 | maxiwq=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2749 | if (over .EQ. 1) then |
---|
| 2750 | res@xyDashPattern = 2 |
---|
[175] | 2751 | plot_wq = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2752 | else |
---|
| 2753 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2754 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2755 | res@gsnRightString = " " |
---|
[190] | 2756 | if (xs .EQ. -1) then |
---|
| 2757 | res@trXMinF = miniwq |
---|
[162] | 2758 | else |
---|
| 2759 | res@trXMinF = xs |
---|
| 2760 | end if |
---|
[190] | 2761 | if (xe .EQ. -1) then |
---|
| 2762 | res@trXMaxF = maxiwq |
---|
[162] | 2763 | else |
---|
| 2764 | res@trXMaxF = xe |
---|
[190] | 2765 | end if |
---|
[175] | 2766 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2767 | end if |
---|
| 2768 | end if |
---|
| 2769 | |
---|
[566] | 2770 | if (vNam(varn) .EQ. "wpqvp" .OR. \ |
---|
| 2771 | vNam(varn) .EQ. "w"+dq+"qv"+dq) then |
---|
[353] | 2772 | miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2773 | maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2774 | if (over .EQ. 1) then |
---|
| 2775 | res@xyDashPattern = 0 |
---|
[175] | 2776 | plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2777 | else |
---|
| 2778 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2779 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2780 | res@gsnRightString = " " |
---|
[190] | 2781 | if (xs .EQ. -1) then |
---|
| 2782 | res@trXMinF = miniwpqvp |
---|
[162] | 2783 | else |
---|
| 2784 | res@trXMinF = xs |
---|
| 2785 | end if |
---|
[190] | 2786 | if (xe .EQ. -1) then |
---|
| 2787 | res@trXMaxF = maxiwpqvp |
---|
[162] | 2788 | else |
---|
| 2789 | res@trXMaxF = xe |
---|
[190] | 2790 | end if |
---|
[175] | 2791 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2792 | end if |
---|
| 2793 | end if |
---|
[526] | 2794 | if (vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "w*qv*") then |
---|
[353] | 2795 | miniwsqvs=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2796 | maxiwsqvs=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2797 | if (over .EQ. 1) then |
---|
| 2798 | res@xyDashPattern = 1 |
---|
[175] | 2799 | plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2800 | else |
---|
| 2801 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2802 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2803 | res@gsnRightString = " " |
---|
[190] | 2804 | if (xs .EQ. -1) then |
---|
| 2805 | res@trXMinF = miniwsqvs |
---|
[162] | 2806 | else |
---|
| 2807 | res@trXMinF = xs |
---|
| 2808 | end if |
---|
[190] | 2809 | if (xe .EQ. -1) then |
---|
| 2810 | res@trXMaxF = maxiwsqvs |
---|
[162] | 2811 | else |
---|
| 2812 | res@trXMaxF = xe |
---|
| 2813 | end if |
---|
[175] | 2814 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2815 | end if |
---|
| 2816 | end if |
---|
| 2817 | if (vNam(varn) .EQ. "wqv") then |
---|
[353] | 2818 | miniwqv=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2819 | maxiwqv=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2820 | if (over .EQ. 1) then |
---|
| 2821 | res@xyDashPattern = 2 |
---|
[175] | 2822 | plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2823 | else |
---|
| 2824 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2825 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2826 | res@gsnRightString = " " |
---|
[190] | 2827 | if (xs .EQ. -1) then |
---|
| 2828 | res@trXMinF = miniwqv |
---|
[162] | 2829 | else |
---|
| 2830 | res@trXMinF = xs |
---|
| 2831 | end if |
---|
[190] | 2832 | if (xe .EQ. -1) then |
---|
| 2833 | res@trXMaxF = maxiwqv |
---|
[162] | 2834 | else |
---|
| 2835 | res@trXMaxF = xe |
---|
| 2836 | end if |
---|
[175] | 2837 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2838 | end if |
---|
| 2839 | end if |
---|
| 2840 | |
---|
[526] | 2841 | if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq) then |
---|
[353] | 2842 | miniwpsp=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2843 | maxiwpsp=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2844 | if (over .EQ. 1) then |
---|
| 2845 | res@xyDashPattern = 0 |
---|
[175] | 2846 | plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2847 | else |
---|
| 2848 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2849 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2850 | res@gsnRightString = " " |
---|
[190] | 2851 | if (xs .EQ. -1) then |
---|
| 2852 | res@trXMinF = miniwpsp |
---|
[162] | 2853 | else |
---|
| 2854 | res@trXMinF = xs |
---|
| 2855 | end if |
---|
[190] | 2856 | if (xe .EQ. -1) then |
---|
| 2857 | res@trXMaxF = maxiwpsp |
---|
[162] | 2858 | else |
---|
| 2859 | res@trXMaxF = xe |
---|
| 2860 | end if |
---|
[175] | 2861 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2862 | end if |
---|
| 2863 | end if |
---|
[526] | 2864 | if (vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "w*s*" ) then |
---|
[353] | 2865 | miniwsss=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2866 | maxiwsss=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2867 | if (over .EQ. 1) then |
---|
| 2868 | res@xyDashPattern = 1 |
---|
[175] | 2869 | plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2870 | else |
---|
| 2871 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2872 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2873 | res@gsnRightString = " " |
---|
[190] | 2874 | if (xs .EQ. -1) then |
---|
| 2875 | res@trXMinF = miniwsss |
---|
[162] | 2876 | else |
---|
| 2877 | res@trXMinF = xs |
---|
| 2878 | end if |
---|
[190] | 2879 | if (xe .EQ. -1) then |
---|
| 2880 | res@trXMaxF = maxiwsss |
---|
[162] | 2881 | else |
---|
| 2882 | res@trXMaxF = xe |
---|
| 2883 | end if |
---|
[175] | 2884 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2885 | end if |
---|
| 2886 | end if |
---|
| 2887 | if (vNam(varn) .EQ. "ws") then |
---|
[353] | 2888 | miniws=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2889 | maxiws=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2890 | if (over .EQ. 1) then |
---|
| 2891 | res@xyDashPattern = 2 |
---|
[175] | 2892 | plot_ws = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2893 | else |
---|
| 2894 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2895 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2896 | res@gsnRightString = " " |
---|
[190] | 2897 | if (xs .EQ. -1) then |
---|
| 2898 | res@trXMinF = miniws |
---|
[162] | 2899 | else |
---|
| 2900 | res@trXMinF = xs |
---|
| 2901 | end if |
---|
[190] | 2902 | if (xe .EQ. -1) then |
---|
| 2903 | res@trXMaxF = maxiws |
---|
[162] | 2904 | else |
---|
| 2905 | res@trXMaxF = xe |
---|
| 2906 | end if |
---|
[175] | 2907 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2908 | end if |
---|
| 2909 | end if |
---|
| 2910 | |
---|
[566] | 2911 | if (vNam(varn) .EQ. "wpsap" .OR. \ |
---|
| 2912 | vNam(varn) .EQ. "w"+dq+"sa"+dq) then |
---|
[353] | 2913 | miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2914 | maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2915 | if (over .EQ. 1) then |
---|
| 2916 | res@xyDashPattern = 0 |
---|
[175] | 2917 | plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2918 | else |
---|
| 2919 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2920 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2921 | res@gsnRightString = " " |
---|
[190] | 2922 | if (xs .EQ. -1) then |
---|
| 2923 | res@trXMinF = miniwpsap |
---|
[162] | 2924 | else |
---|
| 2925 | res@trXMinF = xs |
---|
| 2926 | end if |
---|
[190] | 2927 | if (xe .EQ. -1) then |
---|
| 2928 | res@trXMaxF = maxiwpsap |
---|
[162] | 2929 | else |
---|
| 2930 | res@trXMaxF = xe |
---|
[190] | 2931 | end if |
---|
[175] | 2932 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2933 | end if |
---|
| 2934 | end if |
---|
[526] | 2935 | if (vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "w*sa*") then |
---|
[353] | 2936 | miniwssas=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2937 | maxiwssas=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2938 | if (over .EQ. 1) then |
---|
| 2939 | res@xyDashPattern = 1 |
---|
[175] | 2940 | plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2941 | else |
---|
| 2942 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2943 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2944 | res@gsnRightString = " " |
---|
[190] | 2945 | if (xs .EQ. -1) then |
---|
| 2946 | res@trXMinF = miniwssas |
---|
[162] | 2947 | else |
---|
| 2948 | res@trXMinF = xs |
---|
| 2949 | end if |
---|
[190] | 2950 | if (xe .EQ. -1) then |
---|
| 2951 | res@trXMaxF = maxiwssas |
---|
[162] | 2952 | else |
---|
| 2953 | res@trXMaxF = xe |
---|
[190] | 2954 | end if |
---|
[175] | 2955 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2956 | end if |
---|
| 2957 | end if |
---|
| 2958 | if (vNam(varn) .EQ. "wsa") then |
---|
[353] | 2959 | miniwsa=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2960 | maxiwsa=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2961 | if (over .EQ. 1) then |
---|
| 2962 | res@xyDashPattern = 2 |
---|
[175] | 2963 | plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2964 | else |
---|
| 2965 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2966 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2967 | res@gsnRightString = " " |
---|
[190] | 2968 | if (xs .EQ. -1) then |
---|
| 2969 | res@trXMinF = miniwsa |
---|
[162] | 2970 | else |
---|
| 2971 | res@trXMinF = xs |
---|
| 2972 | end if |
---|
[190] | 2973 | if (xe .EQ. -1) then |
---|
| 2974 | res@trXMaxF = maxiwsa |
---|
[162] | 2975 | else |
---|
| 2976 | res@trXMaxF = xe |
---|
[190] | 2977 | end if |
---|
[175] | 2978 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2979 | end if |
---|
| 2980 | end if |
---|
| 2981 | |
---|
[526] | 2982 | if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "u*2") then |
---|
[353] | 2983 | minius2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 2984 | maxius2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 2985 | if (over .EQ. 1) then |
---|
| 2986 | res@xyDashPattern = 0 |
---|
[175] | 2987 | plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 2988 | else |
---|
| 2989 | res@gsnLeftString = vNam(varn) |
---|
[534] | 2990 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 2991 | res@gsnRightString = " " |
---|
[190] | 2992 | if (xs .EQ. -1) then |
---|
| 2993 | res@trXMinF = minius2 |
---|
[162] | 2994 | else |
---|
| 2995 | res@trXMinF = xs |
---|
| 2996 | end if |
---|
[190] | 2997 | if (xe .EQ. -1) then |
---|
| 2998 | res@trXMaxF = maxius2 |
---|
[162] | 2999 | else |
---|
| 3000 | res@trXMaxF = xe |
---|
[190] | 3001 | end if |
---|
[175] | 3002 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3003 | end if |
---|
| 3004 | end if |
---|
[526] | 3005 | if (vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "v*2") then |
---|
[353] | 3006 | minivs2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 3007 | maxivs2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 3008 | if (over .EQ. 1) then |
---|
| 3009 | res@xyDashPattern = 1 |
---|
[175] | 3010 | plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3011 | else |
---|
| 3012 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3013 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3014 | res@gsnRightString = " " |
---|
[190] | 3015 | if (xs .EQ. -1) then |
---|
| 3016 | res@trXMinF = minivs2 |
---|
[162] | 3017 | else |
---|
| 3018 | res@trXMinF = xs |
---|
| 3019 | end if |
---|
[190] | 3020 | if (xe .EQ. -1) then |
---|
| 3021 | res@trXMaxF = maxivs2 |
---|
[162] | 3022 | else |
---|
| 3023 | res@trXMaxF = xe |
---|
[190] | 3024 | end if |
---|
[175] | 3025 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3026 | end if |
---|
| 3027 | end if |
---|
[526] | 3028 | if (vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "w*2") then |
---|
[353] | 3029 | miniws2=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 3030 | maxiws2=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 3031 | if (over .EQ. 1) then |
---|
| 3032 | res@xyDashPattern = 2 |
---|
[175] | 3033 | plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3034 | else |
---|
| 3035 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3036 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3037 | res@gsnRightString = " " |
---|
[190] | 3038 | if (xs .EQ. -1) then |
---|
| 3039 | res@trXMinF = miniws2 |
---|
[162] | 3040 | else |
---|
| 3041 | res@trXMinF = xs |
---|
| 3042 | end if |
---|
[190] | 3043 | if (xe .EQ. -1) then |
---|
| 3044 | res@trXMaxF = maxiws2 |
---|
[162] | 3045 | else |
---|
| 3046 | res@trXMaxF = xe |
---|
[190] | 3047 | end if |
---|
[175] | 3048 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3049 | end if |
---|
| 3050 | end if |
---|
| 3051 | |
---|
[566] | 3052 | if (vNam(varn) .EQ. "wsususodz" .OR. \ |
---|
| 3053 | vNam(varn) .EQ. "w*u*u*:dz") then |
---|
[353] | 3054 | miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 3055 | maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 3056 | if (over .EQ. 1) then |
---|
| 3057 | res@xyDashPattern = 0 |
---|
[175] | 3058 | plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3059 | else |
---|
| 3060 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3061 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3062 | res@gsnRightString = " " |
---|
[190] | 3063 | if (xs .EQ. -1) then |
---|
| 3064 | res@trXMinF = miniwsususodz |
---|
[162] | 3065 | else |
---|
| 3066 | res@trXMinF = xs |
---|
| 3067 | end if |
---|
[190] | 3068 | if (xe .EQ. -1) then |
---|
| 3069 | res@trXMaxF = maxiwsususodz |
---|
[162] | 3070 | else |
---|
| 3071 | res@trXMaxF = xe |
---|
[190] | 3072 | end if |
---|
[175] | 3073 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3074 | end if |
---|
| 3075 | end if |
---|
[526] | 3076 | if (vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "w*p*:dz") then |
---|
[353] | 3077 | miniwspsodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 3078 | maxiwspsodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 3079 | if (over .EQ. 1) then |
---|
| 3080 | res@xyDashPattern = 1 |
---|
[175] | 3081 | plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3082 | else |
---|
| 3083 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3084 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3085 | res@gsnRightString = " " |
---|
[190] | 3086 | if (xs .EQ. -1) then |
---|
| 3087 | res@trXMinF = miniwspsodz |
---|
[162] | 3088 | else |
---|
| 3089 | res@trXMinF = xs |
---|
| 3090 | end if |
---|
[190] | 3091 | if (xe .EQ. -1) then |
---|
| 3092 | res@trXMaxF = maxiwspsodz |
---|
[162] | 3093 | else |
---|
| 3094 | res@trXMaxF = xe |
---|
[190] | 3095 | end if |
---|
[175] | 3096 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3097 | end if |
---|
| 3098 | end if |
---|
[566] | 3099 | if (vNam(varn) .EQ. "wpeodz" .OR. \ |
---|
| 3100 | vNam(varn) .EQ. "w"+dq+"p:dz") then |
---|
[353] | 3101 | miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
| 3102 | maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[161] | 3103 | if (over .EQ. 1) then |
---|
| 3104 | res@xyDashPattern = 2 |
---|
[175] | 3105 | plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3106 | else |
---|
| 3107 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3108 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3109 | res@gsnRightString = " " |
---|
[190] | 3110 | if (xs .EQ. -1) then |
---|
| 3111 | res@trXMinF = miniwpeodz |
---|
[162] | 3112 | else |
---|
| 3113 | res@trXMinF = xs |
---|
| 3114 | end if |
---|
[190] | 3115 | if (xe .EQ. -1) then |
---|
| 3116 | res@trXMaxF = maxiwpeodz |
---|
[162] | 3117 | else |
---|
| 3118 | res@trXMaxF = xe |
---|
[190] | 3119 | end if |
---|
[175] | 3120 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3121 | end if |
---|
| 3122 | end if |
---|
[175] | 3123 | if (no_files .GT. 1) then |
---|
[324] | 3124 | print("nof="+nof+" und n="+n) |
---|
[175] | 3125 | multi_plot(nof,n)=plot(n) |
---|
[523] | 3126 | max_nof(nof,n)=max(data(varn,:,min_z_int:max_z_int)) |
---|
| 3127 | min_nof(nof,n)=min(data(varn,:,min_z_int:max_z_int)) |
---|
[175] | 3128 | name(nof,n) =vNam(varn) |
---|
| 3129 | unit_(nof,n) =unit(varn) |
---|
| 3130 | end if |
---|
[161] | 3131 | if (over .EQ. 0) then |
---|
| 3132 | n=n+1 |
---|
[174] | 3133 | end if |
---|
| 3134 | if (prof3d .EQ. 0)then |
---|
| 3135 | varn=varn+1 |
---|
| 3136 | end if |
---|
| 3137 | delete(temp) |
---|
[324] | 3138 | delete(temp_att) |
---|
[174] | 3139 | end if |
---|
[154] | 3140 | end do |
---|
[175] | 3141 | if (no_files .GT. 1) then |
---|
| 3142 | delete(vNam) |
---|
[218] | 3143 | delete(files) |
---|
[175] | 3144 | end if |
---|
[218] | 3145 | |
---|
[175] | 3146 | end do |
---|
[218] | 3147 | ;#########ENDE DO LOOP FOR no_files GT 1############# |
---|
[353] | 3148 | |
---|
| 3149 | if (isStrSubset(data@long_name," SR " ) .and. over_remind) then |
---|
| 3150 | print(" ") |
---|
[566] | 3151 | print("If you have outputs of statistic regions you cannot overlay "+\ |
---|
| 3152 | "variables;") |
---|
[353] | 3153 | print("'over' is set to 0" ) |
---|
| 3154 | print(" ") |
---|
| 3155 | over = 0 |
---|
| 3156 | end if |
---|
| 3157 | |
---|
[162] | 3158 | if (count_var .EQ. 0) then |
---|
| 3159 | print(" ") |
---|
[342] | 3160 | print("The variables 'var="+var+"'" ) |
---|
| 3161 | print("do not exist on your input file;") |
---|
| 3162 | print("be sure to have one comma before and after each variable") |
---|
[175] | 3163 | print(" ") |
---|
[342] | 3164 | exit |
---|
[175] | 3165 | end if |
---|
| 3166 | |
---|
| 3167 | if (no_files .GT. 1) then |
---|
[218] | 3168 | multi_legend=new(6,string) |
---|
| 3169 | string_len=new(6,integer) |
---|
[175] | 3170 | multi_dash=new(no_files,string) |
---|
[190] | 3171 | multi_legend(0)=" "+name_legend_1 |
---|
[175] | 3172 | string_len(0)=strlen(multi_legend(0)) |
---|
[190] | 3173 | multi_legend(1)=" "+name_legend_2 |
---|
[175] | 3174 | string_len(1)=strlen(multi_legend(1)) |
---|
[190] | 3175 | multi_legend(2)=" "+name_legend_3 |
---|
[175] | 3176 | string_len(2)=strlen(multi_legend(2)) |
---|
[190] | 3177 | multi_legend(3)=" "+name_legend_4 |
---|
[175] | 3178 | string_len(3)=strlen(multi_legend(3)) |
---|
[190] | 3179 | multi_legend(4)=" "+name_legend_5 |
---|
[175] | 3180 | string_len(4)=strlen(multi_legend(4)) |
---|
[190] | 3181 | multi_legend(5)=" "+name_legend_6 |
---|
[175] | 3182 | string_len(5)=strlen(multi_legend(5)) |
---|
| 3183 | do ml=1,no_files |
---|
| 3184 | multi_dash(ml-1)=ml-1 |
---|
| 3185 | end do |
---|
| 3186 | delete(plot) |
---|
| 3187 | plot = new(dim,graphic) |
---|
| 3188 | do pl=0,n-1 |
---|
| 3189 | plot0 = new(1,graphic) |
---|
| 3190 | res@trXMinF = min(min_nof(:,pl)) |
---|
| 3191 | res@trXMaxF = max(max_nof(:,pl)) |
---|
| 3192 | res@gsnLeftString = name(0,pl) |
---|
| 3193 | res@gsnRightString = unit_(0,pl) |
---|
[874] | 3194 | res@tiXAxisString = "("+unit_(0,pl)+")" |
---|
[324] | 3195 | |
---|
| 3196 | data_0(:,:) = min(min_nof(:,pl)) |
---|
[175] | 3197 | plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res) |
---|
| 3198 | |
---|
| 3199 | ; *************************************************** |
---|
| 3200 | ; legend for combined plot |
---|
| 3201 | ; *************************************************** |
---|
| 3202 | |
---|
| 3203 | lgres = True |
---|
| 3204 | lgMonoDashIndex = False |
---|
| 3205 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3206 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[324] | 3207 | lgres@vpWidthF = max(string_len)*0.015 |
---|
| 3208 | lgres@vpHeightF = 0.03*no_files |
---|
[175] | 3209 | lgres@lgDashIndexes = multi_dash(no_files-1:0) |
---|
[566] | 3210 | lbid = gsn_create_legend(\ |
---|
| 3211 | wks,no_files,multi_legend(no_files-1:0),lgres) |
---|
[175] | 3212 | |
---|
| 3213 | amres = True |
---|
[324] | 3214 | amres@amParallelPosF = max(string_len)*0.012+0.78 |
---|
[175] | 3215 | amres@amOrthogonalPosF = -0.0315*no_files+0.431 |
---|
| 3216 | annoid1 = gsn_add_annotation(plot0,lbid,amres) |
---|
| 3217 | |
---|
| 3218 | do plo=0,no_files-1 |
---|
| 3219 | overlay(plot0,multi_plot(plo,pl)) |
---|
| 3220 | plot(pl)=plot0 |
---|
| 3221 | end do |
---|
| 3222 | delete(plot0) |
---|
| 3223 | end do |
---|
| 3224 | end if |
---|
| 3225 | |
---|
| 3226 | if (count_var .EQ. 0) then |
---|
| 3227 | print(" ") |
---|
[218] | 3228 | print("Select a variable 'var=' or use the default value") |
---|
[162] | 3229 | print(" ") |
---|
| 3230 | print("Your selection '"+var+"' does not exist on the input file") |
---|
| 3231 | print(" ") |
---|
| 3232 | exit |
---|
| 3233 | end if |
---|
| 3234 | |
---|
[161] | 3235 | if (over .EQ. 1 ) then |
---|
[154] | 3236 | |
---|
[161] | 3237 | overlay(plot_u,plot_v) |
---|
| 3238 | overlay(plot_u,plot_w) |
---|
| 3239 | u=0 |
---|
| 3240 | overlay(plot_pt,plot_vpt) |
---|
| 3241 | overlay(plot_pt,plot_lpt) |
---|
| 3242 | pt=0 |
---|
| 3243 | overlay(plot_q,plot_qv) |
---|
| 3244 | overlay(plot_q,plot_ql) |
---|
| 3245 | q=0 |
---|
| 3246 | overlay(plot_e,plot_es) |
---|
| 3247 | e=0 |
---|
| 3248 | overlay(plot_km,plot_kh) |
---|
| 3249 | km=0 |
---|
| 3250 | overlay(plot_wpup,plot_wsus) |
---|
| 3251 | overlay(plot_wpup,plot_wu) |
---|
| 3252 | wpup=0 |
---|
| 3253 | overlay(plot_wpvp,plot_wsvs) |
---|
| 3254 | overlay(plot_wpvp,plot_wv) |
---|
| 3255 | wpvp=0 |
---|
| 3256 | overlay(plot_wpptp,plot_wspts) |
---|
| 3257 | overlay(plot_wpptp,plot_wpt) |
---|
| 3258 | wpptp=0 |
---|
| 3259 | overlay(plot_wsptsBC,plot_wptBC) |
---|
| 3260 | wsptsBC=0 |
---|
| 3261 | overlay(plot_wpvptp,plot_wsvpts) |
---|
| 3262 | overlay(plot_wpvptp,plot_wvpt) |
---|
| 3263 | wpvptp=0 |
---|
| 3264 | overlay(plot_wpqp,plot_wsqs) |
---|
| 3265 | overlay(plot_wpqp,plot_wq) |
---|
| 3266 | wpqp=0 |
---|
| 3267 | overlay(plot_wpqvp,plot_wsqvs) |
---|
| 3268 | overlay(plot_wpqvp,plot_wqv) |
---|
| 3269 | wpqvp=0 |
---|
| 3270 | overlay(plot_wpsp,plot_wsss) |
---|
| 3271 | overlay(plot_wpsp,plot_ws) |
---|
| 3272 | wpsp=0 |
---|
| 3273 | overlay(plot_wpsap,plot_wssas) |
---|
| 3274 | overlay(plot_wpsap,plot_wsa) |
---|
| 3275 | wpsap=0 |
---|
| 3276 | overlay(plot_us2,plot_vs2) |
---|
| 3277 | overlay(plot_us2,plot_ws2) |
---|
| 3278 | us2=0 |
---|
| 3279 | overlay(plot_wsususodz,plot_wspsodz) |
---|
| 3280 | overlay(plot_wsususodz,plot_wpeodz) |
---|
| 3281 | wsususodz=0 |
---|
| 3282 | |
---|
| 3283 | end if |
---|
| 3284 | |
---|
| 3285 | if (over .EQ. 1) then |
---|
| 3286 | |
---|
| 3287 | do varn = 0,dim-1 |
---|
[174] | 3288 | |
---|
| 3289 | check = True |
---|
[161] | 3290 | |
---|
[174] | 3291 | if (prof3d .EQ. 0) then |
---|
[566] | 3292 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 3293 | isStrSubset( vNam(varn), "NORM")) then |
---|
[174] | 3294 | check = False |
---|
| 3295 | end if |
---|
[161] | 3296 | else |
---|
[566] | 3297 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 3298 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
| 3299 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
| 3300 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
| 3301 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
| 3302 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
| 3303 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
| 3304 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
| 3305 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
[174] | 3306 | check = False |
---|
| 3307 | end if |
---|
| 3308 | end if |
---|
| 3309 | |
---|
[190] | 3310 | if (var .NE. "all") then |
---|
[174] | 3311 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
| 3312 | end if |
---|
[161] | 3313 | |
---|
[175] | 3314 | if (check)then |
---|
[174] | 3315 | |
---|
| 3316 | if (prof3d .EQ. 0) then |
---|
[218] | 3317 | if (log_z .EQ. 1) then |
---|
[250] | 3318 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
[175] | 3319 | else |
---|
[250] | 3320 | z = f_att->$vNam(varn+1)$ |
---|
[175] | 3321 | end if |
---|
| 3322 | else |
---|
| 3323 | do i=0,b-1 |
---|
| 3324 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
| 3325 | z_v(varn,:) = z_u |
---|
[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 | else |
---|
| 3332 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
| 3333 | z_v(varn,:) = z_w |
---|
[218] | 3334 | if (log_z .EQ. 1) then |
---|
[175] | 3335 | z = z_v(varn,1:dimz-1) |
---|
| 3336 | else |
---|
| 3337 | z = z_v(varn,:) |
---|
| 3338 | end if |
---|
| 3339 | end if |
---|
| 3340 | end if |
---|
| 3341 | end do |
---|
[174] | 3342 | end if |
---|
| 3343 | |
---|
[218] | 3344 | z=z/norm_z |
---|
[324] | 3345 | |
---|
[353] | 3346 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then |
---|
| 3347 | min_value = abs(0.01*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 3348 | max_value = abs(0.01*max(data(varn,:,min_z_int:max_z_int))) |
---|
[324] | 3349 | else |
---|
[353] | 3350 | if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ |
---|
| 3351 | abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
| 3352 | min_value = abs(0.1*max(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 | else |
---|
[353] | 3355 | if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \ |
---|
| 3356 | abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then |
---|
| 3357 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 3358 | max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
[324] | 3359 | else |
---|
[353] | 3360 | min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) |
---|
| 3361 | max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) |
---|
[324] | 3362 | end if |
---|
| 3363 | end if |
---|
| 3364 | end if |
---|
[353] | 3365 | if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND.\ |
---|
| 3366 | max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then |
---|
[324] | 3367 | min_value = 0.1 |
---|
| 3368 | max_value = 0.1 |
---|
| 3369 | end if |
---|
[175] | 3370 | |
---|
[162] | 3371 | res@gsnLeftString = vNam(varn) |
---|
[534] | 3372 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3373 | res@gsnRightString = " " |
---|
[161] | 3374 | res@trYMinF = min_z |
---|
| 3375 | res@trYMaxF = max_z |
---|
[250] | 3376 | res@xyDashPattern = 0 |
---|
| 3377 | |
---|
[190] | 3378 | if (xs .EQ. -1) then |
---|
[353] | 3379 | res@trXMinF = min(data(varn,:,min_z_int:max_z_int))-min_value |
---|
[162] | 3380 | else |
---|
| 3381 | res@trXMinF = xs |
---|
| 3382 | end if |
---|
[190] | 3383 | if (xe .EQ. -1) then |
---|
[353] | 3384 | res@trXMaxF = max(data(varn,:,min_z_int:max_z_int))+max_value |
---|
[162] | 3385 | else |
---|
| 3386 | res@trXMaxF = xe |
---|
| 3387 | end if |
---|
[161] | 3388 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
| 3389 | |
---|
[566] | 3390 | if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. \ |
---|
| 3391 | vNam(varn) .EQ. "w") then |
---|
[161] | 3392 | if (u .EQ. 0) then |
---|
| 3393 | res@gsnLeftString = "u, v and w" |
---|
[534] | 3394 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3395 | res@gsnRightString = " " |
---|
[190] | 3396 | if (xs .EQ. -1) then |
---|
| 3397 | res@trXMinF = min((/miniu,miniv,miniw/)) |
---|
[162] | 3398 | else |
---|
| 3399 | res@trXMinF = xs |
---|
| 3400 | end if |
---|
[190] | 3401 | if (xe .EQ. -1) then |
---|
| 3402 | res@trXMaxF = max((/maxiu,maxiv,maxiw/)) |
---|
[162] | 3403 | else |
---|
| 3404 | res@trXMaxF = xe |
---|
[175] | 3405 | end if |
---|
[250] | 3406 | if (vNam(varn) .EQ. "v")then |
---|
| 3407 | res@xyDashPattern = 1 |
---|
| 3408 | end if |
---|
| 3409 | if (vNam(varn) .EQ. "w")then |
---|
| 3410 | res@xyDashPattern = 2 |
---|
| 3411 | end if |
---|
[175] | 3412 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3413 | |
---|
| 3414 | ; *************************************************** |
---|
[566] | 3415 | ; legend for overlaid plot |
---|
[161] | 3416 | ; *************************************************** |
---|
| 3417 | |
---|
| 3418 | lgres = True |
---|
| 3419 | lgMonoDashIndex = False |
---|
| 3420 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3421 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[566] | 3422 | lgres@vpWidthF = 0.07 |
---|
[250] | 3423 | lgres@vpHeightF = 0.12 |
---|
[161] | 3424 | lgres@lgDashIndexes = (/0,1,2/) |
---|
| 3425 | lbid = gsn_create_legend(wks,3,(/"u","v","w"/),lgres) |
---|
| 3426 | |
---|
| 3427 | amres = True |
---|
[566] | 3428 | amres@amParallelPosF = 0.88 |
---|
| 3429 | amres@amOrthogonalPosF = 0.33 |
---|
| 3430 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3431 | overlay(plot(n),plot_u) |
---|
| 3432 | u=1 |
---|
| 3433 | else |
---|
[174] | 3434 | if (prof3d .EQ. 0)then |
---|
| 3435 | varn=varn+1 |
---|
| 3436 | end if |
---|
[161] | 3437 | continue |
---|
| 3438 | end if |
---|
| 3439 | end if |
---|
| 3440 | |
---|
[566] | 3441 | if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. \ |
---|
| 3442 | vNam(varn) .EQ. "lpt") then |
---|
[161] | 3443 | if (pt .EQ. 0) then |
---|
| 3444 | res@gsnLeftString = "pt, vpt and lpt" |
---|
[534] | 3445 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3446 | res@gsnRightString = " " |
---|
[190] | 3447 | if (xs .EQ. -1) then |
---|
| 3448 | res@trXMinF = min((/minipt,minivpt,minilpt/)) |
---|
[162] | 3449 | else |
---|
| 3450 | res@trXMinF = xs |
---|
| 3451 | end if |
---|
[190] | 3452 | if (xe .EQ. -1) then |
---|
| 3453 | res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) |
---|
[162] | 3454 | else |
---|
| 3455 | res@trXMaxF = xe |
---|
| 3456 | end if |
---|
[250] | 3457 | if (vNam(varn) .EQ. "vpt")then |
---|
| 3458 | res@xyDashPattern = 1 |
---|
| 3459 | end if |
---|
| 3460 | if (vNam(varn) .EQ. "lpt")then |
---|
| 3461 | res@xyDashPattern = 2 |
---|
| 3462 | end if |
---|
[175] | 3463 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3464 | |
---|
| 3465 | ; *************************************************** |
---|
[566] | 3466 | ; legend for overlaid plot |
---|
[161] | 3467 | ; *************************************************** |
---|
| 3468 | |
---|
| 3469 | lgres = True |
---|
| 3470 | lgMonoDashIndex = False |
---|
| 3471 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3472 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3473 | lgres@vpWidthF = 0.07 |
---|
| 3474 | lgres@vpHeightF = 0.12 |
---|
[161] | 3475 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3476 | lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres) |
---|
[161] | 3477 | amres = True |
---|
[566] | 3478 | amres@amParallelPosF = 0.88 |
---|
| 3479 | amres@amOrthogonalPosF = 0.33 |
---|
| 3480 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3481 | overlay(plot(n),plot_pt) |
---|
| 3482 | pt=1 |
---|
| 3483 | else |
---|
[174] | 3484 | if (prof3d .EQ. 0)then |
---|
| 3485 | varn=varn+1 |
---|
| 3486 | end if |
---|
[161] | 3487 | continue |
---|
| 3488 | end if |
---|
| 3489 | end if |
---|
[566] | 3490 | if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. \ |
---|
| 3491 | vNam(varn) .EQ. "ql") then |
---|
[161] | 3492 | if (q .EQ. 0) then |
---|
| 3493 | res@gsnLeftString = "q, qv and ql" |
---|
[534] | 3494 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3495 | res@gsnRightString = " " |
---|
[190] | 3496 | if (xs .EQ. -1) then |
---|
| 3497 | res@trXMinF = min((/miniq,miniqv,miniql/)) |
---|
[162] | 3498 | else |
---|
| 3499 | res@trXMinF = xs |
---|
| 3500 | end if |
---|
[190] | 3501 | if (xe .EQ. -1) then |
---|
| 3502 | res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) |
---|
[162] | 3503 | else |
---|
| 3504 | res@trXMaxF = xe |
---|
[190] | 3505 | end if |
---|
[250] | 3506 | if (vNam(varn) .EQ. "qv")then |
---|
| 3507 | res@xyDashPattern = 1 |
---|
| 3508 | end if |
---|
| 3509 | if (vNam(varn) .EQ. "ql")then |
---|
| 3510 | res@xyDashPattern = 2 |
---|
| 3511 | end if |
---|
[175] | 3512 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3513 | |
---|
| 3514 | ; *************************************************** |
---|
[566] | 3515 | ; legend for overlaid plot |
---|
[161] | 3516 | ; *************************************************** |
---|
| 3517 | |
---|
| 3518 | lgres = True |
---|
| 3519 | lgMonoDashIndex = False |
---|
| 3520 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3521 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[566] | 3522 | lgres@vpWidthF = 0.07 |
---|
[250] | 3523 | lgres@vpHeightF = 0.12 |
---|
[161] | 3524 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3525 | lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres) |
---|
[161] | 3526 | |
---|
| 3527 | amres = True |
---|
[566] | 3528 | amres@amParallelPosF = 0.88 |
---|
| 3529 | amres@amOrthogonalPosF = 0.33 |
---|
| 3530 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3531 | overlay(plot(n),plot_q) |
---|
| 3532 | q=1 |
---|
| 3533 | else |
---|
[174] | 3534 | if (prof3d .EQ. 0)then |
---|
| 3535 | varn=varn+1 |
---|
| 3536 | end if |
---|
[161] | 3537 | continue |
---|
| 3538 | end if |
---|
[162] | 3539 | end if |
---|
| 3540 | |
---|
[566] | 3541 | if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. \ |
---|
| 3542 | vNam(varn) .EQ. "e*" ) then |
---|
[161] | 3543 | if (e .EQ. 0) then |
---|
[526] | 3544 | res@gsnLeftString = "e and e*" |
---|
[534] | 3545 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3546 | res@gsnRightString = " " |
---|
[190] | 3547 | if (xs .EQ. -1) then |
---|
| 3548 | res@trXMinF = min((/minie,minies/)) |
---|
[162] | 3549 | else |
---|
| 3550 | res@trXMinF = xs |
---|
| 3551 | end if |
---|
[190] | 3552 | if (xe .EQ. -1) then |
---|
| 3553 | res@trXMaxF = max((/maxie,maxies/)) |
---|
[162] | 3554 | else |
---|
| 3555 | res@trXMaxF = xe |
---|
[190] | 3556 | end if |
---|
[250] | 3557 | if (vNam(varn) .EQ. "es")then |
---|
| 3558 | res@xyDashPattern = 1 |
---|
| 3559 | end if |
---|
[175] | 3560 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3561 | |
---|
| 3562 | ; *************************************************** |
---|
[566] | 3563 | ; legend for overlaid plot |
---|
[161] | 3564 | ; *************************************************** |
---|
| 3565 | |
---|
| 3566 | lgres = True |
---|
| 3567 | lgMonoDashIndex = False |
---|
| 3568 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3569 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[566] | 3570 | lgres@vpWidthF = 0.07 |
---|
[250] | 3571 | lgres@vpHeightF = 0.08 |
---|
[161] | 3572 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[526] | 3573 | lbid = gsn_create_legend(wks,2,(/"e","e*"/),lgres) |
---|
[161] | 3574 | |
---|
| 3575 | amres = True |
---|
[566] | 3576 | amres@amParallelPosF = 0.88 |
---|
| 3577 | amres@amOrthogonalPosF = 0.365 |
---|
| 3578 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3579 | overlay(plot(n),plot_e) |
---|
| 3580 | e=1 |
---|
| 3581 | else |
---|
[174] | 3582 | if (prof3d .EQ. 0)then |
---|
| 3583 | varn=varn+1 |
---|
| 3584 | end if |
---|
[161] | 3585 | continue |
---|
| 3586 | end if |
---|
| 3587 | end if |
---|
| 3588 | if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then |
---|
| 3589 | if (km .EQ. 0) then |
---|
| 3590 | res@gsnLeftString = "km and kh" |
---|
[534] | 3591 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3592 | res@gsnRightString = " " |
---|
[190] | 3593 | if (xs .EQ. -1) then |
---|
| 3594 | res@trXMinF = min((/minikm,minikh/)) |
---|
[162] | 3595 | else |
---|
| 3596 | res@trXMinF = xs |
---|
| 3597 | end if |
---|
[190] | 3598 | if (xe .EQ. -1) then |
---|
| 3599 | res@trXMaxF = max((/maxikm,maxikh/)) |
---|
[162] | 3600 | else |
---|
| 3601 | res@trXMaxF = xe |
---|
[190] | 3602 | end if |
---|
[250] | 3603 | if (vNam(varn) .EQ. "kh")then |
---|
| 3604 | res@xyDashPattern = 1 |
---|
| 3605 | end if |
---|
[175] | 3606 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3607 | |
---|
| 3608 | ; *************************************************** |
---|
[566] | 3609 | ; legend for overlaid plot |
---|
[161] | 3610 | ; *************************************************** |
---|
| 3611 | |
---|
| 3612 | lgres = True |
---|
| 3613 | lgMonoDashIndex = False |
---|
| 3614 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3615 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[566] | 3616 | lgres@vpWidthF = 0.07 |
---|
[250] | 3617 | lgres@vpHeightF = 0.08 |
---|
[161] | 3618 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[250] | 3619 | lbid = gsn_create_legend(wks,2,(/"km","kh"/),lgres) |
---|
[161] | 3620 | |
---|
| 3621 | amres = True |
---|
[566] | 3622 | amres@amParallelPosF = 0.88 |
---|
| 3623 | amres@amOrthogonalPosF = 0.365 |
---|
| 3624 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3625 | overlay(plot(n),plot_km) |
---|
| 3626 | km=1 |
---|
| 3627 | else |
---|
[174] | 3628 | if (prof3d .EQ. 0)then |
---|
| 3629 | varn=varn+1 |
---|
| 3630 | end if |
---|
[161] | 3631 | continue |
---|
| 3632 | end if |
---|
| 3633 | end if |
---|
[162] | 3634 | |
---|
[566] | 3635 | if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. \ |
---|
| 3636 | vNam(varn) .EQ. "wu" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. \ |
---|
| 3637 | vNam(varn) .EQ. "w*u*") then |
---|
[161] | 3638 | if (wpup .EQ. 0) then |
---|
[526] | 3639 | res@gsnLeftString = "w"+dq+"u"+dq+", w*u* and wu" |
---|
[534] | 3640 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3641 | res@gsnRightString = " " |
---|
[190] | 3642 | if (xs .EQ. -1) then |
---|
| 3643 | res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) |
---|
[162] | 3644 | else |
---|
| 3645 | res@trXMinF = xs |
---|
| 3646 | end if |
---|
[190] | 3647 | if (xe .EQ. -1) then |
---|
| 3648 | res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) |
---|
[162] | 3649 | else |
---|
| 3650 | res@trXMaxF = xe |
---|
[190] | 3651 | end if |
---|
[250] | 3652 | if (vNam(varn) .EQ. "wsus")then |
---|
| 3653 | res@xyDashPattern = 1 |
---|
| 3654 | end if |
---|
| 3655 | if (vNam(varn) .EQ. "wu")then |
---|
| 3656 | res@xyDashPattern = 2 |
---|
| 3657 | end if |
---|
[175] | 3658 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3659 | |
---|
| 3660 | ; *************************************************** |
---|
[566] | 3661 | ; legend for overlaid plot |
---|
[161] | 3662 | ; *************************************************** |
---|
| 3663 | |
---|
| 3664 | lgres = True |
---|
| 3665 | lgMonoDashIndex = False |
---|
| 3666 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3667 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3668 | lgres@vpWidthF = 0.08 |
---|
| 3669 | lgres@vpHeightF = 0.12 |
---|
[161] | 3670 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3671 | lbid = gsn_create_legend(\ |
---|
| 3672 | wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres) |
---|
[161] | 3673 | |
---|
| 3674 | amres = True |
---|
[566] | 3675 | amres@amParallelPosF = 0.88 |
---|
| 3676 | amres@amOrthogonalPosF = 0.33 |
---|
| 3677 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3678 | overlay(plot(n),plot_wpup) |
---|
| 3679 | wpup=1 |
---|
| 3680 | else |
---|
[174] | 3681 | if (prof3d .EQ. 0)then |
---|
| 3682 | varn=varn+1 |
---|
| 3683 | end if |
---|
[161] | 3684 | continue |
---|
| 3685 | end if |
---|
| 3686 | end if |
---|
[566] | 3687 | if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR. \ |
---|
| 3688 | vNam(varn) .EQ. "wv" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. \ |
---|
| 3689 | vNam(varn) .EQ. "w*v*") then |
---|
[161] | 3690 | if (wpvp .EQ. 0) then |
---|
[526] | 3691 | res@gsnLeftString = "w"+dq+"v"+dq+", w*v* and wv" |
---|
[534] | 3692 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3693 | res@gsnRightString = " " |
---|
[190] | 3694 | if (xs .EQ. -1) then |
---|
| 3695 | res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) |
---|
[162] | 3696 | else |
---|
| 3697 | res@trXMinF = xs |
---|
| 3698 | end if |
---|
[190] | 3699 | if (xe .EQ. -1) then |
---|
| 3700 | res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) |
---|
[162] | 3701 | else |
---|
| 3702 | res@trXMaxF = xe |
---|
| 3703 | end if |
---|
[250] | 3704 | if (vNam(varn) .EQ. "wsvs")then |
---|
| 3705 | res@xyDashPattern = 1 |
---|
| 3706 | end if |
---|
| 3707 | if (vNam(varn) .EQ. "wv")then |
---|
| 3708 | res@xyDashPattern = 2 |
---|
| 3709 | end if |
---|
[175] | 3710 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3711 | |
---|
| 3712 | ; *************************************************** |
---|
[566] | 3713 | ; legend for overlaid plot |
---|
[161] | 3714 | ; *************************************************** |
---|
| 3715 | |
---|
| 3716 | lgres = True |
---|
| 3717 | lgMonoDashIndex = False |
---|
| 3718 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3719 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3720 | lgres@vpWidthF = 0.08 |
---|
| 3721 | lgres@vpHeightF = 0.12 |
---|
[161] | 3722 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3723 | lbid = gsn_create_legend(\ |
---|
| 3724 | wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres) |
---|
[161] | 3725 | |
---|
| 3726 | amres = True |
---|
[566] | 3727 | amres@amParallelPosF = 0.88 |
---|
| 3728 | amres@amOrthogonalPosF = 0.33 |
---|
| 3729 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3730 | overlay(plot(n),plot_wpvp) |
---|
[250] | 3731 | wpvp=1 |
---|
[161] | 3732 | else |
---|
[174] | 3733 | if (prof3d .EQ. 0)then |
---|
| 3734 | varn=varn+1 |
---|
| 3735 | end if |
---|
[161] | 3736 | continue |
---|
| 3737 | end if |
---|
| 3738 | end if |
---|
[566] | 3739 | if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. \ |
---|
| 3740 | vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR.\ |
---|
| 3741 | vNam(varn) .EQ. "w*pt*") then |
---|
[526] | 3742 | if (wpptp .EQ. 0) then |
---|
| 3743 | res@gsnLeftString = "w"+dq+"pt"+dq+", w*pt* and wpt" |
---|
[534] | 3744 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3745 | res@gsnRightString = " " |
---|
[190] | 3746 | if (xs .EQ. -1) then |
---|
| 3747 | res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) |
---|
[162] | 3748 | else |
---|
| 3749 | res@trXMinF = xs |
---|
| 3750 | end if |
---|
[190] | 3751 | if (xe .EQ. -1) then |
---|
| 3752 | res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) |
---|
[162] | 3753 | else |
---|
| 3754 | res@trXMaxF = xe |
---|
[190] | 3755 | end if |
---|
[526] | 3756 | if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*")then |
---|
[250] | 3757 | res@xyDashPattern = 1 |
---|
| 3758 | end if |
---|
| 3759 | if (vNam(varn) .EQ. "wpt")then |
---|
| 3760 | res@xyDashPattern = 2 |
---|
| 3761 | end if |
---|
[175] | 3762 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3763 | |
---|
| 3764 | ; *************************************************** |
---|
[566] | 3765 | ; legend for overlaid plot |
---|
[161] | 3766 | ; *************************************************** |
---|
| 3767 | |
---|
| 3768 | lgres = True |
---|
| 3769 | lgMonoDashIndex = False |
---|
| 3770 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3771 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3772 | lgres@vpWidthF = 0.09 |
---|
| 3773 | lgres@vpHeightF = 0.12 |
---|
[526] | 3774 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3775 | lbid = gsn_create_legend(\ |
---|
| 3776 | wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres) |
---|
[161] | 3777 | |
---|
| 3778 | amres = True |
---|
[566] | 3779 | amres@amParallelPosF = 0.88 |
---|
| 3780 | amres@amOrthogonalPosF = 0.33 |
---|
| 3781 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3782 | overlay(plot(n),plot_wpptp) |
---|
| 3783 | wpptp=1 |
---|
| 3784 | else |
---|
[174] | 3785 | if (prof3d .EQ. 0)then |
---|
| 3786 | varn=varn+1 |
---|
| 3787 | end if |
---|
[161] | 3788 | continue |
---|
| 3789 | end if |
---|
| 3790 | end if |
---|
[566] | 3791 | if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR.\ |
---|
| 3792 | vNam(varn) .EQ. "w*pt*BC") then |
---|
[161] | 3793 | if (wsptsBC .EQ. 0) then |
---|
[526] | 3794 | res@gsnLeftString = "w*pt*BC and wptBC" |
---|
[534] | 3795 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3796 | res@gsnRightString = " " |
---|
[190] | 3797 | if (xs .EQ. -1) then |
---|
| 3798 | res@trXMinF = min((/miniwsptsBC,miniwptBC/)) |
---|
[162] | 3799 | else |
---|
| 3800 | res@trXMinF = xs |
---|
| 3801 | end if |
---|
[190] | 3802 | if (xe .EQ. -1) then |
---|
| 3803 | res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) |
---|
[162] | 3804 | else |
---|
| 3805 | res@trXMaxF = xe |
---|
[190] | 3806 | end if |
---|
[250] | 3807 | if (vNam(varn) .EQ. "wptBC")then |
---|
| 3808 | res@xyDashPattern = 1 |
---|
| 3809 | end if |
---|
[175] | 3810 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3811 | |
---|
| 3812 | ; *************************************************** |
---|
[566] | 3813 | ; legend for overlaid plot |
---|
[161] | 3814 | ; *************************************************** |
---|
| 3815 | |
---|
| 3816 | lgres = True |
---|
| 3817 | lgMonoDashIndex = False |
---|
| 3818 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3819 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3820 | lgres@vpWidthF = 0.1 |
---|
| 3821 | lgres@vpHeightF = 0.12 |
---|
[161] | 3822 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3823 | lbid = gsn_create_legend(\ |
---|
| 3824 | wks,3,(/"w*pt*BC","wptBC"/),lgres) |
---|
[161] | 3825 | |
---|
| 3826 | amres = True |
---|
[566] | 3827 | amres@amParallelPosF = 0.88 |
---|
| 3828 | amres@amOrthogonalPosF = 0.33 |
---|
| 3829 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3830 | overlay(plot(n),plot_wsptsBC) |
---|
| 3831 | wsptsBC=1 |
---|
| 3832 | else |
---|
[174] | 3833 | if (prof3d .EQ. 0)then |
---|
| 3834 | varn=varn+1 |
---|
| 3835 | end if |
---|
[161] | 3836 | continue |
---|
| 3837 | end if |
---|
| 3838 | end if |
---|
[566] | 3839 | if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. \ |
---|
| 3840 | vNam(varn) .EQ. "wvpt" .OR. vNam(varn) .EQ. \ |
---|
| 3841 | "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then |
---|
[161] | 3842 | if (wpvptp .EQ. 0) then |
---|
[526] | 3843 | res@gsnLeftString = "w"+dq+"vpt"+dq+", w*vpt* and wvpt" |
---|
[534] | 3844 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3845 | res@gsnRightString = " " |
---|
[190] | 3846 | if (xs .EQ. -1) then |
---|
| 3847 | res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) |
---|
[162] | 3848 | else |
---|
| 3849 | res@trXMinF = xs |
---|
| 3850 | end if |
---|
[190] | 3851 | if (xe .EQ. -1) then |
---|
| 3852 | res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) |
---|
[162] | 3853 | else |
---|
| 3854 | res@trXMaxF = xe |
---|
[190] | 3855 | end if |
---|
[250] | 3856 | if (vNam(varn) .EQ. "wsvpts")then |
---|
| 3857 | res@xyDashPattern = 1 |
---|
| 3858 | end if |
---|
| 3859 | if (vNam(varn) .EQ. "wvpt")then |
---|
| 3860 | res@xyDashPattern = 2 |
---|
| 3861 | end if |
---|
[175] | 3862 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3863 | |
---|
| 3864 | ; *************************************************** |
---|
[566] | 3865 | ; legend for overlaid plot |
---|
[161] | 3866 | ; *************************************************** |
---|
| 3867 | |
---|
| 3868 | lgres = True |
---|
| 3869 | lgMonoDashIndex = False |
---|
| 3870 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3871 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3872 | lgres@vpWidthF = 0.1 |
---|
| 3873 | lgres@vpHeightF = 0.12 |
---|
[161] | 3874 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3875 | lbid = gsn_create_legend(\ |
---|
| 3876 | wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres) |
---|
[161] | 3877 | amres = True |
---|
[566] | 3878 | amres@amParallelPosF = 0.88 |
---|
| 3879 | amres@amOrthogonalPosF = 0.33 |
---|
| 3880 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3881 | overlay(plot(n),plot_wpvptp) |
---|
| 3882 | wpvptp=1 |
---|
| 3883 | else |
---|
[174] | 3884 | if (prof3d .EQ. 0)then |
---|
| 3885 | varn=varn+1 |
---|
| 3886 | end if |
---|
[161] | 3887 | continue |
---|
| 3888 | end if |
---|
| 3889 | end if |
---|
[566] | 3890 | if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. \ |
---|
| 3891 | vNam(varn) .EQ. "wq" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. \ |
---|
| 3892 | vNam(varn) .EQ. "w*q*") then |
---|
[161] | 3893 | if (wpqp .EQ. 0) then |
---|
[526] | 3894 | res@gsnLeftString = "w"+dq+"q"+dq+", w*q* and wq" |
---|
[534] | 3895 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3896 | res@gsnRightString = " " |
---|
[190] | 3897 | if (xs .EQ. -1) then |
---|
| 3898 | res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) |
---|
[162] | 3899 | else |
---|
| 3900 | res@trXMinF = xs |
---|
| 3901 | end if |
---|
[190] | 3902 | if (xe .EQ. -1) then |
---|
| 3903 | res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) |
---|
[162] | 3904 | else |
---|
| 3905 | res@trXMaxF = xe |
---|
[190] | 3906 | end if |
---|
[250] | 3907 | if (vNam(varn) .EQ. "wsqs")then |
---|
| 3908 | res@xyDashPattern = 1 |
---|
| 3909 | end if |
---|
| 3910 | if (vNam(varn) .EQ. "wq")then |
---|
| 3911 | res@xyDashPattern = 2 |
---|
| 3912 | end if |
---|
[175] | 3913 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3914 | |
---|
| 3915 | ; *************************************************** |
---|
[566] | 3916 | ; legend for overlaid plot |
---|
[161] | 3917 | ; *************************************************** |
---|
| 3918 | |
---|
| 3919 | lgres = True |
---|
| 3920 | lgMonoDashIndex = False |
---|
| 3921 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3922 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3923 | lgres@vpWidthF = 0.08 |
---|
| 3924 | lgres@vpHeightF = 0.12 |
---|
[161] | 3925 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3926 | lbid = gsn_create_legend(\ |
---|
| 3927 | wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres) |
---|
[161] | 3928 | |
---|
| 3929 | amres = True |
---|
[566] | 3930 | amres@amParallelPosF = 0.88 |
---|
| 3931 | amres@amOrthogonalPosF = 0.33 |
---|
| 3932 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3933 | overlay(plot(n),plot_wpqp) |
---|
| 3934 | wpqp=1 |
---|
| 3935 | else |
---|
[174] | 3936 | if (prof3d .EQ. 0)then |
---|
| 3937 | varn=varn+1 |
---|
| 3938 | end if |
---|
[161] | 3939 | continue |
---|
| 3940 | end if |
---|
| 3941 | end if |
---|
[566] | 3942 | if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. \ |
---|
| 3943 | vNam(varn) .EQ. "wqv" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR.\ |
---|
| 3944 | vNam(varn) .EQ. "w*qv*") then |
---|
[161] | 3945 | if (wpqvp .EQ. 0) then |
---|
[526] | 3946 | res@gsnLeftString ="w"+dq+"qv"+dq+" , w*qv* and wqv" |
---|
[534] | 3947 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 3948 | res@gsnRightString = " " |
---|
[190] | 3949 | if (xs .EQ. -1) then |
---|
| 3950 | res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) |
---|
[162] | 3951 | else |
---|
| 3952 | res@trXMinF = xs |
---|
| 3953 | end if |
---|
[190] | 3954 | if (xe .EQ. -1) then |
---|
| 3955 | res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) |
---|
[162] | 3956 | else |
---|
| 3957 | res@trXMaxF = xe |
---|
[190] | 3958 | end if |
---|
[250] | 3959 | if (vNam(varn) .EQ. "wsqvs")then |
---|
| 3960 | res@xyDashPattern = 1 |
---|
| 3961 | end if |
---|
| 3962 | if (vNam(varn) .EQ. "wqv")then |
---|
| 3963 | res@xyDashPattern = 2 |
---|
| 3964 | end if |
---|
[175] | 3965 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 3966 | |
---|
| 3967 | ; *************************************************** |
---|
[566] | 3968 | ; legend for overlaid plot |
---|
[161] | 3969 | ; *************************************************** |
---|
| 3970 | |
---|
| 3971 | lgres = True |
---|
| 3972 | lgMonoDashIndex = False |
---|
| 3973 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 3974 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 3975 | lgres@vpWidthF = 0.09 |
---|
| 3976 | lgres@vpHeightF = 0.12 |
---|
[161] | 3977 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 3978 | lbid = gsn_create_legend(\ |
---|
| 3979 | wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres) |
---|
[161] | 3980 | |
---|
| 3981 | amres = True |
---|
[566] | 3982 | amres@amParallelPosF = 0.88 |
---|
| 3983 | amres@amOrthogonalPosF = 0.33 |
---|
| 3984 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 3985 | overlay(plot(n),plot_wpqvp) |
---|
| 3986 | wpqvp=1 |
---|
| 3987 | else |
---|
[174] | 3988 | if (prof3d .EQ. 0)then |
---|
| 3989 | varn=varn+1 |
---|
| 3990 | end if |
---|
[161] | 3991 | continue |
---|
| 3992 | end if |
---|
| 3993 | end if |
---|
[566] | 3994 | if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. \ |
---|
| 3995 | vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR.\ |
---|
| 3996 | vNam(varn) .EQ. "w*s*") then |
---|
[161] | 3997 | if (wpsp .EQ. 0) then |
---|
[526] | 3998 | res@gsnLeftString = "w"+dq+"s"+dq+", w*s* and ws" |
---|
[534] | 3999 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 4000 | res@gsnRightString = " " |
---|
[190] | 4001 | if (xs .EQ. -1) then |
---|
| 4002 | res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) |
---|
[162] | 4003 | else |
---|
| 4004 | res@trXMinF = xs |
---|
| 4005 | end if |
---|
[190] | 4006 | if (xe .EQ. -1) then |
---|
| 4007 | res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) |
---|
[162] | 4008 | else |
---|
| 4009 | res@trXMaxF = xe |
---|
[190] | 4010 | end if |
---|
[250] | 4011 | if (vNam(varn) .EQ. "wsss")then |
---|
| 4012 | res@xyDashPattern = 1 |
---|
| 4013 | end if |
---|
| 4014 | if (vNam(varn) .EQ. "ws")then |
---|
| 4015 | res@xyDashPattern = 2 |
---|
| 4016 | end if |
---|
[175] | 4017 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 4018 | |
---|
| 4019 | ; *************************************************** |
---|
[566] | 4020 | ; legend for overlaid plot |
---|
[161] | 4021 | ; *************************************************** |
---|
| 4022 | |
---|
| 4023 | lgres = True |
---|
| 4024 | lgMonoDashIndex = False |
---|
| 4025 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 4026 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 4027 | lgres@vpWidthF = 0.08 |
---|
| 4028 | lgres@vpHeightF = 0.12 |
---|
[161] | 4029 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 4030 | lbid = gsn_create_legend(\ |
---|
| 4031 | wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres) |
---|
[161] | 4032 | |
---|
| 4033 | amres = True |
---|
[566] | 4034 | amres@amParallelPosF = 0.88 |
---|
| 4035 | amres@amOrthogonalPosF = 0.33 |
---|
| 4036 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 4037 | overlay(plot(n),plot_wpsp) |
---|
| 4038 | wpsp=1 |
---|
| 4039 | else |
---|
[174] | 4040 | if (prof3d .EQ. 0)then |
---|
| 4041 | varn=varn+1 |
---|
| 4042 | end if |
---|
[161] | 4043 | continue |
---|
| 4044 | end if |
---|
| 4045 | end if |
---|
[566] | 4046 | if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. \ |
---|
| 4047 | vNam(varn) .EQ. "wsa" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR.\ |
---|
| 4048 | vNam(varn) .EQ. "w*sa*") then |
---|
[161] | 4049 | if (wpsap .EQ. 0) then |
---|
[526] | 4050 | res@gsnLeftString = "w"+dq+"sa"+dq+", w*sa* and wsa" |
---|
[534] | 4051 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 4052 | res@gsnRightString = " " |
---|
[190] | 4053 | if (xs .EQ. -1) then |
---|
| 4054 | res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) |
---|
[162] | 4055 | else |
---|
| 4056 | res@trXMinF = xs |
---|
| 4057 | end if |
---|
[190] | 4058 | if (xe .EQ. -1) then |
---|
| 4059 | res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) |
---|
[162] | 4060 | else |
---|
| 4061 | res@trXMaxF = xe |
---|
[190] | 4062 | end if |
---|
[250] | 4063 | if (vNam(varn) .EQ. "wssas")then |
---|
| 4064 | res@xyDashPattern = 1 |
---|
| 4065 | end if |
---|
| 4066 | if (vNam(varn) .EQ. "wsa")then |
---|
| 4067 | res@xyDashPattern = 2 |
---|
| 4068 | end if |
---|
[175] | 4069 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 4070 | |
---|
| 4071 | ; *************************************************** |
---|
[566] | 4072 | ; legend for overlaid plot |
---|
[161] | 4073 | ; *************************************************** |
---|
| 4074 | |
---|
| 4075 | lgres = True |
---|
| 4076 | lgMonoDashIndex = False |
---|
| 4077 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 4078 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 4079 | lgres@vpWidthF = 0.09 |
---|
| 4080 | lgres@vpHeightF = 0.12 |
---|
[161] | 4081 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 4082 | lbid = gsn_create_legend(\ |
---|
| 4083 | wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres) |
---|
[161] | 4084 | amres = True |
---|
[566] | 4085 | amres@amParallelPosF = 0.88 |
---|
| 4086 | amres@amOrthogonalPosF = 0.33 |
---|
| 4087 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 4088 | overlay(plot(n),plot_wpsap) |
---|
| 4089 | wpsap=1 |
---|
| 4090 | else |
---|
[174] | 4091 | if (prof3d .EQ. 0)then |
---|
| 4092 | varn=varn+1 |
---|
| 4093 | end if |
---|
[161] | 4094 | continue |
---|
| 4095 | end if |
---|
| 4096 | end if |
---|
[162] | 4097 | |
---|
[566] | 4098 | if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. \ |
---|
| 4099 | vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "u*2" .OR. \ |
---|
| 4100 | vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then |
---|
[161] | 4101 | if (us2 .EQ. 0) then |
---|
[526] | 4102 | res@gsnLeftString = "u*2, v*2 and w*2" |
---|
[534] | 4103 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 4104 | res@gsnRightString = " " |
---|
[190] | 4105 | if (xs .EQ. -1) then |
---|
| 4106 | res@trXMinF = min((/minius2,minivs2,miniws2/)) |
---|
[162] | 4107 | else |
---|
| 4108 | res@trXMinF = xs |
---|
| 4109 | end if |
---|
[190] | 4110 | if (xe .EQ. -1) then |
---|
| 4111 | res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) |
---|
| 4112 | else |
---|
[162] | 4113 | res@trXMaxF = xe |
---|
[190] | 4114 | end if |
---|
[250] | 4115 | if (vNam(varn) .EQ. "vs2")then |
---|
| 4116 | res@xyDashPattern = 1 |
---|
| 4117 | end if |
---|
| 4118 | if (vNam(varn) .EQ. "ws2")then |
---|
| 4119 | res@xyDashPattern = 2 |
---|
| 4120 | end if |
---|
[175] | 4121 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 4122 | |
---|
| 4123 | ; *************************************************** |
---|
[566] | 4124 | ; legend for overlaid plot |
---|
[161] | 4125 | ; *************************************************** |
---|
| 4126 | |
---|
| 4127 | lgres = True |
---|
| 4128 | lgMonoDashIndex = False |
---|
| 4129 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 4130 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[250] | 4131 | lgres@vpWidthF = 0.07 |
---|
| 4132 | lgres@vpHeightF = 0.12 |
---|
[161] | 4133 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 4134 | lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres) |
---|
[161] | 4135 | amres = True |
---|
[566] | 4136 | amres@amParallelPosF = 0.88 |
---|
| 4137 | amres@amOrthogonalPosF = 0.33 |
---|
| 4138 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 4139 | overlay(plot(n),plot_us2) |
---|
| 4140 | us2=1 |
---|
| 4141 | else |
---|
[174] | 4142 | if (prof3d .EQ. 0)then |
---|
| 4143 | varn=varn+1 |
---|
| 4144 | end if |
---|
[161] | 4145 | continue |
---|
| 4146 | end if |
---|
| 4147 | end if |
---|
[162] | 4148 | |
---|
[566] | 4149 | if (vNam(varn) .EQ. "wsususodz" .OR. \ |
---|
| 4150 | vNam(varn) .EQ. "wspsodz" .OR. \ |
---|
| 4151 | vNam(varn) .EQ. "wpeodz" .OR. \ |
---|
| 4152 | vNam(varn) .EQ. "w*u*u*:dz" .OR. \ |
---|
| 4153 | vNam(varn) .EQ. "w*p*:dz" .OR. \ |
---|
| 4154 | vNam(varn) .EQ. "w"+dq+"e:dz") then |
---|
[161] | 4155 | if (wsususodz .EQ. 0) then |
---|
[526] | 4156 | res@gsnLeftString = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz" |
---|
[534] | 4157 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 4158 | res@gsnRightString = " " |
---|
[190] | 4159 | if (xs .EQ. -1) then |
---|
[566] | 4160 | res@trXMinF = min((/miniwsususodz,\ |
---|
| 4161 | miniwspsodz,miniwpeodz/)) |
---|
[162] | 4162 | else |
---|
| 4163 | res@trXMinF = xs |
---|
| 4164 | end if |
---|
[190] | 4165 | if (xe .EQ. -1) then |
---|
[566] | 4166 | res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,\ |
---|
| 4167 | maxiwpeodz/)) |
---|
[162] | 4168 | else |
---|
| 4169 | res@trXMaxF = xe |
---|
[190] | 4170 | end if |
---|
[250] | 4171 | if (vNam(varn) .EQ. "wspsodz")then |
---|
| 4172 | res@xyDashPattern = 1 |
---|
| 4173 | end if |
---|
| 4174 | if (vNam(varn) .EQ. "wpeodz")then |
---|
| 4175 | res@xyDashPattern = 2 |
---|
| 4176 | end if |
---|
[175] | 4177 | plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
[161] | 4178 | |
---|
| 4179 | ; *************************************************** |
---|
[566] | 4180 | ; legend for overlaid plot |
---|
[161] | 4181 | ; *************************************************** |
---|
| 4182 | |
---|
| 4183 | lgres = True |
---|
| 4184 | lgMonoDashIndex = False |
---|
| 4185 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 4186 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[161] | 4187 | lgres@vpWidthF = 0.12 |
---|
[250] | 4188 | lgres@vpHeightF = 0.12 |
---|
[161] | 4189 | lgres@lgDashIndexes = (/0,1,2/) |
---|
[566] | 4190 | lbid = gsn_create_legend(\ |
---|
| 4191 | wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres) |
---|
[161] | 4192 | amres = True |
---|
[566] | 4193 | amres@amParallelPosF = 0.88 |
---|
| 4194 | amres@amOrthogonalPosF = 0.33 |
---|
| 4195 | annoid1 = gsn_add_annotation(plot(n),lbid,amres) |
---|
[161] | 4196 | overlay(plot(n),plot_wsususodz) |
---|
| 4197 | wsususodz=1 |
---|
| 4198 | else |
---|
[174] | 4199 | if (prof3d .EQ. 0)then |
---|
| 4200 | varn=varn+1 |
---|
| 4201 | end if |
---|
[161] | 4202 | continue |
---|
| 4203 | end if |
---|
| 4204 | end if |
---|
[174] | 4205 | n=n+1 |
---|
| 4206 | if (prof3d .EQ. 0)then |
---|
| 4207 | varn=varn+1 |
---|
| 4208 | end if |
---|
[161] | 4209 | end if |
---|
| 4210 | end do |
---|
[190] | 4211 | end if |
---|
| 4212 | |
---|
| 4213 | com_var_avail=new(count_var,string) |
---|
[161] | 4214 | |
---|
[154] | 4215 | if (combine .EQ. 1) then |
---|
[174] | 4216 | co=0 |
---|
[161] | 4217 | n_o=0 |
---|
[174] | 4218 | do varn = 0,dim-1 |
---|
| 4219 | |
---|
| 4220 | check = True |
---|
| 4221 | |
---|
| 4222 | if (prof3d .EQ. 0) then |
---|
[566] | 4223 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 4224 | isStrSubset( vNam(varn), "NORM")) then |
---|
[174] | 4225 | check = False |
---|
| 4226 | end if |
---|
[161] | 4227 | else |
---|
[566] | 4228 | if ( isStrSubset( vNam(varn), "time") .OR. \ |
---|
| 4229 | isStrSubset( vNam(varn), "zusi") .OR. \ |
---|
| 4230 | isStrSubset( vNam(varn), "zwwi") .OR. \ |
---|
| 4231 | isStrSubset( vNam(varn), "x") .OR. \ |
---|
| 4232 | isStrSubset( vNam(varn), "xu") .OR. \ |
---|
| 4233 | isStrSubset( vNam(varn), "y") .OR. \ |
---|
| 4234 | isStrSubset( vNam(varn), "yv") .OR. \ |
---|
| 4235 | isStrSubset( vNam(varn), "zu_3d") .OR. \ |
---|
| 4236 | isStrSubset( vNam(varn), "zw_3d")) then |
---|
[174] | 4237 | check = False |
---|
| 4238 | end if |
---|
| 4239 | end if |
---|
| 4240 | |
---|
[190] | 4241 | if (var .NE. "all") then |
---|
[174] | 4242 | check = isStrSubset( var,","+vNam(varn)+"," ) |
---|
| 4243 | end if |
---|
| 4244 | |
---|
[175] | 4245 | if (check)then |
---|
| 4246 | |
---|
| 4247 | if (prof3d .EQ. 0) then |
---|
[218] | 4248 | if (log_z .EQ. 1) then |
---|
[250] | 4249 | z = f_att->$vNam(varn+1)$(1:dimz-1) |
---|
[175] | 4250 | else |
---|
[250] | 4251 | z = f_att->$vNam(varn+1)$ |
---|
[175] | 4252 | end if |
---|
| 4253 | else |
---|
| 4254 | do i=0,b-1 |
---|
| 4255 | if (isStrSubset( a(i),"zu_3d" ))then |
---|
| 4256 | z_v(varn,:) = z_u |
---|
[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 | else |
---|
| 4263 | if (isStrSubset( a(i),"zw_3d" ))then |
---|
| 4264 | z_v(varn,:) = z_w |
---|
[218] | 4265 | if (log_z .EQ. 1) then |
---|
[175] | 4266 | z = z_v(varn,1:dimz-1) |
---|
| 4267 | else |
---|
| 4268 | z = z_v(varn,:) |
---|
| 4269 | end if |
---|
| 4270 | end if |
---|
| 4271 | end if |
---|
| 4272 | end do |
---|
| 4273 | end if |
---|
[174] | 4274 | |
---|
[218] | 4275 | z=z/norm_z |
---|
[190] | 4276 | |
---|
| 4277 | com_var_avail(n_o)=vNam(varn) |
---|
| 4278 | |
---|
[161] | 4279 | com=isStrSubset( c_var,","+vNam(varn)+"," ) |
---|
[175] | 4280 | if (com)then |
---|
[174] | 4281 | co = co+1 |
---|
[161] | 4282 | if (n_o .EQ. 1) then |
---|
[175] | 4283 | res@xyDashPattern = 1 |
---|
[161] | 4284 | else |
---|
| 4285 | if (n_o .EQ. 2) then |
---|
| 4286 | res@xyDashPattern = 2 |
---|
| 4287 | else |
---|
| 4288 | res@xyDashPattern = 0 |
---|
[175] | 4289 | res@gsnLeftString = "Combined Plot of "+c_var |
---|
[534] | 4290 | res@tiXAxisString = "("+unit(varn)+")" |
---|
[218] | 4291 | res@gsnRightString = " " |
---|
[190] | 4292 | if (xs .EQ. -1) then |
---|
| 4293 | res@trXMinF = min(mini) |
---|
[162] | 4294 | else |
---|
| 4295 | res@trXMinF = xs |
---|
| 4296 | end if |
---|
[190] | 4297 | if (xe .EQ. -1) then |
---|
| 4298 | res@trXMaxF = max(maxi) |
---|
[162] | 4299 | else |
---|
| 4300 | res@trXMaxF = xe |
---|
| 4301 | end if |
---|
[161] | 4302 | end if |
---|
| 4303 | end if |
---|
| 4304 | label(n_o)=vNam(varn) |
---|
| 4305 | color_o(n_o)=237 |
---|
| 4306 | plot_o(n_o)=gsn_csm_xy(wks,data(varn,:,:),z,res) |
---|
| 4307 | n_o=n_o+1 |
---|
[174] | 4308 | end if |
---|
| 4309 | if (prof3d .EQ. 0)then |
---|
| 4310 | varn=varn+1 |
---|
| 4311 | end if |
---|
[161] | 4312 | end if |
---|
| 4313 | end do |
---|
| 4314 | |
---|
| 4315 | if(number_comb .EQ. 2)then |
---|
[174] | 4316 | if (co .EQ. 2)then |
---|
| 4317 | overlay(plot_o(0),plot_o(1)) |
---|
| 4318 | else |
---|
[190] | 4319 | print(" ") |
---|
| 4320 | print("combining is not possible,") |
---|
[566] | 4321 | print("'c_var'(= "+c_var+") must include two variables of "+\ |
---|
| 4322 | "the general plots = ") |
---|
[190] | 4323 | print("- "+com_var_avail) |
---|
[342] | 4324 | print("be sure to have one comma before and after the variable") |
---|
[190] | 4325 | print(" ") |
---|
| 4326 | exit |
---|
[174] | 4327 | end if |
---|
[161] | 4328 | end if |
---|
| 4329 | if(number_comb .EQ. 3)then |
---|
[174] | 4330 | if (co .EQ. 3)then |
---|
| 4331 | overlay(plot_o(0),plot_o(1)) |
---|
| 4332 | overlay(plot_o(0),plot_o(2)) |
---|
| 4333 | else |
---|
[190] | 4334 | print(" ") |
---|
| 4335 | print("combining is not possible,") |
---|
[566] | 4336 | print("'c_var'(= "+c_var+") must include three variables of "+\ |
---|
| 4337 | "the general plots = ") |
---|
[190] | 4338 | print("- "+com_var_avail) |
---|
[342] | 4339 | print("be sure to have one comma before and after the variable") |
---|
[190] | 4340 | print(" ") |
---|
| 4341 | exit |
---|
[174] | 4342 | end if |
---|
[161] | 4343 | end if |
---|
[154] | 4344 | |
---|
[161] | 4345 | ; *************************************************** |
---|
| 4346 | ; legend for combined plot |
---|
| 4347 | ; *************************************************** |
---|
[154] | 4348 | |
---|
[161] | 4349 | lgres = True |
---|
| 4350 | lgMonoDashIndex = False |
---|
| 4351 | lgres@lgDashIndexes = (/0,1,2/) |
---|
| 4352 | lgres@lgLabelFont = "helvetica" |
---|
[783] | 4353 | lgres@lgLabelFontHeightF = font_size_legend*10.0 |
---|
[161] | 4354 | lgres@vpWidthF = 0.12 |
---|
| 4355 | lgres@vpHeightF = 0.1 |
---|
| 4356 | |
---|
| 4357 | lbid = gsn_create_legend(wks,number_comb,label,lgres) |
---|
| 4358 | |
---|
| 4359 | amres = True |
---|
| 4360 | amres@amParallelPosF = 0.65 |
---|
| 4361 | amres@amOrthogonalPosF = -0.2 |
---|
| 4362 | annoid1 = gsn_add_annotation(plot_o(0),lbid,amres) |
---|
| 4363 | |
---|
| 4364 | plot(0) = plot_o(0) |
---|
| 4365 | |
---|
[154] | 4366 | end if |
---|
| 4367 | |
---|
| 4368 | ; *************************************************** |
---|
| 4369 | ; merge plots onto one page |
---|
| 4370 | ; *************************************************** |
---|
[162] | 4371 | |
---|
[161] | 4372 | do m=0,n-1 |
---|
| 4373 | plot_(m)=plot(n-1-m) |
---|
[154] | 4374 | end do |
---|
| 4375 | |
---|
[532] | 4376 | no_frames = 0 |
---|
| 4377 | |
---|
[566] | 4378 | if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \ |
---|
| 4379 | n .gt. no_rows*no_columns) then |
---|
[175] | 4380 | gsn_panel(wks,plot_,(/n,1/),resP) |
---|
[250] | 4381 | print(" ") |
---|
| 4382 | print("Outputs to .eps or .epsi have only one frame") |
---|
| 4383 | print(" ") |
---|
[161] | 4384 | else |
---|
[218] | 4385 | do i = 0,n-1, no_rows*no_columns |
---|
| 4386 | if( (i+no_rows*no_columns) .gt. (n-1)) then |
---|
| 4387 | gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP) |
---|
[532] | 4388 | no_frames = no_frames + 1 |
---|
[161] | 4389 | else |
---|
[566] | 4390 | gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),\ |
---|
| 4391 | (/no_rows,no_columns/),resP) |
---|
[532] | 4392 | no_frames = no_frames + 1 |
---|
[161] | 4393 | end if |
---|
| 4394 | end do |
---|
| 4395 | end if |
---|
| 4396 | |
---|
[532] | 4397 | if (format_out .EQ. "png" ) then |
---|
| 4398 | png_output = new((/no_frames/), string) |
---|
| 4399 | j = 0 |
---|
| 4400 | do i=0, no_frames-1 |
---|
| 4401 | j = i + 1 |
---|
| 4402 | if (j .LE. 9) then |
---|
| 4403 | png_output(i) = file_out+".00000"+j+".png" |
---|
| 4404 | end if |
---|
| 4405 | if (j .GT. 9 .AND. j .LE. 99) then |
---|
| 4406 | png_output(i) = file_out+".0000"+j+".png" |
---|
| 4407 | end if |
---|
| 4408 | if (j .GT. 99 .AND. j .LE. 999) then |
---|
| 4409 | png_output(i) = file_out+".000"+j+".png" |
---|
| 4410 | end if |
---|
| 4411 | if (j .GT. 999) then |
---|
| 4412 | png_output(i) = file_out+".00"+j+".png" |
---|
| 4413 | end if |
---|
[154] | 4414 | |
---|
[532] | 4415 | ;using imagemagick's convert for reducing the white |
---|
| 4416 | ;space around the plot |
---|
| 4417 | cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ |
---|
| 4418 | png_output(i) + " " + png_output(i) |
---|
| 4419 | system(cmd) |
---|
| 4420 | end do |
---|
| 4421 | |
---|
| 4422 | print(" ") |
---|
| 4423 | print("Output to: "+ png_output) |
---|
| 4424 | print(" ") |
---|
| 4425 | else |
---|
| 4426 | print(" ") |
---|
| 4427 | print("Output to: " + file_out +"."+ format_out) |
---|
| 4428 | print(" ") |
---|
| 4429 | end if |
---|
| 4430 | |
---|
[154] | 4431 | end |
---|