Changeset 218 for palm/trunk/SCRIPTS
- Timestamp:
- Dec 10, 2008 9:14:34 AM (16 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r195 r218 37 37 if (file_1 .EQ. "File in") then 38 38 print(" ") 39 print(" Please provide 1st input file 'file_1=' in 'ncl_preferences.ncl'")39 print("Declare input file 'file_1=' in 'ncl_preferences.ncl' or prompt") 40 40 print(" ") 41 41 exit … … 43 43 file_in = file_1 44 44 end if 45 if (.not. isfilepresent(file_in)) then46 print(" ")47 print("1st input file: '"+file_in+"' does not exist")48 print(" ")49 exit50 end if51 45 52 46 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then … … 73 67 if (fill_mode .NE. "AreaFill" .AND. fill_mode .NE. "RasterFill" .AND. fill_mode .NE. "CellFill") then 74 68 print(" ") 75 print(" Your'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'")69 print("'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'") 76 70 print(" ") 77 71 fill_mode = "AreaFill" … … 108 102 if (xyc .EQ. 0 .AND. xzc .EQ. 0 .AND. yzc .EQ. 0) then 109 103 print(" ") 110 print(" Please select one crossection (xyc=1 or xzc=1 or yzc=1)")104 print("Select one crossection (xyc=1 or xzc=1 or yzc=1)") 111 105 print(" ") 112 106 exit … … 115 109 if (xzc .EQ. 1 .OR. yzc .EQ. 1) then 116 110 print(" ") 117 print(" Please select just one crossection (xyc=1 or xzc=1 or yzc=1)")111 print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)") 118 112 print(" ") 119 113 exit … … 123 117 if (xyc .EQ. 1 .OR. yzc .EQ. 1) then 124 118 print(" ") 125 print(" Please select just one crossection (xyc=1 or xzc=1 or yzc=1)")119 print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)") 126 120 print(" ") 127 121 exit … … 131 125 if (xyc .EQ. 1 .OR. xzc .EQ. 1) then 132 126 print(" ") 133 print(" Please select just one crossection (xyc=1 or xzc=1 or yzc=1)")127 print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)") 134 128 print(" ") 135 129 exit … … 139 133 if (vector .NE. 0 .AND. vector .NE. 1) then 140 134 print(" ") 141 print(" Please set 'vector' to 0 or 1")135 print("Set 'vector' to 0 or 1") 142 136 print(" ") 143 137 exit 144 end if 138 end if 139 140 if (norm_x .EQ. 0) then 141 print(" ") 142 print("Normalising with 0 is not allowed, 'norm_x' is set to 1.0") 143 print(" ") 144 norm_x = 1.0 145 end if 146 if (norm_y .EQ. 0) then 147 print(" ") 148 print("Normalising with 0 is not allowed, 'norm_y' is set to 1.0") 149 print(" ") 150 norm_y = 1.0 151 end if 152 if (norm_z .EQ. 0) then 153 print(" ") 154 print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0") 155 print(" ") 156 norm_z = 1.0 157 end if 145 158 146 159 ; *************************************************** 147 160 ; open input file 148 161 ; *************************************************** 149 150 f = addfile( file_in, "r" ) 151 152 vNam = getfilevarnames(f) 162 163 file_in_1 = False 164 if (isStrSubset(file_in, ".nc"))then 165 start_f = -2 166 end_f = -2 167 file_in_1 = True 168 end if 169 170 if (start_f .EQ. -1)then 171 print(" ") 172 print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 173 print(" ") 174 exit 175 end if 176 if (end_f .EQ. -1)then 177 print(" ") 178 print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 179 print(" ") 180 exit 181 end if 182 183 files=new(end_f-start_f+1,string) 184 185 if (file_in_1)then 186 if (isfilepresent(file_in))then 187 files(0)=file_in 188 else 189 print(" ") 190 print("1st input file: '"+file_in+"' does not exist") 191 print(" ") 192 exit 193 end if 194 else 195 if (start_f .EQ. 0)then 196 if (isfilepresent(file_in+".nc"))then 197 files(0)=file_in+".nc" 198 do i=1,end_f 199 if (isfilepresent(file_in+"."+i+".nc"))then 200 files(i)=file_in+"."+i+".nc" 201 else 202 print(" ") 203 print("Input file: '"+file_in+"."+i+".nc' does not exist") 204 print(" ") 205 exit 206 end if 207 end do 208 else 209 print(" ") 210 print("Input file: '"+file_in+".nc' does not exist") 211 print(" ") 212 exit 213 end if 214 else 215 do i=start_f,end_f 216 if (isfilepresent(file_in+"."+i+".nc"))then 217 files(i-start_f)=file_in+"."+i+".nc" 218 else 219 print(" ") 220 print("Input file: '"+file_in+"."+i+".nc' does not exist") 221 print(" ") 222 exit 223 end if 224 end do 225 end if 226 end if 227 228 f=addfiles(files,"r") 229 f_att=addfile(files(0),"r") 230 ListSetType(f,"cat") 231 232 vNam = getfilevarnames(f_att) 153 233 print(" ") 154 234 print("Variables in input file:") … … 225 305 else 226 306 print(" ") 227 print("Your input file: '"+file_in+"'") 228 print("contains 3d or other data") 307 print("Your input file contains 3d or other data") 229 308 print(" ") 230 309 end if … … 242 321 243 322 cs_res = True 323 vecres = True 244 324 cs_res@gsnYAxisIrregular2Linear = True 245 325 … … 247 327 cs_res@gsnFrame = False 248 328 cs_res@gsnMaximize = True 249 cs_res@gsnPaperOrientation = "portrait" 250 cs_res@gsnPaperWidth = 8.27 251 cs_res@gsnPaperHeight = 11.69 252 cs_res@gsnPaperMargin = 0.79 253 cs_res@tmXBLabelFontHeightF = .03 254 cs_res@tmYLLabelFontHeightF = .03 255 cs_res@tiXAxisFontHeightF = .03 256 cs_res@tiYAxisFontHeightF = .03 329 330 cs_res@tmXBLabelFontHeightF = font_size 331 cs_res@tmYLLabelFontHeightF = font_size 332 cs_res@tiXAxisFontHeightF = font_size 333 cs_res@tiYAxisFontHeightF = font_size 257 334 cs_res@tmXBMode ="Automatic" 258 335 cs_res@tmYLMode ="Automatic" 259 cs_res@lgTitleFontHeightF = .03 260 cs_res@lgLabelFontHeightF = .03 261 cs_res@txFontHeightF = .03 336 262 337 cs_res@cnLevelSelectionMode = "ManualLevels" 338 cs_res@lbLabelFontHeightF = font_size_legend 339 cs_res@lbLabelStride = legend_label_stride 340 263 341 264 342 cs_resP = True 265 cs_resP@txString = f @title343 cs_resP@txString = f_att@title 266 344 cs_resP@txFuncCode = "~" 267 cs_resP@txFontHeightF = .02 268 345 cs_resP@txFontHeightF = 0.015 269 346 270 347 if ( mode .eq. "Fill" ) then 271 348 cs_res@cnFillOn = True 272 349 cs_res@gsnSpreadColors = True 273 cs_res@cnFillMode = fill_mode 274 cs_res@lbOrientation = "Vertical" 350 cs_res@cnFillMode = fill_mode 275 351 cs_res@cnLinesOn = False 276 352 cs_res@cnLineLabelsOn = False … … 280 356 cs_res@cnFillOn = True 281 357 cs_res@gsnSpreadColors = True 282 cs_res@cnFillMode = fill_mode 283 cs_res@lbOrientation = "Vertical" 358 cs_res@cnFillMode = fill_mode 284 359 cs_res@cnLinesOn = True 285 360 cs_res@cnLineLabelsOn = True … … 290 365 ; ********************************************* 291 366 292 t_all = f ->time367 t_all = f[:]->time 293 368 nt = dimsizes(t_all) 294 369 delta_t = t_all(nt-1)/nt … … 305 380 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") 306 381 print(" ") 307 print(" Please select another 'start_time_step'")382 print("Select another 'start_time_step'") 308 383 print(" ") 309 384 exit … … 313 388 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 314 389 print(" ") 315 print(" Please select another 'start_time_step'")390 print("Select another 'start_time_step'") 316 391 print(" ") 317 392 exit 318 393 end if 319 394 end if 320 do i=0,nt-1 395 do i=0,nt-1 321 396 if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then 322 397 st=i … … 329 404 print("'start_time_step' = "+ start_time_step +"h is invalid") 330 405 print(" ") 331 print(" Please select another 'start_time_step'")406 print("Select another 'start_time_step'") 332 407 print(" ") 333 408 exit … … 345 420 print("'end_time_step' = "+end_time_step+ "h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 346 421 print(" ") 347 print(" Please select another 'end_time_step'")422 print("Select another 'end_time_step'") 348 423 print(" ") 349 424 exit … … 353 428 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") 354 429 print(" ") 355 print(" Please select another 'end_time_step'")430 print("Select another 'end_time_step'") 356 431 print(" ") 357 432 exit … … 361 436 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") 362 437 print(" ") 363 print(" Please select another 'start_time_step' or 'end_time_step'")438 print("Select another 'start_time_step' or 'end_time_step'") 364 439 print(" ") 365 440 exit … … 377 452 print("'end_time_step' = "+ end_time_step +"h is invalid") 378 453 print(" ") 379 print(" Please select another 'end_time_step'")454 print("Select another 'end_time_step'") 380 455 print(" ") 381 456 exit … … 401 476 if (vec1 .EQ. "component1") then 402 477 print(" ") 403 print(" Please indicate Vector 1 ('vec1') for Vector-Plot or set 'vector' to 0")478 print("Indicate Vector 1 ('vec1') for Vector-Plot or set 'vector' to 0") 404 479 print(" ") 405 480 exit … … 407 482 if (vec2 .EQ. "component2") then 408 483 print(" ") 409 print(" Please indicate Vector 2 ('vec2') for Vector-Plot or set 'vector' to 0")484 print("Indicate Vector 2 ('vec2') for Vector-Plot or set 'vector' to 0") 410 485 print(" ") 411 486 exit … … 424 499 do varn=0,dim-1 425 500 if (vNam(varn) .eq. "xu" .OR. vNam(varn) .eq. "x")then 426 x_d = f ->$vNam(varn)$501 x_d = f_att->$vNam(varn)$ 427 502 xdim = dimsizes(x_d)-1 428 503 delta_x = x_d(1)-x_d(0) … … 432 507 do varn=0,dim-1 433 508 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y")then 434 y_d = f ->$vNam(varn)$509 y_d = f_att->$vNam(varn)$ 435 510 ydim = dimsizes(y_d)-1 436 511 delta_y = y_d(1)-y_d(0) … … 440 515 do varn=0,dim-1 441 516 if (vNam(varn) .eq. "zu_3d" .OR. vNam(varn) .eq. "zw_3d")then 442 z_d = f ->$vNam(varn)$517 z_d = f_att->$vNam(varn)$ 443 518 zdim = dimsizes(z_d)-1 444 519 delta_z = 0 … … 446 521 else 447 522 if (vNam(varn) .eq. "zu_xy" .OR. vNam(varn) .eq. "zw_xy") then 448 z_d = f ->$vNam(varn)$523 z_d = f_att->$vNam(varn)$ 449 524 zdim = dimsizes(z_d)-1 450 525 delta_z = -1.d … … 460 535 do varn=0,dim-1 461 536 if (vNam(varn) .eq. "xu" .OR. vNam(varn) .eq. "x") then 462 x_d = f ->$vNam(varn)$537 x_d = f_att->$vNam(varn)$ 463 538 xdim = dimsizes(x_d)-1 464 539 delta_x = x_d(1)-x_d(0) … … 468 543 do varn=0,dim-1 469 544 if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then 470 z_d = f ->$vNam(varn)$545 z_d = f_att->$vNam(varn)$ 471 546 zdim = dimsizes(z_d)-1 472 547 delta_z = z_d(1)-z_d(0) … … 476 551 do varn=0,dim-1 477 552 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then 478 y_d = f ->$vNam(varn)$553 y_d = f_att->$vNam(varn)$ 479 554 ydim = dimsizes(y_d)-1 480 555 delta_y = y_d(1)-y_d(0) … … 482 557 else 483 558 if (vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz") then 484 y_d = f ->$vNam(varn)$559 y_d = f_att->$vNam(varn)$ 485 560 ydim = dimsizes(y_d)-1 486 561 delta_y = -1.d … … 496 571 do varn=0,dim-1 497 572 if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then 498 y_d = f ->$vNam(varn)$573 y_d = f_att->$vNam(varn)$ 499 574 ydim = dimsizes(y_d)-1 500 575 delta_y = y_d(1)-y_d(0) … … 504 579 do varn=0,dim-1 505 580 if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then 506 z_d = f ->$vNam(varn)$581 z_d = f_att->$vNam(varn)$ 507 582 zdim = dimsizes(z_d)-1 508 583 delta_z = z_d(1)-z_d(0) … … 512 587 do varn=0,dim-1 513 588 if (vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "x") 514 x_d = f ->$vNam(varn)$589 x_d = f_att->$vNam(varn)$ 515 590 xdim = dimsizes(x_d)-1 516 591 delta_x = x_d(1)-x_d(0) … … 518 593 else 519 594 if (vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "x_yz" ) then 520 x_d = f ->$vNam(varn)$595 x_d = f_att->$vNam(varn)$ 521 596 xdim = dimsizes(x_d)-1 522 597 delta_x = -1.d … … 848 923 end do 849 924 end if 850 925 851 926 if( shape .eq. 1 ) then 852 927 if (xyc .EQ. 1)then 853 928 cs_res@vpWidthF = (xe-xs)/(ye-ys) 854 929 cs_res@vpHeightF = 1 930 vecres@vpWidthF = (xe-xs)/(ye-ys) 931 vecres@vpHeightF = 1 932 if (xe-xs .GT. ye-ys)then 933 cs_res@gsnPaperOrientation = "landscape" 934 vecres@gsnPaperOrientation = "landscape" 935 cs_res@lbOrientation = "Horizontal" 936 else 937 cs_res@gsnPaperOrientation = "portrait" 938 vecres@gsnPaperOrientation = "portrait" 939 cs_res@lbOrientation = "Vertical" 940 end if 855 941 end if 856 942 if (xzc .EQ. 1)then 857 943 cs_res@vpWidthF = (xe-xs)/(delta_x*(ze-zs)) 858 944 cs_res@vpHeightF = 1 945 vecres@vpWidthF = (xe-xs)/(delta_x*(ze-zs)) 946 vecres@vpHeightF = 1 947 if (xe-xs .GT. (delta_x*(ze-zs)))then 948 cs_res@gsnPaperOrientation = "landscape" 949 vecres@gsnPaperOrientation = "landscape" 950 cs_res@lbOrientation = "Horizontal" 951 else 952 cs_res@gsnPaperOrientation = "portrait" 953 vecres@gsnPaperOrientation = "portrait" 954 cs_res@lbOrientation = "Vertical" 955 end if 859 956 end if 860 957 if (yzc .EQ. 1)then 861 958 cs_res@vpWidthF = (ye-ys)/(delta_y*(ze-zs)) 862 959 cs_res@vpHeightF = 1 863 end if 864 end if 865 960 vecres@vpWidthF = (ye-ys)/(delta_y*(ze-zs)) 961 vecres@vpHeightF = 1 962 if (ye-ys .GT. (delta_y*(ze-zs)))then 963 cs_res@gsnPaperOrientation = "landscape" 964 vecres@gsnPaperOrientation = "landscape" 965 cs_res@lbOrientation = "Horizontal" 966 else 967 cs_res@gsnPaperOrientation = "portrait" 968 vecres@gsnPaperOrientation = "portrait" 969 cs_res@lbOrientation = "Vertical" 970 end if 971 end if 972 end if 973 866 974 delete(xs) 867 975 delete(xe) … … 874 982 ye=yend 875 983 984 if (xyc .EQ. 1) then 985 d=(ye-ys+1)/(major_ticks_y-1) 986 e=(xe-xs+1)/(major_ticks_x-1) 987 array_yl =new(major_ticks_y,integer) 988 array_yl_labels=new(major_ticks_y,double) 989 array_minor_yl =new((major_ticks_y-1)*4,double) 990 array_xb =new(major_ticks_x,integer) 991 array_xb_labels=new(major_ticks_x,double) 992 array_minor_xb =new((major_ticks_x-1)*4,double) 993 array_yl(0)=ys 994 array_xb(0)=xs 995 array_yl_labels(0)=y_d(ys) 996 array_xb_labels(0)=x_d(xs) 997 do ar=1,major_ticks_y-1 998 array_yl(ar)=d*(ar-1)+d-1 999 array_yl_labels(ar) = y_d(array_yl(ar)) 1000 if (ar .GT. 0) 1001 do min_ar=0,3 1002 array_minor_yl(4*(ar-1)+min_ar)= int2dble(array_yl(ar-1))+int2dble(array_yl(ar)-array_yl(ar-1))/5*(min_ar+1) 1003 end do 1004 end if 1005 end do 1006 do br=1,major_ticks_x-1 1007 array_xb(br)=e*(br-1)+e-1 1008 array_xb_labels(br) = x_d(array_xb(br)) 1009 if (br .GT. 0) 1010 do min_br=0,3 1011 array_minor_xb(4*(br-1)+min_br)= int2dble(array_xb(br-1))+int2dble(array_xb(br)-array_xb(br-1))/5*(min_br+1) 1012 end do 1013 end if 1014 end do 1015 end if 1016 1017 if (xzc .EQ. 1) then 1018 d=(ze-zs+1)/(major_ticks_y-1) 1019 e=(xe-xs+1)/(major_ticks_x-1) 1020 array_yl =new(major_ticks_y,integer) 1021 array_yl_labels=new(major_ticks_y,double) 1022 array_minor_yl =new((major_ticks_y-1)*4,double) 1023 array_xb =new(major_ticks_x,integer) 1024 array_xb_labels=new(major_ticks_x,double) 1025 array_minor_xb =new((major_ticks_x-1)*4,double) 1026 array_yl(0)=zs 1027 array_xb(0)=xs 1028 array_yl_labels(0)=z_d(zs) 1029 array_xb_labels(0)=x_d(xs) 1030 do ar=1,major_ticks_y-1 1031 array_yl(ar)=d*(ar-1)+d-1 1032 array_yl_labels(ar) = z_d(array_yl(ar)) 1033 if (ar .GT. 0) 1034 do min_ar=0,3 1035 array_minor_yl(4*(ar-1)+min_ar)= int2dble(array_yl(ar-1))+int2dble(array_yl(ar)-array_yl(ar-1))/5*(min_ar+1) 1036 end do 1037 end if 1038 end do 1039 do br=1,major_ticks_x-1 1040 array_xb(br)=e*(br-1)+e-1 1041 array_xb_labels(br) = x_d(array_xb(br)) 1042 if (br .GT. 0) 1043 do min_br=0,3 1044 array_minor_xb(4*(br-1)+min_br)= int2dble(array_xb(br-1))+int2dble(array_xb(br)-array_xb(br-1))/5*(min_br+1) 1045 end do 1046 end if 1047 end do 1048 end if 1049 1050 if (yzc .EQ. 1) then 1051 d=(ze-zs+1)/(major_ticks_y-1) 1052 e=(ye-ys+1)/(major_ticks_x-1) 1053 array_yl =new(major_ticks_y,integer) 1054 array_yl_labels=new(major_ticks_y,double) 1055 array_minor_yl =new((major_ticks_y-1)*4,double) 1056 array_xb =new(major_ticks_x,integer) 1057 array_xb_labels=new(major_ticks_x,double) 1058 array_minor_xb =new((major_ticks_x-1)*4,double) 1059 array_yl(0)=zs 1060 array_xb(0)=ys 1061 array_yl_labels(0)=z_d(zs) 1062 array_xb_labels(0)=y_d(ys) 1063 do ar=1,major_ticks_y-1 1064 array_yl(ar)=d*(ar-1)+d-1 1065 array_yl_labels(ar) = y_d(array_yl(ar)) 1066 if (ar .GT. 0) 1067 do min_ar=0,3 1068 array_minor_yl(4*(ar-1)+min_ar)= int2dble(array_yl(ar-1))+int2dble(array_yl(ar)-array_yl(ar-1))/5*(min_ar+1) 1069 end do 1070 end if 1071 end do 1072 do br=1,major_ticks_x-1 1073 array_xb(br)=e*(br-1)+e-1 1074 array_xb_labels(br) = x_d(array_xb(br)) 1075 if (br .GT. 0) 1076 do min_br=0,3 1077 array_minor_xb(4*(br-1)+min_br)= int2dble(array_xb(br-1))+int2dble(array_xb(br)-array_xb(br-1))/5*(min_br+1) 1078 end do 1079 end if 1080 end do 1081 end if 1082 1083 if (axes_explicit .EQ. 1)then 1084 cs_res@tmYLMode = "Explicit" 1085 cs_res@tmXBMode = "Explicit" 1086 cs_res@tmYLValues = array_yl 1087 if (xyc .EQ. 1)then 1088 cs_res@tmYLLabels = array_yl_labels/norm_y 1089 cs_res@tmXBLabels = array_xb_labels/norm_x 1090 if (norm_x .NE. 1.)then 1091 cs_res@tiXAxisString = "x ["+unit_x+"]" 1092 else 1093 cs_res@tiXAxisString = "x [m]" 1094 end if 1095 if (norm_y .NE. 1.)then 1096 cs_res@tiYAxisString = "y ["+unit_y+"]" 1097 else 1098 cs_res@tiYAxisString = "y [m]" 1099 end if 1100 end if 1101 if (xzc .EQ. 1)then 1102 cs_res@tmYLLabels = array_yl_labels/norm_z 1103 cs_res@tmXBLabels = array_xb_labels/norm_x 1104 if (norm_x .NE. 1.)then 1105 cs_res@tiXAxisString = "x ["+unit_x+"]" 1106 else 1107 cs_res@tiXAxisString = "x [m]" 1108 end if 1109 if (norm_z .NE. 1.)then 1110 cs_res@tiYAxisString = "z ["+unit_z+"]" 1111 else 1112 cs_res@tiYAxisString = "z [m]" 1113 end if 1114 end if 1115 if (yzc .EQ. 1)then 1116 cs_res@tmYLLabels = array_yl_labels/norm_z 1117 cs_res@tmXBLabels = array_xb_labels/norm_y 1118 if (norm_y .NE. 1.)then 1119 cs_res@tiXAxisString = "y ["+unit_y+"]" 1120 else 1121 cs_res@tiXAxisString = "y [m]" 1122 end if 1123 if (norm_z .NE. 1.)then 1124 cs_res@tiYAxisString = "z ["+unit_z+"]" 1125 else 1126 cs_res@tiYAxisString = "z [m]" 1127 end if 1128 end if 1129 cs_res@tmXBValues = array_xb 1130 cs_res@tmYLMinorValues = array_minor_yl 1131 cs_res@tmXBMinorValues = array_minor_xb 1132 else 1133 if (axes_explicit .EQ. 0)then 1134 cs_res@tmYLMinorPerMajor = 4 1135 cs_res@tmXBMinorPerMajor = 4 1136 else 1137 print(" ") 1138 print("'axes_explicit' is invalid and set to 0") 1139 print(" ") 1140 axes_explicit = 0 1141 cs_res@tmYLMinorPerMajor = 4 1142 cs_res@tmXBMinorPerMajor = 4 1143 end if 1144 if (xyc .EQ. 1)then 1145 cs_res@tiXAxisString = "x [gridpoints]" 1146 cs_res@tiYAxisString = "y [gridpoints]" 1147 end if 1148 if (xzc .EQ. 1)then 1149 cs_res@tiXAxisString = "x [gridpoints]" 1150 cs_res@tiYAxisString = "z [gridpoints]" 1151 end if 1152 if (yzc .EQ. 1)then 1153 cs_res@tiXAxisString = "y [gridpoints]" 1154 cs_res@tiYAxisString = "z [gridpoints]" 1155 end if 1156 end if 1157 876 1158 if (xyc .EQ. 1 .OR. xzc .EQ.1)then 877 1159 if (xe .EQ. xs+1) then … … 916 1198 917 1199 MinVal = new(dim,float) 918 MaxVal = new(dim,float) 1200 MaxVal = new(dim,float) 1201 unit = new(dim,string) 919 1202 920 1203 ; **************************************************** … … 980 1263 981 1264 if (xyc .EQ. 1) then 982 data(varn,:,:,:,:)=f->$vNam(varn)$(:,zs:ze,ys:ye,xs:xe) 1265 temp = f[:]->$vNam(varn)$ 1266 data_att = f_att->$vNam(varn)$ 1267 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 983 1268 end if 984 1269 if ( xzc .eq. 1 ) then 985 data(varn,:,:,:,:)=f->$vNam(varn)$(:,zs:ze,ys:ye,xs:xe) 1270 temp = f[:]->$vNam(varn)$ 1271 data_att = f_att->$vNam(varn)$ 1272 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 986 1273 end if 987 1274 if ( yzc .eq. 1) then 988 data(varn,:,:,:,:)=f->$vNam(varn)$(:,zs:ze,ys:ye,xs:xe) 1275 temp = f[:]->$vNam(varn)$ 1276 data_att = f_att->$vNam(varn)$ 1277 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 989 1278 end if 990 1279 if (check_vec1) then … … 1003 1292 MinVal(varn) = min(data(varn,:,:,:,:)) 1004 1293 MaxVal(varn) = max(data(varn,:,:,:,:)) 1294 1295 unit(varn) = data_att@units 1005 1296 1006 1297 end if … … 1075 1366 gsn_define_colormap(wks_ps,"rainbow+white") 1076 1367 1077 plot=new((/no_time*no_layer*no_var/),graphic) 1078 1368 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 1369 plot=new((/no_time*no_layer*no_var+no_time*no_layer/),graphic) 1370 else 1371 plot=new((/no_time*no_layer*no_var/),graphic) 1372 end if 1373 1079 1374 page = 0 1080 1375 n=0 … … 1090 1385 do lo = los, loe 1091 1386 do li = lis, lie 1092 level = "=" + data&z(lo) + "m" 1387 if (xyc .EQ. 1)then 1388 if (sort .EQ. "time")then 1389 level = "z=" + z_d(lo) + "m" 1390 else 1391 level = "z=" + z_d(li) + "m" 1392 end if 1393 end if 1394 if (xzc .EQ. 1)then 1395 if (sort .EQ. "time")then 1396 level = "y=" + y_d(lo) + "m" 1397 else 1398 level = "y=" + y_d(li) + "m" 1399 end if 1400 end if 1401 if (yzc .EQ. 1)then 1402 if (sort .EQ. "time")then 1403 level = "x=" + x_d(lo) + "m" 1404 else 1405 level = "x=" + x_d(li) + "m" 1406 end if 1407 end if 1093 1408 vecres = True ; vector only resources 1094 1409 vecres@gsnDraw = False ; don't draw … … 1098 1413 vecres@vcRefLengthF = 0.05 ; define length of vec ref 1099 1414 vecres@gsnRightString = "Vector plot of "+vec1+" and "+vec2 1100 vecres@gsnLeftString = "t=" + data&t(li) +"s z"+level 1101 vecres@tiXAxisString = " " 1102 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1415 vecres@tmXBLabelFontHeightF = font_size 1416 vecres@tmYLLabelFontHeightF = font_size 1417 vecres@tiXAxisFontHeightF = font_size 1418 vecres@tiYAxisFontHeightF = font_size 1419 if (sort .EQ. "time")then 1420 vecres@gsnLeftString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h "+level 1421 else 1422 vecres@gsnLeftString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) +"h "+level 1423 end if 1424 vecres@tiXAxisString = " " 1425 if (xyc .EQ. 1)then 1426 if (sort .EQ. "time")then 1427 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo,:,:),vect2(li,lo,:,:),vecres) 1428 else 1429 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres) 1430 end if 1431 end if 1432 if (xzc .EQ. 1) then 1433 if (sort .EQ. "time")then 1434 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo,:),vect2(li,:,lo,:),vecres) 1435 else 1436 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,li,:),vect2(lo,:,li,:),vecres) 1437 end if 1438 end if 1439 if (yzc .EQ. 1) then 1440 if (sort .EQ. "time")then 1441 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo),vect2(li,:,:,lo),vecres) 1442 else 1443 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,li),vect2(lo,:,:,li),vecres) 1444 end if 1445 end if 1103 1446 n=n+1 1104 1447 end do … … 1123 1466 1124 1467 if(check) then 1125 1468 1126 1469 space=(MaxVal(varn)-MinVal(varn))/24 1127 1470 … … 1144 1487 1145 1488 if ( xyc .eq. 1 ) then 1146 1147 cs_res@tiXAxisString = "x [m]" 1148 cs_res@tiYAxisString = "y [m]" 1489 1149 1490 cs_res@gsnLeftString = "Plot of "+vNam(varn) 1491 cs_res@gsnRightString = unit(varn) 1150 1492 1151 1493 if ( sort .eq. "time" ) then 1152 if ( data&z(lo) .eq. -1)then1494 if ( z_d(lo) .eq. -1)then 1153 1495 if (delta_z .EQ. -1) then 1154 1496 level = "-average" 1155 1497 else 1156 level = "=" + data&z(lo) + "m"1498 level = "=" + z_d(lo) + "m" 1157 1499 end if 1158 1500 else 1159 level = "=" + data&z(lo) + "m"1501 level = "=" + z_d(lo) + "m" 1160 1502 end if 1161 1503 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h z"+level … … 1177 1519 1178 1520 if ( sort .eq. "layer" ) then 1179 if ( data&z(li) .eq. -1) then1521 if (z_d(li) .eq. -1) then 1180 1522 if (delta_z .EQ. -1) then 1181 1523 level = "-average" 1182 1524 else 1183 level = "=" + data&z(li) + "m"1525 level = "=" + z_d(li) + "m" 1184 1526 end if 1185 1527 else 1186 level = "=" + data&z(li) + "m"1528 level = "=" + z_d(li) + "m" 1187 1529 end if 1188 1530 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h z"+ level … … 1209 1551 1210 1552 if ( xzc .eq. 1 ) then 1211 1212 cs_res@tiXAxisString = "x [m]" 1213 cs_res@tiYAxisString = "z [m]" 1553 1214 1554 cs_res@gsnLeftString = "Plot of "+vNam(varn) 1215 1555 1216 1556 if ( sort .eq. "time" ) then 1217 if ( data&y(lo) .eq. -1 ) then1557 if ( y_d(lo) .eq. -1 ) then 1218 1558 level = "-average" 1219 1559 else 1220 level = "=" + data&y(lo) + "m"1560 level = "=" + y_d(lo) + "m" 1221 1561 end if 1222 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + " sy"+ level1562 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h y"+ level 1223 1563 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,lo,:),cs_res) 1224 1564 if (vector .EQ. 1 .AND. check_vecp) then … … 1232 1572 vecres@gsnLeftString = " " ; turn off left string 1233 1573 vecres@tiXAxisString = " " 1234 plot_vec=gsn_csm_vector(wks_ps,vect1(li, lo,:,:),vect2(li,lo,:,:),vecres)1574 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lo,:),vect2(li,:,lo,:),vecres) 1235 1575 overlay(plot(n), plot_vec) 1236 1576 end if … … 1238 1578 1239 1579 if ( sort .eq. "layer" ) then 1240 if ( data&y(li) .eq. -1 ) then1580 if ( y_d(li) .eq. -1 ) then 1241 1581 level = "-average" 1242 1582 else 1243 level = "=" + data&y(li) + "m"1583 level = "=" + y_d(li) + "m" 1244 1584 end if 1245 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + " sy"+ level1585 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h y"+ level 1246 1586 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,li,:),cs_res) 1247 1587 if (vector .EQ. 1 .AND. check_vecp) then … … 1255 1595 vecres@gsnLeftString = " " ; turn off left string 1256 1596 vecres@tiXAxisString = " " 1257 plot_vec=gsn_csm_vector(wks_ps,vect1(lo, li,:,:),vect2(lo,li,:,:),vecres)1597 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,li,:),vect2(lo,:,li,:),vecres) 1258 1598 overlay(plot(n), plot_vec) 1259 1599 end if … … 1266 1606 1267 1607 if ( yzc .eq. 1 ) then 1268 1269 cs_res@tiXAxisString = "y [m]" 1270 cs_res@tiYAxisString = "z [m]" 1608 1271 1609 cs_res@gsnLeftString = "Plot of "+vNam(varn) 1272 1610 1273 1611 if ( sort .eq. "time" ) then 1274 if ( data&x(lo) .eq. -1 ) then1612 if ( x_d(lo) .eq. -1 ) then 1275 1613 level = "-average" 1276 1614 else 1277 level = "=" + data&x(lo) + "m"1615 level = "=" + x_d(lo) + "m" 1278 1616 end if 1279 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + " sx"+ level1617 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h x"+ level 1280 1618 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,:,lo),cs_res) 1281 1619 if (vector .EQ. 1 .AND. check_vecp) then … … 1289 1627 vecres@gsnLeftString = " " ; turn off left string 1290 1628 vecres@tiXAxisString = " " 1291 plot_vec=gsn_csm_vector(wks_ps,vect1(li, lo,:,:),vect2(li,lo,:,:),vecres)1629 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lo),vect2(li,:,:,lo),vecres) 1292 1630 overlay(plot(n), plot_vec) 1293 1631 end if … … 1295 1633 1296 1634 if ( sort .eq. "layer" ) then 1297 if ( data&x(li) .eq. -1 ) then1635 if ( x_d(li) .eq. -1 ) then 1298 1636 level = "-average" 1299 1637 else 1300 level = "=" + data&x(li) + "m"1638 level = "=" + x_d(li) + "m" 1301 1639 end if 1302 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + " sx"+ level1640 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h x"+ level 1303 1641 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,:,li),cs_res) 1304 1642 if (vector .EQ. 1 .AND. check_vecp)then … … 1312 1650 vecres@gsnLeftString = " " ; turn off left string 1313 1651 vecres@tiXAxisString = " " 1314 plot_vec=gsn_csm_vector(wks_ps,vect1(lo, li,:,:),vect2(lo,li,:,:),vecres)1652 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,li),vect2(lo,:,:,li),vecres) 1315 1653 overlay(plot(n), plot_vec) 1316 1654 end if 1317 1655 end if 1318 1656 end if 1319 n=n+1 1657 n=n+1 1320 1658 end do 1321 1659 end do … … 1334 1672 print(" ") 1335 1673 else 1336 do np = 0,no_layer*no_time*(no_var+1)-1,no_ lines*no_columns1337 if ( np + no_ lines*no_columns .gt. (no_layer*no_time*(no_var+1))-1) then1338 gsn_panel(wks_ps, plot(np:(no_layer*no_time*(no_var+1))-1),(/no_ lines,no_columns/),cs_resP)1674 do np = 0,no_layer*no_time*(no_var+1)-1,no_rows*no_columns 1675 if ( np + no_rows*no_columns .gt. (no_layer*no_time*(no_var+1))-1) then 1676 gsn_panel(wks_ps, plot(np:(no_layer*no_time*(no_var+1))-1),(/no_rows,no_columns/),cs_resP) 1339 1677 else 1340 gsn_panel(wks_ps, plot(np:np+no_ lines*no_columns-1),(/no_lines,no_columns/),cs_resP)1678 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP) 1341 1679 end if 1342 1680 end do 1343 1681 end if 1344 else 1682 else 1345 1683 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 1346 1684 gsn_panel(wks_ps,plot(0:(no_time*no_layer*no_var)-1),(/no_var,no_layer*no_time/),cs_resP) … … 1349 1687 print(" ") 1350 1688 else 1351 do np = 0,no_layer*no_time*no_var-1,no_ lines*no_columns1352 if ( np + no_ lines*no_columns .gt. (no_layer*no_time*no_var)-1) then1353 gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_ lines,no_columns/),cs_resP)1689 do np = 0,no_layer*no_time*no_var-1,no_rows*no_columns 1690 if ( np + no_rows*no_columns .gt. (no_layer*no_time*no_var)-1) then 1691 gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_rows,no_columns/),cs_resP) 1354 1692 else 1355 gsn_panel(wks_ps, plot(np:np+no_ lines*no_columns-1),(/no_lines,no_columns/),cs_resP)1693 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP) 1356 1694 end if 1357 1695 end do -
palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl
r194 r218 16 16 ; REQUIRED --file_1-- INPUT FILE 17 17 ; 18 ; input file produced by PALM; please declare path and name 19 ; 20 ; data type: string 18 ; input file produced by PALM; if there is more than one file for all timesteps of a job chain, 19 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 20 ; otherwise declare path and full file name 21 ; 22 ; data type: string 23 ; 24 ; example: file_1 = "/path_to_file/file_xy_av" if you use more than one cycle number 25 ; file_1 = "/path_to_file/file_xy_av.4.nc" if you use one file (e.g. with cycle number 4) 21 26 ; 22 27 ; default: "File in" … … 25 30 26 31 27 file_1 = "File in" 28 29 30 end if 31 ;*************************************************** 32 ; REQUIRED --xyc, xzc, yzc-- SECTION of XY or XZ or YZ 32 file_1 = "file_1" 33 34 35 end if 36 ;*************************************************** 37 ; REQUIRED if more than one file of a job chain --start_f-- START OF CYCLIC NUMBER 38 ; 39 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 40 ; 41 ; data type: integer 42 ; 43 ; example: start_f = 3 (if first file: example_ts.3.nc) 44 ; 45 ; default: -1 46 ;*************************************************** 47 if (.not. isvar("start_f"))then 48 49 50 start_f = -1 51 52 53 end if 54 ;*************************************************** 55 ; REQUIRED if more than one file of a job chain --end_f-- END OF CYCLIC NUMBER 56 ; 57 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 58 ; 59 ; data type: integer 60 ; 61 ; example: end_f = 48 (if last file: example_ts.48.nc) 62 ; 63 ; default: -1 64 ;*************************************************** 65 if (.not. isvar("end_f"))then 66 67 68 end_f = -1 69 70 71 end if 72 ;*************************************************** 73 ; REQUIRED --xyc--xzc--yzc-- SELECTION of XY or XZ or YZ CROSS SECTIONS 33 74 ; 34 75 ; desired section has to be set to 1; e.g.: xyc=1, xzc=0 and yzc=0 for xy-section 35 76 ; 36 77 ; data type: integer 78 ; 79 ; example: xyc = 1 80 ; xzc = 0 81 ; yzc = 0 37 82 ; 38 83 ; default: 0 … … 56 101 ; OPTIONAL --format_out-- OUTPUT FORMAT 57 102 ; 58 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm 59 ; 60 ; data type: string 103 ; format of the output file; supported file formats: x11, pdf, ps, eps, epsi or ncgm 104 ; 105 ; data type: string 106 ; 107 ; example: format_out = "pdf" 61 108 ; 62 109 ; default: "x11" … … 72 119 ; OPTIONAL --file_out-- OUTPUT FILE 73 120 ; 74 ; please declare path and name 75 ; 76 ; data type: string 121 ; path and name of the output file 122 ; 123 ; data type: string 124 ; 125 ; example: file_out = "/home/path_to_output/test_cs" 77 126 ; 78 127 ; default: "~/test_cs" … … 86 135 end if 87 136 ;*************************************************** 88 ; OPTIONAL --no_columns-- NUMBER OF ROWS137 ; OPTIONAL --no_columns-- NUMBER OF COLUMNS 89 138 ; 90 139 ; number of plots in one row 91 140 ; 92 141 ; data type: integer 142 ; 143 ; example: no_columns = 1 93 144 ; 94 145 ; default: 1 … … 102 153 end if 103 154 ;*************************************************** 104 ; OPTIONAL --no_ lines-- NUMBER OF COLUMNS155 ; OPTIONAL --no_rows-- NUMBER OF ROWS 105 156 ; 106 157 ; number of plots in one column 107 158 ; 108 159 ; data type: integer 160 ; 161 ; example: no_rows = 2 109 162 ; 110 163 ; default: 2 111 164 ;*************************************************** 112 if(.not. isvar("no_ lines"))then113 114 115 no_ lines = 2165 if(.not. isvar("no_rows"))then 166 167 168 no_rows = 2 116 169 117 170 … … 124 177 ; data type: string 125 178 ; 179 ; example: sort = "layer" 180 ; 126 181 ; default: "layer" 127 182 ;*************************************************** … … 136 191 ; OPTIONAL --var-- OUTPUT VARIABLES 137 192 ; 138 ; names of output variables; please inidcate them with one comma before and after each variable; 139 ; e.g.: var=",u,v,w," (the windcomponents u, v and w will be plotted) 193 ; names of output variables; inidcate them with one comma before and after each variable 140 194 ; 141 195 ; data type: string 142 ; 143 ; default: "all" (all available variables will be plotted) 196 ; 197 ; example: var = ",u,v,w" 198 ; 199 ; default: "all" (all available variables are plotted) 144 200 ;*************************************************** 145 201 if(.not. isvar("var"))then … … 153 209 ; OPTIONAL --start_time_step-- FIRST TIME STEP 154 210 ; 155 ; first time step of plot; you don't haveto specify a precise time value from the input file,156 ; it will berounded to the next existent time step211 ; first time step of plot; there is no need to specify a precise time value from the input file, 212 ; 'start_time_step' is rounded to the next existent time step 157 213 ; 158 214 ; data type: double; dimension: [hour] 159 215 ; 216 ; example: start_time_step = 0.5 217 ; 160 218 ; default: -1.d (first available time step) 161 219 ;*************************************************** … … 170 228 ; OPTIONAL --end_time_step-- LAST TIME STEP 171 229 ; 172 ; last time step of plot; you don't haveto specify a precise time value from the input file,173 ; it will berounded to the next existent time step230 ; last time step of plot; there is no need to specify a precise time value from the input file, 231 ; 'end_time_step' is rounded to the next existent time step 174 232 ; 175 233 ; data type: double; dimension: [hour] 176 234 ; 235 ; example: end_time_step = 2.0 236 ; 177 237 ; default: -1.d (last available time step) 178 238 ;*************************************************** … … 188 248 ; 189 249 ; value for minimum of x-axis, selectable if there are NO preseted layers for x (as for XY or XZ 2D-DATA); 190 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 191 ; existent value 250 ; there is no need to specify a precise meter value from the input file, it is rounded to the next existent value 192 251 ; 193 252 ; data type: double; dimension: [meter] 194 253 ; 254 ; example: xs = 150.0 255 ; 195 256 ; default: -1.d (minimum of range) 196 257 ;*************************************************** … … 206 267 ; 207 268 ; value for maximum of x-axis, selectable if there are NO preseted layers for x (as for XY or XZ 2D-DATA); 208 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 209 ; existent value 269 ; there is no need to specify a precise meter value from the input file, it is rounded to the next existent value 210 270 ; 211 271 ; data type: double; dimension: [meter] 212 272 ; 273 ; example: xe = 300.0 274 ; 213 275 ; default: -1.d (maximum of range) 214 276 ;*************************************************** … … 224 286 ; 225 287 ; value for minimum of y-axis, selectable if there are NO preseted layers for y (as for XY or YZ 2D-DATA); 226 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 227 ; existent value 288 ; there is no need to specify a precise meter value from the input file, it is rounded to the next existent value 228 289 ; 229 290 ; data type: double; dimension: [meter] 230 291 ; 292 ; example: ys = 150.0 293 ; 231 294 ; default: -1.d (minimum of range) 232 295 ;*************************************************** … … 242 305 ; 243 306 ; value for maximum of y-axis, selectable if there are NO preseted layers for y (as for XY or YZ 2D-DATA); 244 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 245 ; existent value 307 ; there is no need to specify a precise meter value from the input file, it is rounded to the next existent value 246 308 ; 247 309 ; data type: double; dimension: [meter] 310 ; 311 ; example: ye = 300.0 248 312 ; 249 313 ; default: -1.d (maximum of range) … … 264 328 ; data type: integer 265 329 ; 330 ; example: zs = 0 331 ; 266 332 ; default: -1 (minimum of range) 267 333 ;*************************************************** … … 281 347 ; data type: integer 282 348 ; 349 ; example: ze = 15 350 ; 283 351 ; default: -1 (maximum of range) 284 352 ;*************************************************** … … 297 365 ; data type: string 298 366 ; 367 ; example: mode = "Fill" 368 ; 299 369 ; default: "Fill" 300 370 ;*************************************************** … … 313 383 ; data type: string 314 384 ; 385 ; example: fill_mode = "AreaFill" 386 ; 315 387 ; default: "AreaFill" 316 388 ;*************************************************** … … 325 397 ; OPTIONAL --shape-- ASPECT RATIO 326 398 ; 327 ; aspect ratio of axis is kept [=1] or not[=0] 328 ; 329 ; data type: integer 399 ; aspect ratio of axis is kept [=1] or not[=0] 400 ; 401 ; data type: integer 402 ; 403 ; example: shape = 1 330 404 ; 331 405 ; default: 1 … … 337 411 338 412 413 end if 414 ;*************************************************** 415 ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 416 ; 417 ; font size can be changed to fit to the current plot 418 ; 419 ; data type: float 420 ; 421 ; example: font_size = 0.04 422 ; 423 ; default: 0.04 424 ;*************************************************** 425 if(.not. isvar("font_size"))then 426 427 428 font_size = 0.04 429 430 431 end if 432 ;*************************************************** 433 ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 434 ; 435 ; font size of the legend can be changed to fit to the current plot 436 ; 437 ; data type: float 438 ; 439 ; example: font_size_legend = 0.02 440 ; 441 ; default: 0.02 442 ;*************************************************** 443 if(.not. isvar("font_size_legend"))then 444 445 446 font_size_legend = 0.02 447 448 449 end if 450 ;*************************************************** 451 ; OPTIONAL --legend_label_stride-- REDUCTION OF THE NUMBER OF LABELS IN THE LEGEND 452 ; 453 ; if legend_label_stride is set to 1 every label is shown; if set to 2 every second,... 454 ; 455 ; data type: integer 456 ; 457 ; example: legend_label_stride = 2 458 ; 459 ; default: 2 460 ;*************************************************** 461 if(.not. isvar("legend_label_reduction"))then 462 463 464 legend_label_stride = 2 465 466 467 end if 468 ;*************************************************** 469 ; OPTIONAL --axes_explicit-- EXPLICIT SETTINGS OF X- AND Y-AXES ARE SWITCHED ON 470 ; 471 ; to use several parameters to set up the axes, 'axes_explicit' must be switched [=1]; if switched off [=0] units of axes are [gridpoints] 472 ; 473 ; data type: integer 474 ; 475 ; example: axes_explicit = 0 476 ; 477 ; default: 0 478 ;*************************************************** 479 if(.not. isvar("axes_explicit"))then 480 481 482 axes_explicit = 0 483 484 485 end if 486 ;*************************************************** 487 ; OPTIONAL if axes_explicit = 1 --major_ticks_x-- NUMBER OF MAJOR TICK MARKS AT X-AXIS 488 ; 489 ; major_ticks_x can be set to any integer, best segmentation of x-axis can be achieved, if 490 ; (number of gripdpoints in x-direction)/(major_ticks_x-1)=INTEGER, e.g. 128/8 = 16 -> major_ticks_x should be set to 9 491 ; 492 ; data type: integer 493 ; 494 ; example: major_ticks_x = 6 495 ; 496 ; default: 6 497 ;*************************************************** 498 if(.not. isvar("major_ticks_x"))then 499 500 501 major_ticks_x = 6 502 503 504 end if 505 ;*************************************************** 506 ; OPTIONAL if axes_explicit = 1 --major_ticks_y-- NUMBER OF MAJOR TICK MARKS AT Y-AXIS 507 ; 508 ; major_ticks_y can be set to any integer, best segmentation of y-axis can be achieved, if 509 ; (number of gripdpoints in y-direction)/(major_ticks_y-1)=INTEGER, e.g. 128/8 = 16 -> major_ticks_y should be set to 9 510 ; 511 ; data type: integer 512 ; 513 ; example: major_ticks_y = 6 514 ; 515 ; default: 6 516 ;*************************************************** 517 if(.not. isvar("major_ticks_y"))then 518 519 520 major_ticks_y = 6 521 522 523 end if 524 ;*************************************************** 525 ; OPTIONAL if axes_explicit = 1 --norm_x--norm_y--norm_z-- NORMALISE X-, Y- and Z-AXES 526 ; 527 ; normalising the axes with the given value; units can explicitly set; by default no normalising is used and units are [meter] 528 ; 529 ; data type: float 530 ; 531 ; default: 1. 532 ;*************************************************** 533 if(.not. isvar("norm_x"))then 534 535 norm_x = 1. 536 537 end if 538 if(.not. isvar("norm_y"))then 539 540 norm_y = 1. 541 542 end if 543 if(.not. isvar("norm_z"))then 544 545 norm_z = 1. 546 547 end if 548 ;*************************************************** 549 ; OPTIONAL if axes_explicit = 1 --unit_x--unit_y--unit_z-- UNITS OF X-, Y- and Z-AXES 550 ; 551 ; units of the axes can be set; by default no units are given, if norm_x, norm_y or norm_z are unequal 1., otherwise units are [meter] 552 ; 553 ; data type: string, 554 ; 555 ; example: unit_x = "m/s" 556 ; 557 ; default: " " 558 ;*************************************************** 559 if(.not. isvar("unit_x"))then 560 561 unit_x = " " 562 563 end if 564 if(.not. isvar("unit_y"))then 565 566 unit_y = " " 567 568 end if 569 if(.not. isvar("unit_z"))then 570 571 unit_z = " " 572 573 end if 574 ;*************************************************** 575 ; OPTIONAL --vector-- VECTOR PLOT 576 ; 577 ; a vector plot for one defined vector is switched on [=1] or off [=0] 578 ; 579 ; data type: integer 580 ; 581 ; example: vector = 0 582 ; 583 ; default: 0 584 ;*************************************************** 585 if(.not. isvar("vector"))then 586 587 588 vector = 0 589 590 339 591 end if 340 592 ;*************************************************** 341 ; OPTIONAL --vector-- VECTOR PLOT 342 ; 343 ; a vector plot for one defined vector will be switched on [=1] or off [=0] 344 ; 345 ; data type: integer 346 ; 347 ; default: 0 348 ;*************************************************** 349 if(.not. isvar("vector"))then 350 351 352 vector = 0 353 593 ; REQUIRED IF vector=1 --vec1, vec2-- VECTOR FOR VECTOR PLOT 594 ; 595 ; variables for the vector, vec1 hast to be set to component 1 and vec2 to component 2; 596 ; inidcate them with one comma before and after each variable; 597 ; 598 ; data type: string 599 ; 600 ; example: vec1=",u," 601 ; vec2=",v," 602 ; 603 ; default: vec1 = "component1", vec2 = "component2" 604 ;*************************************************** 605 if(.not. isvar("vec1"))then 606 607 vec1 = "component1" 608 609 end if 610 if (.not. isvar("vec2"))then 611 612 vec2 = "component2" 354 613 355 614 end if 356 615 ;*************************************************** 357 ; REQUIRED IF vector=1 --vec1, vec2-- VECTOR FOR VECTOR PLOT 358 ; 359 ; variables for the vector, vec1 hast to be set to component 1 and vec2 to component 2; 360 ; please inidcate them with one comma before and after each variable; 361 ; e.g.: vec1=",u," and vec2=",v," for plotting the horizontal windvector 362 ; 363 ; data type: string 364 ; 365 ; default: vec1 = "component1", vec2 = "component2" 366 ;*************************************************** 367 if(.not. isvar("vec1"))then 368 369 vec1 = "component1" 370 371 end if 372 if (.not. isvar("vec2"))then 373 374 vec2 = "component2" 616 ; OPTIONAL --plotvec-- VARIABLE FOR EXTRA VECTOR PLOT 617 ; 618 ; the vector plot can be combined with other plots of variables; if this is desired inidcate the variables, 619 ; where a vector plot shall overlay; inidcate them with one comma before and after each variable 620 ; 621 ; data type: string 622 ; 623 ; example: plotvec = ",u,w," 624 ; 625 ; default: "plotvec" (no combining, the vector plot is created seperately) 626 ;*************************************************** 627 if(.not. isvar("plotvec"))then 628 629 630 plotvec = "plotvec" 631 375 632 376 633 end if 377 634 ;*************************************************** 378 ; OPTIONAL --plotvec-- VARIABLE FOR EXTRA VECTOR PLOT379 ;380 ; the vector plot can be combined with other variables; if desired inidcate the variables381 ; with one comma before and after it; e.g. plotvec=",u,v,w," (the vector plot382 ; will combined with the contour plots of u, v and w)383 ;384 ; data type: string385 ;386 ; default: plotvec (no combining, the vector plot will be created seperately)387 ;***************************************************388 if(.not. isvar("plotvec"))then389 390 391 plotvec = "plotvec"392 393 394 end if395 ;***************************************************396 635 ; OPTIONAL --ref_mag-- REFERENCE VECTOR 397 636 ; … … 399 638 ; 400 639 ; data type: float 640 ; 641 ; example: ref_mag = 0.05 401 642 ; 402 643 ; default: 0.05 … … 420 661 421 662 ;*************************************************** 422 ; REQUIRED --file_1-- INPUT FILE 423 ; 424 ; input file produced by PALM; please declare path and name 425 ; 426 ; data type: string 663 ; REQUIRED --file_1-- 1ST INPUT FILE 664 ; 665 ; 1st input file produced by PALM; if there is more than one file for all timesteps of a job chain, 666 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 667 ; otherwise declare path and full file name 668 ; 669 ; data type: string 670 ; 671 ; example: file_1 = "/path_to_file/file_pr" if you use more than one cycle number 672 ; file_1 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 427 673 ; 428 674 ; default: "File in" 429 675 ;*************************************************** 430 if (.not. isvar("file_1"))then 431 432 433 file_1 = "File in" 676 if(.not. isvar("file_1"))then 677 678 679 file_1 = "File in" 680 681 682 end if 683 ;*************************************************** 684 ; REQUIRED --start_f_1-- START OF CYCLIC NUMBER OF THE 1ST INPUT FILE 685 ; 686 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 687 ; 688 ; data type: integer 689 ; 690 ; example: 3 (if first file: example_ts.3.nc) 691 ; 692 ; default: -1 693 ;*************************************************** 694 if (.not. isvar("start_f_1"))then 695 696 697 start_f_1 = -1 698 699 700 end if 701 ;*************************************************** 702 ; REQUIRED --end_f_1-- END OF CYCLIC NUMBER OF THE 1ST INPUT FILE 703 ; 704 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 705 ; 706 ; data type: integer 707 ; 708 ; example: 48 (if last file: example_ts.48.nc) 709 ; 710 ; default: -1 711 ;*************************************************** 712 if (.not. isvar("end_f_1"))then 713 714 715 end_f_1 = -1 434 716 435 717 … … 470 752 ; OPTIONAL --file_out-- OUTPUT FILE 471 753 ; 472 ; please declare path and name754 ; declare path and name of the output file 473 755 ; 474 756 ; data type: string … … 484 766 end if 485 767 ;*************************************************** 486 ; OPTIONAL --no_columns-- NUMBER OF ROWS768 ; OPTIONAL --no_columns-- NUMBER OF COLUMNS 487 769 ; 488 770 ; number of plots in one row … … 500 782 end if 501 783 ;*************************************************** 502 ; OPTIONAL --no_ lines-- NUMBER OF COLUMNS784 ; OPTIONAL --no_rows-- NUMBER OF ROWS 503 785 ; 504 786 ; number of plots in one column … … 508 790 ; default: 2 509 791 ;*************************************************** 510 if (.not. isvar("no_ lines"))then792 if (.not. isvar("no_rows"))then 511 793 512 794 513 no_ lines = 2795 no_rows = 2 514 796 515 797 … … 518 800 ; OPTIONAL --var-- OUTPUT VARIABLES 519 801 ; 520 ; names of output variables; please inidcate them with one comma before and after each variable; 521 ; e.g.: var=",u,v,w," (the windcomponents u, v and w will be plotted) 802 ; names of output variables; inidcate them with one comma before and after each variable 522 803 ; 523 804 ; data type: string 524 ; 525 ; default: "all" (all available variables will be plotted) 805 ; 806 ; example: var = ",u,v,w"; 807 ; 808 ; default: "all" (all available variables are plotted) 526 809 ;*************************************************** 527 810 if (.not. isvar("var"))then … … 535 818 ; OPTIONAL ---no_files-- NUMBER OF INPUT FILES 536 819 ; 537 ; up to 12 input files can be used; all input files must contain the same variables and dimensionalties;538 ; identical variables will be merged in one plot;820 ; up to 6 input files of different runs can be used; all input files must contain the same variables and dimensionalties; 821 ; identical variables are merged in one plot; 539 822 ; combining or overlaying of any variables is not feasible; 540 ; an extra legend (besides the time step legend) will bedrawn where you can explicitily name the items823 ; an extra legend (besides the time step legend) is drawn where you can explicitily name the items 541 824 ; 542 825 ; data type: integer … … 566 849 567 850 568 end if 569 ;*************************************************** 570 ; REQUIRED IF no_files > 1 --file_2-- 2nd INPUT FILE 571 ; 572 ; 2nd input file produced by PALM; please declare path and name 573 ; 574 ; data type: string 851 end if 852 ;*************************************************** 853 ; REQUIRED if no_files > 1 --file_2-- 2ND INPUT FILE 854 ; 855 ; 2nd input file produced by PALM; if there is more than one file for all timesteps of a job chain, 856 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 857 ; otherwise declare path and full file name 858 ; 859 ; data type: string 860 ; 861 ; example: file_2 = "/path_to_file/file_pr" if you use more than one cycle number 862 ; file_2 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 575 863 ; 576 864 ; default: "File in" 577 865 ;*************************************************** 578 if (.not. isvar("file_2"))then 866 if(.not. isvar("file_2"))then 867 868 869 file_2 = "File in" 870 871 872 end if 873 ;*************************************************** 874 ; REQUIRED --start_f_2-- START OF CYCLIC NUMBER OF THE 2ND INPUT FILE 875 ; 876 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 877 ; 878 ; data type: integer 879 ; 880 ; example: 3 (if first file: example_ts.3.nc) 881 ; 882 ; default: -1 883 ;*************************************************** 884 if (.not. isvar("start_f_2"))then 579 885 580 886 581 file_2 = "File in" 582 583 584 end if 887 start_f_2 = -1 888 889 890 end if 891 ;*************************************************** 892 ; REQUIRED --end_f_2-- END OF CYCLIC NUMBER OF THE 2ND INPUT FILE 893 ; 894 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 895 ; 896 ; data type: integer 897 ; 898 ; example: 48 (if last file: example_ts.48.nc) 899 ; 900 ; default: -1 901 ;*************************************************** 902 if (.not. isvar("end_f_2"))then 903 904 905 end_f_2 = -1 906 907 908 end if 585 909 ;*************************************************** 586 910 ; OPTIONAL --name_legend_2-- 2nd LEGEND ITEM … … 598 922 599 923 600 end if 601 ;*************************************************** 602 ; REQUIRED IF no_files > 2 --file_3-- 3rd INPUT FILE 603 ; 604 ; 3rd input file produced by PALM; please declare path and name 605 ; 606 ; data type: string 924 end if 925 ;*************************************************** 926 ; REQUIRED if no_files > 2 --file_3-- 3RD INPUT FILE 927 ; 928 ; 3rd input file produced by PALM; if there is more than one file for all timesteps of a job chain, 929 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 930 ; otherwise declare path and full file name 931 ; 932 ; data type: string 933 ; 934 ; example: file_3 = "/path_to_file/file_pr" if you use more than one cycle number 935 ; file_3 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 607 936 ; 608 937 ; default: "File in" 609 938 ;*************************************************** 610 if (.not. isvar("file_3"))then 611 612 613 file_3 = "File in" 614 615 616 end if 939 if(.not. isvar("file_3"))then 940 941 942 file_3 = "File in" 943 944 945 end if 946 ;*************************************************** 947 ; REQUIRED --start_f_3-- START OF CYCLIC NUMBER OF THE 3RD INPUT FILE 948 ; 949 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 950 ; 951 ; data type: integer 952 ; 953 ; example: 3 (if first file: example_ts.3.nc) 954 ; 955 ; default: -1 956 ;*************************************************** 957 if (.not. isvar("start_f_3"))then 958 959 960 start_f_3 = -1 961 962 963 end if 964 ;*************************************************** 965 ; REQUIRED --end_f_3-- END OF CYCLIC NUMBER OF THE 3RD INPUT FILE 966 ; 967 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 968 ; 969 ; data type: integer 970 ; 971 ; example: 48 (if last file: example_ts.48.nc) 972 ; 973 ; default: -1 974 ;*************************************************** 975 if (.not. isvar("end_f_3"))then 976 977 978 end_f_3 = -1 979 980 981 end if 617 982 ;*************************************************** 618 983 ; OPTIONAL --name_legend_3-- 3rd LEGEND ITEM … … 630 995 631 996 632 end if 633 ;*************************************************** 634 ; REQUIRED IF no_files > 3 --file_4-- 4th INPUT FILE 635 ; 636 ; 4th input file produced by PALM; please declare path and name 637 ; 638 ; data type: string 997 end if 998 ;*************************************************** 999 ; REQUIRED if no_files > 3 --file_4-- 4TH INPUT FILE 1000 ; 1001 ; 4th input file produced by PALM; if there is more than one file for all timesteps of a job chain, 1002 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 1003 ; otherwise declare path and full file name 1004 ; 1005 ; data type: string 1006 ; 1007 ; example: file_4 = "/path_to_file/file_pr" if you use more than one cycle number 1008 ; file_4 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 639 1009 ; 640 1010 ; default: "File in" 641 1011 ;*************************************************** 642 if (.not. isvar("file_4"))then 643 644 645 file_4 = "File in" 646 647 648 end if 1012 if(.not. isvar("file_4"))then 1013 1014 1015 file_4 = "File in" 1016 1017 1018 end if 1019 ;*************************************************** 1020 ; REQUIRED --start_f_4-- START OF CYCLIC NUMBER OF THE 4TH INPUT FILE 1021 ; 1022 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 1023 ; 1024 ; data type: integer 1025 ; 1026 ; example: 3 (if first file: example_ts.3.nc) 1027 ; 1028 ; default: -1 1029 ;*************************************************** 1030 if (.not. isvar("start_f_4"))then 1031 1032 1033 start_f_4 = -1 1034 1035 1036 end if 1037 ;*************************************************** 1038 ; REQUIRED --end_f_4-- END OF CYCLIC NUMBER OF THE 4TH INPUT FILE 1039 ; 1040 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 1041 ; 1042 ; data type: integer 1043 ; 1044 ; example: 48 (if last file: example_ts.48.nc) 1045 ; 1046 ; default: -1 1047 ;*************************************************** 1048 if (.not. isvar("end_f_4"))then 1049 1050 1051 end_f_4 = -1 1052 1053 1054 end if 649 1055 ;*************************************************** 650 1056 ; OPTIONAL --name_legend_4-- 4th LEGEND ITEM … … 662 1068 663 1069 664 end if 665 ;*************************************************** 666 ; REQUIRED IF no_files > 4 --file_5-- 5th INPUT FILE 667 ; 668 ; 5th input file produced by PALM; please declare path and name 669 ; 670 ; data type: string 1070 end if 1071 ;*************************************************** 1072 ; REQUIRED if no_files > 4 --file_5-- 5TH INPUT FILE 1073 ; 1074 ; 5th input file produced by PALM; if there is more than one file for all timesteps of a job chain, 1075 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 1076 ; otherwise declare path and full file name 1077 ; 1078 ; data type: string 1079 ; 1080 ; example: file_5 = "/path_to_file/file_pr" if you use more than one cycle number 1081 ; file_5 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 671 1082 ; 672 1083 ; default: "File in" 673 1084 ;*************************************************** 674 if (.not. isvar("file_5"))then 675 676 677 file_5 = "File in" 678 679 680 end if 1085 if(.not. isvar("file_5"))then 1086 1087 1088 file_5 = "File in" 1089 1090 1091 end if 1092 ;*************************************************** 1093 ; REQUIRED --start_f_5-- START OF CYCLIC NUMBER OF THE 5TH INPUT FILE 1094 ; 1095 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 1096 ; 1097 ; data type: integer 1098 ; 1099 ; example: 3 (if first file: example_ts.3.nc) 1100 ; 1101 ; default: -1 1102 ;*************************************************** 1103 if (.not. isvar("start_f_5"))then 1104 1105 1106 start_f_5 = -1 1107 1108 1109 end if 1110 ;*************************************************** 1111 ; REQUIRED --end_f_5-- END OF CYCLIC NUMBER OF THE 5TH INPUT FILE 1112 ; 1113 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 1114 ; 1115 ; data type: integer 1116 ; 1117 ; example: 48 (if last file: example_ts.48.nc) 1118 ; 1119 ; default: -1 1120 ;*************************************************** 1121 if (.not. isvar("end_f_5"))then 1122 1123 1124 end_f_5 = -1 1125 1126 1127 end if 681 1128 ;*************************************************** 682 1129 ; OPTIONAL --name_legend_5-- 5th LEGEND ITEM … … 694 1141 695 1142 696 end if 697 ;*************************************************** 698 ; REQUIRED IF no_files > 5 --file_6-- 6th INPUT FILE 699 ; 700 ; 6th input file produced by PALM; please declare path and name 701 ; 702 ; data type: string 1143 end if 1144 ;*************************************************** 1145 ; REQUIRED if no_files > 5 --file_6-- 6TH INPUT FILE 1146 ; 1147 ; 6th input file produced by PALM; if there is more than one file for all timesteps of a job chain, 1148 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 1149 ; otherwise declare path and full file name 1150 ; 1151 ; data type: string 1152 ; 1153 ; example: file_6 = "/path_to_file/file_pr" if you use more than one cycle number 1154 ; file_6 = "/path_to_file/file_pr.4.nc" if you use one file (e.g. with cycle number 4) 703 1155 ; 704 1156 ; default: "File in" 705 1157 ;*************************************************** 706 if (.not. isvar("file_6"))then 707 708 709 file_6 = "File in" 710 711 712 end if 713 ;*************************************************** 714 ; OPTIONAL --name_legend_6-- 6th LEGEND ITEM 1158 if(.not. isvar("file_6"))then 1159 1160 1161 file_6 = "File in" 1162 1163 1164 end if 1165 ;*************************************************** 1166 ; REQUIRED --start_f_6-- START OF CYCLIC NUMBER OF THE 6TH INPUT FILE 1167 ; 1168 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 1169 ; 1170 ; data type: integer 1171 ; 1172 ; example: 3 (if first file: example_ts.3.nc) 1173 ; 1174 ; default: -1 1175 ;*************************************************** 1176 if (.not. isvar("start_f_6"))then 1177 1178 1179 start_f_6 = -1 1180 1181 1182 end if 1183 ;*************************************************** 1184 ; REQUIRED --end_f_6-- END OF CYCLIC NUMBER OF THE 6TH INPUT FILE 1185 ; 1186 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 1187 ; 1188 ; data type: integer 1189 ; 1190 ; example: 48 (if last file: example_ts.48.nc) 1191 ; 1192 ; default: -1 1193 ;*************************************************** 1194 if (.not. isvar("end_f_6"))then 1195 1196 1197 end_f_6 = -1 1198 1199 1200 end if 1201 ;*************************************************** 1202 ; OPTIONAL --name_legend_6-- 6TH LEGEND ITEM 715 1203 ; 716 1204 ; if no_files > 5: name of 6th item in extra legend … … 726 1214 727 1215 728 end if 729 ;*************************************************** 730 ; REQUIRED IF no_files > 6 --file_7-- 7th INPUT FILE 731 ; 732 ; 7th input file produced by PALM; please declare path and name 733 ; 734 ; data type: string 735 ; 736 ; default: "File in" 737 ;*************************************************** 738 if (.not. isvar("file_7"))then 739 740 741 file_7 = "File in" 742 743 744 end if 745 ;*************************************************** 746 ; OPTIONAL --name_legend_7-- 7th LEGEND ITEM 747 ; 748 ; if no_files > 6: name of 7th item in extra legend 749 ; 750 ; data type: string 751 ; 752 ; default: "File 7" 753 ;*************************************************** 754 if (.not. isvar("name_legend_7"))then 755 756 757 name_legend_7 = "File 7" 758 759 760 end if 761 ;*************************************************** 762 ; REQUIRED IF no_files > 7 --file_8-- 8th INPUT FILE 763 ; 764 ; 8th input file produced by PALM; please declare path and name 765 ; 766 ; data type: string 767 ; 768 ; default: "File in" 769 ;*************************************************** 770 if (.not. isvar("file_8"))then 771 772 773 file_8 = "File in" 774 775 776 end if 777 ;*************************************************** 778 ; OPTIONAL --name_legend_8-- 8th LEGEND ITEM 779 ; 780 ; if no_files > 1: name of 8th item in extra legend 781 ; 782 ; data type: string 783 ; 784 ; default: "File 8" 785 ;*************************************************** 786 if (.not. isvar("name_legend_8"))then 787 788 789 name_legend_8 = "File 8" 790 791 792 end if 793 ;*************************************************** 794 ; REQUIRED IF no_files > 8 --file_9-- 9th INPUT FILE 795 ; 796 ; 9th input file produced by PALM; please declare path and name 797 ; 798 ; data type: string 799 ; 800 ; default: "File in" 801 ;*************************************************** 802 if (.not. isvar("file_9"))then 803 804 805 file_9 = "File in" 806 807 808 end if 809 ;*************************************************** 810 ; OPTIONAL --name_legend_9-- 9th LEGEND ITEM 811 ; 812 ; if no_files > 8: name of 9th item in extra legend 813 ; 814 ; data type: string 815 ; 816 ; default: "File 9" 817 ;*************************************************** 818 if (.not. isvar("name_legend_9"))then 819 820 821 name_legend_9 = "File 9" 822 823 824 end if 825 ;*************************************************** 826 ; REQUIRED IF no_files > 9 --file_10-- 10th INPUT FILE 827 ; 828 ; 10th input file produced by PALM; please declare path and name 829 ; 830 ; data type: string 831 ; 832 ; default: "File in" 833 ;*************************************************** 834 if (.not. isvar("file_10"))then 835 836 837 file_10 = "File in" 838 839 840 end if 841 ;*************************************************** 842 ; OPTIONAL --name_legend_10-- 10th LEGEND ITEM 843 ; 844 ; if no_files > 9: name of 10th item in extra legend 845 ; 846 ; data type: string 847 ; 848 ; default: "File 10" 849 ;*************************************************** 850 if (.not. isvar("name_legend_10"))then 851 852 853 name_legend_10 = "File 10" 854 855 856 end if 857 ;*************************************************** 858 ; REQUIRED IF no_files > 10 --file_11-- 11th INPUT FILE 859 ; 860 ; 11th input file produced by PALM; please declare path and name 861 ; 862 ; data type: string 863 ; 864 ; default: "File in" 865 ;*************************************************** 866 if (.not. isvar("file_11"))then 867 868 869 file_11 = "File in" 870 871 872 end if 873 ;*************************************************** 874 ; OPTIONAL --name_legend_11-- 11th LEGEND ITEM 875 ; 876 ; if no_files > 1: name of 11th item in extra legend 877 ; 878 ; data type: string 879 ; 880 ; default: "File 11" 881 ;*************************************************** 882 if (.not. isvar("name_legend_11"))then 883 884 885 name_legend_11 = "File 11" 886 887 888 end if 889 ;*************************************************** 890 ; REQUIRED IF no_files > 11 --file_12-- 12th INPUT FILE 891 ; 892 ; 12th input file produced by PALM; please declare path and name 893 ; 894 ; data type: string 895 ; 896 ; default: "File in" 897 ;*************************************************** 898 if (.not. isvar("file_12"))then 899 900 901 file_12 = "File in" 902 903 904 end if 905 ;*************************************************** 906 ; OPTIONAL --name_legend_12-- 12th LEGEND ITEM 907 ; 908 ; if no_files > 11: name of 12th item in extra legend 909 ; 910 ; data type: string 911 ; 912 ; default: "File 12" 913 ;*************************************************** 914 if (.not. isvar("name_legend_12"))then 915 916 917 name_legend_12 = "File 12" 918 919 920 end if 1216 end if 921 1217 ;*************************************************** 922 1218 ; OPTIONAL --start_time_step-- FIRST TIME STEP 923 1219 ; 924 ; first time step of plot; you don't haveto specify a precise time value from the input file,925 ; it will berounded to the next existent time step1220 ; first time step of plot; there is no need to specify a precise time value from the input file, 1221 ; 'start_time_step' is rounded to the next existent time step 926 1222 ; 927 1223 ; data type: double; dimension: [hour] 1224 ; 1225 ; example: start_time_step = 0.5 928 1226 ; 929 1227 ; default: -1.d (first available time step) … … 939 1237 ; OPTIONAL --end_time_step-- LAST TIME STEP 940 1238 ; 941 ; last time step of plot; you don't haveto specify a precise time value from the input file,942 ; it will berounded to the next existent time step1239 ; last time step of plot; there is no need to specify a precise time value from the input file, 1240 ; 'end_time_step' is rounded to the next existent time step 943 1241 ; 944 1242 ; data type: double; dimension: [hour] 945 1243 ; 1244 ; example: end_time_step = 2.0 1245 ; 946 1246 ; default: -1.d (last available time step) 947 1247 ;*************************************************** … … 949 1249 950 1250 951 end_time_step = -1.d 952 953 954 end if 1251 end_time_step = -1.d 1252 1253 1254 end if 1255 ;*************************************************** 1256 ; OPTIONAL --start_x-- STARTVALUE IN X-DIRECTION 1257 ; 1258 ; if 3D data is used for profiles you can choose a startvalue in x-direction for horizontal averaging 1259 ; 1260 ; data type: integer; dimension [grippoint] 1261 ; 1262 ; example: start_x = 0 1263 ; 1264 ; default: 0 (minimum of range) 1265 ;*************************************************** 1266 if (.not. isvar("start_x"))then 1267 1268 1269 start_x = 0 1270 1271 1272 end if 1273 ;*************************************************** 1274 ; OPTIONAL --end_x-- ENDVALUE IN X-DIRECTION 1275 ; 1276 ; if 3D data is used for profiles you can choose an endvalue in x-direction for horizontal averaging 1277 ; 1278 ; data type: integer; dimension [grippoint] 1279 ; 1280 ; example: end_x = 200 1281 ; 1282 ; default: -1 (maximum of range excluding ghostpoint) 1283 ;*************************************************** 1284 if (.not. isvar("end_x"))then 1285 1286 1287 end_x = -1 1288 1289 1290 end if 1291 ;*************************************************** 1292 ; OPTIONAL --start_y-- STARTVALUE IN Y-DIRECTION 1293 ; 1294 ; if 3D data is used for profiles you can choose a startvalue in y-direction for horizontal averaging 1295 ; 1296 ; data type: integer; dimension [grippoint] 1297 ; 1298 ; example: start_y = 0 1299 ; 1300 ; default: 0 (minimum of range) 1301 ;*************************************************** 1302 if (.not. isvar("start_y"))then 1303 1304 1305 start_y = 0 1306 1307 1308 end if 1309 ;*************************************************** 1310 ; OPTIONAL --end_y-- ENDVALUE IN Y-DIRECTION 1311 ; 1312 ; if 3D data is used for profiles you can choose an endvalue in y-direction for horizontal averaging 1313 ; 1314 ; data type: integer; dimension [grippoint] 1315 ; 1316 ; example: end_y = 200 1317 ; 1318 ; default: -1 (maximum of range excluding ghostpoint) 1319 ;*************************************************** 1320 if (.not. isvar("end_y"))then 1321 1322 1323 end_y = -1 1324 1325 1326 end if 955 1327 ;*************************************************** 956 1328 ; OPTIONAL --xs-- MINIMUM X-AXIS … … 959 1331 ; 960 1332 ; data type: float; dimension of variable 1333 ; 1334 ; example: xs = 300. (e.g. if var=",pt") 961 1335 ; 962 1336 ; default: -1. (minimum of range) … … 976 1350 ; data type: float; dimension of variable 977 1351 ; 1352 ; example: xe = 302. (e.g. if var=",pt") 1353 ; 978 1354 ; default: -1. (maximum of range) 979 1355 ;*************************************************** … … 992 1368 ; data type: double; dimension: [meter] 993 1369 ; 1370 ; example: min_z = 0.0 1371 ; 994 1372 ; default: -1.d (related to the minimum of z-axis in input file) 995 1373 ;*************************************************** … … 1008 1386 ; data type: double; dimension: [meter] 1009 1387 ; 1388 ; example: max_z = 1000.0 1389 ; 1010 1390 ; default: -1.d (related to the maximum of z-axis in input file) 1011 1391 ;*************************************************** … … 1018 1398 end if 1019 1399 ;*************************************************** 1020 ; OPTIONAL --logy-- LOGARITHMIC SCALE 1021 ; 1022 ; logarithmic scale for y-axis will be switched on [=1] or off [=0] 1023 ; 1024 ; data type: integer 1400 ; OPTIONAL --log_z-- LOGARITHMIC SCALE OF Z-AXIS 1401 ; 1402 ; logarithmic scale for z-axis is switched on [=1] or off [=0] 1403 ; 1404 ; data type: integer 1405 ; 1406 ; example: log_z = 0 1025 1407 ; 1026 1408 ; default: 0 1027 1409 ;*************************************************** 1028 if (.not. isvar("log y"))then1410 if (.not. isvar("log_z"))then 1029 1411 1030 1412 1031 log y= 01032 1033 1034 end if 1035 ;*************************************************** 1036 ; OPTIONAL --norm -- NORMALISE Y-AXIS1037 ; 1038 ; value for normalising the y-axis1413 log_z = 0 1414 1415 1416 end if 1417 ;*************************************************** 1418 ; OPTIONAL --norm_z-- NORMALISING Z-AXIS 1419 ; 1420 ; value for normalising the z-axis 1039 1421 ; 1040 1422 ; data type: float 1041 1423 ; 1042 ; default: 1 (no normalising) 1043 ;*************************************************** 1044 if (.not. isvar("norm"))then 1424 ; example: norm_z = 1. 1425 ; 1426 ; default: 1. (no normalising) 1427 ;*************************************************** 1428 if (.not. isvar("norm_z"))then 1045 1429 1046 1430 1047 norm = 11431 norm_z = 1. 1048 1432 1049 1433 … … 1052 1436 ; OPTIONAL --over-- OVERLAYING 1053 1437 ; 1054 ; predefined overlaying of standard variables will beswitched on [=1] or off [=0];1438 ; predefined overlaying of standard variables is switched on [=1] or off [=0]; 1055 1439 ; this feature cannot be used with statistic regions 1056 1440 ; 1057 1441 ; data type: integer 1058 1442 ; 1443 ; example: over = 0 1444 ; 1059 1445 ; default: 0 1060 1446 ;*************************************************** … … 1072 1458 ; 1073 1459 ; data type: integer 1460 ; 1461 ; example: combine = 0 1074 1462 ; 1075 1463 ; default: 0 … … 1089 1477 ; data type: integer 1090 1478 ; 1479 ; example: number_comb = 2 1480 ; 1091 1481 ; default: -1 1092 1482 ;*************************************************** … … 1101 1491 ; REQUIRED IF combine=1 --c_var-- VARIABLES FOR COMBINING 1102 1492 ; 1103 ; names of variables; please inidcate them with one comma before and after each variable; 1104 ; e.g.: var=",u,v,w," (the windcomponents u, v and w will be combined) 1105 ; 1106 ; data type: string 1493 ; names of variables; inidcate them with one comma before and after each variable; 1494 ; 1495 ; data type: string 1496 ; 1497 ; example: c_var = ",u,v," 1107 1498 ; 1108 1499 ; default: "c_variables" … … 1122 1513 ; data type: integer 1123 1514 ; 1515 ; example: black = 0 1516 ; 1124 1517 ; default: 0 1125 1518 ;*************************************************** … … 1138 1531 ; data type: integer 1139 1532 ; 1533 ; example: dash = 0 1534 ; 1140 1535 ; default: 0 1141 1536 ;*************************************************** … … 1144 1539 1145 1540 dash = 0 1541 1542 1543 end if 1544 ;*************************************************** 1545 ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 1546 ; 1547 ; font size can be changed to fit to the current plot 1548 ; 1549 ; data type: float 1550 ; 1551 ; example: font_size = 0.02 1552 ; 1553 ; default: 0.02 1554 ;*************************************************** 1555 if(.not. isvar("font_size"))then 1556 1557 1558 font_size = 0.02 1559 1560 1561 end if 1562 ;*************************************************** 1563 ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 1564 ; 1565 ; font size of the legend can be changed to fit to the current plot 1566 ; 1567 ; data type: float 1568 ; 1569 ; example: font_size_legend = 0.2 1570 ; 1571 ; default: 0.2 1572 ;*************************************************** 1573 if(.not. isvar("font_size_legend"))then 1574 1575 1576 font_size_legend = 0.2 1146 1577 1147 1578 … … 1160 1591 ; REQUIRED --file_1-- INPUT FILE 1161 1592 ; 1162 ; input file produced by PALM; please declare path and name 1163 ; 1164 ; data type: string 1593 ; input file produced by PALM; if there is more than one file for all timesteps of a job chain, 1594 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 1595 ; otherwise declare path and full file name 1596 ; 1597 ; data type: string 1598 ; 1599 ; example: file_1 = "/path_to_file/file_sp" if you use more than one cycle number 1600 ; file_1 = "/path_to_file/file_sp.4.nc" if you use one file (e.g. with cycle number 4) 1165 1601 ; 1166 1602 ; default: "File in" 1167 1603 ;*************************************************** 1168 if (.not. isvar("file_1"))then 1604 if(.not. isvar("file_1"))then 1605 1606 1607 file_1 = "File in" 1608 1609 1610 end if 1611 ;*************************************************** 1612 ; REQUIRED if more than one file of a job chain --start_f-- START OF CYCLIC NUMBER 1613 ; 1614 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 1615 ; 1616 ; data type: integer 1617 ; 1618 ; example: start_f = 3 (if first file: example_ts.3.nc) 1619 ; 1620 ; default: -1 1621 ;*************************************************** 1622 if (.not. isvar("start_f"))then 1169 1623 1170 1624 1171 file_1 = "File in" 1172 1173 1174 end if 1625 start_f = -1 1626 1627 1628 end if 1629 ;*************************************************** 1630 ; REQUIRED if more than one file of a job chain --end_f-- END OF CYCLIC NUMBER 1631 ; 1632 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 1633 ; 1634 ; data type: integer 1635 ; 1636 ; example: end_f = 48 (if last file: example_ts.48.nc) 1637 ; 1638 ; default: -1 1639 ;*************************************************** 1640 if (.not. isvar("end_f"))then 1641 1642 1643 end_f = -1 1644 1645 1646 end if 1175 1647 ;*************************************************** 1176 1648 ; OPTIONAL --format_out-- OUTPUT FORMAT 1177 1649 ; 1178 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm 1179 ; 1180 ; data type: string 1650 ; format of the output file; supported file formats: x11, pdf, ps, eps, epsi or ncgm 1651 ; 1652 ; data type: string 1653 ; 1654 ; example: format_out = "pdf" 1181 1655 ; 1182 1656 ; default: "x11" … … 1192 1666 ; OPTIONAL --file_out-- OUTPUT FILE 1193 1667 ; 1194 ; please declare path and name 1195 ; 1196 ; data type: string 1668 ; path and name of the output file 1669 ; 1670 ; data type: string 1671 ; 1672 ; example: file_out = "/home/path_to_output/test_sp" 1197 1673 ; 1198 1674 ; default: "~/test_sp" … … 1206 1682 end if 1207 1683 ;*************************************************** 1208 ; OPTIONAL --no_columns-- NUMBER OF ROWS1684 ; OPTIONAL --no_columns-- NUMBER OF COLUMNS 1209 1685 ; 1210 1686 ; number of plots in one row 1211 1687 ; 1212 1688 ; data type: integer 1689 ; 1690 ; example: no_columns = 1 1213 1691 ; 1214 1692 ; default: 1 … … 1222 1700 end if 1223 1701 ;*************************************************** 1224 ; OPTIONAL --no_ lines-- NUMBER OF COLUMNS1702 ; OPTIONAL --no_rows-- NUMBER OF ROWS 1225 1703 ; 1226 1704 ; number of plots in one column 1227 1705 ; 1228 1706 ; data type: integer 1707 ; 1708 ; example: no_rows = 2 1229 1709 ; 1230 1710 ; default: 2 1231 1711 ;*************************************************** 1232 if (.not. isvar("no_ lines"))then1233 1234 1235 no_ lines = 21712 if (.not. isvar("no_rows"))then 1713 1714 1715 no_rows = 2 1236 1716 1237 1717 … … 1240 1720 ; OPTIONAL --var-- OUTPUT VARIABLES 1241 1721 ; 1242 ; names of output variables; please inidcate them with one comma before and after each variable; 1243 ; e.g.: var=",u,v,w," (the windcomponents u, v and w will be plotted) 1722 ; names of output variables; inidcate them with one comma before and after each variable 1244 1723 ; 1245 1724 ; data type: string 1246 ; 1247 ; default: "all" (all available variables will be plotted) 1725 ; 1726 ; example: var = ",u,v,w" 1727 ; 1728 ; default: "all" (all available variables are plotted) 1248 1729 ;*************************************************** 1249 1730 if (.not. isvar("var"))then … … 1257 1738 ; OPTIONAL --height_level-- HEIGHT LEVELS 1258 1739 ; 1259 ; defines if all heights or selected heights will be output; a 1D array with up to 10 elements 1260 ; from 0 to 9 must be indicated, e.g.: height_level=(/0,3,7/) (level 0, 3 and 7 as in input file 1261 ; will be output) 1740 ; defines if all levels or selected levels are output; a 1D array with up to 100 elements 1741 ; from 0 to 99 must be indicated 1262 1742 ; 1263 1743 ; data type: integer array 1264 1744 ; 1265 ; default: (/-1/) (all levels will be output) 1745 ; example: height_level=(/0,3,7/) 1746 ; 1747 ; default: (/-1/) (all levels are output) 1266 1748 ;*************************************************** 1267 1749 if (.not. isvar("height_level"))then … … 1275 1757 ; OPTIONAL --sort-- TYPE OF SORTING 1276 1758 ; 1277 ; defines if all heights [="height"] or all timesteps [="time"] will be merged in one plot 1278 ; 1279 ; data type: string 1759 ; defines if all heights [="height"] or all timesteps [="time"] are merged in one plot 1760 ; 1761 ; data type: string 1762 ; 1763 ; example: sort = "height" 1280 1764 ; 1281 1765 ; default: "height" … … 1291 1775 ; OPTIONAL --start_time_step-- FIRST TIME STEP 1292 1776 ; 1293 ; first time step of plot; you don't haveto specify a precise time value from the input file,1294 ; it will berounded to the next existent time step1777 ; first time step of plot; there is no need to specify a precise time value from the input file, 1778 ; 'start_time_step' is rounded to the next existent time step 1295 1779 ; 1296 1780 ; data type: double; dimension: [hour] 1297 1781 ; 1782 ; example: start_time_step = 0.5 1783 ; 1298 1784 ; default: -1.d (first available time step) 1299 1785 ;*************************************************** … … 1308 1794 ; OPTIONAL --end_time_step-- LAST TIME STEP 1309 1795 ; 1310 ; last time step of plot; you don't haveto specify a precise time value from the input file,1311 ; it will berounded to the next existent time step1796 ; last time step of plot; there is no need to specify a precise time value from the input file, 1797 ; 'end_time_step' is rounded to the next existent time step 1312 1798 ; 1313 1799 ; data type: double; dimension: [hour] 1314 1800 ; 1801 ; example: end_time_step = 2.0 1802 ; 1315 1803 ; default: -1.d (last available time step) 1316 1804 ;*************************************************** … … 1328 1816 ; 1329 1817 ; data type: integer 1818 ; 1819 ; example: black = 0 1330 1820 ; 1331 1821 ; default: 0 … … 1345 1835 ; data type: integer 1346 1836 ; 1837 ; example: dash = 0 1838 ; 1347 1839 ; default: 0 1348 1840 ;*************************************************** … … 1355 1847 end if 1356 1848 ;*************************************************** 1357 ; OPTIONAL --logx-- LOGARITHMIC SCALE X-AXIS 1358 ; 1359 ; logarithmic scale for x-axis will be switched on [=1] or off [=0] 1360 ; 1361 ; data type: integer 1849 ; OPTIONAL --log_x-- LOGARITHMIC SCALE X-AXIS 1850 ; 1851 ; logarithmic scale for x-axis is switched on [=1] or off [=0] 1852 ; 1853 ; data type: integer 1854 ; 1855 ; example: log_x = 1 1362 1856 ; 1363 1857 ; default: 1 1364 1858 ;*************************************************** 1365 if (.not. isvar("log x"))then1859 if (.not. isvar("log_x"))then 1366 1860 1367 1861 1368 log x = 11862 log_x = 1 1369 1863 1370 1864 1371 1865 end if 1372 1866 ;*************************************************** 1373 ; OPTIONAL --logy-- LOGARITHMIC SCALE Y-AXIS 1374 ; 1375 ; logarithmic scale for y-axis will be switched on [=1] or off [=0] 1376 ; 1377 ; data type: integer 1867 ; OPTIONAL --log_y-- LOGARITHMIC SCALE Y-AXIS 1868 ; 1869 ; logarithmic scale for y-axis is switched on [=1] or off [=0] 1870 ; 1871 ; data type: integer 1872 ; 1873 ; example: log_y = 1 1378 1874 ; 1379 1875 ; default: 1 1380 1876 ;*************************************************** 1381 if (.not. isvar("log y"))then1877 if (.not. isvar("log_y"))then 1382 1878 1383 1879 1384 log y = 11385 1386 1387 end if 1388 ;*************************************************** 1389 ; OPTIONAL --norm x-- NORMALISEX-AXIS1880 log_y = 1 1881 1882 1883 end if 1884 ;*************************************************** 1885 ; OPTIONAL --norm_x-- NORMALISING X-AXIS 1390 1886 ; 1391 1887 ; value for normalising the x-axis … … 1393 1889 ; data type: float 1394 1890 ; 1891 ; example: norm_x = 1 1892 ; 1395 1893 ; default: 1. (no normalising) 1396 1894 ;*************************************************** 1397 if (.not. isvar("norm x"))then1895 if (.not. isvar("norm_x"))then 1398 1896 1399 1897 1400 normx = 1. 1401 1402 1403 end if 1404 ;*************************************************** 1405 ; OPTIONAL --normy-- NORMALISE Y-AXIS 1898 norm_x = 1. 1899 1900 1901 end if 1902 ;*************************************************** 1903 ; OPTIONAL --norm_height-- NORMALISING X-AXIS WITH HEIGHT 1904 ; 1905 ; normalising the x-axis with the height of each spectra is switched on [=1] or off [=0] 1906 ; 1907 ; data type: integer 1908 ; 1909 ; example: norm_height = 0 1910 ; 1911 ; default: 0 (no normalising) 1912 ;*************************************************** 1913 if (.not. isvar("norm_height"))then 1914 1915 1916 norm_height = 0 1917 1918 1919 end if 1920 ;*************************************************** 1921 ; OPTIONAL --norm_y-- NORMALISE Y-AXIS 1406 1922 ; 1407 1923 ; value for normalising the y-axis … … 1409 1925 ; data type: float 1410 1926 ; 1927 ; example: norm_y = 1. 1928 ; 1411 1929 ; default: 1. (no normalising) 1412 1930 ;*************************************************** 1413 if (.not. isvar("norm y"))then1931 if (.not. isvar("norm_y"))then 1414 1932 1415 1933 1416 normy = 1. 1417 1418 1419 end if 1934 norm_y = 1. 1935 1936 1937 end if 1938 ;*************************************************** 1939 ; OPTIONAL --unit_x--unit_y-- UNITS OF X-, Y-AXES 1940 ; 1941 ; unit of the x-axis can be set if norm_x is unequal 1, otherwise the unit is [1/m]; by default no unit is set for the y-axis 1942 ; 1943 ; data type: string, 1944 ; 1945 ; example: unit_x = "100/m" 1946 ; 1947 ; default: " " 1948 ;*************************************************** 1949 if(.not. isvar("unit_x"))then 1950 1951 unit_x = " " 1952 1953 end if 1954 if(.not. isvar("unit_y"))then 1955 1956 unit_y = " " 1957 1958 end if 1959 ;*************************************************** 1960 ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 1961 ; 1962 ; font size can be changed to fit to the current plot 1963 ; 1964 ; data type: float 1965 ; 1966 ; example: font_size = 0.02 1967 ; 1968 ; default: 0.02 1969 ;*************************************************** 1970 if(.not. isvar("font_size"))then 1971 1972 1973 font_size = 0.02 1974 1975 1976 end if 1977 ;*************************************************** 1978 ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 1979 ; 1980 ; font size of the legend can be changed to fit to the current plot 1981 ; 1982 ; data type: float 1983 ; 1984 ; example: font_size_legend = 0.2 1985 ; 1986 ; default: 0.2 1987 ;*************************************************** 1988 if(.not. isvar("font_size_legend"))then 1989 1990 1991 font_size_legend = 0.2 1992 1993 1994 end if 1420 1995 ;*************************************************** 1421 1996 … … 1431 2006 ; REQUIRED --file_1-- INPUT FILE 1432 2007 ; 1433 ; input file produced by PALM; please declare path and name 1434 ; 1435 ; data type: string 2008 ; input file produced by PALM; if there is more than one file for all timesteps of a job chain, 2009 ; declare path and file name without cycle number and ".nc" (first and last cycle numbers are given with the parameters 'start_f' and 'end_f'); 2010 ; otherwise declare path and full file name 2011 ; 2012 ; data type: string 2013 ; 2014 ; example: file_1 = "/path_to_file/file_ts" if you use more than one cycle number 2015 ; file_1 = "/path_to_file/file_ts.4.nc" if you use one file (e.g. with cycle number 4) 1436 2016 ; 1437 2017 ; default: "File in" 1438 2018 ;*************************************************** 1439 if (.not. isvar("file_1"))then 2019 if(.not. isvar("file_1"))then 2020 2021 2022 file_1 = "File in" 2023 2024 2025 end if 2026 ;*************************************************** 2027 ; REQUIRED if more than one file of a job chain --start_f-- START OF CYCLIC NUMBER 2028 ; 2029 ; if there is more than one file for all timesteps of a job chain, declare the first cyclicnumber which contains timesteps you'd like to use 2030 ; 2031 ; data type: integer 2032 ; 2033 ; example: start_f = 3 (if first file: example_ts.3.nc) 2034 ; 2035 ; default: -1 2036 ;*************************************************** 2037 if (.not. isvar("start_f"))then 1440 2038 1441 2039 1442 file_1 = "File in" 1443 1444 1445 end if 2040 start_f = -1 2041 2042 2043 end if 2044 ;*************************************************** 2045 ; REQUIRED if more than one file of a job chain --end_f-- END OF CYCLIC NUMBER 2046 ; 2047 ; if there is more than one file for all timesteps of a job chain, declare the last cyclicnumber which contains timesteps you'd like to use 2048 ; 2049 ; data type: integer 2050 ; 2051 ; example: end_f = 48 (if last file: example_ts.48.nc) 2052 ; 2053 ; default: -1 2054 ;*************************************************** 2055 if (.not. isvar("end_f"))then 2056 2057 2058 end_f = -1 2059 2060 2061 end if 1446 2062 ;*************************************************** 1447 2063 ; OPTIONAL --format_out-- OUTPUT FORMAT 1448 2064 ; 1449 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm 1450 ; 1451 ; data type: string 2065 ; format of the output file; supported file formats: x11, pdf, ps, eps, epsi or ncgm 2066 ; 2067 ; data type: string 2068 ; 2069 ; example: format_out = "pdf" 1452 2070 ; 1453 2071 ; default: "x11" … … 1463 2081 ; OPTIONAL --file_out-- OUTPUT FILE 1464 2082 ; 1465 ; please declare path and name 1466 ; 1467 ; data type: string 2083 ; path and name of the output file 2084 ; 2085 ; data type: string 2086 ; 2087 ; example: file_out = "/home/path_to_output/test_ts" 1468 2088 ; 1469 2089 ; default: "~/test_ts" … … 1477 2097 end if 1478 2098 ;*************************************************** 1479 ; OPTIONAL --no_columns-- NUMBER OF ROWS2099 ; OPTIONAL --no_columns-- NUMBER OF COLUMNS 1480 2100 ; 1481 2101 ; number of plots in one row 1482 2102 ; 1483 2103 ; data type: integer 2104 ; 2105 ; example: no_columns = 1 1484 2106 ; 1485 2107 ; default: 1 … … 1493 2115 end if 1494 2116 ;*************************************************** 1495 ; OPTIONAL --no_ lines-- NUMBER OF COLUMNS2117 ; OPTIONAL --no_rows-- NUMBER OF ROWS 1496 2118 ; 1497 2119 ; number of plots in one column 1498 2120 ; 1499 2121 ; data type: integer 2122 ; 2123 ; example: no_rows = 2 1500 2124 ; 1501 2125 ; default: 2 1502 2126 ;*************************************************** 1503 if (.not. isvar("no_ lines"))then1504 1505 1506 no_ lines = 22127 if (.not. isvar("no_rows"))then 2128 2129 2130 no_rows = 2 1507 2131 1508 2132 … … 1511 2135 ; OPTIONAL --var-- OUTPUT VARIABLES 1512 2136 ; 1513 ; names of output variables; please inidcate them with one comma before and after each variable; 1514 ; e.g.: var=",u,v,w," (the windcomponents u, v and w will be plotted) 2137 ; names of output variables; inidcate them with one comma before and after each variable 1515 2138 ; 1516 2139 ; data type: string 1517 ; 1518 ; default: "all" (all available variables will be plotted) 2140 ; 2141 ; example: var = ",u,v,w" 2142 ; 2143 ; default: "all" (all available variables are plotted) 1519 2144 ;*************************************************** 1520 2145 if (.not. isvar("var"))then … … 1528 2153 ; OPTIONAL --start_time_step-- FIRST TIME STEP 1529 2154 ; 1530 ; first time step of plot; you don't haveto specify a precise time value from the input file,1531 ; it will berounded to the next existent time step2155 ; first time step of plot; there is no need to specify a precise time value from the input file, 2156 ; 'start_time_step' is rounded to the next existent time step 1532 2157 ; 1533 2158 ; data type: double; dimension: [hour] 1534 2159 ; 2160 ; example: start_time_step = 0.5 2161 ; 1535 2162 ; default: -1.d (first available time step) 1536 2163 ;*************************************************** … … 1545 2172 ; OPTIONAL --end_time_step-- LAST TIME STEP 1546 2173 ; 1547 ; last time step of plot; you don't haveto specify a precise time value from the input file,1548 ; it will berounded to the next existent time step2174 ; last time step of plot; there is no need to specify a precise time value from the input file, 2175 ; 'end_time_step' is rounded to the next existent time step 1549 2176 ; 1550 2177 ; data type: double; dimension: [hour] 1551 2178 ; 2179 ; example: end_time_step = 2.0 2180 ; 1552 2181 ; default: -1.d (last available time step) 1553 2182 ;*************************************************** … … 1562 2191 ; OPTIONAL --over-- OVERLAYING 1563 2192 ; 1564 ; predefined overlaying of standard variables will be switched on [=1] or off [=0];2193 ; predefined overlaying of standard variables are switched on [=1] or off [=0]; 1565 2194 ; this feature cannot be used with statistic regions 1566 2195 ; 1567 2196 ; data type: integer 1568 2197 ; 2198 ; example: over = 0 2199 ; 1569 2200 ; default: 0 1570 2201 ;*************************************************** … … 1575 2206 1576 2207 1577 end if 2208 end if 2209 ;*************************************************** 2210 ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 2211 ; 2212 ; font size can be changed to fit to the current plot 2213 ; 2214 ; data type: float 2215 ; 2216 ; example: font_size = 0.07 2217 ; 2218 ; default: 0.07 2219 ;*************************************************** 2220 if(.not. isvar("font_size"))then 2221 2222 2223 font_size = 0.07 2224 2225 2226 end if 2227 ;*************************************************** 2228 ; OPTIONAL --norm_t-- NORMALISING X-AXIS OF TIMESERIES PLOTS (T-AXIS) 2229 ; 2230 ; normalising the x-axis with the given value; the unit can explicitly set; by default no normalising and unit is set to [s] 2231 ; 2232 ; data type: float 2233 ; 2234 ; example: norm_t = 3600 2235 ; 2236 ; default: 1. 2237 ;*************************************************** 2238 if(.not. isvar("normt"))then 2239 2240 2241 norm_t = 1. 2242 2243 2244 end if 2245 ;*************************************************** 2246 ; OPTIONAL --unit_t-- UNIT OF X-AXIS OF TIMESERIES PLOTS (T-AXIS) 2247 ; 2248 ; unit of the x-axis can be set; by default unit is set to [s] 2249 ; 2250 ; data type: string 2251 ; 2252 ; example: unit_t = "h" 2253 ; 2254 ; default: " " 2255 ;*************************************************** 2256 if(.not. isvar("unitt"))then 2257 2258 2259 unit_t = " " 2260 2261 2262 end if 1578 2263 ;*************************************************** 1579 2264 -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r194 r218 33 33 ;*************************************************** 34 34 35 if (no_files .LT. 1 .OR. no_files .GT. 12) then36 print(" ") 37 print(" Please assign 'no_files' between 1 and 12")35 if (no_files .LT. 1 .OR. no_files .GT. 6) then 36 print(" ") 37 print("Assign 'no_files' between 1 and 6") 38 38 print(" ") 39 39 exit 40 40 end if 41 42 file_in = new(no_files,string) 41 42 file_in = new(no_files,string) 43 file_in_1 = new(no_files,logical) 44 start_f = new(no_files,integer) 45 end_f = new(no_files,integer) 43 46 44 47 if (file_1 .EQ. "File in") then 45 48 print(" ") 46 print(" Please provide 1st input file 'file_1=' in 'ncl_preferences.ncl'")49 print("Declare 1st input file 'file_1=' in 'ncl_preferences.ncl' or prompt") 47 50 print(" ") 48 51 exit 49 52 else 50 53 file_in(0) = file_1 51 end if 52 if (.not. isfilepresent(file_in(0))) then 53 print(" ") 54 print("Your 1st input file: '"+file_in+"' does not exist") 55 print(" ") 54 end if 55 file_in_1(0) = False 56 if (isStrSubset(file_in(0), ".nc"))then 57 start_f_1 = -2 58 end_f_1 = -2 59 file_in_1(0) = True 60 end if 61 if (start_f_1 .EQ. -1)then 62 print(" ") 63 print("'start_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)") 64 print(" ") 56 65 exit 57 end if 58 66 end if 67 if (end_f_1 .EQ. -1)then 68 print(" ") 69 print("'end_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)") 70 print(" ") 71 exit 72 end if 73 start_f(0) = start_f_1 74 end_f(0) = end_f_1 75 59 76 if (prof3d .EQ. -1)then 60 77 print(" ") 61 print(" Please set 'prof3d' to 0 or 1")78 print("Set 'prof3d' to 0 or 1") 62 79 print(" ") 63 80 exit … … 74 91 if (file_2 .EQ. "File in") then 75 92 print(" ") 76 print(" Please provide 2nd input file 'file_2=' in 'ncl_preferences.ncl'")93 print("Declare 2nd input file 'file_2=' in 'ncl_preferences.ncl' or prompt") 77 94 print(" ") 78 95 exit 79 96 else 80 97 file_in(1) = file_2 98 end if 99 file_in_1(1) = False 100 if (isStrSubset(file_in(1), ".nc"))then 101 start_f_1 = -2 102 end_f_1 = -2 103 file_in_1(1) = True 81 104 end if 82 if ( .not. isfilepresent(file_in(1)))then83 print(" ") 84 print(" Your 2nd input file: '"+file_in+"' does not exist")85 print(" ") 105 if (start_f_2 .EQ. -1)then 106 print(" ") 107 print("'start_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)") 108 print(" ") 86 109 exit 87 end if 88 end if 110 end if 111 if (end_f_2 .EQ. -1)then 112 print(" ") 113 print("'end_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)") 114 print(" ") 115 exit 116 end if 117 start_f(1) = start_f_2 118 end_f(1) = end_f_2 119 end if 89 120 90 121 if (no_files .GT. 2) then 91 122 if (file_3 .EQ. "File in") then 92 123 print(" ") 93 print(" Please provide 3rd input file 'file_3=' in 'ncl_preferences.ncl'")124 print("Declare 3rd input file 'file_3=' in 'ncl_preferences.ncl' or prompt") 94 125 print(" ") 95 126 exit 96 127 else 97 128 file_in(2) = file_3 129 end if 130 file_in_1(2) = False 131 if (isStrSubset(file_in(2), ".nc"))then 132 start_f_1 = -2 133 end_f_1 = -2 134 file_in_1(2) = True 98 135 end if 99 if ( .not. isfilepresent(file_in(2)))then100 print(" ") 101 print(" Your 3rd input file: '"+file_in+"' does not exist")102 print(" ") 136 if (start_f_3 .EQ. -1)then 137 print(" ") 138 print("'start_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)") 139 print(" ") 103 140 exit 104 end if 141 end if 142 if (end_f_3 .EQ. -1)then 143 print(" ") 144 print("'end_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)") 145 print(" ") 146 exit 147 end if 148 start_f(2) = start_f_3 149 end_f(2) = end_f_3 105 150 end if 106 151 … … 108 153 if (file_4 .EQ. "File in") then 109 154 print(" ") 110 print(" Please provide 4th input file 'file_4=' in 'ncl_preferences.ncl'")155 print("Declare 4th input file 'file_4=' in 'ncl_preferences.ncl' or prompt") 111 156 print(" ") 112 157 exit 113 158 else 114 159 file_in(3) = file_4 160 end if 161 file_in_1(3) = False 162 if (isStrSubset(file_in(3), ".nc"))then 163 start_f_1 = -2 164 end_f_1 = -2 165 file_in_1(3) = True 115 166 end if 116 if ( .not. isfilepresent(file_in(3)))then117 print(" ") 118 print(" Your 4th input file: '"+file_in+"' does not exist")119 print(" ") 167 if (start_f_4 .EQ. -1)then 168 print(" ") 169 print("'start_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)") 170 print(" ") 120 171 exit 121 end if 172 end if 173 if (end_f_4 .EQ. -1)then 174 print(" ") 175 print("'end_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)") 176 print(" ") 177 exit 178 end if 179 start_f(3) = start_f_4 180 end_f(3) = end_f_4 122 181 end if 123 182 … … 125 184 if (file_5 .EQ. "File in") then 126 185 print(" ") 127 print(" Please provide 5th input file 'file_5=' in 'ncl_preferences.ncl'")186 print("Declare 5th input file 'file_5=' in 'ncl_preferences.ncl' or prompt") 128 187 print(" ") 129 188 exit 130 189 else 131 190 file_in(4) = file_5 191 end if 192 file_in_1(4) = False 193 if (isStrSubset(file_in(4), ".nc"))then 194 start_f_1 = -2 195 end_f_1 = -2 196 file_in_1(4) = True 132 197 end if 133 if ( .not. isfilepresent(file_in(4)))then134 print(" ") 135 print(" Your 5th input file: '"+file_in+"' does not exist")136 print(" ") 198 if (start_f_5 .EQ. -1)then 199 print(" ") 200 print("'start_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)") 201 print(" ") 137 202 exit 138 end if 203 end if 204 if (end_f_5 .EQ. -1)then 205 print(" ") 206 print("'end_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)") 207 print(" ") 208 exit 209 end if 210 start_f(4) = start_f_5 211 end_f(4) = end_f_5 139 212 end if 213 140 214 if (no_files .GT. 5) then 141 215 if (file_6 .EQ. "File in") then 142 216 print(" ") 143 print(" Please provide 6th input file 'file_6=' in 'ncl_preferences.ncl'")217 print("Declare 6th input file 'file_6=' in 'ncl_preferences.ncl' or prompt") 144 218 print(" ") 145 219 exit 146 220 else 147 221 file_in(5) = file_6 222 end if 223 file_in_1(5) = False 224 if (isStrSubset(file_in(5), ".nc"))then 225 start_f_1 = -2 226 end_f_1 = -2 227 file_in_1(5) = True 148 228 end if 149 if ( .not. isfilepresent(file_in(5)))then150 print(" ") 151 print(" Your 6th input file: '"+file_in+"' does not exist")152 print(" ") 229 if (start_f_6 .EQ. -1)then 230 print(" ") 231 print("'start_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)") 232 print(" ") 153 233 exit 154 end if 234 end if 235 if (end_f_6 .EQ. -1)then 236 print(" ") 237 print("'end_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)") 238 print(" ") 239 exit 240 end if 241 start_f(5) = start_f_6 242 end_f(5) = end_f_6 155 243 end if 156 if (no_files .GT. 6) then 157 if (file_7 .EQ. "File in") then 158 print(" ") 159 print("Please provide 7th input file 'file_7=' in 'ncl_preferences.ncl'") 160 print(" ") 161 exit 162 else 163 file_in(6) = file_7 164 end if 165 if (.not. isfilepresent(file_in(6))) then 166 print(" ") 167 print("Your 7th input file: '"+file_in+"' does not exist") 168 print(" ") 169 exit 170 end if 171 end if 172 if (no_files .GT. 7) then 173 if (file_8 .EQ. "File in") then 174 print(" ") 175 print("Please provide 8th input file 'file_8=' in 'ncl_preferences.ncl'") 176 print(" ") 177 exit 178 else 179 file_in(7) = file_8 180 end if 181 if (.not. isfilepresent(file_in(7))) then 182 print(" ") 183 print("Your 8th input file: '"+file_in+"' does not exist") 184 print(" ") 185 exit 186 end if 187 end if 188 if (no_files .GT. 8) then 189 if (file_9 .EQ. "File in") then 190 print(" ") 191 print("Please provide 9th input file 'file_9=' in 'ncl_preferences.ncl'") 192 print(" ") 193 exit 194 else 195 file_in(8) = file_9 196 end if 197 if (.not. isfilepresent(file_in(8))) then 198 print(" ") 199 print("Your 9th input file: '"+file_in+"' does not exist") 200 print(" ") 201 exit 202 end if 203 end if 204 if (no_files .GT. 9) then 205 if (file_10 .EQ. "File in") then 206 print(" ") 207 print("Please provide 10th input file 'file_10=' in 'ncl_preferences.ncl'") 208 print(" ") 209 exit 210 else 211 file_in(9) = file_10 212 end if 213 if (.not. isfilepresent(file_in(9))) then 214 print(" ") 215 print("Your 10th input file: '"+file_in+"' does not exist") 216 print(" ") 217 exit 218 end if 219 end if 220 if (no_files .GT. 10) then 221 if (file_11 .EQ. "File in") then 222 print(" ") 223 print("Please provide 11th input file 'file_11=' in 'ncl_preferences.ncl'") 224 print(" ") 225 exit 226 else 227 file_in(10) = file_11 228 end if 229 if (.not. isfilepresent(file_in(10))) then 230 print(" ") 231 print("Your 11th input file: '"+file_in+"' does not exist") 232 print(" ") 233 exit 234 end if 235 end if 236 if (no_files .GT. 11) then 237 if (file_12 .EQ. "File in") then 238 print(" ") 239 print("Please provide 12th input file 'file_12=' in 'ncl_preferences.ncl'") 240 print(" ") 241 exit 242 else 243 file_in(11) = file_12 244 end if 245 if (.not. isfilepresent(file_in(11))) then 246 print(" ") 247 print("Your 12th input file: '"+file_in+"' does not exist") 248 print(" ") 249 exit 250 end if 251 end if 244 252 245 253 246 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then … … 285 278 if (combine .EQ. 1 .AND. number_comb .EQ. -1) then 286 279 print(" ") 287 print(" Please set 'number_comb' to 2 or 3 or combine to 0")280 print("Set 'number_comb' to 2 or 3 or combine to 0") 288 281 print(" ") 289 282 exit … … 292 285 if (number_comb .EQ. -1) then 293 286 print(" ") 294 print(" Please set 'number_comb' to 2 or 3 or combine to 0")287 print("Set 'number_comb' to 2 or 3 or combine to 0") 295 288 print(" ") 296 289 exit … … 298 291 if (number_comb .NE. 2 .AND. number_comb .NE. 3) then 299 292 print(" ") 300 print(" Please set 'number_comb' to 2 or 3 or combine to 0")293 print("Set 'number_comb' to 2 or 3 or combine to 0") 301 294 print(" ") 302 295 exit … … 305 298 if (combine .EQ. 1 .AND. c_var .EQ. "c_variables") then 306 299 print(" ") 307 print(" Please select variables for overlaying ('c_var') or set combine to 0")300 print("Select variables for overlaying ('c_var') or set combine to 0") 308 301 print(" ") 309 302 exit 310 303 end if 311 304 312 if (log y .NE. 0 .AND. logy.NE. 1)then313 print(" ") 314 print("'log y'= "+logy+" is invalid and set to 0")315 print(" ") 316 log y= 0305 if (log_z .NE. 0 .AND. log_z .NE. 1)then 306 print(" ") 307 print("'log_z'= "+log_z+" is invalid and set to 0") 308 print(" ") 309 log_z = 0 317 310 end if 318 311 319 if (norm .EQ. 0) then320 print(" ") 321 print(" You cannot normalise with 0, 'norm' is set to 1")322 print(" ") 323 norm = 1.0312 if (norm_z .EQ. 0) then 313 print(" ") 314 print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0") 315 print(" ") 316 norm_z = 1.0 324 317 end if 325 318 … … 330 323 do nof=0,no_files-1 331 324 332 f=addfile( file_in(nof),"r") 325 files=new(end_f(nof)-start_f(nof)+1,string) 326 if (file_in_1(nof))then 327 if (isfilepresent(file_in(nof)))then 328 files(0)=file_in 329 else 330 print(" ") 331 print("1st input file: '"+file_in+"' does not exist") 332 print(" ") 333 exit 334 end if 335 else 336 if (start_f(nof) .EQ. 0)then 337 if (isfilepresent(file_in(nof)+".nc"))then 338 files(0)=file_in(nof)+".nc" 339 do i=1,end_f(nof) 340 if (isfilepresent(file_in(nof)+"."+i+".nc"))then 341 files(i)=file_in(nof)+"."+i+".nc" 342 else 343 print(" ") 344 print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") 345 print(" ") 346 exit 347 end if 348 end do 349 else 350 print(" ") 351 print("Input file: '"+file_in(nof)+".nc' does not exist") 352 print(" ") 353 exit 354 end if 355 else 356 do i=start_f(nof),end_f(nof) 357 if (isfilepresent(file_in(nof)+"."+i+".nc"))then 358 files(i-start_f(nof))=file_in(nof)+"."+i+".nc" 359 else 360 print(" ") 361 print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") 362 print(" ") 363 exit 364 end if 365 end do 366 end if 367 end if 368 369 f=addfiles(files,"r") 370 f_att=addfile(files(0),"r") 371 ListSetType(f,"cat") 333 372 334 vNam = getfilevarnames(f) 373 vNam = getfilevarnames(f_att) 374 335 375 if (nof .EQ. 0)then 336 376 vNam0=vNam … … 364 404 if (dim .EQ. 0) then 365 405 print(" ") 366 print("There areno data on file")406 print("There is no data on file") 367 407 print(" ") 368 408 end if … … 389 429 end if 390 430 if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_"))then 391 z_u = f ->$vNam(varn+1)$431 z_u = f_att->$vNam(varn+1)$ 392 432 break 393 433 else 394 434 if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then 395 z_u = f ->$vNam(varn+1)$435 z_u = f_att->$vNam(varn+1)$ 396 436 break 397 437 else 398 438 if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then 399 z_u = f ->$vNam(varn+1)$439 z_u = f_att->$vNam(varn+1)$ 400 440 break 401 441 else … … 405 445 else 406 446 if(vNam(varn) .EQ. "lpt" .OR. isStrSubset(vNam(varn), "lpt_"))then 407 z_u = f ->$vNam(varn+1)$447 z_u = f_att->$vNam(varn+1)$ 408 448 break 409 449 else 410 450 if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then 411 z_u = f ->$vNam(varn+1)$451 z_u = f_att->$vNam(varn+1)$ 412 452 break 413 453 else 414 454 if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then 415 z_u = f ->$vNam(varn+1)$455 z_u = f_att->$vNam(varn+1)$ 416 456 break 417 457 else 418 458 if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then 419 z_u = f ->$vNam(varn+1)$459 z_u = f_att->$vNam(varn+1)$ 420 460 break 421 461 else 422 462 if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then 423 z_u = f ->$vNam(varn+1)$463 z_u = f_att->$vNam(varn+1)$ 424 464 break 425 465 else 426 466 if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then 427 z_u = f ->$vNam(varn+1)$467 z_u = f_att->$vNam(varn+1)$ 428 468 break 429 469 else 430 470 if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then 431 z_u = f ->$vNam(varn+1)$471 z_u = f_att->$vNam(varn+1)$ 432 472 break 433 473 else 434 474 if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then 435 z_u = f ->$vNam(varn+1)$475 z_u = f_att->$vNam(varn+1)$ 436 476 break 437 477 else 438 478 if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_"))then 439 z_u = f ->$vNam(varn+1)$479 z_u = f_att->$vNam(varn+1)$ 440 480 break 441 481 else 442 482 if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then 443 z_u = f ->$vNam(varn+1)$483 z_u = f_att->$vNam(varn+1)$ 444 484 break 445 485 else 446 486 if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then 447 z_u = f ->$vNam(varn+1)$487 z_u = f_att->$vNam(varn+1)$ 448 488 break 449 489 else 450 490 if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then 451 z_u = f ->$vNam(varn+1)$491 z_u = f_att->$vNam(varn+1)$ 452 492 break 453 493 else 454 494 if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_"))then 455 z_u = f ->$vNam(varn+1)$495 z_u = f_att->$vNam(varn+1)$ 456 496 break 457 497 else 458 498 if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_") )then 459 z_u = f ->$vNam(varn+1)$499 z_u = f_att->$vNam(varn+1)$ 460 500 break 461 501 else 462 502 if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_"))then 463 z_u = f ->$vNam(varn+1)$503 z_u = f_att->$vNam(varn+1)$ 464 504 break 465 505 else 466 506 if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_"))then 467 z_u = f ->$vNam(varn+1)$507 z_u = f_att->$vNam(varn+1)$ 468 508 break 469 509 else 470 510 if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_"))then 471 z_u = f ->$vNam(varn+1)$511 z_u = f_att->$vNam(varn+1)$ 472 512 break 473 513 else 474 514 if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_"))then 475 z_u = f ->$vNam(varn+1)$515 z_u = f_att->$vNam(varn+1)$ 476 516 break 477 517 end if … … 506 546 end if 507 547 if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_"))then 508 z_w = f ->$vNam(varn+1)$548 z_w = f_att->$vNam(varn+1)$ 509 549 break 510 550 else 511 551 if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_"))then 512 z_w = f ->$vNam(varn+1)$552 z_w = f_att->$vNam(varn+1)$ 513 553 break 514 554 else 515 555 if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_"))then 516 z_w = f ->$vNam(varn+1)$556 z_w = f_att->$vNam(varn+1)$ 517 557 break 518 558 else 519 559 if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then 520 z_w = f ->$vNam(varn+1)$560 z_w = f_att->$vNam(varn+1)$ 521 561 break 522 562 else 523 563 if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_"))then 524 z_w = f ->$vNam(varn+1)$564 z_w = f_att->$vNam(varn+1)$ 525 565 break 526 566 else 527 567 if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_"))then 528 z_w = f ->$vNam(varn+1)$568 z_w = f_att->$vNam(varn+1)$ 529 569 break 530 570 else 531 571 if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then 532 z_w = f ->$vNam(varn+1)$572 z_w = f_att->$vNam(varn+1)$ 533 573 break 534 574 else 535 575 if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_"))then 536 z_w = f ->$vNam(varn+1)$576 z_w = f_att->$vNam(varn+1)$ 537 577 break 538 578 else 539 579 if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_"))then 540 z_w = f ->$vNam(varn+1)$580 z_w = f_att->$vNam(varn+1)$ 541 581 break 542 582 else 543 583 if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpz_"))then 544 z_w = f ->$vNam(varn+1)$584 z_w = f_att->$vNam(varn+1)$ 545 585 break 546 586 else 547 587 if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_"))then 548 z_w = f ->$vNam(varn+1)$588 z_w = f_att->$vNam(varn+1)$ 549 589 break 550 590 else 551 591 if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then 552 z_w = f ->$vNam(varn+1)$592 z_w = f_att->$vNam(varn+1)$ 553 593 break 554 594 else 555 595 if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_"))then 556 z_w = f ->$vNam(varn+1)$596 z_w = f_att->$vNam(varn+1)$ 557 597 break 558 598 else 559 599 if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_"))then 560 z_w = f ->$vNam(varn+1)$600 z_w = f_att->$vNam(varn+1)$ 561 601 break 562 602 else 563 603 if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then 564 z_w = f ->$vNam(varn+1)$604 z_w = f_att->$vNam(varn+1)$ 565 605 break 566 606 else 567 607 if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_"))then 568 z_w = f ->$vNam(varn+1)$608 z_w = f_att->$vNam(varn+1)$ 569 609 break 570 610 else 571 611 if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_"))then 572 z_w = f ->$vNam(varn+1)$612 z_w = f_att->$vNam(varn+1)$ 573 613 break 574 614 else 575 615 if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then 576 z_w = f ->$vNam(varn+1)$616 z_w = f_att->$vNam(varn+1)$ 577 617 break 578 618 else 579 619 if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_"))then 580 z_w = f ->$vNam(varn+1)$620 z_w = f_att->$vNam(varn+1)$ 581 621 break 582 622 else 583 623 if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_"))then 584 z_w = f ->$vNam(varn+1)$624 z_w = f_att->$vNam(varn+1)$ 585 625 break 586 626 else 587 627 if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then 588 z_w = f ->$vNam(varn+1)$628 z_w = f_att->$vNam(varn+1)$ 589 629 break 590 630 else 591 631 if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_"))then 592 z_w = f ->$vNam(varn+1)$632 z_w = f_att->$vNam(varn+1)$ 593 633 break 594 634 else 595 635 if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_"))then 596 z_w = f ->$vNam(varn+1)$636 z_w = f_att->$vNam(varn+1)$ 597 637 break 598 638 else 599 639 if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then 600 z_w = f ->$vNam(varn+1)$640 z_w = f_att->$vNam(varn+1)$ 601 641 break 602 642 else 603 643 if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_"))then 604 z_w = f ->$vNam(varn+1)$644 z_w = f_att->$vNam(varn+1)$ 605 645 break 606 646 else 607 647 if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_") )then 608 z_w = f ->$vNam(varn+1)$648 z_w = f_att->$vNam(varn+1)$ 609 649 break 610 650 else 611 651 if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then 612 z_w = f ->$vNam(varn+1)$652 z_w = f_att->$vNam(varn+1)$ 613 653 break 614 654 else 615 655 if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_"))then 616 z_w = f ->$vNam(varn+1)$656 z_w = f_att->$vNam(varn+1)$ 617 657 break 618 658 else 619 659 if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_"))then 620 z_w = f ->$vNam(varn+1)$660 z_w = f_att->$vNam(varn+1)$ 621 661 break 622 662 else 623 663 if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_"))then 624 z_w = f ->$vNam(varn+1)$664 z_w = f_att->$vNam(varn+1)$ 625 665 break 626 666 else 627 667 if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then 628 z_w = f ->$vNam(varn+1)$668 z_w = f_att->$vNam(varn+1)$ 629 669 break 630 670 else 631 671 if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_") )then 632 z_w = f ->$vNam(varn+1)$672 z_w = f_att->$vNam(varn+1)$ 633 673 break 634 674 else 635 675 if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_"))then 636 z_w = f ->$vNam(varn+1)$676 z_w = f_att->$vNam(varn+1)$ 637 677 break 638 678 end if … … 685 725 if (check)then 686 726 co=co+1 687 z = f ->$vNam(varn+1)$727 z = f_att->$vNam(varn+1)$ 688 728 if (getvardims(z) .EQ. "zu")then 689 729 z_u = z … … 718 758 do varn = dim-1,0,1 719 759 if (vNam(varn) .EQ. "zu_3d")then 720 z_u = f ->zu_3d760 z_u = f_att->zu_3d 721 761 dimz = dimsizes(z_u) 722 762 else 723 763 if (vNam(varn) .EQ. "zw_3d")then 724 z_w = f ->zw_3d764 z_w = f_att->zw_3d 725 765 dimz = dimsizes(z_w) 726 766 end if 727 767 end if 768 if (vNam(varn) .EQ. "x")then 769 x = f_att->x 770 dimx=dimsizes(x) 771 else 772 if (vNam(varn) .EQ. "xu")then 773 x = f_att->xu 774 dimx=dimsizes(x) 775 end if 776 end if 777 if (vNam(varn) .EQ. "y")then 778 y = f_att->y 779 dimy=dimsizes(y) 780 else 781 if (vNam(varn) .EQ. "yv")then 782 y = f_att->yv 783 dimy=dimsizes(y) 784 end if 785 end if 728 786 end do 729 787 … … 733 791 print(" ") 734 792 print("Program aborts - there are no z-variables available") 735 print(" Please be sure if 'plot_3d' is set correctly")793 print("Be sure if 'plot_3d' is set correctly") 736 794 print(" ") 737 795 exit 738 796 end if 739 797 740 t_all = f->time 798 if (prof3d .EQ. 1)then 799 t_all = f[:]->time 800 else 801 t_all = f[:]->time(1:) 802 end if 741 803 nt = dimsizes(t_all) 742 804 delta_t=t_all(nt-1)/nt 743 744 805 745 806 ; **************************************************** … … 754 815 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") 755 816 print(" ") 756 print(" Please select another 'start_time_step'")817 print("Select another 'start_time_step'") 757 818 print(" ") 758 819 exit … … 766 827 end if 767 828 768 do i=0,nt-1 829 do i=0,nt-1 769 830 if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then 770 831 st=i … … 776 837 print("'start_time_step' = "+ start_time_step +"h is invalid") 777 838 print(" ") 778 print(" Please select another 'start_time_step'")839 print("Select another 'start_time_step'") 779 840 print(" ") 780 841 exit … … 792 853 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") 793 854 print(" ") 794 print(" Please select another 'end_time_step'")855 print("Select another 'end_time_step'") 795 856 print(" ") 796 857 exit … … 800 861 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") 801 862 print(" ") 802 print(" Please select another 'start_time_step' or 'end_time_step'")863 print("Select another 'start_time_step' or 'end_time_step'") 803 864 print(" ") 804 865 exit … … 816 877 print("'end_time_step' = "+ end_time_step +"h is invalid") 817 878 print(" ") 818 print(" Please select another 'end_time_step'")879 print("Select another 'end_time_step'") 819 880 print(" ") 820 881 exit … … 838 899 do p=start_time_step,end_time_step 839 900 if (t_all(p)/3600 .LT. 1) then 840 legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600, 2,True)901 legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,3,True) 841 902 else 842 903 legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,0,True) … … 872 933 res@pmLegendWidthF = 0.12 873 934 res@pmLegendHeightF = 0.04*(end_time_step-start_time_step+1) 874 res@lgLabelFontHeightF = .02935 res@lgLabelFontHeightF = font_size 875 936 res@lgTitleString = "Time [h]" 876 res@lgTitleFontHeightF = 0.02 877 res@txFontHeightF = 0.02 878 res@tiXAxisFontHeightF = 0.02 879 res@tiYAxisFontHeightF = 0.02 937 res@lgTitleFontHeightF = font_size 938 res@txFontHeightF = font_size 939 res@tiXAxisFontHeightF = font_size 940 res@tiYAxisFontHeightF = font_size 941 res@tmXBLabelFontHeightF = font_size 942 res@tmYLLabelFontHeightF = font_size 880 943 res@tiXAxisString = " " 881 944 if ( black .eq. 0 ) then 882 945 res@xyLineColors = ispan(2,237,235/np) 883 946 end if 884 if (norm .EQ. 1)then947 if (norm_z .EQ. 1)then 885 948 res@tiYAxisString = "Height [m]" 886 949 else 887 res@tiYAxisString = "Height / "+norm +" [m]"950 res@tiYAxisString = "Height / "+norm_z+" [m]" 888 951 end if 889 952 890 if (log y.EQ. 1) then953 if (log_z .EQ. 1) then 891 954 res@trYLog = True 892 955 end if … … 902 965 end if 903 966 end if 967 968 res@tmXBMinorPerMajor = 4 969 res@tmYLMinorPerMajor = 4 904 970 905 971 resP = True 906 972 resP@txFont = "helvetica" 907 resP@txString = f @title973 resP@txString = f_att@title 908 974 resP@txFuncCode = "~" 909 resP@txFontHeightF = 0.01 4975 resP@txFontHeightF = 0.015 910 976 911 977 ; *************************************************** … … 928 994 ; *************************************************** 929 995 930 if (log y.EQ. 1)then996 if (log_z .EQ. 1)then 931 997 if (min_z .EQ. -1)then 932 998 if (isvar("z_u"))then … … 1016 1082 end if 1017 1083 1018 min_z=min_z/norm 1019 max_z=max_z/norm 1084 min_z=min_z/norm_z 1085 max_z=max_z/norm_z 1020 1086 1021 1087 ; *************************************************** … … 1030 1096 end do 1031 1097 1032 if (log y.EQ. 1) then1098 if (log_z .EQ. 1) then 1033 1099 data = new((/dim,(end_time_step-start_time_step)+1,dimz-1/),float) 1034 1100 data_0 = new((/(end_time_step-start_time_step)+1,dimz-1/),float) … … 1252 1318 maxiwpeodz =-1.E27 1253 1319 end if 1254 1320 1321 if (prof3d .EQ. 1)then 1322 1323 if (end_x .EQ. -1) then 1324 end_x=dimx-2 1325 end if 1326 if (end_y .EQ. -1)then 1327 end_y=dimy-2 1328 end if 1329 if (start_x .LT. 0)then 1330 print(" ") 1331 print("'start_x' is lower than 0 and set to 0") 1332 print(" ") 1333 start_x=0 1334 end if 1335 if (start_x .GT. dimx-1)then 1336 print(" ") 1337 print("'start_x' is greater than available x-range and set to maximum of x-range (excluding ghostpoint)") 1338 print(" ") 1339 start_x=dimx-2 1340 end if 1341 if (end_x .EQ. dimx-1)then 1342 print(" ") 1343 print("'end_x' = "+end_x+" and includes the ghostpoint") 1344 print(" ") 1345 end if 1346 if (end_x .GT. dimx-1)then 1347 print(" ") 1348 print("'end_x' = "+end_x+" is greater than available x-range and set to maximum of x-range (excluding ghostpoint)") 1349 print(" ") 1350 end_x=dimx-2 1351 end if 1352 if (end_x .LT. start_x)then 1353 print(" ") 1354 print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+" and set to maximum of x-range (excluding ghostpoint)") 1355 print(" ") 1356 end_x=dimx-2 1357 end if 1358 if (start_y .LT. 0)then 1359 print(" ") 1360 print("'start_y' is lower than 0 and set to 0") 1361 print(" ") 1362 start_y=0 1363 end if 1364 if (start_y .GT. dimy-1)then 1365 print(" ") 1366 print("'start_y' is greater than available y-range and set to maximum of y-range (excluding ghostpoint)") 1367 print(" ") 1368 start_x=dimy-2 1369 end if 1370 if (end_y .EQ. dimy-1)then 1371 print(" ") 1372 print("'end_y' = "+end_y+" and includes the ghostpoint") 1373 print(" ") 1374 end if 1375 if (end_y .GT. dimy-1)then 1376 print(" ") 1377 print("'end_y' = "+end_y+" is greater than available y-range and set to maximum of y-range (excluding ghostpoint)") 1378 print(" ") 1379 end_x=dimy-2 1380 end if 1381 if (end_y .LT. start_y)then 1382 print(" ") 1383 print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+" and set to maximum of y-range (excluding ghostpoint)") 1384 print(" ") 1385 end_y=dimy-2 1386 end if 1387 1388 end if 1389 1255 1390 n_o=0 1256 1391 count_var=0 … … 1278 1413 if (com) then 1279 1414 if (prof3d .EQ. 0) then 1280 temp = f->$vNam(varn)$ 1281 if (logy .EQ. 1) then 1415 temp = f[:]->$vNam(varn)$(1:,:) 1416 temp_att = f_att->$vNam(varn)$ 1417 if (log_z .EQ. 1) then 1282 1418 data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) 1283 1419 else … … 1285 1421 end if 1286 1422 else 1287 if (log y.EQ. 1) then1423 if (log_z .EQ. 1) then 1288 1424 do i=1,dimz-1 1289 1425 do j=start_time_step,end_time_step 1290 temp= f->$vNam(varn)$(j,i,:,:) 1291 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1426 temp= f[:]->$vNam(varn)$ 1427 temp_att = f_att->$vNam(varn)$ 1428 data_temp = temp(j,i,start_y:end_y,start_x:end_x) 1429 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) 1292 1430 end do 1293 1431 end do … … 1295 1433 do i=0,dimz-1 1296 1434 do j=start_time_step,end_time_step 1297 temp= f->$vNam(varn)$(j,i,:,:) 1298 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1435 temp= f[:]->$vNam(varn)$ 1436 temp_att = f_att->$vNam(varn)$ 1437 data_temp = temp(j,i,start_y:end_y,start_x:end_x) 1438 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) 1299 1439 end do 1300 1440 end do … … 1304 1444 print(" ") 1305 1445 end if 1306 unit(varn) = temp @units1446 unit(varn) = temp_att@units 1307 1447 if (n_o .GT. number_comb-1) then 1308 1448 print(" ") 1309 print(" Please set 'number_comb' to the number of overlaying variables ('c_var' = "+c_var+")")1449 print("Set 'number_comb' to the number of overlaying variables ('c_var' = "+c_var+")") 1310 1450 print(" ") 1311 1451 exit … … 1318 1458 1319 1459 if(check) then 1320 1321 1460 if (isStrSubset(vNam(varn),"_0" ))then 1322 1461 print(" ") … … 1329 1468 1330 1469 if (prof3d .EQ. 0) then 1331 temp = f->$vNam(varn)$ 1470 temp = f[:]->$vNam(varn)$(1:,:) 1471 temp_att = f_att->$vNam(varn)$ 1332 1472 else 1333 if (log y.EQ. 1) then1473 if (log_z .EQ. 1) then 1334 1474 do i=1,dimz-1 1335 1475 do j=start_time_step,end_time_step 1336 temp= f->$vNam(varn)$(j,i,:,:) 1337 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1476 temp= f[:]->$vNam(varn)$(j,i,start_y:end_y,start_x:end_x) 1477 temp_att = f_att->$vNam(varn)$ 1478 data_temp = temp(j,i,start_y:end_y,start_x:end_x) 1479 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) 1338 1480 end do 1339 1481 end do … … 1341 1483 do i=0,dimz-1 1342 1484 do j=start_time_step,end_time_step 1343 temp= f->$vNam(varn)$(j,i,:,:) 1344 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1485 temp= f[:]->$vNam(varn)$;(j,i,start_y:end_y,start_x:end_x) 1486 temp_att = f_att->$vNam(varn)$ 1487 data_temp = temp(j,i,start_y:end_y,start_x:end_x) 1488 data_temp!0 = "t" 1489 data_temp!1 = "z" 1490 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) 1345 1491 end do 1346 1492 end do … … 1349 1495 print("Variable '"+vNam(varn)+"' is read") 1350 1496 print(" ") 1351 unit(varn) = temp @units1352 a=getvar atts(temp)1497 unit(varn) = temp_att@units 1498 a=getvardims(temp_att) 1353 1499 b=dimsizes(a) 1354 1500 end if 1355 1501 1356 1502 if (prof3d .EQ. 0) then 1357 if (log y.EQ. 1) then1358 z = f ->$vNam(varn+1)$(1:dimz-1)1359 unit(varn) = temp @units1503 if (log_z .EQ. 1) then 1504 z = f_att->$vNam(varn+1)$(1:dimz-1) 1505 unit(varn) = temp_att@units 1360 1506 data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) 1361 1507 else 1362 z = f ->$vNam(varn+1)$1363 unit(varn) = temp @units1508 z = f_att->$vNam(varn+1)$ 1509 unit(varn) = temp_att@units 1364 1510 data(varn,:,:) = temp(start_time_step:end_time_step,:) 1365 1511 end if 1366 1512 else 1367 do i=0,b-1 1513 do i=0,b-1 1368 1514 if (isStrSubset( a(i),"zu_3d" ))then 1369 1515 z_v(varn,:) = z_u 1370 if (log y.EQ. 1) then1516 if (log_z .EQ. 1) then 1371 1517 z = z_v(varn,1:dimz-1) 1372 1518 else … … 1376 1522 if (isStrSubset( a(i),"zw_3d" ))then 1377 1523 z_v(varn,:) = z_w 1378 if (log y.EQ. 1) then1524 if (log_z .EQ. 1) then 1379 1525 z = z_v(varn,1:dimz-1) 1380 1526 else … … 1390 1536 end if 1391 1537 if (nof .EQ. 0) then 1392 z_(n,:)=z/norm 1538 z_(n,:)=z/norm_z 1393 1539 z = z_(n,:) 1394 1540 else 1395 z=z/norm 1541 z=z/norm_z 1396 1542 end if 1397 1543 1398 1544 if (over .EQ. 0) then 1399 1545 res@gsnLeftString = vNam(varn) 1400 res@gsnRightString = unit(varn) 1546 res@tiXAxisString = "["+unit(varn)+"]" 1547 res@gsnRightString = " " 1401 1548 res@trYMinF = min_z 1402 1549 res@trYMaxF = max_z … … 1422 1569 else 1423 1570 res@gsnLeftString = vNam(varn) 1424 res@gsnRightString = unit(varn) 1571 res@tiXAxisString = "["+unit(varn)+"]" 1572 res@gsnRightString = " " 1425 1573 if (xs .EQ. -1) then 1426 1574 res@trXMinF = miniu … … 1444 1592 else 1445 1593 res@gsnLeftString = vNam(varn) 1446 res@gsnRightString = unit(varn) 1594 res@tiXAxisString = "["+unit(varn)+"]" 1595 res@gsnRightString = " " 1447 1596 if (xs .EQ. -1) then 1448 1597 res@trXMinF = miniv … … 1466 1615 else 1467 1616 res@gsnLeftString = vNam(varn) 1468 res@gsnRightString = unit(varn) 1617 res@tiXAxisString = "["+unit(varn)+"]" 1618 res@gsnRightString = " " 1469 1619 if (xs .EQ. -1) then 1470 1620 res@trXMinF = miniw … … 1489 1639 else 1490 1640 res@gsnLeftString = vNam(varn) 1491 res@gsnRightString = unit(varn) 1641 res@tiXAxisString = "["+unit(varn)+"]" 1642 res@gsnRightString = " " 1492 1643 if (xs .EQ. -1) then 1493 1644 res@trXMinF = minipt … … 1511 1662 else 1512 1663 res@gsnLeftString = vNam(varn) 1513 res@gsnRightString = unit(varn) 1664 res@tiXAxisString = "["+unit(varn)+"]" 1665 res@gsnRightString = " " 1514 1666 if (xs .EQ. -1) then 1515 1667 res@trXMinF = minivpt … … 1533 1685 else 1534 1686 res@gsnLeftString = vNam(varn) 1535 res@gsnRightString = unit(varn) 1687 res@tiXAxisString = "["+unit(varn)+"]" 1688 res@gsnRightString = " " 1536 1689 if (xs .EQ. -1) then 1537 1690 res@trXMinF = minilpt … … 1556 1709 else 1557 1710 res@gsnLeftString = vNam(varn) 1558 res@gsnRightString = unit(varn) 1711 res@tiXAxisString = "["+unit(varn)+"]" 1712 res@gsnRightString = " " 1559 1713 if (xs .EQ. -1) then 1560 1714 res@trXMinF = minilq … … 1578 1732 else 1579 1733 res@gsnLeftString = vNam(varn) 1580 res@gsnRightString = unit(varn) 1734 res@tiXAxisString = "["+unit(varn)+"]" 1735 res@gsnRightString = " " 1581 1736 if (xs .EQ. -1) then 1582 1737 res@trXMinF = minilqv … … 1600 1755 else 1601 1756 res@gsnLeftString = vNam(varn) 1602 res@gsnRightString = unit(varn) 1757 res@tiXAxisString = "["+unit(varn)+"]" 1758 res@gsnRightString = " " 1603 1759 if (xs .EQ. -1) then 1604 1760 res@trXMinF = miniql … … 1623 1779 else 1624 1780 res@gsnLeftString = vNam(varn) 1625 res@gsnRightString = unit(varn) 1781 res@tiXAxisString = "["+unit(varn)+"]" 1782 res@gsnRightString = " " 1626 1783 if (xs .EQ. -1) then 1627 1784 res@trXMinF = minie … … 1645 1802 else 1646 1803 res@gsnLeftString = vNam(varn) 1647 res@gsnRightString = unit(varn) 1804 res@tiXAxisString = "["+unit(varn)+"]" 1805 res@gsnRightString = " " 1648 1806 if (xs .EQ. -1) then 1649 1807 res@trXMinF = minies … … 1668 1826 else 1669 1827 res@gsnLeftString = vNam(varn) 1670 res@gsnRightString = unit(varn) 1828 res@tiXAxisString = "["+unit(varn)+"]" 1829 res@gsnRightString = " " 1671 1830 if (xs .EQ. -1) then 1672 1831 res@trXMinF = minikm … … 1690 1849 else 1691 1850 res@gsnLeftString = vNam(varn) 1692 res@gsnRightString = unit(varn) 1851 res@tiXAxisString = "["+unit(varn)+"]" 1852 res@gsnRightString = " " 1693 1853 if (xs .EQ. -1) then 1694 1854 res@trXMinF = minikh … … 1713 1873 else 1714 1874 res@gsnLeftString = vNam(varn) 1715 res@gsnRightString = unit(varn) 1875 res@tiXAxisString = "["+unit(varn)+"]" 1876 res@gsnRightString = " " 1716 1877 if (xs .EQ. -1) then 1717 1878 res@trXMinF = miniwpup … … 1735 1896 else 1736 1897 res@gsnLeftString = vNam(varn) 1737 res@gsnRightString = unit(varn) 1898 res@tiXAxisString = "["+unit(varn)+"]" 1899 res@gsnRightString = " " 1738 1900 if (xs .EQ. -1) then 1739 1901 res@trXMinF = miniwsus … … 1757 1919 else 1758 1920 res@gsnLeftString = vNam(varn) 1759 res@gsnRightString = unit(varn) 1921 res@tiXAxisString = "["+unit(varn)+"]" 1922 res@gsnRightString = " " 1760 1923 if (xs .EQ. -1) then 1761 1924 res@trXMinF = miniwu … … 1780 1943 else 1781 1944 res@gsnLeftString = vNam(varn) 1782 res@gsnRightString = unit(varn) 1945 res@tiXAxisString = "["+unit(varn)+"]" 1946 res@gsnRightString = " " 1783 1947 if (xs .EQ. -1) then 1784 1948 res@trXMinF = miniwpvp … … 1802 1966 else 1803 1967 res@gsnLeftString = vNam(varn) 1804 res@gsnRightString = unit(varn) 1968 res@tiXAxisString = "["+unit(varn)+"]" 1969 res@gsnRightString = " " 1805 1970 if (xs .EQ. -1) then 1806 1971 res@trXMinF = miniwsvs … … 1824 1989 else 1825 1990 res@gsnLeftString = vNam(varn) 1826 res@gsnRightString = unit(varn) 1991 res@tiXAxisString = "["+unit(varn)+"]" 1992 res@gsnRightString = " " 1827 1993 if (xs .EQ. -1) then 1828 1994 res@trXMinF = miniwv … … 1847 2013 else 1848 2014 res@gsnLeftString = vNam(varn) 1849 res@gsnRightString = unit(varn) 2015 res@tiXAxisString = "["+unit(varn)+"]" 2016 res@gsnRightString = " " 1850 2017 if (xs .EQ. -1) then 1851 2018 res@trXMinF = miniwpptp … … 1869 2036 else 1870 2037 res@gsnLeftString = vNam(varn) 1871 res@gsnRightString = unit(varn) 2038 res@tiXAxisString = "["+unit(varn)+"]" 2039 res@gsnRightString = " " 1872 2040 if (xs .EQ. -1) then 1873 2041 res@trXMinF = miniwspts … … 1891 2059 else 1892 2060 res@gsnLeftString = vNam(varn) 1893 res@gsnRightString = unit(varn) 2061 res@tiXAxisString = "["+unit(varn)+"]" 2062 res@gsnRightString = " " 1894 2063 if (xs .EQ. -1) then 1895 2064 res@trXMinF = miniwpt … … 1914 2083 else 1915 2084 res@gsnLeftString = vNam(varn) 1916 res@gsnRightString = unit(varn) 2085 res@tiXAxisString = "["+unit(varn)+"]" 2086 res@gsnRightString = " " 1917 2087 if (xs .EQ. -1) then 1918 2088 res@trXMinF = miniwsptsBC … … 1936 2106 else 1937 2107 res@gsnLeftString = vNam(varn) 1938 res@gsnRightString = unit(varn) 2108 res@tiXAxisString = "["+unit(varn)+"]" 2109 res@gsnRightString = " " 1939 2110 if (xs .EQ. -1) then 1940 2111 res@trXMinF = miniwptBC … … 1959 2130 else 1960 2131 res@gsnLeftString = vNam(varn) 1961 res@gsnRightString = unit(varn) 2132 res@tiXAxisString = "["+unit(varn)+"]" 2133 res@gsnRightString = " " 1962 2134 if (xs .EQ. -1) then 1963 2135 res@trXMinF = miniwpvptp … … 1981 2153 else 1982 2154 res@gsnLeftString = vNam(varn) 1983 res@gsnRightString = unit(varn) 2155 res@tiXAxisString = "["+unit(varn)+"]" 2156 res@gsnRightString = " " 1984 2157 if (xs .EQ. -1) then 1985 2158 res@trXMinF = miniwsvpts … … 2003 2176 else 2004 2177 res@gsnLeftString = vNam(varn) 2005 res@gsnRightString = unit(varn) 2178 res@tiXAxisString = "["+unit(varn)+"]" 2179 res@gsnRightString = " " 2006 2180 if (xs .EQ. -1) then 2007 2181 res@trXMinF = miniwvpt … … 2026 2200 else 2027 2201 res@gsnLeftString = vNam(varn) 2028 res@gsnRightString = unit(varn) 2202 res@tiXAxisString = "["+unit(varn)+"]" 2203 res@gsnRightString = " " 2029 2204 if (xs .EQ. -1) then 2030 2205 res@trXMinF = miniwpqp … … 2048 2223 else 2049 2224 res@gsnLeftString = vNam(varn) 2050 res@gsnRightString = unit(varn) 2225 res@tiXAxisString = "["+unit(varn)+"]" 2226 res@gsnRightString = " " 2051 2227 if (xs .EQ. -1) then 2052 2228 res@trXMinF = miniwsqs … … 2070 2246 else 2071 2247 res@gsnLeftString = vNam(varn) 2072 res@gsnRightString = unit(varn) 2248 res@tiXAxisString = "["+unit(varn)+"]" 2249 res@gsnRightString = " " 2073 2250 if (xs .EQ. -1) then 2074 2251 res@trXMinF = miniwq … … 2093 2270 else 2094 2271 res@gsnLeftString = vNam(varn) 2095 res@gsnRightString = unit(varn) 2272 res@tiXAxisString = "["+unit(varn)+"]" 2273 res@gsnRightString = " " 2096 2274 if (xs .EQ. -1) then 2097 2275 res@trXMinF = miniwpqvp … … 2115 2293 else 2116 2294 res@gsnLeftString = vNam(varn) 2117 res@gsnRightString = unit(varn) 2295 res@tiXAxisString = "["+unit(varn)+"]" 2296 res@gsnRightString = " " 2118 2297 if (xs .EQ. -1) then 2119 2298 res@trXMinF = miniwsqvs … … 2137 2316 else 2138 2317 res@gsnLeftString = vNam(varn) 2139 res@gsnRightString = unit(varn) 2318 res@tiXAxisString = "["+unit(varn)+"]" 2319 res@gsnRightString = " " 2140 2320 if (xs .EQ. -1) then 2141 2321 res@trXMinF = miniwqv … … 2160 2340 else 2161 2341 res@gsnLeftString = vNam(varn) 2162 res@gsnRightString = unit(varn) 2342 res@tiXAxisString = "["+unit(varn)+"]" 2343 res@gsnRightString = " " 2163 2344 if (xs .EQ. -1) then 2164 2345 res@trXMinF = miniwpsp … … 2182 2363 else 2183 2364 res@gsnLeftString = vNam(varn) 2184 res@gsnRightString = unit(varn) 2365 res@tiXAxisString = "["+unit(varn)+"]" 2366 res@gsnRightString = " " 2185 2367 if (xs .EQ. -1) then 2186 2368 res@trXMinF = miniwsss … … 2204 2386 else 2205 2387 res@gsnLeftString = vNam(varn) 2206 res@gsnRightString = unit(varn) 2388 res@tiXAxisString = "["+unit(varn)+"]" 2389 res@gsnRightString = " " 2207 2390 if (xs .EQ. -1) then 2208 2391 res@trXMinF = miniws … … 2227 2410 else 2228 2411 res@gsnLeftString = vNam(varn) 2229 res@gsnRightString = unit(varn) 2412 res@tiXAxisString = "["+unit(varn)+"]" 2413 res@gsnRightString = " " 2230 2414 if (xs .EQ. -1) then 2231 2415 res@trXMinF = miniwpsap … … 2249 2433 else 2250 2434 res@gsnLeftString = vNam(varn) 2251 res@gsnRightString = unit(varn) 2435 res@tiXAxisString = "["+unit(varn)+"]" 2436 res@gsnRightString = " " 2252 2437 if (xs .EQ. -1) then 2253 2438 res@trXMinF = miniwssas … … 2271 2456 else 2272 2457 res@gsnLeftString = vNam(varn) 2273 res@gsnRightString = unit(varn) 2458 res@tiXAxisString = "["+unit(varn)+"]" 2459 res@gsnRightString = " " 2274 2460 if (xs .EQ. -1) then 2275 2461 res@trXMinF = miniwsa … … 2294 2480 else 2295 2481 res@gsnLeftString = vNam(varn) 2296 res@gsnRightString = unit(varn) 2482 res@tiXAxisString = "["+unit(varn)+"]" 2483 res@gsnRightString = " " 2297 2484 if (xs .EQ. -1) then 2298 2485 res@trXMinF = minius2 … … 2316 2503 else 2317 2504 res@gsnLeftString = vNam(varn) 2318 res@gsnRightString = unit(varn) 2505 res@tiXAxisString = "["+unit(varn)+"]" 2506 res@gsnRightString = " " 2319 2507 if (xs .EQ. -1) then 2320 2508 res@trXMinF = minivs2 … … 2338 2526 else 2339 2527 res@gsnLeftString = vNam(varn) 2340 res@gsnRightString = unit(varn) 2528 res@tiXAxisString = "["+unit(varn)+"]" 2529 res@gsnRightString = " " 2341 2530 if (xs .EQ. -1) then 2342 2531 res@trXMinF = miniws2 … … 2361 2550 else 2362 2551 res@gsnLeftString = vNam(varn) 2363 res@gsnRightString = unit(varn) 2552 res@tiXAxisString = "["+unit(varn)+"]" 2553 res@gsnRightString = " " 2364 2554 if (xs .EQ. -1) then 2365 2555 res@trXMinF = miniwsususodz … … 2383 2573 else 2384 2574 res@gsnLeftString = vNam(varn) 2385 res@gsnRightString = unit(varn) 2575 res@tiXAxisString = "["+unit(varn)+"]" 2576 res@gsnRightString = " " 2386 2577 if (xs .EQ. -1) then 2387 2578 res@trXMinF = miniwspsodz … … 2405 2596 else 2406 2597 res@gsnLeftString = vNam(varn) 2407 res@gsnRightString = unit(varn) 2598 res@tiXAxisString = "["+unit(varn)+"]" 2599 res@gsnRightString = " " 2408 2600 if (xs .EQ. -1) then 2409 2601 res@trXMinF = miniwpeodz … … 2437 2629 if (no_files .GT. 1) then 2438 2630 delete(vNam) 2439 end if 2631 delete(files) 2632 end if 2633 2440 2634 end do 2441 2635 ;#########ENDE DO LOOP FOR no_files GT 1############# 2636 2442 2637 if (count_var .EQ. 0) then 2443 2638 print(" ") … … 2449 2644 2450 2645 if (no_files .GT. 1) then 2451 multi_legend=new( 12,string)2452 string_len=new( 12,integer)2646 multi_legend=new(6,string) 2647 string_len=new(6,integer) 2453 2648 multi_dash=new(no_files,string) 2454 2649 multi_legend(0)=" "+name_legend_1 … … 2464 2659 multi_legend(5)=" "+name_legend_6 2465 2660 string_len(5)=strlen(multi_legend(5)) 2466 multi_legend(6)=" "+name_legend_72467 string_len(6)=strlen(multi_legend(6))2468 multi_legend(7)=" "+name_legend_82469 string_len(7)=strlen(multi_legend(7))2470 multi_legend(8)=" "+name_legend_92471 string_len(8)=strlen(multi_legend(8))2472 multi_legend(9)=" "+name_legend_102473 string_len(9)=strlen(multi_legend(9))2474 multi_legend(10)=" "+name_legend_112475 string_len(10)=strlen(multi_legend(10))2476 multi_legend(11)=" "+name_legend_122477 string_len(11)=strlen(multi_legend(11))2478 2661 do ml=1,no_files 2479 2662 multi_dash(ml-1)=ml-1 … … 2497 2680 lgMonoDashIndex = False 2498 2681 lgres@lgLabelFont = "helvetica" 2499 lgres@lgLabelFontHeightF = .22682 lgres@lgLabelFontHeightF = font_size_legend 2500 2683 lgres@vpWidthF = max(string_len)*0.012 2501 2684 lgres@vpHeightF = 0.04*no_files … … 2518 2701 if (count_var .EQ. 0) then 2519 2702 print(" ") 2520 print(" Please select a variable 'var=' or use the default value")2703 print("Select a variable 'var=' or use the default value") 2521 2704 print(" ") 2522 2705 print("Your selection '"+var+"' does not exist on the input file") … … 2598 2781 2599 2782 if (prof3d .EQ. 0) then 2600 if (log y.EQ. 1) then2783 if (log_z .EQ. 1) then 2601 2784 z = f->$vNam(varn+1)$(1:dimz-1) 2602 2785 else … … 2607 2790 if (isStrSubset( a(i),"zu_3d" ))then 2608 2791 z_v(varn,:) = z_u 2609 if (log y.EQ. 1) then2792 if (log_z .EQ. 1) then 2610 2793 z = z_v(varn,1:dimz-1) 2611 2794 else … … 2615 2798 if (isStrSubset( a(i),"zw_3d" ))then 2616 2799 z_v(varn,:) = z_w 2617 if (log y.EQ. 1) then2800 if (log_z .EQ. 1) then 2618 2801 z = z_v(varn,1:dimz-1) 2619 2802 else … … 2625 2808 end if 2626 2809 2627 z=z/norm 2810 z=z/norm_z 2628 2811 2629 2812 res@gsnLeftString = vNam(varn) 2630 res@gsnRightString = unit(varn) 2813 res@tiXAxisString = "["+unit(varn)+"]" 2814 res@gsnRightString = " " 2631 2815 res@trYMinF = min_z 2632 2816 res@trYMaxF = max_z … … 2646 2830 if (u .EQ. 0) then 2647 2831 res@gsnLeftString = "u, v and w" 2648 res@gsnRightString = unit(varn) 2832 res@tiXAxisString = "["+unit(varn)+"]" 2833 res@gsnRightString = " " 2649 2834 if (xs .EQ. -1) then 2650 2835 res@trXMinF = min((/miniu,miniv,miniw/)) … … 2666 2851 lgMonoDashIndex = False 2667 2852 lgres@lgLabelFont = "helvetica" 2668 lgres@lgLabelFontHeightF = .12853 lgres@lgLabelFontHeightF = font_size_legend 2669 2854 lgres@vpWidthF = 0.12 2670 2855 lgres@vpHeightF = 0.1 … … 2689 2874 if (pt .EQ. 0) then 2690 2875 res@gsnLeftString = "pt, vpt and lpt" 2691 res@gsnRightString = unit(varn) 2876 res@tiXAxisString = "["+unit(varn)+"]" 2877 res@gsnRightString = " " 2692 2878 if (xs .EQ. -1) then 2693 2879 res@trXMinF = min((/minipt,minivpt,minilpt/)) … … 2710 2896 lgMonoDashIndex = False 2711 2897 lgres@lgLabelFont = "helvetica" 2712 lgres@lgLabelFontHeightF = .12898 lgres@lgLabelFontHeightF = font_size_legend 2713 2899 lgres@vpWidthF = 0.12 2714 2900 lgres@vpHeightF = 0.1 … … 2732 2918 if (q .EQ. 0) then 2733 2919 res@gsnLeftString = "q, qv and ql" 2734 res@gsnRightString = unit(varn) 2920 res@tiXAxisString = "["+unit(varn)+"]" 2921 res@gsnRightString = " " 2735 2922 if (xs .EQ. -1) then 2736 2923 res@trXMinF = min((/miniq,miniqv,miniql/)) … … 2753 2940 lgMonoDashIndex = False 2754 2941 lgres@lgLabelFont = "helvetica" 2755 lgres@lgLabelFontHeightF = .12942 lgres@lgLabelFontHeightF = font_size_legend 2756 2943 lgres@vpWidthF = 0.12 2757 2944 lgres@vpHeightF = 0.1 … … 2776 2963 if (e .EQ. 0) then 2777 2964 res@gsnLeftString = "e and es" 2778 res@gsnRightString = unit(varn) 2965 res@tiXAxisString = "["+unit(varn)+"]" 2966 res@gsnRightString = " " 2779 2967 if (xs .EQ. -1) then 2780 2968 res@trXMinF = min((/minie,minies/)) … … 2797 2985 lgMonoDashIndex = False 2798 2986 lgres@lgLabelFont = "helvetica" 2799 lgres@lgLabelFontHeightF = .12987 lgres@lgLabelFontHeightF = font_size_legend 2800 2988 lgres@vpWidthF = 0.12 2801 2989 lgres@vpHeightF = 0.1 … … 2819 3007 if (km .EQ. 0) then 2820 3008 res@gsnLeftString = "km and kh" 2821 res@gsnRightString = unit(varn) 3009 res@tiXAxisString = "["+unit(varn)+"]" 3010 res@gsnRightString = " " 2822 3011 if (xs .EQ. -1) then 2823 3012 res@trXMinF = min((/minikm,minikh/)) … … 2840 3029 lgMonoDashIndex = False 2841 3030 lgres@lgLabelFont = "helvetica" 2842 lgres@lgLabelFontHeightF = .13031 lgres@lgLabelFontHeightF = font_size_legend 2843 3032 lgres@vpWidthF = 0.12 2844 3033 lgres@vpHeightF = 0.1 … … 2863 3052 if (wpup .EQ. 0) then 2864 3053 res@gsnLeftString = "wpup, wsus and wu" 2865 res@gsnRightString = unit(varn) 3054 res@tiXAxisString = "["+unit(varn)+"]" 3055 res@gsnRightString = " " 2866 3056 if (xs .EQ. -1) then 2867 3057 res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) … … 2884 3074 lgMonoDashIndex = False 2885 3075 lgres@lgLabelFont = "helvetica" 2886 lgres@lgLabelFontHeightF = .13076 lgres@lgLabelFontHeightF = font_size_legend 2887 3077 lgres@vpWidthF = 0.12 2888 3078 lgres@vpHeightF = 0.1 … … 2906 3096 if (wpvp .EQ. 0) then 2907 3097 res@gsnLeftString = "wpvp, wsus and wv" 2908 res@gsnRightString = unit(varn) 3098 res@tiXAxisString = "["+unit(varn)+"]" 3099 res@gsnRightString = " " 2909 3100 if (xs .EQ. -1) then 2910 3101 res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) … … 2927 3118 lgMonoDashIndex = False 2928 3119 lgres@lgLabelFont = "helvetica" 2929 lgres@lgLabelFontHeightF = .13120 lgres@lgLabelFontHeightF = font_size_legend 2930 3121 lgres@vpWidthF = 0.12 2931 3122 lgres@vpHeightF = 0.1 … … 2949 3140 if (wpptp .EQ. 0) then 2950 3141 res@gsnLeftString = "wpptp, wspts and wv" 2951 res@gsnRightString = unit(varn) 3142 res@tiXAxisString = "["+unit(varn)+"]" 3143 res@gsnRightString = " " 2952 3144 if (xs .EQ. -1) then 2953 3145 res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) … … 2970 3162 lgMonoDashIndex = False 2971 3163 lgres@lgLabelFont = "helvetica" 2972 lgres@lgLabelFontHeightF = .13164 lgres@lgLabelFontHeightF = font_size_legend 2973 3165 lgres@vpWidthF = 0.12 2974 3166 lgres@vpHeightF = 0.1 … … 2992 3184 if (wsptsBC .EQ. 0) then 2993 3185 res@gsnLeftString = "wsptsBC and wptBC" 2994 res@gsnRightString = unit(varn) 3186 res@tiXAxisString = "["+unit(varn)+"]" 3187 res@gsnRightString = " " 2995 3188 if (xs .EQ. -1) then 2996 3189 res@trXMinF = min((/miniwsptsBC,miniwptBC/)) … … 3013 3206 lgMonoDashIndex = False 3014 3207 lgres@lgLabelFont = "helvetica" 3015 lgres@lgLabelFontHeightF = .13208 lgres@lgLabelFontHeightF = font_size_legend 3016 3209 lgres@vpWidthF = 0.12 3017 3210 lgres@vpHeightF = 0.1 … … 3035 3228 if (wpvptp .EQ. 0) then 3036 3229 res@gsnLeftString = "wpvptp, wsvpts and wv" 3037 res@gsnRightString = unit(varn) 3230 res@tiXAxisString = "["+unit(varn)+"]" 3231 res@gsnRightString = " " 3038 3232 if (xs .EQ. -1) then 3039 3233 res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) … … 3056 3250 lgMonoDashIndex = False 3057 3251 lgres@lgLabelFont = "helvetica" 3058 lgres@lgLabelFontHeightF = .13252 lgres@lgLabelFontHeightF = font_size_legend 3059 3253 lgres@vpWidthF = 0.12 3060 3254 lgres@vpHeightF = 0.1 … … 3078 3272 if (wpqp .EQ. 0) then 3079 3273 res@gsnLeftString = "wpqp, wsqs and wq" 3080 res@gsnRightString = unit(varn) 3274 res@tiXAxisString = "["+unit(varn)+"]" 3275 res@gsnRightString = " " 3081 3276 if (xs .EQ. -1) then 3082 3277 res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) … … 3099 3294 lgMonoDashIndex = False 3100 3295 lgres@lgLabelFont = "helvetica" 3101 lgres@lgLabelFontHeightF = .13296 lgres@lgLabelFontHeightF = font_size_legend 3102 3297 lgres@vpWidthF = 0.12 3103 3298 lgres@vpHeightF = 0.1 … … 3121 3316 if (wpqvp .EQ. 0) then 3122 3317 res@gsnLeftString = "wpqvp, wsqvs and wqv" 3123 res@gsnRightString = unit(varn) 3318 res@tiXAxisString = "["+unit(varn)+"]" 3319 res@gsnRightString = " " 3124 3320 if (xs .EQ. -1) then 3125 3321 res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) … … 3142 3338 lgMonoDashIndex = False 3143 3339 lgres@lgLabelFont = "helvetica" 3144 lgres@lgLabelFontHeightF = .13340 lgres@lgLabelFontHeightF = font_size_legend 3145 3341 lgres@vpWidthF = 0.12 3146 3342 lgres@vpHeightF = 0.1 … … 3164 3360 if (wpsp .EQ. 0) then 3165 3361 res@gsnLeftString = "wpsp, wsss and ws" 3166 res@gsnRightString = unit(varn) 3362 res@tiXAxisString = "["+unit(varn)+"]" 3363 res@gsnRightString = " " 3167 3364 if (xs .EQ. -1) then 3168 3365 res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) … … 3185 3382 lgMonoDashIndex = False 3186 3383 lgres@lgLabelFont = "helvetica" 3187 lgres@lgLabelFontHeightF = .13384 lgres@lgLabelFontHeightF = font_size_legend 3188 3385 lgres@vpWidthF = 0.12 3189 3386 lgres@vpHeightF = 0.1 … … 3207 3404 if (wpsap .EQ. 0) then 3208 3405 res@gsnLeftString = "wpsap, wssas and wsa" 3209 res@gsnRightString = unit(varn) 3406 res@tiXAxisString = "["+unit(varn)+"]" 3407 res@gsnRightString = " " 3210 3408 if (xs .EQ. -1) then 3211 3409 res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) … … 3228 3426 lgMonoDashIndex = False 3229 3427 lgres@lgLabelFont = "helvetica" 3230 lgres@lgLabelFontHeightF = .13428 lgres@lgLabelFontHeightF = font_size_legend 3231 3429 lgres@vpWidthF = 0.12 3232 3430 lgres@vpHeightF = 0.1 … … 3251 3449 if (us2 .EQ. 0) then 3252 3450 res@gsnLeftString = "us2, vs2 and ws2" 3253 res@gsnRightString = unit(varn) 3451 res@tiXAxisString = "["+unit(varn)+"]" 3452 res@gsnRightString = " " 3254 3453 if (xs .EQ. -1) then 3255 3454 res@trXMinF = min((/minius2,minivs2,miniws2/)) … … 3272 3471 lgMonoDashIndex = False 3273 3472 lgres@lgLabelFont = "helvetica" 3274 lgres@lgLabelFontHeightF = .13473 lgres@lgLabelFontHeightF = font_size_legend 3275 3474 lgres@vpWidthF = 0.12 3276 3475 lgres@vpHeightF = 0.1 … … 3295 3494 if (wsususodz .EQ. 0) then 3296 3495 res@gsnLeftString = "wsususodz, wspsodz and ws2" 3297 res@gsnRightString = unit(varn) 3496 res@tiXAxisString = "["+unit(varn)+"]" 3497 res@gsnRightString = " " 3298 3498 if (xs .EQ. -1) then 3299 3499 res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/)) … … 3316 3516 lgMonoDashIndex = False 3317 3517 lgres@lgLabelFont = "helvetica" 3318 lgres@lgLabelFontHeightF = .13518 lgres@lgLabelFontHeightF = font_size_legend 3319 3519 lgres@vpWidthF = 0.12 3320 3520 lgres@vpHeightF = 0.1 … … 3369 3569 3370 3570 if (prof3d .EQ. 0) then 3371 if (log y.EQ. 1) then3571 if (log_z .EQ. 1) then 3372 3572 z = f->$vNam(varn+1)$(1:dimz-1) 3373 3573 else … … 3378 3578 if (isStrSubset( a(i),"zu_3d" ))then 3379 3579 z_v(varn,:) = z_u 3380 if (log y.EQ. 1) then3580 if (log_z .EQ. 1) then 3381 3581 z = z_v(varn,1:dimz-1) 3382 3582 else … … 3386 3586 if (isStrSubset( a(i),"zw_3d" ))then 3387 3587 z_v(varn,:) = z_w 3388 if (log y.EQ. 1) then3588 if (log_z .EQ. 1) then 3389 3589 z = z_v(varn,1:dimz-1) 3390 3590 else … … 3396 3596 end if 3397 3597 3398 z=z/norm 3598 z=z/norm_z 3399 3599 3400 3600 com_var_avail(n_o)=vNam(varn) … … 3412 3612 res@xyDashPattern = 0 3413 3613 res@gsnLeftString = "Combined Plot of "+c_var 3414 res@gsnRightString = unit(varn) 3614 res@tiXAxisString = "["+unit(varn)+"]" 3615 res@gsnRightString = " " 3415 3616 if (xs .EQ. -1) then 3416 3617 res@trXMinF = min(mini) … … 3472 3673 lgres@lgDashIndexes = (/0,1,2/) 3473 3674 lgres@lgLabelFont = "helvetica" 3474 lgres@lgLabelFontHeightF = .13675 lgres@lgLabelFontHeightF = font_size_legend 3475 3676 lgres@vpWidthF = 0.12 3476 3677 lgres@vpHeightF = 0.1 … … 3498 3699 gsn_panel(wks,plot_,(/n,1/),resP) 3499 3700 else 3500 do i = 0,n-1, no_ lines*no_columns3501 if( (i+no_ lines*no_columns) .gt. (n-1)) then3502 gsn_panel(wks,plot_(i:n-1),(/no_ lines,no_columns/),resP)3701 do i = 0,n-1, no_rows*no_columns 3702 if( (i+no_rows*no_columns) .gt. (n-1)) then 3703 gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP) 3503 3704 else 3504 gsn_panel(wks,plot_(i:i+no_ lines*no_columns-1),(/no_lines,no_columns/),resP)3705 gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 3505 3706 end if 3506 3707 end do -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r194 r218 26 26 end if 27 27 end if 28 28 29 29 begin 30 30 … … 35 35 if (file_1 .EQ. "File in") then 36 36 print(" ") 37 print(" Please provide 1st input file 'file_1=' in 'ncl_preferences.ncl'")37 print("Declare input file 'file_1=' in 'ncl_preferences.ncl' or prompt") 38 38 print(" ") 39 39 exit … … 41 41 file_in = file_1 42 42 end if 43 if (.not. isfilepresent(file_in)) then44 print(" ")45 print("1st input file: '"+file_in+"' does not exist")46 print(" ")47 exit48 end if49 43 50 44 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then … … 55 49 end if 56 50 57 if (log x .NE. 0 .AND. logx .NE. 1)then58 print(" ") 59 print("'log x'= "+logx+" is invalid and set to 1")60 print(" ") 61 log x = 151 if (log_x .NE. 0 .AND. log_x .NE. 1)then 52 print(" ") 53 print("'log_x'= "+log_x+" is invalid and set to 1") 54 print(" ") 55 log_x = 1 62 56 end if 63 57 64 if (log y .NE. 0 .AND. logy .NE. 1)then65 print(" ") 66 print("'log y'= "+logy+" is invalid and set to 1")67 print(" ") 68 log y = 158 if (log_y .NE. 0 .AND. log_y .NE. 1)then 59 print(" ") 60 print("'log_y'= "+log_y+" is invalid and set to 1") 61 print(" ") 62 log_y = 1 69 63 end if 70 64 71 if (norm y .EQ. 0.) then72 print(" ") 73 print(" You cannot normalise the y-axis with 0, 'normy' is set to 1.0")74 print(" ") 75 norm y = 1.076 end if 77 if (norm x .EQ. 0.) then78 print(" ") 79 print(" You cannot normalise the x-axis with 0, 'normx' is set to 1.0")80 print(" ") 81 norm x= 1.065 if (norm_y .EQ. 0.) then 66 print(" ") 67 print("Normalising with 0 is not allowed, 'norm_y' is set to 1.0") 68 print(" ") 69 norm_y = 1.0 70 end if 71 if (norm_x .EQ. 0.) then 72 print(" ") 73 print("Normalising with 0 is not allowed, 'norm_x' is set to 1.0") 74 print(" ") 75 norm_x= 1.0 82 76 end if 83 77 … … 106 100 ; open input file 107 101 ;*************************************************** 108 109 f=addfile(file_in,"r") 110 111 vNam = getfilevarnames(f) 102 103 file_in_1 = False 104 if (isStrSubset(file_in, ".nc"))then 105 start_f = -2 106 end_f = -2 107 file_in_1 = True 108 end if 109 110 if (start_f .EQ. -1)then 111 print(" ") 112 print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 113 print(" ") 114 exit 115 end if 116 if (end_f .EQ. -1)then 117 print(" ") 118 print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 119 print(" ") 120 exit 121 end if 122 123 files=new(end_f-start_f+1,string) 124 125 if (file_in_1)then 126 if (isfilepresent(file_in))then 127 files(0)=file_in 128 else 129 print(" ") 130 print("1st input file: '"+file_in+"' does not exist") 131 print(" ") 132 exit 133 end if 134 else 135 if (start_f .EQ. 0)then 136 if (isfilepresent(file_in+".nc"))then 137 files(0)=file_in+".nc" 138 do i=1,end_f 139 if (isfilepresent(file_in+"."+i+".nc"))then 140 files(i)=file_in+"."+i+".nc" 141 else 142 print(" ") 143 print("Input file: '"+file_in+"."+i+".nc' does not exist") 144 print(" ") 145 exit 146 end if 147 end do 148 else 149 print(" ") 150 print("Input file: '"+file_in+".nc' does not exist") 151 print(" ") 152 exit 153 end if 154 else 155 do i=start_f,end_f 156 if (isfilepresent(file_in+"."+i+".nc"))then 157 files(i-start_f)=file_in+"."+i+".nc" 158 else 159 print(" ") 160 print("Input file: '"+file_in+"."+i+".nc' does not exist") 161 print(" ") 162 exit 163 end if 164 end do 165 end if 166 end if 167 168 f=addfiles(files,"r") 169 f_att=addfile(files(0),"r") 170 ListSetType(f,"cat") 171 172 vNam = getfilevarnames(f_att) 112 173 print(" ") 113 174 print("Variables in input file:") … … 115 176 print(" ") 116 177 dim = dimsizes(vNam) 117 vDim = getfiledimsizes(f )178 vDim = getfiledimsizes(f_att) 118 179 119 t_all = f ->time180 t_all = f[:]->time 120 181 nt = dimsizes(t_all) 121 182 delta_t=t_all(nt-1)/nt 122 183 123 k_x=f ->k_x184 k_x=f_att->k_x 124 185 dimx=dimsizes(k_x) 125 k_y=f ->k_y186 k_y=f_att->k_y 126 187 dimy=dimsizes(k_y) 127 188 … … 131 192 do i=0,dim-1 132 193 if (vNam(i) .EQ. "zu_sp")then 133 zu=f ->zu_sp194 zu=f_att->zu_sp 134 195 if (height_level(0) .EQ. -1)then 135 196 dimz=dimsizes(zu) … … 150 211 else 151 212 if (vNam(i) .EQ. "zw_sp")then 152 zw=f ->zw_sp213 zw=f_att->zw_sp 153 214 if (height_level(0) .EQ. -1)then 154 215 dimz=dimsizes(zw) … … 182 243 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") 183 244 print(" ") 184 print(" Please select another 'start_time_step'")245 print("Select another 'start_time_step'") 185 246 print(" ") 186 247 exit … … 204 265 print("'start_time_step' = "+ start_time_step +"h is invalid") 205 266 print(" ") 206 print(" Please select another 'start_time_step'")267 print("Select another 'start_time_step'") 207 268 print(" ") 208 269 exit … … 220 281 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") 221 282 print(" ") 222 print(" Please select another 'end_time_step'")283 print("Select another 'end_time_step'") 223 284 print(" ") 224 285 exit … … 228 289 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") 229 290 print(" ") 230 print(" Please select another 'start_time_step' or 'end_time_step'")291 print("Select another 'start_time_step' or 'end_time_step'") 231 292 print(" ") 232 293 exit … … 245 306 print("'end_time_step' = "+ end_time_step +"h is invalid") 246 307 print(" ") 247 print(" Please select another 'end_time_step'")308 print("Select another 'end_time_step'") 248 309 print(" ") 249 310 exit … … 281 342 res@lgLabelFont = "helvetica" 282 343 res@tmLabelAutoStride = True 283 res@pmLegendDisplayMode = "Always" 284 res@pmLegendSide = "Top" 285 res@pmLegendParallelPosF = 1.2 286 res@pmLegendOrthogonalPosF = -1.0 287 res@pmLegendWidthF = 0.12 288 if (sort .EQ. "time")then 289 res@pmLegendHeightF = 0.04*(end_time_step-start_time_step+1) 290 else 291 res@pmLegendHeightF = 0.04*dimz 292 end if 293 res@lgLabelFontHeightF = .025 294 res@lgTitleFontHeightF = .025 295 res@txFontHeightF = 0.025 296 res@tiXAxisFontHeightF = 0.025 297 res@tiYAxisFontHeightF = 0.025 298 299 if (logx .EQ. 1) then 344 345 res@lgLabelFontHeightF = font_size_legend 346 res@lgTitleFontHeightF = font_size 347 res@txFontHeightF = font_size 348 res@tiXAxisFontHeightF = font_size 349 res@tiYAxisFontHeightF = font_size 350 res@tmXBLabelFontHeightF = font_size 351 res@tmYLLabelFontHeightF = font_size 352 353 res@tmXBMinorPerMajor = 4 354 res@tmYLMinorPerMajor = 4 355 356 if (log_x .EQ. 1) then 300 357 res@trXLog = True 301 358 else 302 359 res@trXLog = False 303 360 end if 304 if (log y .EQ. 1)then361 if (log_y .EQ. 1)then 305 362 res@trYLog = True 306 363 else … … 326 383 plot = new(dim*dimt,graphic) 327 384 np=dimz 328 res@lgTitleString = "Height [m]"385 329 386 do p=0,dimz-1 330 387 if (height_level(0) .EQ. -1)then … … 340 397 if (black .eq. 0 ) then 341 398 if (np .EQ. 1)then 342 res@xyLineColors= 237399 color = 237 343 400 else 344 401 step=round(235/(np-1),3) 345 res@xyLineColors= ispan(2,237,step)402 color = ispan(2,237,step) 346 403 end if 347 404 end if … … 352 409 wks=gsn_open_wks(format_out,file_out) 353 410 gsn_define_colormap(wks,"rainbow+white") 354 355 temp=new((/dimt,dimz,dimx/),float)356 411 357 412 n=0 … … 369 424 370 425 if(check) then 371 372 temp = f->$vNam(varn)$(start_time_step:end_time_step,0:dimz-1,:) 373 374 a=getvardims(temp) 426 427 temp = f[:]->$vNam(varn)$ 428 data = temp(start_time_step:end_time_step,0:dimz-1,:) 429 430 temp_att = f_att->$vNam(varn)$ 431 a=getvardims(temp_att) 375 432 b=dimsizes(a) 376 433 377 434 if (height_level(0) .NE. -1)then 378 435 do te=0,dimz-1 379 temp(:,te,:) = f->$vNam(varn)$(start_time_step:end_time_step,height_level(te),:) 436 print(height_level(te)) 437 data(:,te,:) = temp(start_time_step:end_time_step,height_level(te),:) 380 438 end do 381 439 end if 382 440 383 temp=temp/(normy*normx) ;SMOOTHING: #temp=smth9(temp/norm, 0.50, -0.25, False)#441 data=data/(norm_y*norm_x) ;SMOOTHING: #temp=smth9(temp/norm, 0.50, -0.25, False)# 384 442 385 443 do i=0,b-1 … … 402 460 end if 403 461 end do 404 462 463 min_x=new(dimz,double) 464 max_x=new(dimz,double) 465 min_y=new(dimz,float) 466 max_y=new(dimz,float) 467 plot_h = new(dimz,graphic) 468 405 469 if (isStrSubset(vNam(varn),"x"))then 406 x_axis = f->k_x 407 x_axis = x_axis/normx 408 if (normx .NE. 1.)then 409 res@tiXAxisString = "k_x / "+normx 470 x_axis = new((/dimz,dimx/),double) 471 do q=0,dimz-1 472 x_axis(q,:) = f_att->k_x 473 x_axis = x_axis/norm_x 474 end do 475 if (norm_x .NE. 1.)then 476 res@tiXAxisString = "k~B~x~N~ ["+unit_x+"]" 410 477 else 411 res@tiXAxisString = "k_x" 478 if (norm_height .EQ. 1)then 479 res@tiXAxisString = "k~B~x~N~ x z [1]" 480 else 481 res@tiXAxisString = "k~B~x~N~ [1/m]" 482 end if 412 483 end if 484 dim_r=dimx 413 485 else 414 x_axis = f->k_y 415 x_axis = x_axis/normx 416 if (normx .NE. 1.)then 417 res@tiXAxisString = "k_y / "+normx 486 x_axis=new((/dimz,dimy/),double) 487 do q=0,dimz-1 488 x_axis(q,:) = f_att->k_y 489 x_axis = x_axis/norm_x 490 end do 491 if (norm_x .NE. 1.)then 492 res@tiXAxisString = "k~B~x~N~ ["+unit_x+"]" 418 493 else 419 res@tiXAxisString = "k_y" 494 if (norm_height .EQ. 1)then 495 res@tiXAxisString = "k~B~x~N~ x z [1]" 496 else 497 res@tiXAxisString = "k~B~x~N~ [1/m]" 498 end if 420 499 end if 500 dim_r=dimy 421 501 end if 422 502 423 503 if (sort .EQ. "time") 504 res@xyLineColors = color 505 res@pmLegendDisplayMode = "Always" 506 res@pmLegendSide = "Top" 507 res@pmLegendParallelPosF = 1.2 508 res@pmLegendOrthogonalPosF = -1.0 509 res@pmLegendWidthF = 0.12 510 res@pmLegendHeightF = 0.04*(end_time_step-start_time_step+1) 424 511 do p=dimz-1,0,1 425 if (log y .EQ. 1)then512 if (log_y .EQ. 1)then 426 513 do q=0,dimt-1 427 do r=0,dim sizes(x_axis)-1428 if ( temp(q,p,r) .EQ. 0)then514 do r=0,dim_r-1 515 if (data(q,p,r) .EQ. 0)then 429 516 st=p+start_time_step 430 517 print(" ") … … 436 523 end do 437 524 end if 438 res@trXMinF = min(x_axis)439 res@trXMaxF = max(x_axis)440 525 res@gsnLeftString = vNam(varn) 441 res@gsnRightString = "Height = "+z(p)+"m" 442 if (normy .NE. 1.)then 443 res@tiYAxisString = vNam(varn)+" / "+normy 444 else 445 res@tiYAxisString = vNam(varn) 446 end if 447 res@xyExplicitLegendLabels = legend_label 448 plot(n) = gsn_csm_xy(wks,x_axis,temp(:,p,:),res) 526 res@gsnRightString = "Height = "+z(p)+"m" 527 res@tiYAxisString = "["+unit_y+"]" 528 res@xyExplicitLegendLabels = legend_label 529 if (norm_height .EQ. 1)then 530 data(:,p,:)=data(:,p,:)*doubletofloat(z(p)) 531 x_axis(p,:) = x_axis(p,:)*z(p) 532 end if 533 res@trXMinF = min(x_axis(p,:)) 534 res@trXMaxF = max(x_axis(p,:)) 535 plot(n) = gsn_csm_xy(wks,x_axis(p,:),data(:,p,:),res) 449 536 n=n+1 450 537 end do … … 453 540 do p=0,dimt-1 454 541 do q=0,dimz-1 455 do r=0,dim sizes(x_axis)-1456 if ( temp(p,q,r) .EQ. 0)then542 do r=0,dim_r-1 543 if (data(p,q,r) .EQ. 0)then 457 544 st=p+start_time_step 458 545 print(" ") … … 462 549 end if 463 550 end do 464 end do 465 res@trXMinF = min(x_axis) 466 res@trXMaxF = max(x_axis) 467 res@gsnLeftString = vNam(varn) 468 res@gsnRightString = "Time = "+legend_label(p)+"h" 469 if (normy .NE. 1.)then 470 res@tiYAxisString = vNam(varn)+" / "+normy 471 else 472 res@tiYAxisString = vNam(varn) 473 end if 474 res@xyExplicitLegendLabels = legend_label_z 475 plot(n) = gsn_csm_xy(wks,x_axis,temp(p,:,:),res) 476 n=n+1 551 if (norm_height .EQ. 1 .AND. p .EQ. 0)then 552 data(p,q,:) = data(p,q,:)*doubletofloat(legend_label_z(q)) 553 x_axis(q,:) = x_axis(q,:)*doubletofloat(legend_label_z(q)) 554 end if 555 max_y(q)=max(data(p,q,:)) 556 min_y(q)=min(data(p,q,:)) 557 min_x(q)=min(x_axis(q,:)) 558 max_x(q)=max(x_axis(q,:)) 559 end do 560 do q=0,dimz-1 561 res@xyLineColor = color(q) 562 if (dash .EQ. 1)then 563 res@xyDashPattern = q 564 end if 565 if (q .EQ. 0)then 566 res@tiYAxisString = "["+unit_y+"]" 567 res@gsnLeftString = vNam(varn) 568 res@gsnRightString = "Time = "+legend_label(p)+"h" 569 res@trXMinF = min(min_x) 570 res@trXMaxF = max(max_x) 571 res@trYMinF = min(min_y) 572 res@trYMaxF = max(max_y) 573 574 plot_h(q) = gsn_csm_xy(wks,x_axis(q,:),data(p,q,:),res) 575 576 lgres = True 577 if (dash .EQ. 0)then 578 lgres@lgMonoDashIndex = True 579 else 580 lgres@lgDashIndexes = ispan(0,dimz-1,1) 581 end if 582 if (black .EQ. 1)then 583 lgres@lgMonoLineColors = True 584 else 585 lgres@lgLineColors = color 586 end if 587 lgres@lgTitleString = "Height [m]" 588 lgres@lgLabelFont = "helvetica" 589 lgres@lgLabelFontHeightF = font_size_legend 590 lgres@lgTitleFontHeightF = font_size 591 lgres@vpWidthF = 0.12 592 lgres@vpHeightF = font_size_legend/5*dimz 593 594 lbid = gsn_create_legend(wks,dimz,legend_label_z,lgres) 595 596 amres = True 597 amres@amParallelPosF = 0.75 598 amres@amOrthogonalPosF = 0.15 599 annoid1 = gsn_add_annotation(plot_h(q),lbid,amres) 600 else 601 plot_h(q) = gsn_csm_xy(wks,x_axis(q,:),data(p,q,:),res) 602 overlay(plot_h(0),plot_h(q)) 603 end if 604 end do 605 plot(n)=plot_h(0) 606 n=n+1 477 607 end do 478 608 end if 479 609 end if 480 delete(temp) 610 delete(data) 611 delete(temp) 481 612 delete(x_axis) 613 delete(min_x) 614 delete(max_x) 615 delete(min_y) 616 delete(max_y) 617 delete(plot_h) 482 618 end if 483 619 end do … … 497 633 resP = True 498 634 resP@txFont = "helvetica" 499 resP@txString = f @title635 resP@txString = f_att@title 500 636 resP@txFuncCode = "~" 501 resP@txFontHeightF = 0.01 4637 resP@txFontHeightF = 0.015 502 638 503 639 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 504 640 gsn_panel(wks,plot,(/n,1/),resP) 505 641 else 506 do i = 0,n-1, no_ lines*no_columns507 if( (i+no_ lines*no_columns) .gt. (n-1)) then508 gsn_panel(wks,plot(i:n-1),(/no_ lines,no_columns/),resP)642 do i = 0,n-1, no_rows*no_columns 643 if( (i+no_rows*no_columns) .gt. (n-1)) then 644 gsn_panel(wks,plot(i:n-1),(/no_rows,no_columns/),resP) 509 645 else 510 gsn_panel(wks,plot(i:i+no_ lines*no_columns-1),(/no_lines,no_columns/),resP)646 gsn_panel(wks,plot(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 511 647 end if 512 648 end do -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r194 r218 33 33 ; set up default parameter values and strings 34 34 ;*************************************************** 35 35 36 36 if (file_1 .EQ. "File in") then 37 37 print(" ") 38 print(" Please provide 1st input file 'file_1=' in 'ncl_preferences.ncl'")38 print("Declare input file 'file_1=' in 'ncl_preferences.ncl' or prompt") 39 39 print(" ") 40 40 exit … … 42 42 file_in = file_1 43 43 end if 44 if (.not. isfilepresent(file_in)) then45 print(" ")46 print("1st input file: '"+file_in+"' does not exist")47 print(" ")48 exit49 end if50 44 51 45 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then … … 61 55 print(" ") 62 56 over = 0 63 end if 57 end if 58 59 if (norm_t .EQ. 0) then 60 print(" ") 61 print("Normalising with 0 is not allowed, 'norm_t' is set to 1.0") 62 print(" ") 63 norm_t = 1.0 64 end if 64 65 65 66 … … 67 68 ; open input file 68 69 ;*************************************************** 69 70 f = addfile(file_in , "r" ) 71 72 vNam = getfilevarnames(f) 70 71 file_in_1 = False 72 if (isStrSubset(file_in, ".nc"))then 73 start_f = -2 74 end_f = -2 75 file_in_1 = True 76 end if 77 78 if (start_f .EQ. -1)then 79 print(" ") 80 print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 81 print(" ") 82 exit 83 end if 84 if (end_f .EQ. -1)then 85 print(" ") 86 print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 87 print(" ") 88 exit 89 end if 90 91 files=new(end_f-start_f+1,string) 92 93 if (file_in_1)then 94 if (isfilepresent(file_in))then 95 files(0)=file_in 96 else 97 print(" ") 98 print("1st input file: '"+file_in+"' does not exist") 99 print(" ") 100 exit 101 end if 102 else 103 if (start_f .EQ. 0)then 104 if (isfilepresent(file_in+".nc"))then 105 files(0)=file_in+".nc" 106 do i=1,end_f 107 if (isfilepresent(file_in+"."+i+".nc"))then 108 files(i)=file_in+"."+i+".nc" 109 else 110 print(" ") 111 print("Input file: '"+file_in+"."+i+".nc' does not exist") 112 print(" ") 113 exit 114 end if 115 end do 116 else 117 print(" ") 118 print("Input file: '"+file_in+".nc' does not exist") 119 print(" ") 120 exit 121 end if 122 else 123 do i=start_f,end_f 124 if (isfilepresent(file_in+"."+i+".nc"))then 125 files(i-start_f)=file_in+"."+i+".nc" 126 else 127 print(" ") 128 print("Input file: '"+file_in+"."+i+".nc' does not exist") 129 print(" ") 130 exit 131 end if 132 end do 133 end if 134 end if 135 136 f=addfiles(files,"r") 137 f_att=addfile(files(0),"r") 138 ListSetType(f,"cat") 139 140 vNam=getfilevarnames(f_att) 141 73 142 print(" ") 74 143 print("Variables in input file:") … … 82 151 end if 83 152 84 t_all = f ->time153 t_all = f[:]->time 85 154 nt = dimsizes(t_all) 86 155 delta_t=t_all(nt-1)/nt 87 156 88 157 ;**************************************************** 89 158 ; start of time step and different types of mistakes that could be done … … 97 166 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") 98 167 print(" ") 99 print(" Please select another 'start_time_step'")168 print("Select another 'start_time_step'") 100 169 print(" ") 101 170 exit … … 105 174 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 106 175 print(" ") 107 print(" Please select another 'start_time_step'")176 print("Select another 'start_time_step'") 108 177 print(" ") 109 178 exit … … 123 192 print("'start_time_step' = "+ start_time_step +"h is invalid") 124 193 print(" ") 125 print(" Please select another 'start_time_step'")194 print("Select another 'start_time_step'") 126 195 print(" ") 127 196 exit … … 139 208 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") 140 209 print(" ") 141 print(" Please select another 'end_time_step'")210 print("Select another 'end_time_step'") 142 211 print(" ") 143 212 exit … … 147 216 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") 148 217 print(" ") 149 print(" Please select another 'end_time_step'")218 print("Select another 'end_time_step'") 150 219 print(" ") 151 220 exit … … 155 224 print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h") 156 225 print(" ") 157 print(" Please select another 'start_time_step' or 'end_time_step'")226 print("Select another 'start_time_step' or 'end_time_step'") 158 227 print(" ") 159 228 exit … … 171 240 print("'end_time_step' = "+ end_time_step +"h is invalid") 172 241 print(" ") 173 print(" Please select another 'end_time_step'")242 print("Select another 'end_time_step'") 174 243 print(" ") 175 244 exit … … 186 255 print(" ") 187 256 188 t = f->time(start_time_step:end_time_step) 189 257 t = t_all(start_time_step:end_time_step)/norm_t 190 258 191 259 ; *************************************************** … … 210 278 res@xyLineColors = (/237/) 211 279 212 res@lgLabelFontHeightF = .02280 res@lgLabelFontHeightF = 0.02 213 281 214 282 resP = True 215 283 resP@txFont = "helvetica" 216 resP@txString = f @title+" time series "284 resP@txString = f_att@title+" time series " 217 285 resP@txFuncCode = "~" 218 286 resP@txFontHeightF = 0.015 287 288 res@tmXBMinorPerMajor = 4 289 res@tmYLMinorPerMajor = 4 219 290 220 291 res@vpWidthF=4 … … 290 361 count_var=count_var+1 291 362 292 data_all = f ->$vNam(varn)$ 293 unit(varn) = data_all@units 363 data_all = f[:]->$vNam(varn)$ 364 data_att = f_att->$vNam(varn)$ 365 unit(varn) = data_att@units 294 366 295 367 data(varn,:)=data_all(start_time_step:end_time_step) … … 303 375 if (mini(varn) .EQ. maxi(varn)) then 304 376 if (min(data(varn,:)) .EQ. 0)then 305 mini(varn)= mini(varn)- 1.306 maxi(varn)= maxi(varn)+ 1.377 mini(varn)= mini(varn)-0.1 378 maxi(varn)= maxi(varn)+0.1 307 379 end if 308 380 if (min(data(varn,:)) .LT. 0)then … … 322 394 if (mini(varn) .EQ. maxi(varn)) then 323 395 if (min(data(varn,:)) .EQ. 0)then 324 mini(varn)= mini(varn)- 1.325 maxi(varn)= maxi(varn)+ 1.396 mini(varn)= mini(varn)-0.1 397 maxi(varn)= maxi(varn)+0.1 326 398 end if 327 399 if (min(data(varn,:)) .LT. 0)then … … 341 413 if (mini(varn) .EQ. maxi(varn)) then 342 414 if (mini(varn) .EQ. 0)then 343 mini(varn)= mini(varn)- 1.344 maxi(varn)= maxi(varn)+ 1.415 mini(varn)= mini(varn)-0.1 416 maxi(varn)= maxi(varn)+0.1 345 417 end if 346 418 if (mini(varn) .LT. 0)then … … 360 432 if (mini(varn) .EQ. maxi(varn)) then 361 433 if (min(data(varn,:)) .EQ. 0)then 362 mini(varn)= mini(varn)- 1.363 maxi(varn)= maxi(varn)+ 1.434 mini(varn)= mini(varn)-0.1 435 maxi(varn)= maxi(varn)+0.1 364 436 end if 365 437 if (min(data(varn,:)) .LT. 0)then … … 379 451 if (mini(varn) .EQ. maxi(varn)) then 380 452 if (min(data(varn,:)) .EQ. 0)then 381 mini(varn)= mini(varn)- 1.382 maxi(varn)= maxi(varn)+ 1.453 mini(varn)= mini(varn)-0.1 454 maxi(varn)= maxi(varn)+0.1 383 455 end if 384 456 if (min(data(varn,:)) .LT. 0)then … … 398 470 if (mini(varn) .EQ. maxi(varn)) then 399 471 if (min(data(varn,:)) .EQ. 0)then 400 mini(varn)= mini(varn)- 1.401 maxi(varn)= maxi(varn)+ 1.472 mini(varn)= mini(varn)-0.1 473 maxi(varn)= maxi(varn)+0.1 402 474 end if 403 475 if (min(data(varn,:)) .LT. 0)then … … 417 489 if (mini(varn) .EQ. maxi(varn)) then 418 490 if (min(data(varn,:)) .EQ. 0)then 419 mini(varn)= mini(varn)- 1.420 maxi(varn)= maxi(varn)+ 1.491 mini(varn)= mini(varn)-0.1 492 maxi(varn)= maxi(varn)+0.1 421 493 end if 422 494 if (min(data(varn,:)) .LT. 0)then … … 459 531 if(check) then 460 532 461 if (isStrSubset(vNam(varn),"_0 " ))then533 if (isStrSubset(vNam(varn),"_0 " ))then 462 534 print(" ") 463 535 print("If you have Outputs of statistic regions you cannot overlay variables; 'over' is set to 0") … … 470 542 res@gsnLeftString = "overlayed plot" 471 543 res@gsnRightString = unit(varn) 472 res@tiXAxisString = " time [s] " 473 res@tiYAxisString = " " 474 res@tiXAxisFontHeightF = 0.07 475 res@txFontHeightF = 0.07 476 res@tiYAxisFontHeightF = 0.07 544 if (norm_t .NE. 1.)then 545 res@tiXAxisString = "t ["+unit_t+"]" 546 else 547 res@tiXAxisString = "t [s]" 548 end if 549 res@tiYAxisString = " " 550 res@tiXAxisFontHeightF = font_size 551 res@txFontHeightF = font_size 552 res@tiYAxisFontHeightF = font_size 477 553 478 554 if (vNam(varn) .EQ. "E") … … 1105 1181 if (min(data(varn,:)) .EQ. max(data(varn,:))) then 1106 1182 if (min(data(varn,:)) .EQ. 0)then 1107 res@trYMaxF = min(data(varn,:))- 1.1108 res@trYMinF = max(data(varn,:))+ 1.1183 res@trYMaxF = min(data(varn,:))-0.1 1184 res@trYMinF = max(data(varn,:))+0.1 1109 1185 end if 1110 1186 if (min(data(varn,:)) .LT. 0)then … … 1128 1204 res@gsnLeftString = vNam(varn) 1129 1205 res@gsnRightString = unit(varn) 1130 res@tiXAxisString = " time [s] " 1131 res@tiYAxisString = " " 1132 res@tiXAxisFontHeightF = 0.07 1133 res@txFontHeightF = 0.07 1134 res@tiYAxisFontHeightF = 0.07 1206 if (norm_t .NE. 1.)then 1207 res@tiXAxisString = "t ["+unit_t+"]" 1208 else 1209 res@tiXAxisString = "t [s]" 1210 end if 1211 res@tiYAxisString = " " 1212 res@tiXAxisFontHeightF = font_size 1213 res@txFontHeightF = font_size 1214 res@tiYAxisFontHeightF = font_size 1215 res@tmXBLabelFontHeightF = font_size 1216 res@tmYLLabelFontHeightF = font_size 1135 1217 res@trYMaxF = min(data(varn,:)) 1136 1218 res@trYMinF = max(data(varn,:)) 1137 1219 if (min(data(varn,:)) .EQ. max(data(varn,:))) then 1138 1220 if (min(data(varn,:)) .EQ. 0)then 1139 res@trYMaxF = min(data(varn,:))- 1.1140 res@trYMinF = max(data(varn,:))+ 1.1221 res@trYMaxF = min(data(varn,:))-0.1 1222 res@trYMinF = max(data(varn,:))+0.1 1141 1223 end if 1142 1224 if (min(data(varn,:)) .LT. 0)then … … 1162 1244 gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP) 1163 1245 else 1164 do np = 1,n,no_ lines*no_columns1165 if ( np + no_ lines*no_columns .gt. n) then1166 gsn_panel(wks_ps, plot_ps(np:n),(/no_ lines,no_columns/),resP)1246 do np = 1,n,no_rows*no_columns 1247 if ( np + no_rows*no_columns .gt. n) then 1248 gsn_panel(wks_ps, plot_ps(np:n),(/no_rows,no_columns/),resP) 1167 1249 else 1168 gsn_panel(wks_ps, plot_ps(np:np+no_ lines*no_columns-1),(/no_lines,no_columns/),resP)1250 gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 1169 1251 end if 1170 1252 end do
Note: See TracChangeset
for help on using the changeset viewer.