Changeset 769
- Timestamp:
- Oct 26, 2011 2:20:45 PM (13 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r758 r769 454 454 st=i 455 455 break 456 else 457 st=0 456 458 end if 457 459 end do 458 459 if (.not. isvar("st"))then 460 print(" ") 461 print("'start_time_step' = "+ start_time_step +"h is invalid") 462 print(" ") 463 print("Select another 'start_time_step'") 464 print(" ") 465 exit 466 end if 460 467 461 468 462 ; **************************************************** … … 506 500 et=i 507 501 break 502 else 503 et=0 508 504 end if 509 505 end do 510 511 if (.not. isvar("et"))then512 print(" ")513 print("'end_time_step' = "+ end_time_step +"h is invalid")514 print(" ")515 print("Select another 'end_time_step'")516 print(" ")517 exit518 end if519 506 520 507 delete(start_time_step) … … 1421 1408 n = 0 1422 1409 no_zu1 = 0 1410 no_topo= 0 1423 1411 1424 1412 ;**************************************************** … … 1461 1449 if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. \ 1462 1450 vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. \ 1463 vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. \1464 1451 vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. \ 1465 1452 vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. \ … … 1485 1472 if (xyc .EQ. 1) then 1486 1473 temp = f[:]->$vNam(varn)$ 1487 data_att = f_att->$vNam(varn)$ 1474 if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi") 1475 dummy=0 1476 else 1477 data_att = f_att->$vNam(varn)$ 1478 end if 1488 1479 if(vNam(varn) .eq. "lwps_xy" .or. vNam(varn) .eq. "pras_xy" \ 1489 1480 .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \ … … 1499 1490 no_zu1=no_zu1+1 1500 1491 else 1501 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 1492 if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi") 1493 ;these variables depend on x and y 1494 data(varn,0,0,:,:)=doubletofloat(temp(ys:ye,xs:xe)) 1495 no_topo=no_topo+1 1496 else 1497 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 1498 end if 1502 1499 end if 1503 1500 delete(temp) … … 1527 1524 0:(ze-zs),0:(ye-ys),0:(xe-xs))) 1528 1525 1529 unit(varn) = data_att@units 1530 delete(data_att) 1526 if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi") 1527 unit(varn) = "meters" 1528 else 1529 unit(varn) = data_att@units 1530 delete(data_att) 1531 end if 1531 1532 1532 1533 end if … … 1550 1551 if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. \ 1551 1552 vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. \ 1552 vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. \1553 1553 vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. \ 1554 1554 vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. \ … … 1627 1627 plot=new((/no_time*no_layer/),graphic) 1628 1628 else 1629 plot=new((/no_time*no_layer* no_var - no_time*(no_layer-1)*no_zu1/)\1630 1629 plot=new((/no_time*no_layer*(no_var-no_topo) + no_topo - \ 1630 no_time*(no_layer-1)*no_zu1/),graphic) 1631 1631 end if 1632 1632 dim_plot=dimsizes(plot) … … 1756 1756 if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. \ 1757 1757 vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. \ 1758 vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. \1759 1758 vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. \ 1760 1759 vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. \ … … 1829 1828 loe = 0 1830 1829 level = "=" + zu1(0) + "m" 1830 else 1831 loe = laye 1832 end if 1833 1834 if(vNam(varn) .eq. "zwwi" .or. \ 1835 vNam(varn) .eq. "zusi") then 1836 loe = 0 1837 los = 0 1838 lie = 0 1839 lis = 0 1840 level = "" 1841 else 1842 lis = start_time_step 1843 lie = end_time_step 1844 los = lays 1845 loe = laye 1831 1846 end if 1832 1847 1833 cs_res@gsnCenterString = "t=" + \ 1834 decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1848 if(vNam(varn) .eq. "zwwi" .or. \ 1849 vNam(varn) .eq. "zusi") then 1850 cs_res@gsnCenterString = "" 1851 else 1852 cs_res@gsnCenterString = "t=" + \ 1853 decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1854 end if 1835 1855 1836 1856 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then … … 1894 1914 lie = 0 1895 1915 level = "=" + zu1(0) + "m" 1916 else 1917 lie = laye 1896 1918 end if 1897 1898 cs_res@gsnCenterString = "t=" + \ 1899 decimalPlaces(t_all(lo)/3600,2,True) + "h z"+ level 1919 1920 if(vNam(varn) .eq. "zwwi" .or. \ 1921 vNam(varn) .eq. "zusi") then 1922 lie = 0 1923 lis = 0 1924 loe = 0 1925 los = 0 1926 level = "" 1927 else 1928 lis = lays 1929 lie = laye 1930 los = start_time_step 1931 loe = end_time_step 1932 end if 1933 1934 if(vNam(varn) .eq. "zwwi" .or. \ 1935 vNam(varn) .eq. "zusi") then 1936 cs_res@gsnCenterString = "" 1937 else 1938 cs_res@gsnCenterString = "t=" + \ 1939 decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1940 end if 1900 1941 1901 1942 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r731 r769 1048 1048 st=i 1049 1049 break 1050 else 1051 st=0 1050 1052 end if 1051 1053 end do 1052 if (.not. isvar("st"))then1053 print(" ")1054 print("'start_time_step' = "+ start_time_step +"h is invalid")1055 print(" ")1056 print("Select another 'start_time_step'")1057 print(" ")1058 exit1059 end if1060 1054 1061 1055 ; **************************************************** … … 1092 1086 et=i 1093 1087 break 1088 else 1089 et=0 1094 1090 end if 1095 1091 end do 1096 if (.not. isvar("et"))then 1097 print(" ") 1098 print("'end_time_step' = "+ end_time_step +"h is invalid") 1099 print(" ") 1100 print("Select another 'end_time_step'") 1101 print(" ") 1102 exit 1103 end if 1104 1092 1105 1093 delete(start_time_step) 1106 1094 start_time_step=round(st,3) … … 1121 1109 end if 1122 1110 1123 if (time_stride .G E. no_time) then1124 print(" ") 1125 print("'time_stride' is greater equalthan number of available "+\1111 if (time_stride .GT. no_time) then 1112 print(" ") 1113 print("'time_stride' is greater than number of available "+\ 1126 1114 "time steps,") 1127 1115 print("=> 'time_stride' is set to 1") … … 2008 1996 end if 2009 1997 2010 if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then 2011 min_value = abs(0.001*min(data(varn,:,min_z_int:max_z_int))) 2012 max_value = abs(0.001*max(data(varn,:,min_z_int:max_z_int))) 2013 else 2014 if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ 2015 abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then 2016 min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2017 max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2018 else 2019 if (abs(max(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND.\ 2020 abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then 2021 min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2022 max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2023 else 2024 min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2025 max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2026 end if 2027 end if 2028 end if 1998 1999 ;data can contain missing values in case of output of t=0h (inital profiles) 2000 ;where no output is possible 2001 n_not_ismissing = num(.not.ismissing(data(varn,:,:))) 2002 2003 if (n_not_ismissing .GT. 0 ) then 2004 2005 if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then 2006 min_value = abs(0.001*min(data(varn,:,min_z_int:max_z_int))) 2007 max_value = abs(0.001*max(data(varn,:,min_z_int:max_z_int))) 2008 else 2009 if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \ 2010 abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then 2011 min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2012 max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2013 else 2014 if (abs(max(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND.\ 2015 abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then 2016 min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2017 max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2018 else 2019 min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int))) 2020 max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int))) 2021 end if 2022 end if 2023 end if 2029 2024 2030 if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND. \ 2031 max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then 2032 min_value = 0.1 2033 max_value = 0.1 2034 end if 2025 if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND. \ 2026 max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then 2027 min_value = 0.1 2028 max_value = 0.1 2029 end if 2030 2031 else 2032 print(" ") 2033 print(vNam(varn) + " contains only missing values") 2034 print(" ") 2035 end if 2035 2036 2036 2037 if (over .EQ. 0) then -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r585 r769 323 323 st=i 324 324 break 325 else 326 st=0 325 327 end if 326 328 end do 327 328 if (.not. isvar("st"))then329 print(" ")330 print("'start_time_step' = "+ start_time_step +"h is invalid")331 print(" ")332 print("Select another 'start_time_step'")333 print(" ")334 exit335 end if336 329 337 330 ;**************************************************** … … 367 360 et=i 368 361 break 362 else 363 et=0 369 364 end if 370 365 end do 371 372 if (.not. isvar("et"))then373 print(" ")374 print("'end_time_step' = "+ end_time_step +"h is invalid")375 print(" ")376 print("Select another 'end_time_step'")377 print(" ")378 exit379 end if380 366 381 367 delete(start_time_step) -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r758 r769 195 195 delta_t = t_all(nt-1)/nt 196 196 197 if (nt .LE. 1) then 198 print(" ") 199 print("Input file contains only one time step -> " +\ 200 "plot of timeseries is not possible ") 201 print(" ") 202 exit 203 end if 204 197 205 ;**************************************************** 198 206 ; start of time step and different types of mistakes that could be done … … 228 236 st=i 229 237 break 238 else 239 st=0 230 240 end if 231 241 end do … … 233 243 start_time_step .LT. t_all(nt-1)) then 234 244 st=nt-2 235 end if 236 if (.not. isvar("st"))then 237 print(" ") 238 print("'start_time_step' = "+ start_time_step +"h is invalid") 239 print(" ") 240 print("Select another 'start_time_step'") 241 print(" ") 242 exit 245 else 246 st=0 243 247 end if 244 248 … … 286 290 et=i 287 291 break 292 else 293 et=0 288 294 end if 289 295 end do 290 291 if (.not. isvar("et"))then292 print(" ")293 print("'end_time_step' = "+ end_time_step +"h is invalid")294 print(" ")295 print("Select another 'end_time_step'")296 print(" ")297 exit298 end if299 296 300 297 delete(start_time_step)
Note: See TracChangeset
for help on using the changeset viewer.