Changeset 162
- Timestamp:
- Apr 30, 2008 1:41:13 PM (16 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/.ncl_preferences
r161 r162 11 11 ___'file_out'________[path/name; i.e. ~/.../test]_______________default = test____________[ALL] 12 12 test 13 ___start_time_step___[0;1;...]__________________________________default = 1_______________[ALL]14 1 15 ___end_time_step_____[1;2;...]__________________________________default = nt______________[ALL]16 nt 13 ___start_time_step___[0;1;...]__________________________________default = t(0)____________[ALL] 14 t(0) 15 ___end_time_step_____[1;2;...]__________________________________default = t(end)__________[ALL] 16 t(end) 17 17 ___no_columns________[1;2;...]__________________________________default = 1_______________[ALL] 18 18 1 … … 35 35 ___max_z_____________[100;1000;...]_____________________________default = max(z_u)________[PR] 36 36 max(z_u) 37 ___over______________[0] or [1]_________________________________default = 0_______________[PR+TS] 38 0 39 ___vector____________[0] or [1]_________________________________default = 0_______________[CS] 40 0 41 ___'vec1'____________[,u,;,v,;...]______________________________default = vec1____________[CS] 42 vec1 43 ___'vec2'____________[,u,;,v,;...]______________________________default = vec2____________[CS] 44 vec2 45 __'plotvec'__________[,u,;,v,;...]______________________________default = plotvec_________[CS] 46 plotvec 47 ___ref_mag___________[0.1;0.02;...]_____________________________default = 0.05____________[CS] 48 0.05 49 ___'mode'____________[Fill], [Line] or [Both]___________________default = Fill____________[CS] 50 Fill 37 51 ___'sort'____________[time] or [layer]__________________________default = time____________[CS] 38 52 time 39 ___'mode'____________[Fill], [Line] or [Both]___________________default = Fill____________[CS]40 Fill41 53 ___'fill_mode'_______[AreaFill], [RasterFill] or [CellFill]_____default = AreaFill________[CS] 42 54 AreaFill … … 49 61 ___yzc_______________[0] or [1]_________________________________default = 0_______________[CS] 50 62 0 51 ___xs________________[0,1,...]__________________________________default = 0_______________[CS]52 053 ___xe________________[1;2;...]__________________________________default = xdim____________[CS ]63 ___xs________________[0,1,...]__________________________________default = x0______________[CS+PR] 64 x0 65 ___xe________________[1;2;...]__________________________________default = xdim____________[CS+PR] 54 66 xdim 55 ___ys________________[0;1;...]__________________________________default = 0_______________[CS]56 067 ___ys________________[0;1;...]__________________________________default = y0______________[CS] 68 y0 57 69 ___ye________________[1;2;...]__________________________________default = ydim____________[CS] 58 70 ydim 59 ___zs________________[0;1;...]__________________________________default = 0_______________[CS]60 071 ___zs________________[0;1;...]__________________________________default = z0______________[CS] 72 z0 61 73 ___ze________________[1;2;...]__________________________________default = zdim____________[CS] 62 74 zdim 63 ___vector____________[0] or [1]_________________________________default = 0_______________[CS]64 065 ___'vec1'____________[,u,;,v,;...]______________________________default = vec1____________[CS]66 vec167 ___'vec2'____________[,u,;,v,;...]______________________________default = vec2____________[CS]68 vec269 __'plotvec'__________[,u,;,v,;...]______________________________default = plotvec_________[CS]70 plotvec71 ___ref_mag___________[0.1;0.02;...]_____________________________default = 0.05____________[CS]72 0.0573 ___over______________[0] or [1]_________________________________default = 0_______________[TS+PR]74 075 75 ___end of file ".ncl_preferences"_____________________________________________________________ -
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r161 r162 61 61 if ( .not. isvar("sort") ) then ; sort of plots 62 62 sort = "time" 63 if (parameter( 37) .NE. "time") then64 sort = parameter( 37)63 if (parameter(51) .NE. "time") then 64 sort = parameter(51) 65 65 end if 66 66 end if 67 67 if ( .not. isvar("mode") ) then ; pattern of contour plots 68 68 mode = "Fill" 69 if (parameter( 39) .NE. "Fill") then70 mode = parameter( 39)69 if (parameter(49) .NE. "Fill") then 70 mode = parameter(49) 71 71 end if 72 72 end if 73 73 if ( .not. isvar("fill_mode") ) then ; pattern of filling 74 74 fill_mode = "AreaFill" 75 if (parameter( 41) .NE. "AreaFill") then76 mode = parameter( 41)75 if (parameter(53) .NE. "AreaFill") then 76 mode = parameter(53) 77 77 end if 78 78 end if 79 79 if ( .not. isvar("shape") ) then ; keeping of aspect ratio 80 80 shape = 1 81 if (parameter( 43) .NE. "1") then82 shape = stringtointeger(parameter( 43))83 if (stringtointeger(parameter( 43)) .NE. 0) then81 if (parameter(55) .NE. "1") then 82 shape = stringtointeger(parameter(55)) 83 if (stringtointeger(parameter(55)) .NE. 0) then 84 84 print(" ") 85 85 print("Please set 'shape' to 0 or 1") … … 95 95 if ( .not. isvar("xyc") ) then ; turn xy cross-section on or off 96 96 xyc = 0 97 if (parameter( 45) .NE. "0") then98 xyc = stringtointeger(parameter( 45))99 if (stringtointeger(parameter( 45)) .NE. 1) then97 if (parameter(57) .NE. "0") then 98 xyc = stringtointeger(parameter(57)) 99 if (stringtointeger(parameter(57)) .NE. 1) then 100 100 print(" ") 101 101 print("Please set 'xyc' to 0 or 1") … … 107 107 if ( .not. isvar("xzc") ) then ; turn xz cross-section on or off 108 108 xzc = 0 109 if (parameter( 47) .NE. "0") then110 xzc = stringtointeger(parameter( 47))111 if (stringtointeger(parameter( 47)) .NE. 1) then109 if (parameter(59) .NE. "0") then 110 xzc = stringtointeger(parameter(59)) 111 if (stringtointeger(parameter(59)) .NE. 1) then 112 112 print(" ") 113 113 print("Please set 'xzc' to 0 or 1") … … 119 119 if ( .not. isvar("yzc") ) then ; turn yz cross-section on or off 120 120 yzc = 0 121 if (parameter( 49) .NE. "0") then122 yzc = stringtointeger(parameter( 49))123 if (stringtointeger(parameter( 49)) .NE. 1) then121 if (parameter(61) .NE. "0") then 122 yzc = stringtointeger(parameter(61)) 123 if (stringtointeger(parameter(61)) .NE. 1) then 124 124 print(" ") 125 125 print("Please set 'yzc' to 0 or 1") … … 129 129 end if 130 130 end if 131 if ( .not. isvar("xs") ) then ; start of x-coordinate range132 xs = 0133 if (parameter(51) .NE. "0") then134 xs = stringtointeger(parameter(51))135 end if136 end if137 if ( .not. isvar("ys") ) then ; start of y-coordinate range138 ys = 0139 if (parameter(55) .NE. "0") then140 ys = stringtointeger(parameter(55))141 end if142 end if143 if ( .not. isvar("zs") ) then ; start of z-coordinate range144 zs = 0145 if (parameter(59) .NE. "0") then146 zs = stringtointeger(parameter(59))147 end if148 end if149 131 150 132 if (xyc .EQ. 0 .AND. xzc .EQ. 0 .AND. yzc .EQ. 0) then … … 180 162 if ( .not. isvar("vector") ) then ; sort of plots 181 163 vector = 0 182 if (parameter( 63) .NE. "0") then183 vector = stringtointeger(parameter( 63))184 if (stringtointeger(parameter( 63)) .NE. 1) then164 if (parameter(39) .NE. "0") then 165 vector = stringtointeger(parameter(39)) 166 if (stringtointeger(parameter(39)) .NE. 1) then 185 167 print(" ") 186 168 print("Please set 'vector' to 0 or 1") … … 192 174 if ( .not. isvar("ref_mag") ) then ; sort of plots 193 175 ref_mag = 0.05 194 if (parameter( 71) .NE. "0.05") then195 ref_mag = stringtofloat(parameter( 71))176 if (parameter(47) .NE. "0.05") then 177 ref_mag = stringtofloat(parameter(47)) 196 178 end if 197 179 end if … … 208 190 print(" ") 209 191 dim = dimsizes(vNam) 192 193 ; *************************************************** 194 ; check for kind of input file 195 ; *************************************************** 196 197 check_3d = True 198 do varn=0,dim-1 199 checkxy = isStrSubset( vNam(varn),"xy") 200 checkxz = isStrSubset( vNam(varn),"xz") 201 checkyz = isStrSubset( vNam(varn),"yz") 202 if (checkxy .OR. checkxz .OR. checkyz) then 203 check_3d = False 204 break 205 end if 206 end do 207 if (.not. check_3d) then 208 if (xyc .EQ. 1 .AND. .not. checkxy) then 209 print(" ") 210 print("Your input file doesn't have values for xy cross-sections") 211 if (checkxz)then 212 print("Select another input file or xz cross-sections") 213 else 214 print("Select another input file or yz cross-sections") 215 end if 216 print(" ") 217 exit 218 else 219 print(" ") 220 print("Your input file contains xy data") 221 print(" ") 222 end if 223 if (xzc .EQ. 1 .AND. .not. checkxz) then 224 print(" ") 225 print("Your input file doesn't have values for xz cross-sections") 226 if (checkxy)then 227 print("Select another input file or xy cross-sections") 228 else 229 print("Select another input file or yz cross-sections") 230 end if 231 print(" ") 232 exit 233 else 234 print(" ") 235 print("Your input file contains xz data") 236 print(" ") 237 end if 238 if (yzc .EQ. 1 .AND. .not. checkyz) then 239 print(" ") 240 print("Your input file doesn't have values for yz cross-sections") 241 if (checkxy)then 242 print("Select another input file or xy cross-sections") 243 else 244 print("Select another input file or xz cross-sections") 245 end if 246 print(" ") 247 exit 248 else 249 print(" ") 250 print("Your input file contains yz data") 251 print(" ") 252 end if 253 else 254 print(" ") 255 print("Your input file: '"+file_in+"'") 256 print("contains 3d or other data") 257 print(" ") 258 end if 259 210 260 if (dim .EQ. 0) then 211 261 print(" ") 212 print("There areno data on file")262 print("There is no data on file") 213 263 print(" ") 264 exit 214 265 end if 215 266 … … 241 292 cs_res@lgLabelFontHeightF = .02 242 293 cs_res@txFontHeightF = .02 294 cs_res@cnLevelSelectionMode = "ManualLevels" 295 243 296 cs_resP = True 244 297 cs_resP@txString = f@title 245 298 cs_resP@txFuncCode = "~" ; necessary for title 246 299 cs_resP@txFontHeightF = .02 300 247 301 248 302 if ( mode .eq. "Fill" ) then … … 268 322 ; ********************************************* 269 323 270 t = f->time 271 nt = dimsizes(t) 272 273 ; ********************************************* 324 t_all = f->time 325 nt = dimsizes(t_all) 326 delta_t = t_all(nt-1)/nt 327 328 ; **************************************************** 274 329 ; start of time step and different types of mistakes that could be done 275 ; ********************************************* 330 ; **************************************************** 276 331 277 332 if ( .not. isvar("start_time_step") ) then 278 start_time_step = 0 279 if (parameter(13) .NE. "1") then 280 if (parameter(13) .LT. "1") 281 print(" ") 282 print("Begin with time step 1") 333 start_time_step=t_all(0)/3600 334 if (parameter(13) .NE. "t(0)") then 335 if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600) 336 print(" ") 337 print("'start_time_step' = "+ parameter(13) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 338 print(" ") 339 print("Please select another 'start_time_step'") 283 340 print(" ") 284 341 exit 285 342 end if 286 if (stringtointeger(parameter(13)) .GT. nt) 287 print(" ") 288 print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt)) 343 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600) 344 print(" ") 345 print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 346 print(" ") 347 print("Please select another 'start_time_step'") 289 348 print(" ") 290 349 exit 291 350 end if 292 start_time_step = stringtointeger(parameter(13))-1351 start_time_step=stringtodouble(parameter(13)) 293 352 end if 294 353 else 295 if (start_time_step .LE. 0) 296 print(" ") 297 print("Begin with time step 1") 354 if (start_time_step .GT. t_all(nt-1)/3600) 355 print(" ") 356 print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 357 print(" ") 358 print("Please select another 'start_time_step'") 298 359 print(" ") 299 360 exit 300 361 end if 301 if (start_time_step .GT. nt) 302 print(" ") 303 print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt)) 362 if (start_time_step .LT. t_all(0)/3600) 363 print(" ") 364 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 365 print(" ") 366 print("Please select another 'start_time_step'") 304 367 print(" ") 305 368 exit 306 369 end if 307 start_time_step = start_time_step - 1 308 end if 309 370 end if 371 start_time_step = start_time_step*3600 372 do i=0,nt-1 373 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then 374 st=i 375 break 376 end if 377 end do 378 310 379 ; **************************************************** 311 380 ; end of time step and different types of mistakes that could be done … … 313 382 314 383 if ( .not. isvar("end_time_step") ) then 315 end_time_step = nt-1 316 if (parameter(15) .NE. "nt") then 317 if (parameter(15) .LE. "0") 318 print(" ") 319 print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ") 384 end_time_step = t_all(nt-1)/3600 385 if (parameter(15) .NE. "t(end)") then 386 if (stringtodouble(parameter(15)) .LT. t_all(0)/3600) 387 print(" ") 388 print("'end_time_step' = "+parameter(15)+ "h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 389 print(" ") 390 print("Please select another 'end_time_step'") 320 391 print(" ") 321 392 exit 322 393 end if 323 if (stringtointeger(parameter(15)) .GT. nt) 324 print(" ") 325 print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt)) 394 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600) 395 print(" ") 396 print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 397 print(" ") 398 print("Please select another 'end_time_step'") 326 399 print(" ") 327 400 exit 328 401 end if 329 if (stringtointeger(parameter(15)) .LT. stringtointeger(parameter(13)) ) 330 print(" ") 331 print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(15)) 402 if (stringtodouble(parameter(15)) .LT. start_time_step/3600) 403 print(" ") 404 print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+parameter(13)+"h") 405 print(" ") 406 print("Please select another 'start_time_step' or 'end_time_step'") 332 407 print(" ") 333 408 exit 334 409 end if 335 end_time_step = stringto integer(parameter(15))-1410 end_time_step = stringtodouble(parameter(15)) 336 411 end if 337 412 else 338 if (end_time_step .LE. 0) 339 print(" ") 340 print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ") 413 if (end_time_step .LT. t_all(0)/3600) 414 print(" ") 415 print("'end_time_step' = "+end_time_step+ "h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 416 print(" ") 417 print("Please select another 'end_time_step'") 341 418 print(" ") 342 419 exit 343 420 end if 344 if (end_time_step .GT. nt) 345 print(" ") 346 print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt)) 347 print(" ") 421 if (end_time_step .GT. t_all(nt-1)/3600) 422 print(" ") 423 print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 424 print(" ") 425 print("Please select another 'end_time_step'") 426 print(" ") 348 427 exit 349 428 end if 350 if (end_time_step .LT. start_time_step) 351 print(" ") 352 print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step) 429 if (end_time_step .LT. start_time_step/3600) 430 print(" ") 431 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") 432 print(" ") 433 print("Please select another 'start_time_step' or 'end_time_step'") 353 434 print(" ") 354 435 exit 355 436 end if 356 end_time_step = end_time_step-1 357 end if 358 437 end if 438 end_time_step = end_time_step*3600 439 do i=0,nt-1 440 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then 441 et=i 442 break 443 end if 444 end do 445 446 delete(start_time_step) 447 start_time_step=round(st,3) 448 delete(end_time_step) 449 end_time_step=round(et,3) 450 451 print(" ") 452 print("Output from "+t_all(start_time_step)/3600+"h = "+t_all(start_time_step)+"s => index = "+start_time_step) 453 print(" till "+t_all(end_time_step)/3600+"h = "+t_all(end_time_step)+"s => index = "+end_time_step) 454 print(" ") 455 359 456 no_time=(end_time_step-start_time_step)+1 360 457 … … 365 462 if (vector .EQ. 1) then 366 463 if ( .not. isvar("plotvec") ) then 367 plotvec = parameter( 69)464 plotvec = parameter(45) 368 465 end if 369 466 if ( .not. isvar("vec1") ) then 370 vec1 = parameter( 65)371 if (parameter( 65) .EQ. "vec1") then467 vec1 = parameter(41) 468 if (parameter(41) .EQ. "vec1") then 372 469 print(" ") 373 470 print("Please indicate Vector 1 ('vec1') for Vector-Plot") … … 377 474 end if 378 475 if ( .not. isvar("vec2") ) then 379 vec2 = parameter( 67)380 if (parameter( 67) .EQ. "vec2") then476 vec2 = parameter(43) 477 if (parameter(43) .EQ. "vec2") then 381 478 print(" ") 382 479 print("Please indicate Vector 2 ('vec2') for Vector-Plot") … … 395 492 ; **************************************************** 396 493 397 do varn=dim-1,0,1 398 399 if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x" .or. vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or. vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or. vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "ind_x_yz") then 400 check = False 494 if (xyc .EQ. 1) then 495 do varn=0,dim-1 496 if (vNam(varn) .eq. "xu" .OR. vNam(varn) .eq. "x")then 497 x_d = f->$vNam(varn)$ 498 xdim = dimsizes(x_d)-1 499 delta_x = x_d(1)-x_d(0) 500 break 501 end if 502 end do 503 do varn=0,dim-1 504 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y")then 505 y_d = f->$vNam(varn)$ 506 ydim = dimsizes(y_d)-1 507 delta_y = y_d(1)-y_d(0) 508 break 509 end if 510 end do 511 do varn=0,dim-1 512 if (vNam(varn) .eq. "zu_3d" .OR. vNam(varn) .eq. "zw_3d")then 513 z_d = f->$vNam(varn)$ 514 zdim = dimsizes(z_d)-1 515 delta_z = 0 516 break 517 else 518 if (vNam(varn) .eq. "zu_xy" .OR. vNam(varn) .eq. "zw_xy") then 519 z_d = f->$vNam(varn)$ 520 zdim = dimsizes(z_d)-1 521 delta_z = -1.d 522 break 523 else 524 zdim = 0 525 delta_z = -1.d 526 end if 527 end if 528 end do 529 end if 530 if (xzc .EQ. 1) then 531 do varn=0,dim-1 532 if (vNam(varn) .eq. "xu" .OR. vNam(varn) .eq. "x") then 533 x_d = f->$vNam(varn)$ 534 xdim = dimsizes(x_d)-1 535 delta_x = x_d(1)-x_d(0) 536 break 537 end if 538 end do 539 do varn=0,dim-1 540 if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then 541 z_d = f->$vNam(varn)$ 542 zdim = dimsizes(z_d)-1 543 delta_z = z_d(1)-z_d(0) 544 break 545 end if 546 end do 547 do varn=0,dim-1 548 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then 549 y_d = f->$vNam(varn)$ 550 ydim = dimsizes(y_d)-1 551 delta_y = y_d(1)-y_d(0) 552 break 553 else 554 if (vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz") then 555 y_d = f->$vNam(varn)$ 556 ydim = dimsizes(y_d)-1 557 delta_y = -1.d 558 break 559 else 560 ydim = 0 561 delta_y = -1.d 562 end if 563 end if 564 end do 565 end if 566 if (yzc .EQ. 1) then 567 do varn=0,dim-1 568 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then 569 y_d = f->$vNam(varn)$ 570 ydim = dimsizes(y_d)-1 571 delta_y = y_d(1)-y_d(0) 572 break 573 end if 574 end do 575 do varn=0,dim-1 576 if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then 577 z_d = f->$vNam(varn)$ 578 zdim = dimsizes(z_d)-1 579 delta_z = z_d(1)-z_d(0) 580 break 581 end if 582 end do 583 do varn=0,dim-1 584 if (vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "x") 585 x_d = f->$vNam(varn)$ 586 xdim = dimsizes(x_d)-1 587 delta_x = x_d(1)-x_d(0) 588 break 589 else 590 if (vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "x_yz" ) then 591 x_d = f->$vNam(varn)$ 592 xdim = dimsizes(x_d)-1 593 delta_x = -1.d 594 break 595 else 596 xdim = 0 597 delta_x = -1.d 598 end if 599 end if 600 end do 601 end if 602 603 ; **************************************************** 604 ; set up ranges of x-, y- and z-coordinates 605 ; **************************************************** 606 607 if ( .not. isvar("xs") ) then 608 xs = 0.0d 609 xstart = 0 610 if (parameter(63) .NE. "x0") then 611 if (delta_x .EQ. -1) then 612 print(" ") 613 print("You cannot choose a start value for x, there are preseted layers for x") 614 print(" ") 615 xstart=0 616 else 617 if (stringtodouble(parameter(63)) .LT. 0-delta_x/2) then 618 print(" ") 619 print("range start for x-coordinate = "+parameter(63)+"m is lower than first value x = "+0+"m or xu = "+(0-delta_x/2)+"m") 620 print(" ") 621 exit 622 end if 623 if (xyc .EQ. 1 .OR. xzc .EQ. 1) then 624 if (stringtodouble(parameter(63)) .GE. xdim*delta_x) then 625 print(" ") 626 print("range start for x-coordinate = "+parameter(63)+"m is equal or greater than last value = "+xdim*delta_x+"m") 627 print(" ") 628 exit 629 end if 630 else 631 if (stringtodouble(parameter(63)) .GT. xdim*delta_x) then 632 print(" ") 633 print("range start for x-coordinate = "+parameter(63)+"m is greater than last value = "+xdim*delta_x+"m") 634 print(" ") 635 exit 636 end if 637 end if 638 xs = stringtodouble(parameter(63)) 639 end if 640 end if 641 else 642 if (delta_x .EQ. -1) then 643 print(" ") 644 print("You cannot choose a start value for x, there are preseted layers for x") 645 print(" ") 646 xstart=0 401 647 else 402 check = True 403 end if 404 if ( isvar("var") ) then 405 check = isStrSubset( var,","+vNam(varn)+",") 406 end if 407 if (parameter(21) .NE. "variables") then 408 var = parameter(21) 409 check = isStrSubset( var,","+vNam(varn)+"," ) 410 end if 411 412 if(check) then 413 print(vNam(varn)) 414 data_all = f->$vNam(varn)$ 415 416 ; **************************************************** 417 ; set up ranges of x-, y- and z-coordinates 418 ; **************************************************** 419 420 xdim = dimsizes(data_all(0,0,0,:)) - 1 421 ydim = dimsizes(data_all(0,0,:,0)) - 1 422 zdim = dimsizes(data_all(0,:,0,0)) - 1 423 424 if ( .not. isvar("xe")) then ; output x-coordinate range end (in index) 425 xe = xdim 426 if (parameter(53) .NE. "xdim") then 427 if (stringtointeger(parameter(53)) .GT. xdim) then 428 print(" ") 429 print("range end for x-coordinate = "+parameter(53)+" is higher than available dimensions = "+xdim) 430 print(" ") 648 if (xs .LT. 0-delta_x/2) then 649 print(" ") 650 print("range start for x-coordinate = "+xs+"m is lower than first value = "+(0-delta_x/2)+"m") 651 print(" ") 652 exit 653 end if 654 if (xyc .EQ. 1 .OR. xzc .EQ. 1) then 655 if (xs .GE. xdim*delta_x) then 656 print(" ") 657 print("range start for x-coordinate = "+xs+"m is equal or greater than last value = "+xdim*delta_x+"m") 658 print(" ") 659 exit 660 end if 661 else 662 if (xs .GT. xdim*delta_x) then 663 print(" ") 664 print("range start for x-coordinate = "+xs+"m is greater than last value = "+xdim*delta_x+"m") 665 print(" ") 666 exit 667 end if 668 end if 669 end if 670 end if 671 672 if ( .not. isvar("ys") ) then 673 ys = 0.0d 674 ystart = 0 675 if (parameter(67) .NE. "y0") then 676 if (delta_y .EQ. -1) then 677 print(" ") 678 print("You cannot choose a start value for y, there are preseted layers for y") 679 print(" ") 680 ystart=0 681 else 682 if (stringtodouble(parameter(67)) .LT. 0-delta_y/2) then 683 print(" ") 684 print("range start for y-coordinate = "+parameter(67)+"m is lower than first value = "+0-delta_y/2+"m") 685 print(" ") 686 exit 687 end if 688 if (xyc .EQ. 1 .OR. yzc .EQ. 1) then 689 if (stringtodouble(parameter(67)) .GE. ydim*delta_y) then 690 print(" ") 691 print("range start for y-coordinate = "+parameter(67)+"m is equal or greater than last value = "+ydim*delta_y+"m") 692 print(" ") 431 693 exit 432 694 end if 433 if (stringtointeger(parameter(53)) .LT. 0 .OR. stringtointeger(parameter(53)) .LT. xs) then 434 print(" ") 435 print("range end for x-coordinate = "+parameter(53)+" is too small") 695 else 696 if (stringtodouble(parameter(67)) .GT. ydim*delta_y) then 697 print(" ") 698 print("range start for y-coordinate = "+parameter(67)+"m is greater than last value = "+ydim*delta_y+"m") 436 699 print(" ") 437 700 exit 438 701 end if 439 xe = stringtointeger(parameter(53)) 440 end if 441 else 442 if (xe .GT. xdim) then 443 print(" ") 444 print("range end for x-coordinate = "+xe+" is higher than available dimensions = "+xdim) 445 print(" ") 446 exit 447 end if 448 if (xe .LT. 0 .OR. xe .LT. xs) then 449 print(" ") 450 print("range end for x-coordinate = "+xe+" is too small") 451 print(" ") 452 exit 453 end if 454 end if 455 456 if ( .not. isvar("ye")) then ; output y-coordinate range end (in index) 457 ye = ydim 458 if (parameter(57) .NE. "ydim") then 459 if (stringtointeger(parameter(57)) .GT. ydim) then 460 print(" ") 461 print("range end for y-coordinate = "+parameter(57)+" is higher than available dimensions = "+ydim) 702 end if 703 ys = stringtodouble(parameter(67)) 704 end if 705 end if 706 else 707 if (delta_y .EQ. -1) then 708 print(" ") 709 print("You cannot choose a start value for y, there are preseted layers for y") 710 print(" ") 711 ystart=0 712 else 713 if (ys .LT. 0-delta_y/2) then 714 print(" ") 715 print("range start for y-coordinate = "+ys+"m is lower than first value = "+0-delta_y/2+"m") 716 print(" ") 717 exit 718 end if 719 if (xyc .EQ. 1 .OR. yzc .EQ. 1) then 720 if (ys .GE. ydim*delta_y) then 721 print(" ") 722 print("range start for y-coordinate = "+ys+"m is equal or greater than last value = "+ydim*delta_y+"m") 723 print(" ") 724 exit 725 end if 726 else 727 if (ys .GT. ydim*delta_y) then 728 print(" ") 729 print("range start for y-coordinate = "+ys+"m is greater than last value = "+ydim*delta_y+"m") 730 print(" ") 731 exit 732 end if 733 end if 734 end if 735 end if 736 737 if ( .not. isvar("zs") ) then ; start of z-coordinate range 738 zs = 0 739 if (parameter(71) .NE. "z0") then 740 if (delta_z .EQ. -1) then 741 print(" ") 742 print("You cannot choose a start value for z, there are preseted layers for z") 743 print(" ") 744 else 745 print(" ") 746 print("Please mind to indicate start and end ranges for the z-coordinate in") 747 print("indices not in 'meters'. Corresponding index and meter:") 748 print(" ") 749 print(" = "+z_d+" m") 750 print(" ") 751 if (stringtointeger(parameter(71)) .LT. 0) then 752 print(" ") 753 print("range start for z-coordinate = "+parameter(71)+" is lower than first gridpoint = 0") 754 print(" ") 755 exit 756 end if 757 if (xzc .EQ. 1 .OR. yzc .EQ. 1) then 758 if (stringtointeger(parameter(71)) .GE. zdim) then 759 print(" ") 760 print("range start for z-coordinate = "+parameter(71)+" is equal or greater than last gridpoint = "+zdim) 462 761 print(" ") 463 762 exit 464 763 end if 465 if (stringtointeger(parameter(57)) .LT. 0 .OR. stringtointeger(parameter(57)) .LT. ys) then 466 print(" ") 467 print("range end for y-coordinate = "+parameter(57)+" is too small") 764 else 765 if (stringtodouble(parameter(71)) .GT. zdim) then 766 print(" ") 767 print("range start for z-coordinate = "+parameter(71)+" is greater than last gridpoint = "+zdim) 468 768 print(" ") 469 769 exit 470 770 end if 471 ye = stringtointeger(parameter(57)) 771 end if 772 zs = stringtointeger(parameter(71)) 773 end if 774 end if 775 else 776 if (delta_z .EQ. -1) then 777 print(" ") 778 print("You cannot choose a start value for z, there are preseted layers for z") 779 print(" ") 780 else 781 if (zs .LT. 0) then 782 print(" ") 783 print("range start for z-coordinate = "+zs+" is lower than first gridpoint = 0") 784 print(" ") 785 exit 786 end if 787 if (xzc .EQ. 1 .OR. yzc .EQ. 1) then 788 if (zs .GE. zdim) then 789 print(" ") 790 print("range start for z-coordinate = "+zs+" is equal or greater than last gridpoint = "+zdim) 791 print(" ") 792 exit 793 end if 794 else 795 if (zs .GT. zdim) then 796 print(" ") 797 print("range start for z-coordinate = "+zs+" is greater than last gridpoint = "+zdim) 798 print(" ") 799 exit 800 end if 801 end if 802 end if 803 end if 804 805 if ( .not. isvar("xe")) then 806 xe = xdim*delta_x 807 xend = xdim 808 if (parameter(65) .NE. "xdim") then 809 if (delta_x .EQ. -1) then 810 print(" ") 811 print("You cannot choose an end value for x, there are preseted layers for x") 812 print(" ") 813 xend=xdim 814 else 815 if (stringtodouble(parameter(65)) .GT. xdim*delta_x) then 816 print(" ") 817 print("range end for x-coordinate = "+parameter(65)+"m is greater than last value = "+xdim*delta_x+"m") 818 print(" ") 819 exit 472 820 end if 473 else 474 if (ye .GT. ydim) then 475 print(" ") 476 print("range end for y-coordinate = "+ye+" is higher than available dimensions = "+ydim) 477 print(" ") 478 exit 479 end if 480 if (ye .LT. 0 .OR. ye .LT. ys) then 481 print(" ") 482 print("range end for y-coordinate = "+ye+" is too small") 483 print(" ") 484 exit 485 end if 486 end if 487 488 if ( .not. isvar("ze")) then ; output z-coordinate range end (in index) 489 ze = zdim 490 if (parameter(61) .NE. "zdim") then 491 if (stringtointeger(parameter(61)) .GT. zdim) then 492 print(" ") 493 print("range end for z-coordinate = "+parameter(61)+" is higher than available dimensions = "+zdim) 821 if (xyc .EQ. 1 .OR. xzc .EQ. 1) then 822 if (stringtodouble(parameter(65)) .LE. 0-delta_x/2) 823 print(" ") 824 print("range end for x-coordinate = "+parameter(65)+"m is equal or lower than first value = "+(0-delta_x/2)+"m") 494 825 print(" ") 495 826 exit 496 827 end if 497 if (stringto integer(parameter(61)) .LT. 0 .OR. stringtointeger(parameter(61)) .LT. zs) then498 print(" ") 499 print("range end for z-coordinate = "+parameter(61)+" is too small")828 if (stringtodouble(parameter(65)) .LE. xs) then 829 print(" ") 830 print("range end for x-coordinate = "+parameter(65)+"m is equal or lower than start range = "+xs+"m") 500 831 print(" ") 501 832 exit 502 833 end if 503 ze = stringtointeger(parameter(61)) 834 else 835 if (stringtodouble(parameter(65)) .LT. 0-delta_x/2) 836 print(" ") 837 print("range end for x-coordinate = "+parameter(65)+"m is lower than first value = "+(0-delta_x/2)+"m") 838 print(" ") 839 exit 840 end if 841 if (stringtodouble(parameter(65)) .LT. xs) then 842 print(" ") 843 print("range end for x-coordinate = "+parameter(65)+"m is lower than start range = "+xs+"m") 844 print(" ") 845 exit 846 end if 847 end if 848 xe = stringtodouble(parameter(65)) 849 end if 850 end if 851 else 852 if (delta_x .EQ. -1) then 853 print(" ") 854 print("You cannot choose an end value for x, there are preseted layers for x") 855 print(" ") 856 xend=xdim 857 else 858 if (xe .GT. xdim*delta_x) then 859 print(" ") 860 print("range end for x-coordinate = "+xe+"m is greater than last value = "+xdim*delta_x+"m") 861 print(" ") 862 exit 863 end if 864 if (xyc .EQ. 1 .OR. xzc .EQ. 1) then 865 if (xe .LE. 0-delta_x/2) 866 print(" ") 867 print("range end for x-coordinate = "+xe+"m is equal or lower than first value = "+(0-delta_x/2)+"m") 868 print(" ") 869 exit 870 end if 871 if (xe .LE. xs) then 872 print(" ") 873 print("range end for x-coordinate = "+xe+"m is equal or lower than start range = "+xs+"m") 874 print(" ") 875 exit 876 end if 877 if (stringtodouble(xe .EQ. xs+1)) then 878 print(" ") 879 print("range end for x-coordinate = "+xe+"m must be at least two more gridpoints greater than start range = "+xs+"m") 880 print(" ") 881 exit 882 end if 883 else 884 if (xe .LT. 0-delta_x/2) 885 print(" ") 886 print("range end for x-coordinate = "+xe+"m is lower than first value = "+(0-delta_x/2)+"m") 887 print(" ") 888 exit 889 end if 890 if (xe .LT. xs) then 891 print(" ") 892 print("range end for x-coordinate = "+xe+"m is lower than start range = "+xs+"m") 893 print(" ") 894 exit 895 end if 896 end if 897 end if 898 end if 899 900 if ( .not. isvar("ye")) then 901 ye = ydim*delta_y 902 yend = ydim 903 if (parameter(69) .NE. "ydim") then 904 if (delta_y .EQ. -1) then 905 print(" ") 906 print("You cannot choose an end value for y, there are preseted layers for y") 907 print(" ") 908 yend=ydim 909 else 910 if (stringtodouble(parameter(69)) .GT. ydim*delta_y) then 911 print(" ") 912 print("range end for y-coordinate = "+parameter(69)+"m is greater than last value = "+ydim*delta_y+"m") 913 print(" ") 914 exit 504 915 end if 505 else 506 if (ze .GT. zdim) then 507 print(" ") 508 print("range end for z-coordinate = "+ze+" is higher than available dimensions = "+zdim) 916 if (xyc .EQ. 1 .OR. yzc .EQ. 1) then 917 if (stringtodouble(parameter(69)) .LE. 0-delta_y/2) 918 print(" ") 919 print("range end for y-coordinate = "+parameter(69)+"m is equal or lower than first value = "+(0-delta_y/2)+"m") 920 print(" ") 921 exit 922 end if 923 if (stringtodouble(parameter(69)) .LE. ys) then 924 print(" ") 925 print("range end for y-coordinate = "+parameter(69)+"m is equal or lower than start range = "+ys+"m") 926 print(" ") 927 exit 928 end if 929 if (stringtodouble(parameter(69)) .EQ. ys+1) then 930 print(" ") 931 print("range end for y-coordinate = "+parameter(69)+"m must be at least two more gridpoints greater than start range = "+ys+"m") 932 print(" ") 933 exit 934 end if 935 else 936 if (stringtodouble(parameter(69)) .LT. 0-delta_y/2) 937 print(" ") 938 print("range end for y-coordinate = "+parameter(69)+"m is lower than first value = "+(0-delta_y/2)+"m") 939 print(" ") 940 exit 941 end if 942 if (stringtodouble(parameter(69)) .LT. ys) then 943 print(" ") 944 print("range end for y-coordinate = "+parameter(69)+"m is lower than start range = "+ys+"m") 945 print(" ") 946 exit 947 end if 948 end if 949 ye = stringtodouble(parameter(69)) 950 end if 951 end if 952 else 953 if (delta_y .EQ. -1) then 954 print(" ") 955 print("You cannot choose an end value for y, there are preseted layers for y") 956 print(" ") 957 yend=ydim 958 else 959 if (ye .GT. ydim*delta_y) then 960 print(" ") 961 print("range end for y-coordinate = "+ye+"m is greater than last value = "+ydim*delta_y+"m") 962 print(" ") 963 exit 964 end if 965 if (xyc .EQ. 1 .OR. yzc .EQ. 1) then 966 if (ye .LE. 0-delta_y/2) 967 print(" ") 968 print("range end for y-coordinate = "+ye+"m is equal or lower than first value = "+(0-delta_y/2)+"m") 969 print(" ") 970 exit 971 end if 972 if (ye .LE. ys) then 973 print(" ") 974 print("range end for y-coordinate = "+ye+"m is equal or lower than start range = "+ys+"m") 975 print(" ") 976 exit 977 end if 978 if (ye .EQ. ys+1) then 979 print(" ") 980 print("range end for y-coordinate = "+ye+"m must be at least two more gridpoints greater than start range = "+ys+"m") 981 print(" ") 982 exit 983 end if 984 else 985 if (ye .LT. 0-delta_y/2) 986 print(" ") 987 print("range end for y-coordinate = "+ye+"m is lower than first value = "+(0-delta_y/2)+"m") 988 print(" ") 989 exit 990 end if 991 if (ye .LT. ys) then 992 print(" ") 993 print("range end for y-coordinate = "+ye+"m is lower than start range = "+ys+"m") 994 print(" ") 995 exit 996 end if 997 end if 998 end if 999 end if 1000 1001 if ( .not. isvar("ze")) then 1002 ze = zdim 1003 if (parameter(73) .NE. "zdim") then 1004 if (delta_z .EQ. -1) then 1005 print(" ") 1006 print("You cannot choose an end value for z, there are preseted layers for z") 1007 print(" ") 1008 else 1009 if (stringtointeger(parameter(73)) .GT. zdim) then 1010 print(" ") 1011 print("range end for z-coordinate = "+parameter(73)+" is greater than last gridpoint = "+zdim) 509 1012 print(" ") 510 exit 511 end if 512 if (ze .LT. 0 .OR. ze .LT. zs) then 513 print(" ") 514 print("range end for z-coordinate = "+ze+" is too small") 515 print(" ") 516 exit 517 end if 518 end if 519 delete(data_all) 520 end if 521 end do 522 1013 exit 1014 end if 1015 if (xzc .EQ. 1 .OR. yzc .EQ. 1) then 1016 if (stringtointeger(parameter(73)) .LE. 0) 1017 print(" ") 1018 print("range end for z-coordinate = "+parameter(73)+" is equal or lower than first gridpoint = 0") 1019 print(" ") 1020 exit 1021 end if 1022 if (stringtointeger(parameter(73)) .LE. zs) then 1023 print(" ") 1024 print("range end for z-coordinate = "+parameter(73)+" is equal or lower than start range = "+zs) 1025 print(" ") 1026 exit 1027 end if 1028 if (stringtodouble(parameter(73)) .EQ. zs+1) then 1029 print(" ") 1030 print("range end for z-coordinate = "+parameter(73)+" must be at least two more gridpoints greater than start range = "+zs) 1031 print(" ") 1032 exit 1033 end if 1034 else 1035 if (stringtointeger(parameter(73)) .LT. 0) 1036 print(" ") 1037 print("range end for z-coordinate = "+parameter(73)+" is lower than first gridpoint = 0") 1038 print(" ") 1039 exit 1040 end if 1041 if (stringtointeger(parameter(73)) .LT. zs) then 1042 print(" ") 1043 print("range end for z-coordinate = "+parameter(73)+" is lower than start range = "+zs) 1044 print(" ") 1045 exit 1046 end if 1047 end if 1048 ze = stringtointeger(parameter(73)) 1049 end if 1050 end if 1051 else 1052 if (delta_z .EQ. -1) then 1053 print(" ") 1054 print("You cannot choose an end value for z, there are preseted layers for z") 1055 print(" ") 1056 ze = zdim 1057 else 1058 if (ze .GT. zdim) then 1059 print(" ") 1060 print("range end for z-coordinate = "+ze+" is greater than last gridpoint = "+zdim) 1061 print(" ") 1062 exit 1063 end if 1064 if (xzc .EQ. 1 .OR. yzc .EQ. 1) then 1065 if (ze .LE. 0) 1066 print(" ") 1067 print("range end for z-coordinate = "+ze+" is equal or lower than first gridpoint = 0") 1068 print(" ") 1069 exit 1070 end if 1071 if (ze .LE. zs) then 1072 print(" ") 1073 print("range end for z-coordinate = "+ze+" is equal or lower than start range = "+zs) 1074 print(" ") 1075 exit 1076 end if 1077 if (ze .EQ. zs+1) then 1078 print(" ") 1079 print("range end for z-coordinate = "+ze+" must be at least two more gridpoints greater than start range = "+zs) 1080 print(" ") 1081 exit 1082 end if 1083 else 1084 if (ze .LT. 0) 1085 print(" ") 1086 print("range end for z-coordinate = "+ze+" is lower than first gridpoint = 0") 1087 print(" ") 1088 exit 1089 end if 1090 if (ze .LT. zs) then 1091 print(" ") 1092 print("range end for z-coordinate = "+ze+" is lower than start range = "+zs) 1093 print(" ") 1094 exit 1095 end if 1096 end if 1097 end if 1098 end if 1099 1100 if (delta_x .NE. -1) then 1101 do i=0,xdim 1102 if (xs .GT. x_d(i)-delta_x/2 .AND. xs .LE. x_d(i)+delta_x/2)then 1103 xstart=i 1104 break 1105 end if 1106 end do 1107 do i=0,xdim 1108 if (xe .GT. x_d(i)-delta_x/2 .AND. xe .LE. x_d(i)+delta_x/2)then 1109 xend=i 1110 break 1111 end if 1112 end do 1113 end if 1114 if (delta_y .NE. -1) then 1115 do i=0,xdim 1116 if (ys .GT. y_d(i)-delta_y/2 .AND. ys .LE. y_d(i)+delta_y/2)then 1117 ystart=i 1118 break 1119 end if 1120 end do 1121 do i=0,xdim 1122 if (ye .GT. y_d(i)-delta_y/2 .AND. ye .LE. y_d(i)+delta_y/2)then 1123 yend=i 1124 break 1125 end if 1126 end do 1127 end if 1128 1129 delete(xs) 1130 delete(xe) 1131 delete(ys) 1132 delete(ye) 1133 1134 xs=xstart 1135 xe=xend 1136 ys=ystart 1137 ye=yend 1138 1139 if (xyc .EQ. 1 .OR. xzc .EQ.1)then 1140 if (xe .EQ. xs+1) then 1141 print(" ") 1142 print("range end for x-coordinate="+parameter(65)+"m(=>value on file="+xe*delta_x+"m) must be at least two") 1143 print("more gridpoints(="+2*delta_x+"m) greater than start range="+parameter(63)+"m(=>value on file="+xs*delta_x+"m)") 1144 print(" ") 1145 exit 1146 end if 1147 end if 1148 if (xyc .EQ. 1 .OR. yzc .EQ.1)then 1149 if (ye .EQ. ys+1) then 1150 print(" ") 1151 print("range end for y-coordinate="+parameter(69)+"m(=>value on file="+ye*delta_y+"m) must be at least two") 1152 print("more gridpoints(="+2*delta_y+"m) greater than start range="+parameter(67)+"m(=>value on file="+ys*delta_y+"m)") 1153 print(" ") 1154 exit 1155 end if 1156 end if 1157 if (xzc .EQ. 1 .OR. yzc .EQ.1)then 1158 if (ze .EQ. zs+1) then 1159 print(" ") 1160 print("range end for x-coordinate="+parameter(73)+"(=> value on file="+ze+") must be at least two") 1161 print("more gridpoints greater than start range="+parameter(71)+"(=>value on file="+zs+")") 1162 print(" ") 1163 exit 1164 end if 1165 end if 1166 523 1167 if (xyc .EQ. 1) then 524 1168 no_layer = (ze-zs)+1 1169 data = new((/dim,nt,zdim+1,(ye-ys)+1,(xe-xs)+1/),float) 525 1170 end if 526 1171 if (xzc .EQ. 1) then 527 1172 no_layer = (ye-ys)+1 1173 data = new((/dim,nt,(ze-zs)+1,ydim+1,(xe-xs)+1/),float) 528 1174 end if 529 1175 if (yzc .EQ. 1) then 530 1176 no_layer = (xe-xs)+1 531 end if 532 533 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1177 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,xdim+1/),float) 1178 end if 1179 1180 MinVal = new(dim,float) 1181 MaxVal = new(dim,float) 534 1182 535 1183 ; **************************************************** … … 571 1219 572 1220 data_all = f->$vNam(varn)$ 573 1221 574 1222 if (vector .EQ. 1) then 575 1223 check_vec1 = isStrSubset( vec1,","+vNam(varn)+",") … … 590 1238 end if 591 1239 592 if(check) then 1240 if(check) then 593 1241 594 1242 no_var=no_var+1 … … 603 1251 end if 604 1252 605 data(varn,:,:,:,:)=data_all(0:nt-1,zs:ze,ys:ye,xs:xe) 1253 if (xyc .EQ. 1) then 1254 data(varn,:,:,:,:)=data_all(:,:,ys:ye,xs:xe) 1255 end if 1256 if ( xzc .eq. 1 ) then 1257 data(varn,:,:,:,:)=data_all(:,zs:ze,:,xs:xe) 1258 end if 1259 if ( yzc .eq. 1) then 1260 data(varn,:,:,:,:)=data_all(:,zs:ze,ys:ye,:) 1261 end if 1262 606 1263 if (check_vec1) then 607 1264 vect1=data_all … … 615 1272 data!2 = "z" 616 1273 data!3 = "y" 617 data!4 = "x" 1274 data!4 = "x" 1275 1276 MinVal(varn) = min(data(varn,:,:,:,:)) 1277 MaxVal(varn) = max(data(varn,:,:,:,:)) 618 1278 619 1279 end if … … 622 1282 623 1283 end do 624 625 plot_panel=new((/no_time*no_layer*no_var/),graphic) 1284 1285 if (no_var .EQ. 0) then 1286 print(" ") 1287 print("Please select a variable 'var=' or use the default value") 1288 print(" ") 1289 print("Your selection '"+var+"' does not exist on the input file") 1290 print(" ") 1291 exit 1292 end if 626 1293 627 1294 if (vector .EQ. 1) then … … 648 1315 gsn_define_colormap(wks_ps,"rainbow+white") 649 1316 650 plot=new((/no_time*no_layer*no_var /),graphic)651 1317 plot=new((/no_time*no_layer*no_var*2/),graphic) 1318 652 1319 page = 0 653 1320 n=0 654 655 print(" plots sorted by '"+sort+"'")1321 print(" ") 1322 print("Plots sorted by '"+sort+"'") 656 1323 print(" ") 657 1324 … … 660 1327 ; *************************************************** 661 1328 1329 if (vector .EQ. 1 .AND. parameter(45) .EQ. "plotvec") then 1330 do lo = los, loe 1331 do li = lis, lie 1332 level = "=" + data&z(lo) + "m" 1333 vecres = True ; vector only resources 1334 vecres@gsnDraw = False ; don't draw 1335 vecres@gsnFrame = False ; don't advance frame 1336 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1337 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1338 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1339 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 1340 vecres@gsnLeftString = "t=" + data&t(li) +"s z"+level 1341 vecres@tiXAxisString = " " 1342 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1343 n=n+1 1344 end do 1345 end do 1346 end if 1347 662 1348 check = True 663 1349 664 1350 do varn=dim-1,0,1 665 1351 … … 682 1368 683 1369 if(check) then 684 1370 print(vNam(varn)) 1371 space=(MaxVal(varn)-MinVal(varn))/24 1372 1373 cs_res@cnMinLevelValF = MinVal(varn) 1374 cs_res@cnMaxLevelValF = MaxVal(varn) 1375 1376 cs_res@cnLevelSpacingF = space 1377 685 1378 ; **************************************************** 686 1379 ; loops over time and layer 687 1380 ; **************************************************** 688 1381 1382 689 1383 do lo = los, loe 690 do li = lis, lie 691 1384 do li = lis, lie 1385 692 1386 ; **************************************************** 693 1387 ; xy cross section … … 699 1393 cs_res@tiYAxisString = "y [m]" 700 1394 cs_res@gsnLeftString = "Plot of "+vNam(varn) 701 1395 702 1396 if ( sort .eq. "time" ) then 703 1397 if ( data&z(lo) .eq. -1 ) then … … 706 1400 level = "=" + data&z(lo) + "m" 707 1401 end if 708 cs_res@gsnCenterString = "t ime=" + data&t(li) +"s z"+level1402 cs_res@gsnCenterString = "t=" + data&t(li) +"s z"+level 709 1403 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,lo,:,:),cs_res) 710 if (vector .EQ. 1) then 711 if (check_vecp) 712 vecres = True ; vector only resources 713 vecres@gsnDraw = False ; don't draw 714 vecres@gsnFrame = False ; don't advance frame 715 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 716 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 717 vecres@vcRefLengthF = 0.05 ; define length of vec ref 718 vecres@gsnRightString = " " ; turn off right string 719 vecres@gsnLeftString = " " ; turn off left string 720 vecres@tiXAxisString = " " 721 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 722 overlay(plot(n), plot_vec) 723 else 724 vecres = True ; vector only resources 725 vecres@gsnDraw = False ; don't draw 726 vecres@gsnFrame = False ; don't advance frame 727 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 728 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 729 vecres@vcRefLengthF = 0.05 ; define length of vec ref 730 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 731 vecres@gsnLeftString = " " ; turn off left string 732 vecres@tiXAxisString = " " 733 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 734 plot(n) = plot_vec 735 end if 1404 if (vector .EQ. 1 .AND. check_vecp) then 1405 vecres = True ; vector only resources 1406 vecres@gsnDraw = False ; don't draw 1407 vecres@gsnFrame = False ; don't advance frame 1408 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1409 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1410 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1411 vecres@gsnRightString = " " 1412 vecres@gsnLeftString = " " 1413 vecres@tiXAxisString = " " 1414 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1415 overlay(plot(n), plot_vec) 736 1416 end if 737 1417 end if 738 1418 739 1419 if ( sort .eq. "layer" ) then 740 1420 if ( data&z(li) .eq. -1 ) then … … 745 1425 cs_res@gsnCenterString = "t=" + data&t(lo) + "s z"+ level 746 1426 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,li,:,:),cs_res) 747 if (vector .EQ. 1) then 748 if (check_vecp) 749 vecres = True ; vector only resources 750 vecres@gsnDraw = False ; don't draw 751 vecres@gsnFrame = False ; don't advance frame 752 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 753 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 754 vecres@vcRefLengthF = 0.05 ; define length of vec ref 755 vecres@gsnRightString = " " ; turn off right string 756 vecres@gsnLeftString = " " ; turn off left string 757 vecres@tiXAxisString = " " 758 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 759 overlay(plot(n), plot_vec) 760 else 761 vecres = True ; vector only resources 762 vecres@gsnDraw = False ; don't draw 763 vecres@gsnFrame = False ; don't advance frame 764 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 765 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 766 vecres@vcRefLengthF = 0.05 ; define length of vec ref 767 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 768 vecres@gsnLeftString = " " ; turn off left string 769 vecres@tiXAxisString = " " 770 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 771 plot(n) = plot_vec 772 end if 1427 if (vector .EQ. 1 .AND. check_vecp) then 1428 vecres = True ; vector only resources 1429 vecres@gsnDraw = False ; don't draw 1430 vecres@gsnFrame = False ; don't advance frame 1431 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1432 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1433 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1434 vecres@gsnRightString = " " ; turn off right string 1435 vecres@gsnLeftString = " " ; turn off left string 1436 vecres@tiXAxisString = " " 1437 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 1438 overlay(plot(n), plot_vec) 773 1439 end if 774 1440 end if … … 784 1450 cs_res@tiYAxisString = "z [m]" 785 1451 cs_res@gsnLeftString = "Plot of "+vNam(varn) 786 1452 787 1453 if ( sort .eq. "time" ) then 788 1454 if ( data&z(lo) .eq. -1 ) then … … 793 1459 cs_res@gsnCenterString = "t=" + data&t(li) + "s y"+ level 794 1460 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,lo,:),cs_res) 795 if (vector .EQ. 1) then 796 if (check_vecp) 797 vecres = True ; vector only resources 798 vecres@gsnDraw = False ; don't draw 799 vecres@gsnFrame = False ; don't advance frame 800 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 801 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 802 vecres@vcRefLengthF = 0.05 ; define length of vec ref 803 vecres@gsnRightString = " " ; turn off right string 804 vecres@gsnLeftString = " " ; turn off left string 805 vecres@tiXAxisString = " " 806 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 807 overlay(plot(n), plot_vec) 808 else 809 vecres = True ; vector only resources 810 vecres@gsnDraw = False ; don't draw 811 vecres@gsnFrame = False ; don't advance frame 812 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 813 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 814 vecres@vcRefLengthF = 0.05 ; define length of vec ref 815 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 816 vecres@gsnLeftString = " " ; turn off left string 817 vecres@tiXAxisString = " " 818 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 819 plot(n) = plot_vec 820 end if 1461 if (vector .EQ. 1 .AND. check_vecp) then 1462 vecres = True ; vector only resources 1463 vecres@gsnDraw = False ; don't draw 1464 vecres@gsnFrame = False ; don't advance frame 1465 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1466 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1467 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1468 vecres@gsnRightString = " " ; turn off right string 1469 vecres@gsnLeftString = " " ; turn off left string 1470 vecres@tiXAxisString = " " 1471 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1472 overlay(plot(n), plot_vec) 821 1473 end if 822 1474 end if … … 830 1482 cs_res@gsnCenterString = "t=" + data&t(lo) + "s y"+ level 831 1483 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,li,:),cs_res) 832 if (vector .EQ. 1) then 833 if (check_vecp) 834 vecres = True ; vector only resources 835 vecres@gsnDraw = False ; don't draw 836 vecres@gsnFrame = False ; don't advance frame 837 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 838 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 839 vecres@vcRefLengthF = 0.05 ; define length of vec ref 840 vecres@gsnRightString = " " ; turn off right string 841 vecres@gsnLeftString = " " ; turn off left string 842 vecres@tiXAxisString = " " 843 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 844 overlay(plot(n), plot_vec) 845 else 846 vecres = True ; vector only resources 847 vecres@gsnDraw = False ; don't draw 848 vecres@gsnFrame = False ; don't advance frame 849 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 850 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 851 vecres@vcRefLengthF = 0.05 ; define length of vec ref 852 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 853 vecres@gsnLeftString = " " ; turn off left string 854 vecres@tiXAxisString = " " 855 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 856 plot(n) = plot_vec 857 end if 1484 if (vector .EQ. 1 .AND. check_vecp) then 1485 vecres = True ; vector only resources 1486 vecres@gsnDraw = False ; don't draw 1487 vecres@gsnFrame = False ; don't advance frame 1488 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1489 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1490 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1491 vecres@gsnRightString = " " ; turn off right string 1492 vecres@gsnLeftString = " " ; turn off left string 1493 vecres@tiXAxisString = " " 1494 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 1495 overlay(plot(n), plot_vec) 858 1496 end if 859 1497 end if … … 878 1516 cs_res@gsnCenterString = "t=" + data&t(li) + "s x"+ level 879 1517 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,:,lo),cs_res) 880 if (vector .EQ. 1) then 881 if (check_vecp) 882 vecres = True ; vector only resources 883 vecres@gsnDraw = False ; don't draw 884 vecres@gsnFrame = False ; don't advance frame 885 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 886 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 887 vecres@vcRefLengthF = 0.05 ; define length of vec ref 888 vecres@gsnRightString = " " ; turn off right string 889 vecres@gsnLeftString = " " ; turn off left string 890 vecres@tiXAxisString = " " 891 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 892 overlay(plot(n), plot_vec) 893 else 894 vecres = True ; vector only resources 895 vecres@gsnDraw = False ; don't draw 896 vecres@gsnFrame = False ; don't advance frame 897 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 898 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 899 vecres@vcRefLengthF = 0.05 ; define length of vec ref 900 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 901 vecres@gsnLeftString = " " ; turn off left string 902 vecres@tiXAxisString = " " 903 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 904 plot(n) = plot_vec 905 end if 1518 if (vector .EQ. 1 .AND. check_vecp) then 1519 vecres = True ; vector only resources 1520 vecres@gsnDraw = False ; don't draw 1521 vecres@gsnFrame = False ; don't advance frame 1522 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1523 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1524 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1525 vecres@gsnRightString = " " ; turn off right string 1526 vecres@gsnLeftString = " " ; turn off left string 1527 vecres@tiXAxisString = " " 1528 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1529 overlay(plot(n), plot_vec) 906 1530 end if 907 1531 end if … … 915 1539 cs_res@gsnCenterString = "t=" + data&t(lo) + "s x"+ level 916 1540 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,:,li),cs_res) 917 if (vector .EQ. 1) then 918 if (check_vecp) 919 vecres = True ; vector only resources 920 vecres@gsnDraw = False ; don't draw 921 vecres@gsnFrame = False ; don't advance frame 922 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 923 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 924 vecres@vcRefLengthF = 0.05 ; define length of vec ref 925 vecres@gsnRightString = " " ; turn off right string 926 vecres@gsnLeftString = " " ; turn off left string 927 vecres@tiXAxisString = " " 928 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 929 overlay(plot(n), plot_vec) 930 else 931 vecres = True ; vector only resources 932 vecres@gsnDraw = False ; don't draw 933 vecres@gsnFrame = False ; don't advance frame 934 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 935 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 936 vecres@vcRefLengthF = 0.05 ; define length of vec ref 937 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 938 vecres@gsnLeftString = " " ; turn off left string 939 vecres@tiXAxisString = " " 940 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 941 plot(n) = plot_vec 942 end if 1541 if (vector .EQ. 1 .AND. check_vecp)then 1542 vecres = True ; vector only resources 1543 vecres@gsnDraw = False ; don't draw 1544 vecres@gsnFrame = False ; don't advance frame 1545 vecres@vcGlyphStyle = "CurlyVector" ; curly vectors 1546 vecres@vcRefMagnitudeF = ref_mag ; define vector ref mag 1547 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1548 vecres@gsnRightString = " " ; turn off right string 1549 vecres@gsnLeftString = " " ; turn off left string 1550 vecres@tiXAxisString = " " 1551 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 1552 overlay(plot(n), plot_vec) 943 1553 end if 944 1554 end if … … 947 1557 end do 948 1558 end do 949 end if 1559 end if 950 1560 end do 951 1561 … … 953 1563 ; merge plots onto one page 954 1564 ; *************************************************** 955 956 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 957 gsn_panel(wks_ps,plot(0:(no_time*no_layer*no_var)-1),(/no_var,no_layer*no_time/),cs_resP) 958 print(" ") 959 print("Outputs to .eps or .epsi have only one frame") 960 print(" ") 961 else 962 do np = 0,no_layer*no_time*no_var-1,no_lines*no_columns 963 if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 964 gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_lines,no_columns/),cs_resP) 965 else 966 gsn_panel(wks_ps, plot(np:np+no_lines*no_columns-1),(/no_lines,no_columns/),cs_resP) 967 end if 968 end do 1565 1566 if (vector .EQ. 1 .AND. parameter(45) .EQ. "plotvec")then 1567 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 1568 gsn_panel(wks_ps,plot(0:(no_time*no_layer*(no_var+1))-1),(/no_var+1,no_layer*no_time/),cs_resP) 1569 print(" ") 1570 print("Outputs to .eps or .epsi have only one frame") 1571 print(" ") 1572 else 1573 do np = 0,no_layer*no_time*(no_var+1)-1,no_lines*no_columns 1574 if ( np + no_lines*no_columns .gt. (no_layer*no_time*(no_var+1))-1) then 1575 gsn_panel(wks_ps, plot(np:(no_layer*no_time*(no_var+1))-1),(/no_lines,no_columns/),cs_resP) 1576 else 1577 gsn_panel(wks_ps, plot(np:np+no_lines*no_columns-1),(/no_lines,no_columns/),cs_resP) 1578 end if 1579 end do 1580 end if 1581 else 1582 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 1583 gsn_panel(wks_ps,plot(0:(no_time*no_layer*no_var)-1),(/no_var,no_layer*no_time/),cs_resP) 1584 print(" ") 1585 print("Outputs to .eps or .epsi have only one frame") 1586 print(" ") 1587 else 1588 do np = 0,no_layer*no_time*no_var-1,no_lines*no_columns 1589 if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 1590 gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_lines,no_columns/),cs_resP) 1591 else 1592 gsn_panel(wks_ps, plot(np:np+no_lines*no_columns-1),(/no_lines,no_columns/),cs_resP) 1593 end if 1594 end do 1595 end if 969 1596 end if 970 1597 -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r161 r162 107 107 if ( .not. isvar("over") ) then ; switches overlaying plots on 108 108 over = 0 109 if (stringtointeger(parameter( 73)) .NE. 0) then110 over = stringtointeger(parameter( 73))111 if (stringtointeger(parameter( 73)) .NE. 1) then109 if (stringtointeger(parameter(37)) .NE. 0) then 110 over = stringtointeger(parameter(37)) 111 if (stringtointeger(parameter(37)) .NE. 1) then 112 112 print(" ") 113 113 print("Please set 'over' to 0 or 1") … … 456 456 end do 457 457 end if 458 459 dimz = dimsizes(z_w) 460 dimz = dimsizes(z_u) 458 if (isvar("z_u") ) then 459 dimz = dimsizes(z_u) 460 else 461 if (isvar("z_w"))then 462 dimz = dimsizes(z_w) 463 end if 464 end if 461 465 t_all = f->time 462 466 nt = dimsizes(t_all) 467 delta_t=t_all(nt-1)/nt 463 468 464 469 ; **************************************************** … … 467 472 468 473 if ( .not. isvar("start_time_step") ) then 469 start_time_step = 1470 if (parameter(13) .NE. " 1") then471 if ( parameter(13) .LE. "1")474 start_time_step=t_all(1)/3600 475 if (parameter(13) .NE. "t(0)") then 476 if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600) 472 477 print(" ") 473 print("Begin at least with time step 2") 478 print("'start_time_step' = "+ parameter(13) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 479 print(" ") 480 print("Please select another 'start_time_step'") 474 481 print(" ") 475 482 exit 476 483 end if 477 if (stringto integer(parameter(13)) .GE. nt)484 if (stringtofloat(parameter(13)) .LE. t_all(0)/3600) 478 485 print(" ") 479 print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt-1)) 486 print("'start_time_step' = "+ parameter(13) +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 487 print(" ") 488 print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h") 480 489 print(" ") 481 490 exit 482 491 end if 483 start_time_step = stringtointeger(parameter(13))-1492 start_time_step=stringtodouble(parameter(13)) 484 493 end if 485 494 else 486 if (start_time_step . LE.0)495 if (start_time_step .GT. t_all(nt-1)/3600) 487 496 print(" ") 488 print("Begin at least with time step 1") 497 print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 498 print(" ") 499 print("Please select another 'start_time_step'") 489 500 print(" ") 490 501 exit 491 502 end if 492 if (start_time_step . GE. nt)503 if (start_time_step .LE. t_all(0)/3600) 493 504 print(" ") 494 print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt-1)) 505 print("'start_time_step' = "+ start_time_step +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 506 print(" ") 507 print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h") 495 508 print(" ") 496 509 exit 497 510 end if 498 start_time_step = start_time_step - 1499 511 end if 500 512 start_time_step = start_time_step*3600 513 if (start_time_step .GT. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then 514 st=1 515 end if 516 do i=2,nt-1 517 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then 518 st=i 519 break 520 end if 521 end do 522 501 523 ; **************************************************** 502 524 ; end of time step and different types of mistakes that could be done … … 504 526 505 527 if ( .not. isvar("end_time_step") ) then 506 end_time_step = nt-1 507 if (parameter(15) .NE. "nt") then 508 if (parameter(15) .LE. "0") 509 print(" ") 510 print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ") 511 print(" ") 512 exit 513 end if 514 if (stringtointeger(parameter(15)) .GE. nt) 528 end_time_step = t_all(nt-1)/3600 529 if (parameter(15) .NE. "t(end)") then 530 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600) 515 531 print(" ") 516 print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt-1)) 532 print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 533 print(" ") 534 print("Please select another 'end_time_step'") 517 535 print(" ") 518 536 exit 519 537 end if 520 if (stringto integer(parameter(15)) .LT. stringtointeger(parameter(13)))538 if (stringtodouble(parameter(15)) .LT. start_time_step/3600) 521 539 print(" ") 522 print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(13)) 540 print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+parameter(13)+"h") 541 print(" ") 542 print("Please select another 'start_time_step' or 'end_time_step'") 523 543 print(" ") 524 544 exit 525 545 end if 526 end_time_step = stringto integer(parameter(15))546 end_time_step = stringtodouble(parameter(15)) 527 547 end if 528 548 else 529 if (end_time_step . LE.0)549 if (end_time_step .GT. t_all(nt-1)/3600) 530 550 print(" ") 531 print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ") 551 print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 552 print(" ") 553 print("Please select another 'end_time_step'") 532 554 print(" ") 533 555 exit 534 556 end if 535 if (end_time_step . GE. nt)557 if (end_time_step .LT. start_time_step/3600) 536 558 print(" ") 537 print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt-1)) 559 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") 560 print(" ") 561 print("Please select another 'start_time_step' or 'end_time_step'") 538 562 print(" ") 539 563 exit 540 564 end if 541 if (end_time_step .LT. start_time_step) 542 print(" ") 543 print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step) 544 print(" ") 545 exit 565 end if 566 end_time_step = end_time_step*3600 567 if (end_time_step .GT. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then 568 et=1 569 end if 570 do i=2,nt-1 571 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then 572 et=i 573 break 546 574 end if 547 end_time_step = end_time_step - 1 548 end if 575 end do 576 577 delete(start_time_step) 578 start_time_step=round(st,3) 579 delete(end_time_step) 580 end_time_step=round(et,3) 549 581 550 582 ; **************************************************** … … 557 589 end do 558 590 559 np = end_time_step-start_time_step 591 np = end_time_step-start_time_step+1 560 592 if ( black .eq. 0 ) then 561 593 res=True … … 887 919 888 920 n_o=0 921 count_var=0 889 922 do varn = 0,dim-1 890 923 … … 908 941 com=isStrSubset(c_var,","+vNam(varn)+"," ) 909 942 if (com) 910 check = False911 943 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) 912 944 unit(varn) = temp@units … … 919 951 mini(n_o)=min(data(varn,:,:)) 920 952 maxi(n_o)=max(data(varn,:,:)) 921 varn=varn+1922 953 n_o=n_o+1 923 954 end if … … 925 956 926 957 if(check) then 927 958 count_var=count_var+1 959 928 960 z = f->$vNam(varn+1)$ 929 961 … … 935 967 res@gsnRightString = unit(varn) 936 968 res@trYMinF = min_z 937 res@trYMaxF = max_z 938 res@trXMinF = min(data(varn,:,:)) 939 res@trXMaxF = max(data(varn,:,:)) 969 res@trYMaxF = max_z 970 if (.not. isvar("xs")) then 971 if (parameter(63) .NE. "x0") then 972 res@trXMinF = stringtofloat(parameter(63)) 973 else 974 res@trXMinF = min(data(varn,:,:)) 975 end if 976 else 977 res@trXMinF = xs 978 end if 979 if (.not. isvar("xe")) then 980 if (parameter(65) .NE. "xdim") then 981 res@trXMaxF = stringtofloat(parameter(65)) 982 else 983 res@trXMaxF = max(data(varn,:,:)) 984 end if 985 else 986 res@trXMaxF = xe 987 end if 940 988 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 941 989 end if … … 950 998 res@gsnLeftString = vNam(varn) 951 999 res@gsnRightString = unit(varn) 952 res@trXMinF = miniu 953 res@trXMaxF = maxiu 1000 if (.not. isvar("xs")) then 1001 if (parameter(63) .NE. "x0") then 1002 res@trXMinF = stringtofloat(parameter(63)) 1003 else 1004 res@trXMinF = miniu 1005 end if 1006 else 1007 res@trXMinF = xs 1008 end if 1009 if (.not. isvar("xe")) then 1010 if (parameter(65) .NE. "xdim") then 1011 res@trXMaxF = stringtofloat(parameter(65)) 1012 else 1013 res@trXMaxF = maxiu 1014 end if 1015 else 1016 res@trXMaxF = xe 1017 end if 954 1018 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 955 1019 end if … … 964 1028 res@gsnLeftString = vNam(varn) 965 1029 res@gsnRightString = unit(varn) 966 res@trXMinF = miniv 967 res@trXMaxF = maxiv 1030 if (.not. isvar("xs")) then 1031 if (parameter(63) .NE. "x0") then 1032 res@trXMinF = stringtofloat(parameter(63)) 1033 else 1034 res@trXMinF = miniv 1035 end if 1036 else 1037 res@trXMinF = xs 1038 end if 1039 if (.not. isvar("xe")) then 1040 if (parameter(65) .NE. "xdim") then 1041 res@trXMaxF = stringtofloat(parameter(65)) 1042 else 1043 res@trXMaxF = maxiv 1044 end if 1045 else 1046 res@trXMaxF = xe 1047 end if 968 1048 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 969 1049 end if … … 978 1058 res@gsnLeftString = vNam(varn) 979 1059 res@gsnRightString = unit(varn) 980 res@trXMinF = miniw 981 res@trXMaxF = maxiw 1060 if (.not. isvar("xs")) then 1061 if (parameter(63) .NE. "x0") then 1062 res@trXMinF = stringtofloat(parameter(63)) 1063 else 1064 res@trXMinF = miniw 1065 end if 1066 else 1067 res@trXMinF = xs 1068 end if 1069 if (.not. isvar("xe")) then 1070 if (parameter(65) .NE. "xdim") then 1071 res@trXMaxF = stringtofloat(parameter(65)) 1072 else 1073 res@trXMaxF = maxiw 1074 end if 1075 else 1076 res@trXMaxF = xe 1077 end if 982 1078 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 983 1079 end if … … 993 1089 res@gsnLeftString = vNam(varn) 994 1090 res@gsnRightString = unit(varn) 995 res@trXMinF = minipt 996 res@trXMaxF = maxipt 1091 if (.not. isvar("xs")) then 1092 if (parameter(63) .NE. "x0") then 1093 res@trXMinF = stringtofloat(parameter(63)) 1094 else 1095 res@trXMinF = minipt 1096 end if 1097 else 1098 res@trXMinF = xs 1099 end if 1100 if (.not. isvar("xe")) then 1101 if (parameter(65) .NE. "xdim") then 1102 res@trXMaxF = stringtofloat(parameter(65)) 1103 else 1104 res@trXMaxF = maxipt 1105 end if 1106 else 1107 res@trXMaxF = xe 1108 end if 997 1109 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 998 1110 end if … … 1007 1119 res@gsnLeftString = vNam(varn) 1008 1120 res@gsnRightString = unit(varn) 1009 res@trXMinF = minivpt 1010 res@trXMaxF = maxivpt 1121 if (.not. isvar("xs")) then 1122 if (parameter(63) .NE. "x0") then 1123 res@trXMinF = stringtofloat(parameter(63)) 1124 else 1125 res@trXMinF = minivpt 1126 end if 1127 else 1128 res@trXMinF = xs 1129 end if 1130 if (.not. isvar("xe")) then 1131 if (parameter(65) .NE. "xdim") then 1132 res@trXMaxF = stringtofloat(parameter(65)) 1133 else 1134 res@trXMaxF = maxivpt 1135 end if 1136 else 1137 res@trXMaxF = xe 1138 end if 1011 1139 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1012 1140 end if … … 1021 1149 res@gsnLeftString = vNam(varn) 1022 1150 res@gsnRightString = unit(varn) 1023 res@trXMinF = minilpt 1024 res@trXMaxF = maxilpt 1151 if (.not. isvar("xs")) then 1152 if (parameter(63) .NE. "x0") then 1153 res@trXMinF = stringtofloat(parameter(63)) 1154 else 1155 res@trXMinF = minilpt 1156 end if 1157 else 1158 res@trXMinF = xs 1159 end if 1160 if (.not. isvar("xe")) then 1161 if (parameter(65) .NE. "xdim") then 1162 res@trXMaxF = stringtofloat(parameter(65)) 1163 else 1164 res@trXMaxF = maxilpt 1165 end if 1166 else 1167 res@trXMaxF = xe 1168 end if 1025 1169 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1026 1170 end if … … 1036 1180 res@gsnLeftString = vNam(varn) 1037 1181 res@gsnRightString = unit(varn) 1038 res@trXMinF = miniq 1039 res@trXMaxF = maxiq 1182 if (.not. isvar("xs")) then 1183 if (parameter(63) .NE. "x0") then 1184 res@trXMinF = stringtofloat(parameter(63)) 1185 else 1186 res@trXMinF = minilq 1187 end if 1188 else 1189 res@trXMinF = xs 1190 end if 1191 if (.not. isvar("xe")) then 1192 if (parameter(65) .NE. "xdim") then 1193 res@trXMaxF = stringtofloat(parameter(65)) 1194 else 1195 res@trXMaxF = maxilq 1196 end if 1197 else 1198 res@trXMaxF = xe 1199 end if 1040 1200 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1041 1201 end if … … 1050 1210 res@gsnLeftString = vNam(varn) 1051 1211 res@gsnRightString = unit(varn) 1052 res@trXMinF = miniqv 1053 res@trXMaxF = maxiqv 1212 if (.not. isvar("xs")) then 1213 if (parameter(63) .NE. "x0") then 1214 res@trXMinF = stringtofloat(parameter(63)) 1215 else 1216 res@trXMinF = minilqv 1217 end if 1218 else 1219 res@trXMinF = xs 1220 end if 1221 if (.not. isvar("xe")) then 1222 if (parameter(65) .NE. "xdim") then 1223 res@trXMaxF = stringtofloat(parameter(65)) 1224 else 1225 res@trXMaxF = maxilqv 1226 end if 1227 else 1228 res@trXMaxF = xe 1229 end if 1054 1230 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1055 1231 end if … … 1064 1240 res@gsnLeftString = vNam(varn) 1065 1241 res@gsnRightString = unit(varn) 1066 res@trXMinF = miniql 1067 res@trXMaxF = maxiql 1068 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1069 end if 1070 end if 1071 1072 if (vNam(varn) .EQ. "rho") then 1073 if (over .EQ. 1) then 1074 res@gsnLeftString = vNam(varn) 1075 res@gsnRightString = unit(varn) 1076 res@trXMinF = min(data(varn,:,:)) 1077 res@trXMaxF = max(data(varn,:,:)) 1078 plot_q = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1079 else 1080 res@gsnLeftString = vNam(varn) 1081 res@gsnRightString = unit(varn) 1082 res@trXMinF = min(data(varn,:,:)) 1083 res@trXMaxF = max(data(varn,:,:)) 1084 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1085 end if 1086 end if 1087 1088 if (vNam(varn) .EQ. "s") then 1089 if (over .EQ. 1) then 1090 res@gsnLeftString = vNam(varn) 1091 res@gsnRightString = unit(varn) 1092 res@trXMinF = min(data(varn,:,:)) 1093 res@trXMaxF = max(data(varn,:,:)) 1094 plot_s = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1095 else 1096 res@gsnLeftString = vNam(varn) 1097 res@gsnRightString = unit(varn) 1098 res@trXMinF = min(data(varn,:,:)) 1099 res@trXMaxF = max(data(varn,:,:)) 1100 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1101 end if 1102 end if 1103 1104 if (vNam(varn) .EQ. "sa") then 1105 if (over .EQ. 1) then 1106 res@gsnLeftString = vNam(varn) 1107 res@gsnRightString = unit(varn) 1108 res@trXMinF = min(data(varn,:,:)) 1109 res@trXMaxF = max(data(varn,:,:)) 1110 plot_sa = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1111 else 1112 res@gsnLeftString = vNam(varn) 1113 res@gsnRightString = unit(varn) 1114 res@trXMinF = min(data(varn,:,:)) 1115 res@trXMaxF = max(data(varn,:,:)) 1242 if (.not. isvar("xs")) then 1243 if (parameter(63) .NE. "x0") then 1244 res@trXMinF = stringtofloat(parameter(63)) 1245 else 1246 res@trXMinF = miniql 1247 end if 1248 else 1249 res@trXMinF = xs 1250 end if 1251 if (.not. isvar("xe")) then 1252 if (parameter(65) .NE. "xdim") then 1253 res@trXMaxF = stringtofloat(parameter(65)) 1254 else 1255 res@trXMaxF = maxiql 1256 end if 1257 else 1258 res@trXMaxF = xe 1259 end if 1116 1260 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1117 1261 end if … … 1127 1271 res@gsnLeftString = vNam(varn) 1128 1272 res@gsnRightString = unit(varn) 1129 res@trXMinF = minie 1130 res@trXMaxF = maxie 1273 if (.not. isvar("xs")) then 1274 if (parameter(63) .NE. "x0") then 1275 res@trXMinF = stringtofloat(parameter(63)) 1276 else 1277 res@trXMinF = minie 1278 end if 1279 else 1280 res@trXMinF = xs 1281 end if 1282 if (.not. isvar("xe")) then 1283 if (parameter(65) .NE. "xdim") then 1284 res@trXMaxF = stringtofloat(parameter(65)) 1285 else 1286 res@trXMaxF = maxie 1287 end if 1288 else 1289 res@trXMaxF = xe 1290 end if 1131 1291 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1132 1292 end if … … 1141 1301 res@gsnLeftString = vNam(varn) 1142 1302 res@gsnRightString = unit(varn) 1143 res@trXMinF = minies 1144 res@trXMaxF = maxies 1303 if (.not. isvar("xs")) then 1304 if (parameter(63) .NE. "x0") then 1305 res@trXMinF = stringtofloat(parameter(63)) 1306 else 1307 res@trXMinF = minies 1308 end if 1309 else 1310 res@trXMinF = xs 1311 end if 1312 if (.not. isvar("xe")) then 1313 if (parameter(65) .NE. "xdim") then 1314 res@trXMaxF = stringtofloat(parameter(65)) 1315 else 1316 res@trXMaxF = maxies 1317 end if 1318 else 1319 res@trXMaxF = xe 1320 end if 1145 1321 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1146 1322 end if … … 1156 1332 res@gsnLeftString = vNam(varn) 1157 1333 res@gsnRightString = unit(varn) 1158 res@trXMinF = minikm 1159 res@trXMaxF = maxikm 1334 if (.not. isvar("xs")) then 1335 if (parameter(63) .NE. "x0") then 1336 res@trXMinF = stringtofloat(parameter(63)) 1337 else 1338 res@trXMinF = minikm 1339 end if 1340 else 1341 res@trXMinF = xs 1342 end if 1343 if (.not. isvar("xe")) then 1344 if (parameter(65) .NE. "xdim") then 1345 res@trXMaxF = stringtofloat(parameter(65)) 1346 else 1347 res@trXMaxF = maxikm 1348 end if 1349 else 1350 res@trXMaxF = xe 1351 end if 1160 1352 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1161 1353 end if … … 1170 1362 res@gsnLeftString = vNam(varn) 1171 1363 res@gsnRightString = unit(varn) 1172 res@trXMinF = minikh 1173 res@trXMaxF = maxikh 1364 if (.not. isvar("xs")) then 1365 if (parameter(63) .NE. "x0") then 1366 res@trXMinF = stringtofloat(parameter(63)) 1367 else 1368 res@trXMinF = minikh 1369 end if 1370 else 1371 res@trXMinF = xs 1372 end if 1373 if (.not. isvar("xe")) then 1374 if (parameter(65) .NE. "xdim") then 1375 res@trXMaxF = stringtofloat(parameter(65)) 1376 else 1377 res@trXMaxF = maxikh 1378 end if 1379 else 1380 res@trXMaxF = xe 1381 end if 1174 1382 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1175 end if1176 end if1177 1178 if (vNam(varn) .EQ. "l") then1179 if (over .EQ. 1) then1180 res@gsnLeftString = vNam(varn)1181 res@gsnRightString = unit(varn)1182 res@trXMinF = min(data(varn,:,:))1183 res@trXMaxF = max(data(varn,:,:))1184 plot_l = gsn_csm_xy(wks,data(varn,:,:),z_u,res)1185 else1186 res@gsnLeftString = vNam(varn)1187 res@gsnRightString = unit(varn)1188 res@trXMinF = min(data(varn,:,:))1189 res@trXMaxF = max(data(varn,:,:))1190 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)1191 1383 end if 1192 1384 end if … … 1201 1393 res@gsnLeftString = vNam(varn) 1202 1394 res@gsnRightString = unit(varn) 1203 res@trXMinF = miniwpup 1204 res@trXMaxF = maxiwpup 1395 if (.not. isvar("xs")) then 1396 if (parameter(63) .NE. "x0") then 1397 res@trXMinF = stringtofloat(parameter(63)) 1398 else 1399 res@trXMinF = miniwpup 1400 end if 1401 else 1402 res@trXMinF = xs 1403 end if 1404 if (.not. isvar("xe")) then 1405 if (parameter(65) .NE. "xdim") then 1406 res@trXMaxF = stringtofloat(parameter(65)) 1407 else 1408 res@trXMaxF = maxiwpup 1409 end if 1410 else 1411 res@trXMaxF = xe 1412 end if 1205 1413 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1206 1414 end if … … 1215 1423 res@gsnLeftString = vNam(varn) 1216 1424 res@gsnRightString = unit(varn) 1217 res@trXMinF = miniwsus 1218 res@trXMaxF = maxiwsus 1425 if (.not. isvar("xs")) then 1426 if (parameter(63) .NE. "x0") then 1427 res@trXMinF = stringtofloat(parameter(63)) 1428 else 1429 res@trXMinF = miniwsus 1430 end if 1431 else 1432 res@trXMinF = xs 1433 end if 1434 if (.not. isvar("xe")) then 1435 if (parameter(65) .NE. "xdim") then 1436 res@trXMaxF = stringtofloat(parameter(65)) 1437 else 1438 res@trXMaxF = maxiwsus 1439 end if 1440 else 1441 res@trXMaxF = xe 1442 end if 1219 1443 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1220 1444 end if … … 1229 1453 res@gsnLeftString = vNam(varn) 1230 1454 res@gsnRightString = unit(varn) 1231 res@trXMinF = miniwu 1232 res@trXMaxF = maxiwu 1455 if (.not. isvar("xs")) then 1456 if (parameter(63) .NE. "x0") then 1457 res@trXMinF = stringtofloat(parameter(63)) 1458 else 1459 res@trXMinF = miniwu 1460 end if 1461 else 1462 res@trXMinF = xs 1463 end if 1464 if (.not. isvar("xe")) then 1465 if (parameter(65) .NE. "xdim") then 1466 res@trXMaxF = stringtofloat(parameter(65)) 1467 else 1468 res@trXMaxF = maxiwu 1469 end if 1470 else 1471 res@trXMaxF = xe 1472 end if 1233 1473 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1234 1474 end if … … 1244 1484 res@gsnLeftString = vNam(varn) 1245 1485 res@gsnRightString = unit(varn) 1246 res@trXMinF = miniwpvp 1247 res@trXMaxF = maxiwpvp 1486 if (.not. isvar("xs")) then 1487 if (parameter(63) .NE. "x0") then 1488 res@trXMinF = stringtofloat(parameter(63)) 1489 else 1490 res@trXMinF = miniwpvp 1491 end if 1492 else 1493 res@trXMinF = xs 1494 end if 1495 if (.not. isvar("xe")) then 1496 if (parameter(65) .NE. "xdim") then 1497 res@trXMaxF = stringtofloat(parameter(65)) 1498 else 1499 res@trXMaxF = maxiwpvp 1500 end if 1501 else 1502 res@trXMaxF = xe 1503 end if 1248 1504 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1249 1505 end if … … 1258 1514 res@gsnLeftString = vNam(varn) 1259 1515 res@gsnRightString = unit(varn) 1260 res@trXMinF = miniwsvs 1261 res@trXMaxF = maxiwsvs 1516 if (.not. isvar("xs")) then 1517 if (parameter(63) .NE. "x0") then 1518 res@trXMinF = stringtofloat(parameter(63)) 1519 else 1520 res@trXMinF = miniwsvs 1521 end if 1522 else 1523 res@trXMinF = xs 1524 end if 1525 if (.not. isvar("xe")) then 1526 if (parameter(65) .NE. "xdim") then 1527 res@trXMaxF = stringtofloat(parameter(65)) 1528 else 1529 res@trXMaxF = maxiwsvs 1530 end if 1531 else 1532 res@trXMaxF = xe 1533 end if 1262 1534 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1263 1535 end if … … 1272 1544 res@gsnLeftString = vNam(varn) 1273 1545 res@gsnRightString = unit(varn) 1274 res@trXMinF = miniwv 1275 res@trXMaxF = maxiwv 1546 if (.not. isvar("xs")) then 1547 if (parameter(63) .NE. "x0") then 1548 res@trXMinF = stringtofloat(parameter(63)) 1549 else 1550 res@trXMinF = miniwv 1551 end if 1552 else 1553 res@trXMinF = xs 1554 end if 1555 if (.not. isvar("xe")) then 1556 if (parameter(65) .NE. "xdim") then 1557 res@trXMaxF = stringtofloat(parameter(65)) 1558 else 1559 res@trXMaxF = maxiwv 1560 end if 1561 else 1562 res@trXMaxF = xe 1563 end if 1276 1564 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1277 1565 end if … … 1287 1575 res@gsnLeftString = vNam(varn) 1288 1576 res@gsnRightString = unit(varn) 1289 res@trXMinF = miniwpptp 1290 res@trXMaxF = maxiwpptp 1577 if (.not. isvar("xs")) then 1578 if (parameter(63) .NE. "x0") then 1579 res@trXMinF = stringtofloat(parameter(63)) 1580 else 1581 res@trXMinF = miniwpptp 1582 end if 1583 else 1584 res@trXMinF = xs 1585 end if 1586 if (.not. isvar("xe")) then 1587 if (parameter(65) .NE. "xdim") then 1588 res@trXMaxF = stringtofloat(parameter(65)) 1589 else 1590 res@trXMaxF = maxiwpptp 1591 end if 1592 else 1593 res@trXMaxF = xe 1594 end if 1291 1595 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1292 1596 end if … … 1301 1605 res@gsnLeftString = vNam(varn) 1302 1606 res@gsnRightString = unit(varn) 1303 res@trXMinF = miniwspts 1304 res@trXMaxF = maxiwspts 1607 if (.not. isvar("xs")) then 1608 if (parameter(63) .NE. "x0") then 1609 res@trXMinF = stringtofloat(parameter(63)) 1610 else 1611 res@trXMinF = miniwspts 1612 end if 1613 else 1614 res@trXMinF = xs 1615 end if 1616 if (.not. isvar("xe")) then 1617 if (parameter(65) .NE. "xdim") then 1618 res@trXMaxF = stringtofloat(parameter(65)) 1619 else 1620 res@trXMaxF = maxiwspts 1621 end if 1622 else 1623 res@trXMaxF = xe 1624 end if 1305 1625 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1306 1626 end if … … 1315 1635 res@gsnLeftString = vNam(varn) 1316 1636 res@gsnRightString = unit(varn) 1317 res@trXMinF = miniwpt 1318 res@trXMaxF = maxiwpt 1637 if (.not. isvar("xs")) then 1638 if (parameter(63) .NE. "x0") then 1639 res@trXMinF = stringtofloat(parameter(63)) 1640 else 1641 res@trXMinF = miniwpt 1642 end if 1643 else 1644 res@trXMinF = xs 1645 end if 1646 if (.not. isvar("xe")) then 1647 if (parameter(65) .NE. "xdim") then 1648 res@trXMaxF = stringtofloat(parameter(65)) 1649 else 1650 res@trXMaxF = maxiwpt 1651 end if 1652 else 1653 res@trXMaxF = xe 1654 end if 1319 1655 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1320 1656 end if … … 1330 1666 res@gsnLeftString = vNam(varn) 1331 1667 res@gsnRightString = unit(varn) 1332 res@trXMinF = miniwsptsBC 1333 res@trXMaxF = maxiwsptsBC 1668 if (.not. isvar("xs")) then 1669 if (parameter(63) .NE. "x0") then 1670 res@trXMinF = stringtofloat(parameter(63)) 1671 else 1672 res@trXMinF = miniwsptsBC 1673 end if 1674 else 1675 res@trXMinF = xs 1676 end if 1677 if (.not. isvar("xe")) then 1678 if (parameter(65) .NE. "xdim") then 1679 res@trXMaxF = stringtofloat(parameter(65)) 1680 else 1681 res@trXMaxF = maxiwsptsBC 1682 end if 1683 else 1684 res@trXMaxF = xe 1685 end if 1334 1686 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1335 1687 end if … … 1344 1696 res@gsnLeftString = vNam(varn) 1345 1697 res@gsnRightString = unit(varn) 1346 res@trXMinF = miniwptBC 1347 res@trXMaxF = maxiwptBC 1698 if (.not. isvar("xs")) then 1699 if (parameter(63) .NE. "x0") then 1700 res@trXMinF = stringtofloat(parameter(63)) 1701 else 1702 res@trXMinF = miniwptBC 1703 end if 1704 else 1705 res@trXMinF = xs 1706 end if 1707 if (.not. isvar("xe")) then 1708 if (parameter(65) .NE. "xdim") then 1709 res@trXMaxF = stringtofloat(parameter(65)) 1710 else 1711 res@trXMaxF = maxiwptBC 1712 end if 1713 else 1714 res@trXMaxF = xe 1715 end if 1348 1716 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1349 1717 end if … … 1359 1727 res@gsnLeftString = vNam(varn) 1360 1728 res@gsnRightString = unit(varn) 1361 res@trXMinF = miniwpvptp 1362 res@trXMaxF = maxiwpvptp 1729 if (.not. isvar("xs")) then 1730 if (parameter(63) .NE. "x0") then 1731 res@trXMinF = stringtofloat(parameter(63)) 1732 else 1733 res@trXMinF = miniwpvptp 1734 end if 1735 else 1736 res@trXMinF = xs 1737 end if 1738 if (.not. isvar("xe")) then 1739 if (parameter(65) .NE. "xdim") then 1740 res@trXMaxF = stringtofloat(parameter(65)) 1741 else 1742 res@trXMaxF = maxiwpvptp 1743 end if 1744 else 1745 res@trXMaxF = xe 1746 end if 1363 1747 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1364 1748 end if … … 1373 1757 res@gsnLeftString = vNam(varn) 1374 1758 res@gsnRightString = unit(varn) 1375 res@trXMinF = miniwsvpts 1376 res@trXMaxF = maxiwsvpts 1759 if (.not. isvar("xs")) then 1760 if (parameter(63) .NE. "x0") then 1761 res@trXMinF = stringtofloat(parameter(63)) 1762 else 1763 res@trXMinF = miniwsvpts 1764 end if 1765 else 1766 res@trXMinF = xs 1767 end if 1768 if (.not. isvar("xe")) then 1769 if (parameter(65) .NE. "xdim") then 1770 res@trXMaxF = stringtofloat(parameter(65)) 1771 else 1772 res@trXMaxF = maxiwsvpts 1773 end if 1774 else 1775 res@trXMaxF = xe 1776 end if 1377 1777 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1378 1778 end if … … 1387 1787 res@gsnLeftString = vNam(varn) 1388 1788 res@gsnRightString = unit(varn) 1389 res@trXMinF = miniwvpt 1390 res@trXMaxF = maxiwvpt 1789 if (.not. isvar("xs")) then 1790 if (parameter(63) .NE. "x0") then 1791 res@trXMinF = stringtofloat(parameter(63)) 1792 else 1793 res@trXMinF = miniwvpt 1794 end if 1795 else 1796 res@trXMinF = xs 1797 end if 1798 if (.not. isvar("xe")) then 1799 if (parameter(65) .NE. "xdim") then 1800 res@trXMaxF = stringtofloat(parameter(65)) 1801 else 1802 res@trXMaxF = maxiwvpt 1803 end if 1804 else 1805 res@trXMaxF = xe 1806 end if 1391 1807 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1392 1808 end if … … 1402 1818 res@gsnLeftString = vNam(varn) 1403 1819 res@gsnRightString = unit(varn) 1404 res@trXMinF = miniwpqp 1405 res@trXMaxF = maxiwpqp 1820 if (.not. isvar("xs")) then 1821 if (parameter(63) .NE. "x0") then 1822 res@trXMinF = stringtofloat(parameter(63)) 1823 else 1824 res@trXMinF = miniwpqp 1825 end if 1826 else 1827 res@trXMinF = xs 1828 end if 1829 if (.not. isvar("xe")) then 1830 if (parameter(65) .NE. "xdim") then 1831 res@trXMaxF = stringtofloat(parameter(65)) 1832 else 1833 res@trXMaxF = maxiwpqp 1834 end if 1835 else 1836 res@trXMaxF = xe 1837 end if 1406 1838 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1407 1839 end if … … 1416 1848 res@gsnLeftString = vNam(varn) 1417 1849 res@gsnRightString = unit(varn) 1418 res@trXMinF = miniwsqs 1419 res@trXMaxF = maxiwsqs 1850 if (.not. isvar("xs")) then 1851 if (parameter(63) .NE. "x0") then 1852 res@trXMinF = stringtofloat(parameter(63)) 1853 else 1854 res@trXMinF = miniwsqs 1855 end if 1856 else 1857 res@trXMinF = xs 1858 end if 1859 if (.not. isvar("xe")) then 1860 if (parameter(65) .NE. "xdim") then 1861 res@trXMaxF = stringtofloat(parameter(65)) 1862 else 1863 res@trXMaxF = maxiwsqs 1864 end if 1865 else 1866 res@trXMaxF = xe 1867 end if 1420 1868 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1421 1869 end if … … 1430 1878 res@gsnLeftString = vNam(varn) 1431 1879 res@gsnRightString = unit(varn) 1432 res@trXMinF = miniwq 1433 res@trXMaxF = maxiwq 1880 if (.not. isvar("xs")) then 1881 if (parameter(63) .NE. "x0") then 1882 res@trXMinF = stringtofloat(parameter(63)) 1883 else 1884 res@trXMinF = miniwq 1885 end if 1886 else 1887 res@trXMinF = xs 1888 end if 1889 if (.not. isvar("xe")) then 1890 if (parameter(65) .NE. "xdim") then 1891 res@trXMaxF = stringtofloat(parameter(65)) 1892 else 1893 res@trXMaxF = maxiwq 1894 end if 1895 else 1896 res@trXMaxF = xe 1897 end if 1434 1898 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1435 1899 end if … … 1445 1909 res@gsnLeftString = vNam(varn) 1446 1910 res@gsnRightString = unit(varn) 1447 res@trXMinF = miniwpqvp 1448 res@trXMaxF = maxiwpqvp 1911 if (.not. isvar("xs")) then 1912 if (parameter(63) .NE. "x0") then 1913 res@trXMinF = stringtofloat(parameter(63)) 1914 else 1915 res@trXMinF = miniwpqvp 1916 end if 1917 else 1918 res@trXMinF = xs 1919 end if 1920 if (.not. isvar("xe")) then 1921 if (parameter(65) .NE. "xdim") then 1922 res@trXMaxF = stringtofloat(parameter(65)) 1923 else 1924 res@trXMaxF = maxiwpqvp 1925 end if 1926 else 1927 res@trXMaxF = xe 1928 end if 1449 1929 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1450 1930 end if … … 1459 1939 res@gsnLeftString = vNam(varn) 1460 1940 res@gsnRightString = unit(varn) 1461 res@trXMinF = miniwsqvs 1462 res@trXMaxF = maxiwsqvs 1941 if (.not. isvar("xs")) then 1942 if (parameter(63) .NE. "x0") then 1943 res@trXMinF = stringtofloat(parameter(63)) 1944 else 1945 res@trXMinF = miniwsqvs 1946 end if 1947 else 1948 res@trXMinF = xs 1949 end if 1950 if (.not. isvar("xe")) then 1951 if (parameter(65) .NE. "xdim") then 1952 res@trXMaxF = stringtofloat(parameter(65)) 1953 else 1954 res@trXMaxF = maxiwsqvs 1955 end if 1956 else 1957 res@trXMaxF = xe 1958 end if 1463 1959 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1464 1960 end if … … 1473 1969 res@gsnLeftString = vNam(varn) 1474 1970 res@gsnRightString = unit(varn) 1475 res@trXMinF = miniwqv 1476 res@trXMaxF = maxiwqv 1971 if (.not. isvar("xs")) then 1972 if (parameter(63) .NE. "x0") then 1973 res@trXMinF = stringtofloat(parameter(63)) 1974 else 1975 res@trXMinF = miniwqv 1976 end if 1977 else 1978 res@trXMinF = xs 1979 end if 1980 if (.not. isvar("xe")) then 1981 if (parameter(65) .NE. "xdim") then 1982 res@trXMaxF = stringtofloat(parameter(65)) 1983 else 1984 res@trXMaxF = maxiwqv 1985 end if 1986 else 1987 res@trXMaxF = xe 1988 end if 1477 1989 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1478 1990 end if … … 1488 2000 res@gsnLeftString = vNam(varn) 1489 2001 res@gsnRightString = unit(varn) 1490 res@trXMinF = miniwpsp 1491 res@trXMaxF = maxiwpsp 2002 if (.not. isvar("xs")) then 2003 if (parameter(63) .NE. "x0") then 2004 res@trXMinF = stringtofloat(parameter(63)) 2005 else 2006 res@trXMinF = miniwpsp 2007 end if 2008 else 2009 res@trXMinF = xs 2010 end if 2011 if (.not. isvar("xe")) then 2012 if (parameter(65) .NE. "xdim") then 2013 res@trXMaxF = stringtofloat(parameter(65)) 2014 else 2015 res@trXMaxF = maxiwpsp 2016 end if 2017 else 2018 res@trXMaxF = xe 2019 end if 1492 2020 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1493 2021 end if … … 1502 2030 res@gsnLeftString = vNam(varn) 1503 2031 res@gsnRightString = unit(varn) 1504 res@trXMinF = miniwsss 1505 res@trXMaxF = maxiwsss 2032 if (.not. isvar("xs")) then 2033 if (parameter(63) .NE. "x0") then 2034 res@trXMinF = stringtofloat(parameter(63)) 2035 else 2036 res@trXMinF = miniwsss 2037 end if 2038 else 2039 res@trXMinF = xs 2040 end if 2041 if (.not. isvar("xe")) then 2042 if (parameter(65) .NE. "xdim") then 2043 res@trXMaxF = stringtofloat(parameter(65)) 2044 else 2045 res@trXMaxF = maxiwsss 2046 end if 2047 else 2048 res@trXMaxF = xe 2049 end if 1506 2050 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1507 2051 end if … … 1516 2060 res@gsnLeftString = vNam(varn) 1517 2061 res@gsnRightString = unit(varn) 1518 res@trXMinF = miniws 1519 res@trXMaxF = maxiws 2062 if (.not. isvar("xs")) then 2063 if (parameter(63) .NE. "x0") then 2064 res@trXMinF = stringtofloat(parameter(63)) 2065 else 2066 res@trXMinF = miniws 2067 end if 2068 else 2069 res@trXMinF = xs 2070 end if 2071 if (.not. isvar("xe")) then 2072 if (parameter(65) .NE. "xdim") then 2073 res@trXMaxF = stringtofloat(parameter(65)) 2074 else 2075 res@trXMaxF = maxiws 2076 end if 2077 else 2078 res@trXMaxF = xe 2079 end if 1520 2080 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1521 2081 end if … … 1531 2091 res@gsnLeftString = vNam(varn) 1532 2092 res@gsnRightString = unit(varn) 1533 res@trXMinF = miniwpsap 1534 res@trXMaxF = maxiwpsap 2093 if (.not. isvar("xs")) then 2094 if (parameter(63) .NE. "x0") then 2095 res@trXMinF = stringtofloat(parameter(63)) 2096 else 2097 res@trXMinF = miniwpsap 2098 end if 2099 else 2100 res@trXMinF = xs 2101 end if 2102 if (.not. isvar("xe")) then 2103 if (parameter(65) .NE. "xdim") then 2104 res@trXMaxF = stringtofloat(parameter(65)) 2105 else 2106 res@trXMaxF = maxiwpsap 2107 end if 2108 else 2109 res@trXMaxF = xe 2110 end if 1535 2111 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1536 2112 end if … … 1545 2121 res@gsnLeftString = vNam(varn) 1546 2122 res@gsnRightString = unit(varn) 1547 res@trXMinF = miniwssas 1548 res@trXMaxF = maxiwssas 2123 if (.not. isvar("xs")) then 2124 if (parameter(63) .NE. "x0") then 2125 res@trXMinF = stringtofloat(parameter(63)) 2126 else 2127 res@trXMinF = miniwssas 2128 end if 2129 else 2130 res@trXMinF = xs 2131 end if 2132 if (.not. isvar("xe")) then 2133 if (parameter(65) .NE. "xdim") then 2134 res@trXMaxF = stringtofloat(parameter(65)) 2135 else 2136 res@trXMaxF = maxiwssas 2137 end if 2138 else 2139 res@trXMaxF = xe 2140 end if 1549 2141 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1550 2142 end if … … 1559 2151 res@gsnLeftString = vNam(varn) 1560 2152 res@gsnRightString = unit(varn) 1561 res@trXMinF = miniwsa1562 res@trXMaxF = maxiwsa1563 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)1564 end if1565 end if1566 1567 if (vNam(varn) .EQ. "wses") then1568 if (over .EQ. 1) then1569 res@gsnLeftString = vNam(varn)1570 res@gsnRightString = unit(varn)1571 res@trXMinF = min(data(varn,:,:))1572 res@trXMaxF = max(data(varn,:,:))1573 plot_wses = gsn_csm_xy(wks,data(varn,:,:),z_w,res)1574 else1575 res@gsnLeftString = vNam(varn)1576 res@gsnRightString = unit(varn)1577 res@trXMinF = min(data(varn,:,:))1578 res@trXMaxF = max(data(varn,:,:))2153 if (.not. isvar("xs")) then 2154 if (parameter(63) .NE. "x0") then 2155 res@trXMinF = stringtofloat(parameter(63)) 2156 else 2157 res@trXMinF = miniwsa 2158 end if 2159 else 2160 res@trXMinF = xs 2161 end if 2162 if (.not. isvar("xe")) then 2163 if (parameter(65) .NE. "xdim") then 2164 res@trXMaxF = stringtofloat(parameter(65)) 2165 else 2166 res@trXMaxF = maxiwsa 2167 end if 2168 else 2169 res@trXMaxF = xe 2170 end if 1579 2171 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1580 2172 end if … … 1590 2182 res@gsnLeftString = vNam(varn) 1591 2183 res@gsnRightString = unit(varn) 1592 res@trXMinF = minius2 1593 res@trXMaxF = maxius2 2184 if (.not. isvar("xs")) then 2185 if (parameter(63) .NE. "x0") then 2186 res@trXMinF = stringtofloat(parameter(63)) 2187 else 2188 res@trXMinF = minius2 2189 end if 2190 else 2191 res@trXMinF = xs 2192 end if 2193 if (.not. isvar("xe")) then 2194 if (parameter(65) .NE. "xdim") then 2195 res@trXMaxF = stringtofloat(parameter(65)) 2196 else 2197 res@trXMaxF = maxius2 2198 end if 2199 else 2200 res@trXMaxF = xe 2201 end if 1594 2202 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1595 2203 end if … … 1604 2212 res@gsnLeftString = vNam(varn) 1605 2213 res@gsnRightString = unit(varn) 1606 res@trXMinF = minivs2 1607 res@trXMaxF = maxivs2 2214 if (.not. isvar("xs")) then 2215 if (parameter(63) .NE. "x0") then 2216 res@trXMinF = stringtofloat(parameter(63)) 2217 else 2218 res@trXMinF = minivs2 2219 end if 2220 else 2221 res@trXMinF = xs 2222 end if 2223 if (.not. isvar("xe")) then 2224 if (parameter(65) .NE. "xdim") then 2225 res@trXMaxF = stringtofloat(parameter(65)) 2226 else 2227 res@trXMaxF = maxivs2 2228 end if 2229 else 2230 res@trXMaxF = xe 2231 end if 1608 2232 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1609 2233 end if … … 1618 2242 res@gsnLeftString = vNam(varn) 1619 2243 res@gsnRightString = unit(varn) 1620 res@trXMinF = miniws2 1621 res@trXMaxF = maxiws2 1622 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1623 end if 1624 end if 1625 1626 if (vNam(varn) .EQ. "pts2") then 1627 minipts2=min(data(varn,:,:)) 1628 maxipts2=max(data(varn,:,:)) 1629 if (over .EQ. 1) then 1630 res@gsnLeftString = vNam(varn) 1631 res@gsnRightString = unit(varn) 1632 res@trXMinF = minipts2 1633 res@trXMaxF = maxipts2 1634 plot_pts2 = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1635 else 1636 res@gsnLeftString = vNam(varn) 1637 res@gsnRightString = unit(varn) 1638 res@trXMinF = minipts2 1639 res@trXMaxF = maxipts2 1640 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1641 end if 1642 end if 1643 1644 if (vNam(varn) .EQ. "ws3") then 1645 miniws3=min(data(varn,:,:)) 1646 maxiws3=max(data(varn,:,:)) 1647 if (over .EQ. 1) then 1648 res@gsnLeftString = vNam(varn) 1649 res@gsnRightString = unit(varn) 1650 res@trXMinF = miniws3 1651 res@trXMaxF = maxiws3 1652 plot_ws3 = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1653 else 1654 res@gsnLeftString = vNam(varn) 1655 res@gsnRightString = unit(varn) 1656 res@trXMinF = miniws3 1657 res@trXMaxF = maxiws3 1658 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1659 end if 1660 end if 1661 1662 if (vNam(varn) .EQ. "Sw") then 1663 miniSw=min(data(varn,:,:)) 1664 maxiSw=max(data(varn,:,:)) 1665 if (over .EQ. 1) then 1666 res@gsnLeftString = vNam(varn) 1667 res@gsnRightString = unit(varn) 1668 res@trXMinF = miniSw 1669 res@trXMaxF = maxiSw 1670 plot_Sw = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1671 else 1672 res@gsnLeftString = vNam(varn) 1673 res@gsnRightString = unit(varn) 1674 res@trXMinF = miniSw 1675 res@trXMaxF = maxiSw 1676 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1677 end if 1678 end if 1679 1680 if (vNam(varn) .EQ. "ws2pts") then 1681 miniws2pts=min(data(varn,:,:)) 1682 maxiws2pts=max(data(varn,:,:)) 1683 if (over .EQ. 1) then 1684 res@gsnLeftString = vNam(varn) 1685 res@gsnRightString = unit(varn) 1686 res@trXMinF = miniws2pts 1687 res@trXMaxF = maxiws2pts 1688 plot_ws2pts = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1689 else 1690 res@gsnLeftString = vNam(varn) 1691 res@gsnRightString = unit(varn) 1692 res@trXMinF = miniws2pts 1693 res@trXMaxF = maxiws2pts 1694 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1695 end if 1696 end if 1697 1698 if (vNam(varn) .EQ. "wspts2") then 1699 miniwspts2=min(data(varn,:,:)) 1700 maxiwspts2=max(data(varn,:,:)) 1701 if (over .EQ. 1) then 1702 res@gsnLeftString = vNam(varn) 1703 res@gsnRightString = unit(varn) 1704 res@trXMinF = miniwspts2 1705 res@trXMaxF = maxiwspts2 1706 plot_wspts2 = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1707 else 1708 res@gsnLeftString = vNam(varn) 1709 res@gsnRightString = unit(varn) 1710 res@trXMinF = miniwspts2 1711 res@trXMaxF = maxiwspts2 2244 if (.not. isvar("xs")) then 2245 if (parameter(63) .NE. "x0") then 2246 res@trXMinF = stringtofloat(parameter(63)) 2247 else 2248 res@trXMinF = miniws2 2249 end if 2250 else 2251 res@trXMinF = xs 2252 end if 2253 if (.not. isvar("xe")) then 2254 if (parameter(65) .NE. "xdim") then 2255 res@trXMaxF = stringtofloat(parameter(65)) 2256 else 2257 res@trXMaxF = maxiws2 2258 end if 2259 else 2260 res@trXMaxF = xe 2261 end if 1712 2262 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1713 2263 end if … … 1723 2273 res@gsnLeftString = vNam(varn) 1724 2274 res@gsnRightString = unit(varn) 1725 res@trXMinF = miniwsususodz 1726 res@trXMaxF = maxiwsususodz 2275 if (.not. isvar("xs")) then 2276 if (parameter(63) .NE. "x0") then 2277 res@trXMinF = stringtofloat(parameter(63)) 2278 else 2279 res@trXMinF = miniwsususodz 2280 end if 2281 else 2282 res@trXMinF = xs 2283 end if 2284 if (.not. isvar("xe")) then 2285 if (parameter(65) .NE. "xdim") then 2286 res@trXMaxF = stringtofloat(parameter(65)) 2287 else 2288 res@trXMaxF = maxiwsususodz 2289 end if 2290 else 2291 res@trXMaxF = xe 2292 end if 1727 2293 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1728 2294 end if … … 1737 2303 res@gsnLeftString = vNam(varn) 1738 2304 res@gsnRightString = unit(varn) 1739 res@trXMinF = miniwspsodz 1740 res@trXMaxF = maxiwspsodz 2305 if (.not. isvar("xs")) then 2306 if (parameter(63) .NE. "x0") then 2307 res@trXMinF = stringtofloat(parameter(63)) 2308 else 2309 res@trXMinF = miniwspsodz 2310 end if 2311 else 2312 res@trXMinF = xs 2313 end if 2314 if (.not. isvar("xe")) then 2315 if (parameter(65) .NE. "xdim") then 2316 res@trXMaxF = stringtofloat(parameter(65)) 2317 else 2318 res@trXMaxF = maxiwspsodz 2319 end if 2320 else 2321 res@trXMaxF = xe 2322 end if 1741 2323 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 1742 2324 end if … … 1751 2333 res@gsnLeftString = vNam(varn) 1752 2334 res@gsnRightString = unit(varn) 1753 res@trXMinF = miniwpeodz 1754 res@trXMaxF = maxiwpeodz 2335 if (.not. isvar("xs")) then 2336 if (parameter(63) .NE. "x0") then 2337 res@trXMinF = stringtofloat(parameter(63)) 2338 else 2339 res@trXMinF = miniwpeodz 2340 end if 2341 else 2342 res@trXMinF = xs 2343 end if 2344 if (.not. isvar("xe")) then 2345 if (parameter(65) .NE. "xdim") then 2346 res@trXMaxF = stringtofloat(parameter(65)) 2347 else 2348 res@trXMaxF = maxiwpeodz 2349 end if 2350 else 2351 res@trXMaxF = xe 2352 end if 1755 2353 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 1756 2354 end if … … 1763 2361 delete(temp) 1764 2362 end do 1765 2363 2364 if (count_var .EQ. 0) then 2365 print(" ") 2366 print("Please select a variable 'var=' or use the default value") 2367 print(" ") 2368 print("Your selection '"+var+"' does not exist on the input file") 2369 print(" ") 2370 exit 2371 end if 2372 1766 2373 if (over .EQ. 1 ) then 1767 2374 … … 1836 2443 z = f->$vNam(varn+1)$ 1837 2444 1838 ;res@gsnLeftString = vNam(varn)2445 res@gsnLeftString = vNam(varn) 1839 2446 res@gsnRightString = unit(varn) 1840 2447 res@trYMinF = min_z 1841 2448 res@trYMaxF = max_z 1842 res@trXMinF = min(data(varn,:,:)) 1843 res@trXMaxF = max(data(varn,:,:)) 2449 if (.not. isvar("xs")) then 2450 if (parameter(63) .NE. "x0") then 2451 res@trXMinF = stringtofloat(parameter(63)) 2452 else 2453 res@trXMinF = min(data(varn,:,:)) 2454 end if 2455 else 2456 res@trXMinF = xs 2457 end if 2458 if (.not. isvar("xe")) then 2459 if (parameter(65) .NE. "xdim") then 2460 res@trXMaxF = stringtofloat(parameter(65)) 2461 else 2462 res@trXMaxF = max(data(varn,:,:)) 2463 end if 2464 else 2465 res@trXMaxF = xe 2466 end if 1844 2467 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1845 2468 … … 1848 2471 res@gsnLeftString = "u, v and w" 1849 2472 res@gsnRightString = unit(varn) 1850 res@trXMinF = min((/miniu,miniv,miniw/)) 1851 res@trXMaxF = max((/maxiu,maxiv,maxiw/)) 2473 if (.not. isvar("xs")) then 2474 if (parameter(63) .NE. "x0") then 2475 res@trXMinF = stringtofloat(parameter(63)) 2476 else 2477 res@trXMinF = min((/miniu,miniv,miniw/)) 2478 end if 2479 else 2480 res@trXMinF = xs 2481 end if 2482 if (.not. isvar("xe")) then 2483 if (parameter(65) .NE. "xdim") then 2484 res@trXMaxF = stringtofloat(parameter(65)) 2485 else 2486 res@trXMaxF = max((/maxiu,maxiv,maxiw/)) 2487 end if 2488 else 2489 res@trXMaxF = xe 2490 end if 1852 2491 if (vNam(varn) .EQ. "w") then 1853 2492 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 1885 2524 res@gsnLeftString = "pt, vpt and lpt" 1886 2525 res@gsnRightString = unit(varn) 1887 res@trXMinF = min((/minipt,minivpt,minilpt/)) 1888 res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) 2526 if (.not. isvar("xs")) then 2527 if (parameter(63) .NE. "x0") then 2528 res@trXMinF = stringtofloat(parameter(63)) 2529 else 2530 res@trXMinF = min((/minipt,minivpt,minilpt/)) 2531 end if 2532 else 2533 res@trXMinF = xs 2534 end if 2535 if (.not. isvar("xe")) then 2536 if (parameter(65) .NE. "xdim") then 2537 res@trXMaxF = stringtofloat(parameter(65)) 2538 else 2539 res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) 2540 end if 2541 else 2542 res@trXMaxF = xe 2543 end if 1889 2544 1890 2545 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) … … 1918 2573 res@gsnLeftString = "q, qv and ql" 1919 2574 res@gsnRightString = unit(varn) 1920 res@trXMinF = min((/miniq,miniqv,miniql/)) 1921 res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) 2575 if (.not. isvar("xs")) then 2576 if (parameter(63) .NE. "x0") then 2577 res@trXMinF = stringtofloat(parameter(63)) 2578 else 2579 res@trXMinF = min((/miniq,miniqv,miniql/)) 2580 end if 2581 else 2582 res@trXMinF = xs 2583 end if 2584 if (.not. isvar("xe")) then 2585 if (parameter(65) .NE. "xdim") then 2586 res@trXMaxF = stringtofloat(parameter(65)) 2587 else 2588 res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) 2589 end if 2590 else 2591 res@trXMaxF = xe 2592 end if 1922 2593 1923 2594 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) … … 1946 2617 continue 1947 2618 end if 1948 end if 1949 if (vNam(varn) .EQ. "rho") then 1950 plot(n) = plot_rho 1951 end if 1952 if (vNam(varn) .EQ. "s") then 1953 plot(n) = plot_s 1954 end if 1955 if (vNam(varn) .EQ. "sa") then 1956 plot(n) = plot_sa 1957 end if 2619 end if 2620 1958 2621 if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then 1959 2622 if (e .EQ. 0) then 1960 2623 res@gsnLeftString = "e and es" 1961 2624 res@gsnRightString = unit(varn) 1962 res@trXMinF = min((/minie,minies/)) 1963 res@trXMaxF = max((/maxie,maxies/)) 2625 if (.not. isvar("xs")) then 2626 if (parameter(63) .NE. "x0") then 2627 res@trXMinF = stringtofloat(parameter(63)) 2628 else 2629 res@trXMinF = min((/minie,minies/)) 2630 end if 2631 else 2632 res@trXMinF = xs 2633 end if 2634 if (.not. isvar("xe")) then 2635 if (parameter(65) .NE. "xdim") then 2636 res@trXMaxF = stringtofloat(parameter(65)) 2637 else 2638 res@trXMaxF = max((/maxie,maxies/)) 2639 end if 2640 else 2641 res@trXMaxF = xe 2642 end if 1964 2643 1965 2644 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) … … 1993 2672 res@gsnLeftString = "km and kh" 1994 2673 res@gsnRightString = unit(varn) 1995 res@trXMinF = min((/minikm,minikh/)) 1996 res@trXMaxF = max((/maxikm,maxikh/)) 2674 if (.not. isvar("xs")) then 2675 if (parameter(63) .NE. "x0") then 2676 res@trXMinF = stringtofloat(parameter(63)) 2677 else 2678 res@trXMinF = min((/minikm,minikh/)) 2679 end if 2680 else 2681 res@trXMinF = xs 2682 end if 2683 if (.not. isvar("xe")) then 2684 if (parameter(65) .NE. "xdim") then 2685 res@trXMaxF = stringtofloat(parameter(65)) 2686 else 2687 res@trXMaxF = max((/maxikm,maxikh/)) 2688 end if 2689 else 2690 res@trXMaxF = xe 2691 end if 1997 2692 1998 2693 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) … … 2022 2717 end if 2023 2718 end if 2024 if (vNam(varn) .EQ. "l") then 2025 plot(n) = plot_l 2026 end if 2719 2027 2720 if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then 2028 2721 if (wpup .EQ. 0) then 2029 2722 res@gsnLeftString = "wpup, wsus and wu" 2030 2723 res@gsnRightString = unit(varn) 2031 res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) 2032 res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) 2724 if (.not. isvar("xs")) then 2725 if (parameter(63) .NE. "x0") then 2726 res@trXMinF = stringtofloat(parameter(63)) 2727 else 2728 res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) 2729 end if 2730 else 2731 res@trXMinF = xs 2732 end if 2733 if (.not. isvar("xe")) then 2734 if (parameter(65) .NE. "xdim") then 2735 res@trXMaxF = stringtofloat(parameter(65)) 2736 else 2737 res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) 2738 end if 2739 else 2740 res@trXMaxF = xe 2741 end if 2033 2742 2034 2743 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2062 2771 res@gsnLeftString = "wpvp, wsus and wv" 2063 2772 res@gsnRightString = unit(varn) 2064 res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) 2065 res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) 2773 if (.not. isvar("xs")) then 2774 if (parameter(63) .NE. "x0") then 2775 res@trXMinF = stringtofloat(parameter(63)) 2776 else 2777 res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) 2778 end if 2779 else 2780 res@trXMinF = xs 2781 end if 2782 if (.not. isvar("xe")) then 2783 if (parameter(65) .NE. "xdim") then 2784 res@trXMaxF = stringtofloat(parameter(65)) 2785 else 2786 res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) 2787 end if 2788 else 2789 res@trXMaxF = xe 2790 end if 2066 2791 2067 2792 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2095 2820 res@gsnLeftString = "wpptp, wspts and wv" 2096 2821 res@gsnRightString = unit(varn) 2097 res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) 2098 res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) 2822 if (.not. isvar("xs")) then 2823 if (parameter(63) .NE. "x0") then 2824 res@trXMinF = stringtofloat(parameter(63)) 2825 else 2826 res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) 2827 end if 2828 else 2829 res@trXMinF = xs 2830 end if 2831 if (.not. isvar("xe")) then 2832 if (parameter(65) .NE. "xdim") then 2833 res@trXMaxF = stringtofloat(parameter(65)) 2834 else 2835 res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) 2836 end if 2837 else 2838 res@trXMaxF = xe 2839 end if 2099 2840 2100 2841 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2128 2869 res@gsnLeftString = "wsptsBC and wptBC" 2129 2870 res@gsnRightString = unit(varn) 2130 res@trXMinF = min((/miniwsptsBC,miniwptBC/)) 2131 res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) 2871 if (.not. isvar("xs")) then 2872 if (parameter(63) .NE. "x0") then 2873 res@trXMinF = stringtofloat(parameter(63)) 2874 else 2875 res@trXMinF = min((/miniwsptsBC,miniwptBC/)) 2876 end if 2877 else 2878 res@trXMinF = xs 2879 end if 2880 if (.not. isvar("xe")) then 2881 if (parameter(65) .NE. "xdim") then 2882 res@trXMaxF = stringtofloat(parameter(65)) 2883 else 2884 res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) 2885 end if 2886 else 2887 res@trXMaxF = xe 2888 end if 2132 2889 2133 2890 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2161 2918 res@gsnLeftString = "wpvptp, wsvpts and wv" 2162 2919 res@gsnRightString = unit(varn) 2163 res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) 2164 res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) 2920 if (.not. isvar("xs")) then 2921 if (parameter(63) .NE. "x0") then 2922 res@trXMinF = stringtofloat(parameter(63)) 2923 else 2924 res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) 2925 end if 2926 else 2927 res@trXMinF = xs 2928 end if 2929 if (.not. isvar("xe")) then 2930 if (parameter(65) .NE. "xdim") then 2931 res@trXMaxF = stringtofloat(parameter(65)) 2932 else 2933 res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) 2934 end if 2935 else 2936 res@trXMaxF = xe 2937 end if 2165 2938 2166 2939 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2194 2967 res@gsnLeftString = "wpqp, wsqs and wq" 2195 2968 res@gsnRightString = unit(varn) 2196 res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) 2197 res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) 2969 if (.not. isvar("xs")) then 2970 if (parameter(63) .NE. "x0") then 2971 res@trXMinF = stringtofloat(parameter(63)) 2972 else 2973 res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) 2974 end if 2975 else 2976 res@trXMinF = xs 2977 end if 2978 if (.not. isvar("xe")) then 2979 if (parameter(65) .NE. "xdim") then 2980 res@trXMaxF = stringtofloat(parameter(65)) 2981 else 2982 res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) 2983 end if 2984 else 2985 res@trXMaxF = xe 2986 end if 2198 2987 2199 2988 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2227 3016 res@gsnLeftString = "wpqvp, wsqvs and wqv" 2228 3017 res@gsnRightString = unit(varn) 2229 res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) 2230 res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) 3018 if (.not. isvar("xs")) then 3019 if (parameter(63) .NE. "x0") then 3020 res@trXMinF = stringtofloat(parameter(63)) 3021 else 3022 res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) 3023 end if 3024 else 3025 res@trXMinF = xs 3026 end if 3027 if (.not. isvar("xe")) then 3028 if (parameter(65) .NE. "xdim") then 3029 res@trXMaxF = stringtofloat(parameter(65)) 3030 else 3031 res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) 3032 end if 3033 else 3034 res@trXMaxF = xe 3035 end if 2231 3036 2232 3037 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2260 3065 res@gsnLeftString = "wpsp, wsss and ws" 2261 3066 res@gsnRightString = unit(varn) 2262 res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) 2263 res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) 3067 if (.not. isvar("xs")) then 3068 if (parameter(63) .NE. "x0") then 3069 res@trXMinF = stringtofloat(parameter(63)) 3070 else 3071 res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) 3072 end if 3073 else 3074 res@trXMinF = xs 3075 end if 3076 if (.not. isvar("xe")) then 3077 if (parameter(65) .NE. "xdim") then 3078 res@trXMaxF = stringtofloat(parameter(65)) 3079 else 3080 res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) 3081 end if 3082 else 3083 res@trXMaxF = xe 3084 end if 2264 3085 2265 3086 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2293 3114 res@gsnLeftString = "wpsap, wssas and wsa" 2294 3115 res@gsnRightString = unit(varn) 2295 res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) 2296 res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) 3116 if (.not. isvar("xs")) then 3117 if (parameter(63) .NE. "x0") then 3118 res@trXMinF = stringtofloat(parameter(63)) 3119 else 3120 res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) 3121 end if 3122 else 3123 res@trXMinF = xs 3124 end if 3125 if (.not. isvar("xe")) then 3126 if (parameter(65) .NE. "xdim") then 3127 res@trXMaxF = stringtofloat(parameter(65)) 3128 else 3129 res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) 3130 end if 3131 else 3132 res@trXMaxF = xe 3133 end if 2297 3134 2298 3135 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2322 3159 end if 2323 3160 end if 2324 if (vNam(varn) .EQ. "wses") then 2325 plot(n) = plot_wses 2326 end if 3161 2327 3162 if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then 2328 3163 if (us2 .EQ. 0) then 2329 3164 res@gsnLeftString = "us2, vs2 and ws2" 2330 3165 res@gsnRightString = unit(varn) 2331 res@trXMinF = min((/minius2,minivs2,miniws2/)) 2332 res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) 3166 if (.not. isvar("xs")) then 3167 if (parameter(63) .NE. "x0") then 3168 res@trXMinF = stringtofloat(parameter(63)) 3169 else 3170 res@trXMinF = min((/minius2,minivs2,miniws2/)) 3171 end if 3172 else 3173 res@trXMinF = xs 3174 end if 3175 if (.not. isvar("xe")) then 3176 if (parameter(65) .NE. "xdim") then 3177 res@trXMaxF = stringtofloat(parameter(65)) 3178 else 3179 res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) 3180 end if 3181 else 3182 res@trXMaxF = xe 3183 end if 2333 3184 2334 3185 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2358 3209 end if 2359 3210 end if 2360 if (vNam(varn) .EQ. "pts2") then 2361 plot(n) = plot_pts2 2362 end if 2363 if (vNam(varn) .EQ. "ws3") then 2364 plot(n) = plot_ws3 2365 end if 2366 if (vNam(varn) .EQ. "Sw") then 2367 plot(n) = plot_Sw 2368 end if 2369 if (vNam(varn) .EQ. "ws2pts") then 2370 plot(n) = plot_ws2pts 2371 end if 2372 if (vNam(varn) .EQ. "wspts2") then 2373 plot(n) = plot_wspts2 2374 end if 3211 2375 3212 if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then 2376 3213 if (wsususodz .EQ. 0) then 2377 3214 res@gsnLeftString = "wsususodz, wspsodz and ws2" 2378 3215 res@gsnRightString = unit(varn) 2379 res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/)) 2380 res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/)) 3216 if (.not. isvar("xs")) then 3217 if (parameter(63) .NE. "x0") then 3218 res@trXMinF = stringtofloat(parameter(63)) 3219 else 3220 res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/)) 3221 end if 3222 else 3223 res@trXMinF = xs 3224 end if 3225 if (.not. isvar("xe")) then 3226 if (parameter(65) .NE. "xdim") then 3227 res@trXMaxF = stringtofloat(parameter(65)) 3228 else 3229 res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/)) 3230 end if 3231 else 3232 res@trXMaxF = xe 3233 end if 2381 3234 2382 3235 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) … … 2449 3302 res@gsnLeftString = c_var 2450 3303 res@gsnRightString = unit(varn) 2451 res@trXMinF = min(mini) 2452 res@trXMaxF = max(maxi) 3304 if (.not. isvar("xs")) then 3305 if (parameter(63) .NE. "x0") then 3306 res@trXMinF = stringtofloat(parameter(63)) 3307 else 3308 res@trXMinF = min(mini) 3309 end if 3310 else 3311 res@trXMinF = xs 3312 end if 3313 if (.not. isvar("xe")) then 3314 if (parameter(65) .NE. "xdim") then 3315 res@trXMaxF = stringtofloat(parameter(65)) 3316 else 3317 res@trXMaxF = max(maxi) 3318 end if 3319 else 3320 res@trXMaxF = xe 3321 end if 2453 3322 end if 2454 3323 end if … … 2496 3365 ; merge plots onto one page 2497 3366 ; *************************************************** 2498 print(n) 3367 2499 3368 do m=0,n-1 2500 3369 plot_(m)=plot(n-1-m) -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r161 r162 63 63 if ( .not. isvar("over") ) then ; switches overlaying plots on 64 64 over = 0 65 if (stringtointeger(parameter( 73)) .NE. 0) then66 over = stringtointeger(parameter( 73))67 if (stringtointeger(parameter( 73)) .NE. 1) then65 if (stringtointeger(parameter(37)) .NE. 0) then 66 over = stringtointeger(parameter(37)) 67 if (stringtointeger(parameter(37)) .NE. 1) then 68 68 print(" ") 69 69 print("Please set 'over' to 0 or 1") … … 93 93 t_all = f->time 94 94 nt = dimsizes(t_all) 95 delta_t=t_all(nt-1)/nt 95 96 96 97 ; **************************************************** … … 99 100 100 101 if ( .not. isvar("start_time_step") ) then 101 start_time_step = 0 102 if (parameter(13) .NE. "1") then 103 if (parameter(13) .LE. "0") 104 print(" ") 105 print("Begin with time step 1") 102 start_time_step=t_all(0)/3600 103 if (parameter(13) .NE. "t(0)") then 104 if (stringtodouble(parameter(13)) .GE. t_all(nt-1)/3600) 105 print(" ") 106 print("'start_time_step' = "+ parameter(13) +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 107 print(" ") 108 print("Please select another 'start_time_step'") 106 109 print(" ") 107 110 exit 108 111 end if 109 if (stringtointeger(parameter(13)) .GE. nt) 110 print(" ") 111 print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt-1)) 112 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600) 113 print(" ") 114 print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 115 print(" ") 116 print("Please select another 'start_time_step'") 112 117 print(" ") 113 118 exit 114 119 end if 115 start_time_step = stringtointeger(parameter(13))-1120 start_time_step=stringtodouble(parameter(13)) 116 121 end if 117 122 else 118 if (start_time_step .LE. 0) 119 print(" ") 120 print("Begin with time step 1") 123 if (start_time_step .GE. t_all(nt-1)/3600) 124 print(" ") 125 print("'start_time_step' = "+ start_time_step +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 126 print(" ") 127 print("Please select another 'start_time_step'") 121 128 print(" ") 122 129 exit 123 130 end if 124 if (start_time_step .GE. nt) 125 print(" ") 126 print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt-1)) 131 if (start_time_step .LT. t_all(0)/3600) 132 print(" ") 133 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 134 print(" ") 135 print("Please select another 'start_time_step'") 127 136 print(" ") 128 137 exit 129 138 end if 130 start_time_step = start_time_step - 1131 139 end if 132 140 start_time_step = start_time_step*3600 141 do i=0,nt-2 142 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then 143 st=i 144 break 145 end if 146 end do 147 if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then 148 st=nt-2 149 end if 150 133 151 ; **************************************************** 134 152 ; end of time step and different types of mistakes that could be done … … 136 154 137 155 if ( .not. isvar("end_time_step") ) then 138 end_time_step = nt-1 139 if (parameter(15) .NE. "nt") then 140 if (parameter(15) .LE. "0") 141 print(" ") 142 print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ") 156 end_time_step = t_all(nt-1)/3600 157 if (parameter(15) .NE. "t(end)") then 158 if (stringtodouble(parameter(15)) .LE. t_all(0)/3600) 159 print(" ") 160 print("'end_time_step' = "+parameter(15)+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 161 print(" ") 162 print("Please select another 'end_time_step'") 143 163 print(" ") 144 164 exit 145 165 end if 146 if (stringtointeger(parameter(15)) .GE. nt) 147 print(" ") 148 print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt-1)) 166 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600) 167 print(" ") 168 print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 169 print(" ") 170 print("Please select another 'end_time_step'") 149 171 print(" ") 150 172 exit 151 173 end if 152 if (stringtointeger(parameter(15)) .LT. stringtointeger(parameter(13)) ) 153 print(" ") 154 print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(13)) 174 if (stringtodouble(parameter(15)) .LE. start_time_step/3600) 175 print(" ") 176 print("'end_time_step' = "+ parameter(15) +"h is equal or lower than 'start_time_step' = "+parameter(13)+"h") 177 print(" ") 178 print("Please select another 'start_time_step' or 'end_time_step'") 155 179 print(" ") 156 180 exit 157 181 end if 158 end_time_step = stringto integer(parameter(15))-1182 end_time_step = stringtodouble(parameter(15)) 159 183 end if 160 184 else 161 if (end_time_step .LE. 0) 162 print(" ") 163 print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ") 185 if (end_time_step .LE. t_all(0)/3600) 186 print(" ") 187 print("'end_time_step' = "+end_time_step+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 188 print(" ") 189 print("Please select another 'end_time_step'") 164 190 print(" ") 165 191 exit 166 192 end if 167 if (end_time_step .GE. nt) 168 print(" ") 169 print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt-1)) 193 if (end_time_step .GT. t_all(nt-1)/3600) 194 print(" ") 195 print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 196 print(" ") 197 print("Please select another 'end_time_step'") 170 198 print(" ") 171 199 exit 172 200 end if 173 if (end_time_step .LT. start_time_step) 174 print(" ") 175 print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step) 201 if (end_time_step .LE. start_time_step/3600) 202 print(" ") 203 print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h") 204 print(" ") 205 print("Please select another 'start_time_step' or 'end_time_step'") 176 206 print(" ") 177 207 exit 178 208 end if 179 end_time_step = end_time_step - 1 180 end if 209 end if 210 end_time_step = end_time_step*3600 211 do i=0,nt-1 212 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then 213 et=i 214 break 215 end if 216 end do 217 218 delete(start_time_step) 219 start_time_step=round(st,3) 220 delete(end_time_step) 221 end_time_step=round(et,3) 181 222 182 223 t = f->time(start_time_step:end_time_step) … … 266 307 plot_splptz = gsn_csm_xy(wks_ps,t,data_0(:),res) 267 308 end if 268 309 310 count_var=0 269 311 do varn = dim-1,0,1 270 312 … … 284 326 285 327 if(check) then 286 328 count_var=count_var+1 329 287 330 data_all = f ->$vNam(varn)$ 288 331 unit(varn) = data_all@units … … 432 475 end do 433 476 477 if (count_var .EQ. 0) then 478 print(" ") 479 print("Please select a variable 'var=' or use the default value") 480 print(" ") 481 print("Your selection '"+var+"' does not exist on the input file") 482 print(" ") 483 exit 484 end if 485 434 486 do varn = dim-1,0,1 435 487 … … 457 509 res@tiXAxisFontHeightF = 0.07 458 510 res@txFontHeightF = 0.07 459 res@tiYAxisFontHeightF = 0.07 460 res@xyLabelMode = "Custom" 461 511 res@tiYAxisFontHeightF = 0.07 462 512 463 513 if (vNam(varn) .EQ. "E") 464 514 E=0 465 515 res@xyLineColors = (/237/) 466 res@xyExplicitLabels = "E"467 516 res@xyLineLabelFontHeightF = 0.05 468 517 res@xyLineLabelFontColor = 237 … … 474 523 Es=0 475 524 res@xyLineColors = (/144/) 476 res@xyExplicitLabels = "Es"477 525 res@xyLineLabelFontHeightF = 0.05 478 526 res@xyLineLabelFontColor = 144 … … 483 531 us=0 484 532 res@xyLineColors = (/237/) 485 res@xyExplicitLabels = "us"486 533 res@xyLineLabelFontHeightF = 0.05 487 534 res@xyLineLabelFontColor = 237 … … 493 540 ws=0 494 541 res@xyLineColors = (/144/) 495 res@xyExplicitLabels = "ws"496 542 res@xyLineLabelFontHeightF = 0.05 497 543 res@xyLineLabelFontColor = 144 … … 502 548 u=0 503 549 res@xyLineColors = (/237/) 504 res@xyExplicitLabels = "umax"505 550 res@xyLineLabelFontHeightF = 0.05 506 551 res@xyLineLabelFontColor = 237 … … 512 557 v=0 513 558 res@xyLineColors = (/144/) 514 res@xyExplicitLabels = "vmax"515 559 res@xyLineLabelFontHeightF = 0.05 516 560 res@xyLineLabelFontColor = 144 … … 520 564 w=0 521 565 res@xyLineColors = (/80/) 522 res@xyExplicitLabels = "wmax"523 566 res@xyLineLabelFontHeightF = 0.05 524 567 res@xyLineLabelFontColor = 80 … … 529 572 zw=0 530 573 res@xyLineColors = (/237/) 531 res@xyExplicitLabels = "z_i_wpt"532 574 res@xyLineLabelFontHeightF = 0.05 533 575 res@xyLineLabelFontColor = 237 … … 539 581 z=0 540 582 res@xyLineColors = (/144/) 541 res@xyExplicitLabels = "z_i_pt"542 583 res@xyLineLabelFontHeightF = 0.05 543 584 res@xyLineLabelFontColor = 144 … … 548 589 w0=0 549 590 res@xyLineColors = (/237/) 550 res@xyExplicitLabels = "wpptp0"551 591 res@xyLineLabelFontHeightF = 0.05 552 592 res@xyLineLabelFontColor = 237 … … 558 598 wp=0 559 599 res@xyLineColors = (/144/) 560 res@xyExplicitLabels = "wpptp"561 600 res@xyLineLabelFontHeightF = 0.05 562 601 res@xyLineLabelFontColor = 144 … … 566 605 wt=0 567 606 res@xyLineColors = (/80/) 568 res@xyExplicitLabels = "wpt"569 607 res@xyLineLabelFontHeightF = 0.05 570 608 res@xyLineLabelFontColor = 80 … … 575 613 p=0 576 614 res@xyLineColors = (/237/) 577 res@xyExplicitLabels = "pt_0_"578 615 res@xyLineLabelFontHeightF = 0.05 579 616 res@xyLineLabelFontColor = 237 … … 585 622 pz=0 586 623 res@xyLineColors = (/144/) 587 res@xyExplicitLabels = "pt_zp_"588 624 res@xyLineLabelFontHeightF = 0.05 589 625 res@xyLineLabelFontColor = 144 … … 594 630 x=0 595 631 res@xyLineColors = (/237/) 596 res@xyExplicitLabels = "splptx"597 632 res@xyLineLabelFontHeightF = 0.05 598 633 res@xyLineLabelFontColor = 237 … … 604 639 y=0 605 640 res@xyLineColors = (/144/) 606 res@xyExplicitLabels = "splpty"607 641 res@xyLineLabelFontHeightF = 0.05 608 642 res@xyLineLabelFontColor = 144 … … 612 646 z=0 613 647 res@xyLineColors = (/80/) 614 res@xyExplicitLabels = "splptz"615 648 res@xyLineLabelFontHeightF = 0.05 616 649 res@xyLineLabelFontColor = 80 … … 645 678 overlay(plot_E,plot_Es) 646 679 n=n+1 647 plot_ps(n) = plot_E 680 plot_ps(n) = plot_E 681 682 ; *************************************************** 683 ; legend for combined plot 684 ; *************************************************** 685 686 lgres = True 687 lgMonoDashIndex = False 688 lgres@lgLabelFont = "helvetica" 689 lgres@lgLabelFontHeightF = .1 690 lgres@vpWidthF = 0.4 691 lgres@vpHeightF = 0.4 692 lgres@lgDashIndexes = (/0,0,0/) 693 lgres@lgLineColors = (/237,144,80/) 694 lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres) 695 696 amres = True 697 amres@amParallelPosF = 0.6 698 amres@amOrthogonalPosF = -0.2 699 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 648 700 end if 649 701 if (vNam(varn) .EQ. "Es" .AND. E .NE. 1) then … … 651 703 overlay(plot_E,plot_Es) 652 704 n=n+1 653 plot_ps(n) = plot_E 705 plot_ps(n) = plot_E 706 707 ; *************************************************** 708 ; legend for combined plot 709 ; *************************************************** 710 711 lgres = True 712 lgMonoDashIndex = False 713 lgres@lgLabelFont = "helvetica" 714 lgres@lgLabelFontHeightF = .1 715 lgres@vpWidthF = 0.4 716 lgres@vpHeightF = 0.4 717 lgres@lgDashIndexes = (/0,0,0/) 718 lgres@lgLineColors = (/237,144,80/) 719 lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres) 720 721 amres = True 722 amres@amParallelPosF = 0.6 723 amres@amOrthogonalPosF = -0.2 724 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 654 725 end if 655 726 … … 659 730 n=n+1 660 731 plot_ps(n) = plot_us 732 733 ; *************************************************** 734 ; legend for combined plot 735 ; *************************************************** 736 737 lgres = True 738 lgMonoDashIndex = False 739 lgres@lgLabelFont = "helvetica" 740 lgres@lgLabelFontHeightF = .1 741 lgres@vpWidthF = 0.4 742 lgres@vpHeightF = 0.4 743 lgres@lgDashIndexes = (/0,0,0/) 744 lgres@lgLineColors = (/237,144,80/) 745 lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres) 746 747 amres = True 748 amres@amParallelPosF = 0.6 749 amres@amOrthogonalPosF = -0.2 750 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 661 751 end if 662 752 if (vNam(varn) .EQ. "ws" .AND. us .NE. 1) then … … 665 755 n=n+1 666 756 plot_ps(n) = plot_us 757 758 ; *************************************************** 759 ; legend for combined plot 760 ; *************************************************** 761 762 lgres = True 763 lgMonoDashIndex = False 764 lgres@lgLabelFont = "helvetica" 765 lgres@lgLabelFontHeightF = .1 766 lgres@vpWidthF = 0.4 767 lgres@vpHeightF = 0.4 768 lgres@lgDashIndexes = (/0,0,0/) 769 lgres@lgLineColors = (/237,144,80/) 770 lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres) 771 772 amres = True 773 amres@amParallelPosF = 0.6 774 amres@amOrthogonalPosF = -0.2 775 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 667 776 end if 668 777 … … 674 783 n=n+1 675 784 plot_ps(n) = plot_umax 785 786 ; *************************************************** 787 ; legend for combined plot 788 ; *************************************************** 789 790 lgres = True 791 lgMonoDashIndex = False 792 lgres@lgLabelFont = "helvetica" 793 lgres@lgLabelFontHeightF = .1 794 lgres@vpWidthF = 0.4 795 lgres@vpHeightF = 0.4 796 lgres@lgDashIndexes = (/0,0,0/) 797 lgres@lgLineColors = (/237,144,80/) 798 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 799 800 amres = True 801 amres@amParallelPosF = 0.6 802 amres@amOrthogonalPosF = -0.2 803 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 676 804 end if 677 805 end if … … 683 811 n=n+1 684 812 plot_ps(n) = plot_umax 813 814 ; *************************************************** 815 ; legend for combined plot 816 ; *************************************************** 817 818 lgres = True 819 lgMonoDashIndex = False 820 lgres@lgLabelFont = "helvetica" 821 lgres@lgLabelFontHeightF = .1 822 lgres@vpWidthF = 0.4 823 lgres@vpHeightF = 0.4 824 lgres@lgDashIndexes = (/0,0,0/) 825 lgres@lgLineColors = (/237,144,80/) 826 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 827 828 amres = True 829 amres@amParallelPosF = 0.6 830 amres@amOrthogonalPosF = -0.2 831 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 685 832 end if 686 833 end if … … 692 839 n=n+1 693 840 plot_ps(n) = plot_umax 841 842 ; *************************************************** 843 ; legend for combined plot 844 ; *************************************************** 845 846 lgres = True 847 lgMonoDashIndex = False 848 lgres@lgLabelFont = "helvetica" 849 lgres@lgLabelFontHeightF = .1 850 lgres@vpWidthF = 0.4 851 lgres@vpHeightF = 0.4 852 lgres@lgDashIndexes = (/0,0,0/) 853 lgres@lgLineColors = (/237,144,80/) 854 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 855 856 amres = True 857 amres@amParallelPosF = 0.6 858 amres@amOrthogonalPosF = -0.2 859 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 694 860 end if 695 861 end if … … 699 865 overlay(plot_z_i_wpt,plot_z_i_pt) 700 866 n=n+1 701 plot_ps(n) = plot_z_i_wpt 867 plot_ps(n) = plot_z_i_wpt 868 869 ; *************************************************** 870 ; legend for combined plot 871 ; *************************************************** 872 873 lgres = True 874 lgMonoDashIndex = False 875 lgres@lgLabelFont = "helvetica" 876 lgres@lgLabelFontHeightF = .1 877 lgres@vpWidthF = 0.4 878 lgres@vpHeightF = 0.4 879 lgres@lgDashIndexes = (/0,0,0/) 880 lgres@lgLineColors = (/237,144,80/) 881 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 882 883 amres = True 884 amres@amParallelPosF = 0.6 885 amres@amOrthogonalPosF = -0.2 886 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 702 887 end if 703 888 if (vNam(varn) .EQ. "z_i_pt" .AND. zw .NE. 1) then … … 705 890 overlay(plot_z_i_wpt,plot_z_i_pt) 706 891 n=n+1 707 plot_ps(n) = plot_z_i_wpt 892 plot_ps(n) = plot_z_i_wpt 893 894 ; *************************************************** 895 ; legend for combined plot 896 ; *************************************************** 897 898 lgres = True 899 lgMonoDashIndex = False 900 lgres@lgLabelFont = "helvetica" 901 lgres@lgLabelFontHeightF = .1 902 lgres@vpWidthF = 0.4 903 lgres@vpHeightF = 0.4 904 lgres@lgDashIndexes = (/0,0,0/) 905 lgres@lgLineColors = (/237,144,80/) 906 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 907 908 amres = True 909 amres@amParallelPosF = 0.6 910 amres@amOrthogonalPosF = -0.2 911 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 708 912 end if 709 913 … … 715 919 n=n+1 716 920 plot_ps(n) = plot_wpptp0 921 922 ; *************************************************** 923 ; legend for combined plot 924 ; *************************************************** 925 926 lgres = True 927 lgMonoDashIndex = False 928 lgres@lgLabelFont = "helvetica" 929 lgres@lgLabelFontHeightF = .1 930 lgres@vpWidthF = 0.4 931 lgres@vpHeightF = 0.4 932 lgres@lgDashIndexes = (/0,0,0/) 933 lgres@lgLineColors = (/237,144,80/) 934 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 935 936 amres = True 937 amres@amParallelPosF = 0.6 938 amres@amOrthogonalPosF = -0.2 939 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 717 940 end if 718 941 end if … … 723 946 overlay(plot_wpptp0,plot_wpt) 724 947 n=n+1 725 plot_ps(n) = plot_wpptp0 948 plot_ps(n) = plot_wpptp0 949 950 ; *************************************************** 951 ; legend for combined plot 952 ; *************************************************** 953 954 lgres = True 955 lgMonoDashIndex = False 956 lgres@lgLabelFont = "helvetica" 957 lgres@lgLabelFontHeightF = .1 958 lgres@vpWidthF = 0.4 959 lgres@vpHeightF = 0.4 960 lgres@lgDashIndexes = (/0,0,0/) 961 lgres@lgLineColors = (/237,144,80/) 962 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 963 964 amres = True 965 amres@amParallelPosF = 0.6 966 amres@amOrthogonalPosF = -0.2 967 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 726 968 end if 727 969 end if … … 732 974 overlay(plot_wpptp0,plot_wpt) 733 975 n=n+1 734 plot_ps(n) = plot_wpptp0 976 plot_ps(n) = plot_wpptp0 977 978 ; *************************************************** 979 ; legend for combined plot 980 ; *************************************************** 981 982 lgres = True 983 lgMonoDashIndex = False 984 lgres@lgLabelFont = "helvetica" 985 lgres@lgLabelFontHeightF = .1 986 lgres@vpWidthF = 0.4 987 lgres@vpHeightF = 0.4 988 lgres@lgDashIndexes = (/0,0,0/) 989 lgres@lgLineColors = (/237,144,80/) 990 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 991 992 amres = True 993 amres@amParallelPosF = 0.6 994 amres@amOrthogonalPosF = -0.2 995 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 735 996 end if 736 997 end if … … 740 1001 overlay(plot_pt_0_,plot_pt_zp_) 741 1002 n=n+1 742 plot_ps(n) = plot_pt_0_ 1003 plot_ps(n) = plot_pt_0_ 1004 1005 ; *************************************************** 1006 ; legend for combined plot 1007 ; *************************************************** 1008 1009 lgres = True 1010 lgMonoDashIndex = False 1011 lgres@lgLabelFont = "helvetica" 1012 lgres@lgLabelFontHeightF = .1 1013 lgres@vpWidthF = 0.4 1014 lgres@vpHeightF = 0.4 1015 lgres@lgDashIndexes = (/0,0,0/) 1016 lgres@lgLineColors = (/237,144,80/) 1017 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1018 1019 amres = True 1020 amres@amParallelPosF = 0.6 1021 amres@amOrthogonalPosF = -0.2 1022 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 743 1023 end if 744 1024 if (vNam(varn) .EQ. "pt_zp_" .AND. p .NE. 1) then … … 746 1026 overlay(plot_pt_0_,plot_pt_zp_) 747 1027 n=n+1 748 plot_ps(n) = plot_pt_0_ 1028 plot_ps(n) = plot_pt_0_ 1029 1030 ; *************************************************** 1031 ; legend for combined plot 1032 ; *************************************************** 1033 1034 lgres = True 1035 lgMonoDashIndex = False 1036 lgres@lgLabelFont = "helvetica" 1037 lgres@lgLabelFontHeightF = .1 1038 lgres@vpWidthF = 0.4 1039 lgres@vpHeightF = 0.4 1040 lgres@lgDashIndexes = (/0,0,0/) 1041 lgres@lgLineColors = (/237,144,80/) 1042 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1043 1044 amres = True 1045 amres@amParallelPosF = 0.6 1046 amres@amOrthogonalPosF = -0.2 1047 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 749 1048 end if 750 1049 … … 755 1054 overlay(plot_splptx,plot_splptz) 756 1055 n=n+1 757 plot_ps(n) = plot_splptx 1056 plot_ps(n) = plot_splptx 1057 1058 ; *************************************************** 1059 ; legend for combined plot 1060 ; *************************************************** 1061 1062 lgres = True 1063 lgMonoDashIndex = False 1064 lgres@lgLabelFont = "helvetica" 1065 lgres@lgLabelFontHeightF = .1 1066 lgres@vpWidthF = 0.4 1067 lgres@vpHeightF = 0.4 1068 lgres@lgDashIndexes = (/0,0,0/) 1069 lgres@lgLineColors = (/237,144,80/) 1070 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1071 1072 amres = True 1073 amres@amParallelPosF = 0.6 1074 amres@amOrthogonalPosF = -0.2 1075 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 758 1076 end if 759 1077 end if … … 765 1083 n=n+1 766 1084 plot_ps(n) = plot_splptx 1085 1086 ; *************************************************** 1087 ; legend for combined plot 1088 ; *************************************************** 1089 1090 lgres = True 1091 lgMonoDashIndex = False 1092 lgres@lgLabelFont = "helvetica" 1093 lgres@lgLabelFontHeightF = .1 1094 lgres@vpWidthF = 0.4 1095 lgres@vpHeightF = 0.4 1096 lgres@lgDashIndexes = (/0,0,0/) 1097 lgres@lgLineColors = (/237,144,80/) 1098 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1099 1100 amres = True 1101 amres@amParallelPosF = 0.6 1102 amres@amOrthogonalPosF = -0.2 1103 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 767 1104 end if 768 1105 end if … … 773 1110 overlay(plot_splptx,plot_splptz) 774 1111 n=n+1 775 plot_ps(n) = plot_splptx 1112 plot_ps(n) = plot_splptx 1113 1114 ; *************************************************** 1115 ; legend for combined plot 1116 ; *************************************************** 1117 1118 lgres = True 1119 lgMonoDashIndex = False 1120 lgres@lgLabelFont = "helvetica" 1121 lgres@lgLabelFontHeightF = .1 1122 lgres@vpWidthF = 0.4 1123 lgres@vpHeightF = 0.4 1124 lgres@lgDashIndexes = (/0,0,0/) 1125 lgres@lgLineColors = (/237,144,80/) 1126 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1127 1128 amres = True 1129 amres@amParallelPosF = 0.6 1130 amres@amOrthogonalPosF = -0.2 1131 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 776 1132 end if 777 1133 end if … … 840 1196 ; merge plots onto one page 841 1197 ; *************************************************** 842 1198 843 1199 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 844 1200 gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
Note: See TracChangeset
for help on using the changeset viewer.