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