Changeset 358 for palm/trunk/SCRIPTS/NCL/cross_sections.ncl
 Timestamp:
 Jul 29, 2009 1:49:07 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r357 r358 702 702 print("You cannot choose a start value for z, there are preseted layers for z") 703 703 print(" ") 704 zs = 0 704 705 else 705 706 if (zs .LT. 0) then … … 1264 1265 lis = start_time_step 1265 1266 lie = end_time_step 1266 los = 01267 loe = laye lays1267 los = lays 1268 loe = laye 1268 1269 else 1269 lis = 01270 lie = laye lays1270 lis = lays 1271 lie = laye 1271 1272 los = start_time_step 1272 1273 loe = end_time_step … … 1456 1457 if (xyc .EQ. 1)then 1457 1458 if (sort .EQ. "time")then 1458 level = "z=" + z_d(lo) + "m" 1459 if(z_d(lo) .eq. 1.d) then 1460 level = "zaverage" 1461 else 1462 level = "z=" + z_d(lo) + "m" 1463 end if 1459 1464 else 1460 level = "z=" + z_d(li) + "m" 1465 if(z_d(li) .eq. 1.d) then 1466 level = "zaverage" 1467 else 1468 level = "z=" + z_d(li) + "m" 1469 end if 1461 1470 end if 1462 1471 end if 1463 1472 if (xzc .EQ. 1)then 1464 1473 if (sort .EQ. "time")then 1465 level = "y=" + y_d(lo) + "m" 1474 if(y_d(lo) .eq. 1.d) then 1475 level = "yaverage" 1476 else 1477 level = "y=" + y_d(lo) + "m" 1478 end if 1466 1479 else 1467 level = "y=" + y_d(li) + "m" 1480 if(y_d(li) .eq. 1.d) then 1481 level = "yaverage" 1482 else 1483 level = "y=" + y_d(li) + "m" 1484 end if 1468 1485 end if 1469 1486 end if 1470 1487 if (yzc .EQ. 1)then 1471 1488 if (sort .EQ. "time")then 1472 level = "x=" + x_d(lo) + "m" 1489 if(x_d(lo) .eq. 1.d) then 1490 level = "xaverage" 1491 else 1492 level = "x=" + x_d(lo) + "m" 1493 end if 1473 1494 else 1474 level = "x=" + x_d(li) + "m" 1495 if(x_d(li) .eq. 1.d) then 1496 level = "xaverage" 1497 else 1498 level = "x=" + x_d(li) + "m" 1499 end if 1475 1500 end if 1476 1501 end if … … 1494 1519 if (xyc .EQ. 1)then 1495 1520 if (sort .EQ. "time")then 1496 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo ,:,:),vect2(li,lo,:,:),vecres)1521 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lolos,:,:),vect2(li,lolos,:,:),vecres) 1497 1522 else 1498 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,li ,:,:),vect2(lo,li,:,:),vecres)1523 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,lilis,:,:),vect2(lo,lilis,:,:),vecres) 1499 1524 end if 1500 1525 end if 1501 1526 if (xzc .EQ. 1) then 1502 1527 if (sort .EQ. "time")then 1503 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo ,:),vect2(li,:,lo,:),vecres)1528 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lolos,:),vect2(li,:,lolos,:),vecres) 1504 1529 else 1505 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,li ,:),vect2(lo,:,li,:),vecres)1530 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,lilis,:),vect2(lo,:,lilis,:),vecres) 1506 1531 end if 1507 1532 end if 1508 1533 if (yzc .EQ. 1) then 1509 1534 if (sort .EQ. "time")then 1510 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo ),vect2(li,:,:,lo),vecres)1535 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lolos),vect2(li,:,:,lolos),vecres) 1511 1536 else 1512 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,li ),vect2(lo,:,:,li),vecres)1537 plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,lilis),vect2(lo,:,:,lilis),vecres) 1513 1538 end if 1514 1539 end if … … 1523 1548 check_vecp = isStrSubset( plotvec,","+vNam(varn)+",") 1524 1549 end if 1525 1550 1526 1551 if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or. vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi" .or. vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or. vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or. vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or. vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "ind_x_yz") then 1527 1552 check = False … … 1561 1586 1562 1587 if ( sort .eq. "time" ) then 1563 if ( z_d( zs+lo) .eq. 1)then1588 if ( z_d(lo) .eq. 1)then 1564 1589 if (delta_z .EQ. 1) then 1565 1590 level = "average" 1566 1591 else 1567 level = "=" + z_d( zs+lo) + "m"1592 level = "=" + z_d(lo) + "m" 1568 1593 end if 1569 1594 else 1570 level = "=" + z_d( zs+lo) + "m"1595 level = "=" + z_d(lo) + "m" 1571 1596 end if 1572 1597 … … 1577 1602 1578 1603 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) +"h z"+level 1579 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,lo ,:,:),cs_res)1604 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,lolos,:,:),cs_res) 1580 1605 if (vector .EQ. 1 .AND. check_vecp) then 1581 1606 vecres = True ; vector only resources … … 1588 1613 vecres@gsnLeftString = " " 1589 1614 vecres@tiXAxisString = " " 1590 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lo ,:,:),vect2(li,lo,:,:),vecres)1615 plot_vec=gsn_csm_vector(wks_ps,vect1(li,lolos,:,:),vect2(li,lolos,:,:),vecres) 1591 1616 overlay(plot(n), plot_vec) 1592 1617 end if … … 1598 1623 level = "average" 1599 1624 else 1600 level = "=" + z_d( zs+li) + "m"1625 level = "=" + z_d(li) + "m" 1601 1626 end if 1602 1627 else 1603 level = "=" + z_d( zs+li) + "m"1628 level = "=" + z_d(li) + "m" 1604 1629 end if 1605 1630 … … 1611 1636 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h z"+ level 1612 1637 1613 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,li ,:,:),cs_res)1638 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,lilis,:,:),cs_res) 1614 1639 if (vector .EQ. 1 .AND. check_vecp) then 1615 1640 vecres = True ; vector only resources … … 1637 1662 1638 1663 if ( sort .eq. "time" ) then 1639 if ( y_d( ys+lo) .eq. 1 ) then1664 if ( y_d(lo) .eq. 1 ) then 1640 1665 level = "average" 1641 1666 else 1642 level = "=" + y_d( ys+lo) + "m"1667 level = "=" + y_d(lo) + "m" 1643 1668 end if 1644 1669 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h y"+ level 1645 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,lo ,:),cs_res)1670 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,lolos,:),cs_res) 1646 1671 if (vector .EQ. 1 .AND. check_vecp) then 1647 1672 vecres = True ; vector only resources … … 1654 1679 vecres@gsnLeftString = " " ; turn off left string 1655 1680 vecres@tiXAxisString = " " 1656 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lo ,:),vect2(li,:,lo,:),vecres)1681 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lolos,:),vect2(li,:,lolos,:),vecres) 1657 1682 overlay(plot(n), plot_vec) 1658 1683 end if … … 1660 1685 1661 1686 if ( sort .eq. "layer" ) then 1662 if ( y_d( ys+li) .eq. 1 ) then1687 if ( y_d(li) .eq. 1 ) then 1663 1688 level = "average" 1664 1689 else 1665 level = "=" + y_d( ys+li) + "m"1690 level = "=" + y_d(li) + "m" 1666 1691 end if 1667 1692 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h y"+ level 1668 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,li ,:),cs_res)1693 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,lilis,:),cs_res) 1669 1694 if (vector .EQ. 1 .AND. check_vecp) then 1670 1695 vecres = True ; vector only resources … … 1677 1702 vecres@gsnLeftString = " " ; turn off left string 1678 1703 vecres@tiXAxisString = " " 1679 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,li ,:),vect2(lo,:,li,:),vecres)1704 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,lilis,:),vect2(lo,:,lilis,:),vecres) 1680 1705 overlay(plot(n), plot_vec) 1681 1706 end if … … 1695 1720 level = "average" 1696 1721 else 1697 level = "=" + x_d( xs+lo) + "m"1722 level = "=" + x_d(lo) + "m" 1698 1723 end if 1699 1724 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(li)/3600,2,True) + "h x"+ level 1700 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,:,lo ),cs_res)1725 plot(n) = gsn_csm_contour(wks_ps,data(varn,li,:,:,lolos),cs_res) 1701 1726 if (vector .EQ. 1 .AND. check_vecp) then 1702 1727 vecres = True ; vector only resources … … 1709 1734 vecres@gsnLeftString = " " ; turn off left string 1710 1735 vecres@tiXAxisString = " " 1711 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lo ),vect2(li,:,:,lo),vecres)1736 plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lolos),vect2(li,:,:,lolos),vecres) 1712 1737 overlay(plot(n), plot_vec) 1713 1738 end if … … 1718 1743 level = "average" 1719 1744 else 1720 level = "=" + x_d( xs+li) + "m"1745 level = "=" + x_d(li) + "m" 1721 1746 end if 1722 1747 cs_res@gsnCenterString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) + "h x"+ level 1723 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,:,li ),cs_res)1748 plot(n) = gsn_csm_contour(wks_ps,data(varn,lo,:,:,lilis),cs_res) 1724 1749 if (vector .EQ. 1 .AND. check_vecp)then 1725 1750 vecres = True ; vector only resources … … 1732 1757 vecres@gsnLeftString = " " ; turn off left string 1733 1758 vecres@tiXAxisString = " " 1734 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,li ),vect2(lo,:,:,li),vecres)1759 plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,lilis),vect2(lo,:,:,lilis),vecres) 1735 1760 overlay(plot(n), plot_vec) 1736 1761 end if
Note: See TracChangeset
for help on using the changeset viewer.