Changeset 357
 Timestamp:
 Jul 24, 2009 2:30:53 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r329 r357 529 529 delta_z = 1.d 530 530 end if 531 end if 532 if (vNam(varn) .eq. "zu1_xy") then 533 zu1 = f_att>$vNam(varn)$ 531 534 end if 532 535 end do … … 1275 1278 no_var=0 1276 1279 n=0 1280 no_zu1=0 1277 1281 1278 1282 do varn=dim1,0,1 … … 1289 1293 end if 1290 1294 1295 if (var .NE. "all") then 1296 check = isStrSubset( var,","+vNam(varn)+"," ) 1297 end if 1298 1291 1299 if(check) then 1292 1300 … … 1306 1314 data_att = f_att>$vNam(varn)$ 1307 1315 if(vNam(varn) .eq. "ts_xy" .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy") 1308 ;these variables depend vonzu1_xy and that's why they have only one zlayer1316 ;these variables depend zu1_xy and that's why they have only one zlayer 1309 1317 data(varn,:,0,:,:)=temp(:,0,ys:ye,xs:xe) 1318 no_zu1=no_zu1+1 1310 1319 else 1311 1320 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) … … 1317 1326 data_att = f_att>$vNam(varn)$ 1318 1327 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 1328 delete(temp) 1319 1329 end if 1320 1330 if ( yzc .eq. 1) then … … 1322 1332 data_att = f_att>$vNam(varn)$ 1323 1333 data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 1334 delete(temp) 1324 1335 end if 1325 1336 if (check_vec1) then … … 1345 1356 1346 1357 end do 1358 1359 if (no_var .EQ. 0) then 1360 print(" ") 1361 print("The variables var='"+var+"' do not exist on your input file;") 1362 print("be sure to have one comma before and after each variable") 1363 print(" ") 1364 exit 1365 end if 1347 1366 1348 1367 var_input=new(no_var,string) … … 1363 1382 end if 1364 1383 1384 if (var .NE. "all") then 1385 check = isStrSubset( var,","+vNam(varn)+"," ) 1386 end if 1387 1365 1388 if(check) then 1366 1389 var_input(numb)=vNam(varn) 1367 1390 numb=numb+1 1368 1391 end if 1369 1370 if (var .NE. "all") then1371 check = isStrSubset( var,","+vNam(varn)+"," )1372 end if1373 1392 1374 1393 if (check) then … … 1381 1400 print(" ") 1382 1401 print("The variables var='"+var+"' do not exist on your input file;") 1383 print("be sure to have one comma be rfore and after each variable")1402 print("be sure to have one comma before and after each variable") 1384 1403 print(" ") 1385 1404 exit … … 1391 1410 print("Component 1 for the vectorplot ('vec1') must be one of the varibles on the input file:") 1392 1411 print(" "+var_input) 1393 print("be sure to have one comma be rfore and after the variable")1412 print("be sure to have one comma before and after the variable") 1394 1413 print(" ") 1395 1414 exit … … 1400 1419 print("Component 2 for the vectorplot ('vec2') must be one of the varibles on the input file:") 1401 1420 print(" "+var_input) 1402 print("be sure to have one comma be rfore and after the variable")1421 print("be sure to have one comma before and after the variable") 1403 1422 print(" ") 1404 1423 exit … … 1414 1433 1415 1434 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 1416 plot=new((/no_time*no_layer*no_var+no_time*no_layer/),graphic) 1435 plot=new((/no_time*no_layer*no_var  no_time*(no_layer1)*no_zu1 \ 1436 + no_time*no_layer/),graphic) 1417 1437 else 1418 plot=new((/no_time*no_layer*no_var/),graphic) 1419 end if 1438 plot=new((/no_time*no_layer*no_var  no_time*(no_layer1)*no_zu1/),graphic) 1439 end if 1440 dim_plot=dimsizes(plot) 1420 1441 1421 1442 page = 0 … … 1428 1449 ; create plots 1429 1450 ; *************************************************** 1451 1430 1452 1431 1453 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then … … 1548 1570 level = "=" + z_d(zs+lo) + "m" 1549 1571 end if 1550 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1572 1573 if(vNam(varn) .eq. "ts_xy" .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy")then 1574 loe = 0 1575 level = "=" + zu1(0) + "m" 1576 end if 1577 1578 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1551 1579 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,lo,:,:),cs_res) 1552 1580 if (vector .EQ. 1 .AND. check_vecp) then … … 1575 1603 level = "=" + z_d(zs+li) + "m" 1576 1604 end if 1577 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h z"+ level 1605 1606 if(vNam(varn) .eq. "ts_xy" .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy")then 1607 lie = 0 1608 level = "=" + zu1(0) + "m" 1609 end if 1610 1611 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h z"+ level 1612 1578 1613 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,li,:,:),cs_res) 1579 1614 if (vector .EQ. 1 .AND. check_vecp) then … … 1710 1745 ; *************************************************** 1711 1746 ; merge plots onto one page 1712 ; *************************************************** 1713 1747 ; *************************************************** 1714 1748 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec")then 1715 1749 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then … … 1719 1753 print(" ") 1720 1754 else 1721 do np = 0, no_layer*no_time*(no_var+1)1,no_rows*no_columns1722 if ( np + no_rows*no_columns .gt. (no_layer*no_time*(no_var+1))1) then1723 gsn_panel(wks_ps, plot(np: (no_layer*no_time*(no_var+1))1),(/no_rows,no_columns/),cs_resP)1755 do np = 0,dim_plot1,no_rows*no_columns 1756 if ( np + no_rows*no_columns .gt. dim_plot1) then 1757 gsn_panel(wks_ps, plot(np:dim_plot1),(/no_rows,no_columns/),cs_resP) 1724 1758 else 1725 1759 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns1),(/no_rows,no_columns/),cs_resP) … … 1729 1763 else 1730 1764 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 1731 gsn_panel(wks_ps,plot(0: (no_time*no_layer*no_var)1),(/no_var,no_layer*no_time/),cs_resP)1765 gsn_panel(wks_ps,plot(0:dim_plot1),(/dim_plot,1/),cs_resP) 1732 1766 print(" ") 1733 1767 print("Outputs to .eps or .epsi have only one frame") 1734 1768 print(" ") 1735 1769 else 1736 do np = 0, no_layer*no_time*no_var1,no_rows*no_columns1737 if ( np + no_rows*no_columns .gt. (no_layer*no_time*no_var)1) then1738 gsn_panel(wks_ps, plot(np: (no_layer*no_time*no_var)1),(/no_rows,no_columns/),cs_resP)1770 do np = 0,dim_plot1,no_rows*no_columns 1771 if ( np + no_rows*no_columns .gt. dim_plot1) then 1772 gsn_panel(wks_ps, plot(np:dim_plot1),(/no_rows,no_columns/),cs_resP) 1739 1773 else 1740 1774 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns1),(/no_rows,no_columns/),cs_resP)
Note: See TracChangeset
for help on using the changeset viewer.