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