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