Changeset 324 for palm/trunk
- Timestamp:
- May 19, 2009 2:25:12 PM (16 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/profiles.ncl
r267 r324 324 324 files(0)=file_in(nof)+".nc" 325 325 do i=1,end_f(nof) 326 if (isfilepresent(file_in(nof)+"."+i+".nc"))then327 files(i)=file_in(nof)+"."+i+".nc"328 else329 print(" ")330 print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist")331 print(" ")332 exit333 end if334 end do326 if (isfilepresent(file_in(nof)+"."+i+".nc"))then 327 files(i)=file_in(nof)+"."+i+".nc" 328 else 329 print(" ") 330 print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") 331 print(" ") 332 exit 333 end if 334 end do 335 335 else 336 336 print(" ") … … 805 805 end if 806 806 807 delta_t=t_all(nt-1)/nt 807 if (nt .EQ. 1)then 808 delta_t=t_all(nt-1)/nt 809 else 810 delta_t=(t_all(nt-1)-t_all(0))/(nt-1) 811 end if 808 812 809 813 ; **************************************************** … … 872 876 do i=0,nt-1 873 877 if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then 878 print((t_all(i)-delta_t/2)/3600) 879 print((t_all(i)+delta_t/2)/3600) 874 880 et=i 875 881 break … … 883 889 print(" ") 884 890 exit 885 end if 891 end if 886 892 887 893 delete(start_time_step) … … 889 895 delete(end_time_step) 890 896 end_time_step=round(et,3) 897 898 print(start_time_step) 899 print(end_time_step) 891 900 892 901 print(" ") … … 1459 1468 exit 1460 1469 end if 1470 if (abs(min(data(varn,:,:))) .GT. 10)then 1471 min_value = abs(0.01*min(data(varn,:,:))) 1472 max_value = abs(0.01*max(data(varn,:,:))) 1473 else 1474 if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. abs(max(data(varn,:,:))) .GT. 0.01)then 1475 min_value = abs(0.1*max(data(varn,:,:))) 1476 max_value = abs(0.1*max(data(varn,:,:))) 1477 else 1478 if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. abs(min(data(varn,:,:))) .GT. 0.01)then 1479 min_value = abs(0.1*min(data(varn,:,:))) 1480 max_value = abs(0.1*min(data(varn,:,:))) 1481 else 1482 min_value = abs(0.1*min(data(varn,:,:))) 1483 max_value = abs(0.1*max(data(varn,:,:))) 1484 end if 1485 end if 1486 end if 1487 if (min(data(varn,:,:)) .EQ. 0 .AND. max(data(varn,:,:)) .EQ. 0)then 1488 min_value = 0.1 1489 max_value = 0.1 1490 end if 1461 1491 mini(n_o)=min(data(varn,:,:)) 1462 1492 maxi(n_o)=max(data(varn,:,:)) … … 1520 1550 z = f_att->$vNam(varn+1)$ 1521 1551 unit(varn) = temp_att@units 1522 data(varn,:,:) = temp(start_time_step:end_time_step,:) 1552 data(varn,:,:) = temp(start_time_step:end_time_step,:) 1523 1553 end if 1524 1554 else … … 1550 1580 z=z/norm_z 1551 1581 end if 1582 1583 if (abs(min(data(varn,:,:))) .GT. 10)then 1584 min_value = abs(0.01*min(data(varn,:,:))) 1585 max_value = abs(0.01*max(data(varn,:,:))) 1586 else 1587 if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. abs(max(data(varn,:,:))) .GT. 0.01)then 1588 min_value = abs(0.1*max(data(varn,:,:))) 1589 max_value = abs(0.1*max(data(varn,:,:))) 1590 else 1591 if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. abs(min(data(varn,:,:))) .GT. 0.01)then 1592 min_value = abs(0.1*min(data(varn,:,:))) 1593 max_value = abs(0.1*min(data(varn,:,:))) 1594 else 1595 min_value = abs(0.1*min(data(varn,:,:))) 1596 max_value = abs(0.1*max(data(varn,:,:))) 1597 end if 1598 end if 1599 end if 1600 if (min(data(varn,:,:)) .EQ. 0 .AND. max(data(varn,:,:)) .EQ. 0)then 1601 min_value = 0.1 1602 max_value = 0.1 1603 end if 1552 1604 1553 1605 if (over .EQ. 0) then … … 1558 1610 res@trYMaxF = max_z 1559 1611 if (xs .EQ. -1) then 1560 res@trXMinF = min(data(varn,:,:)) 1612 res@trXMinF = min(data(varn,:,:))-min_value 1561 1613 else 1562 1614 res@trXMinF = xs 1563 1615 end if 1564 1616 if (xe .EQ. -1) then 1565 res@trXMaxF = max(data(varn,:,:)) 1617 res@trXMaxF = max(data(varn,:,:))+max_value 1566 1618 else 1567 1619 res@trXMaxF = xe … … 1571 1623 1572 1624 if (vNam(varn) .EQ. "u") then 1573 miniu=min(data(varn,:,:)) 1574 maxiu=max(data(varn,:,:)) 1625 miniu=min(data(varn,:,:))-min_value 1626 maxiu=max(data(varn,:,:))+max_value 1575 1627 if (over .EQ. 1) then 1576 1628 res@xyDashPattern = 0 … … 1580 1632 res@tiXAxisString = "["+unit(varn)+"]" 1581 1633 res@gsnRightString = " " 1582 if (xs .EQ. -1) then 1634 if (xs .EQ. -1) then 1583 1635 res@trXMinF = miniu 1584 1636 else … … 1594 1646 end if 1595 1647 if (vNam(varn) .EQ. "v") then 1596 miniv=min(data(varn,:,:)) 1597 maxiv=max(data(varn,:,:)) 1648 miniv=min(data(varn,:,:))-min_value 1649 maxiv=max(data(varn,:,:))+max_value 1598 1650 if (over .EQ. 1) then 1599 1651 res@xyMonoDashPattern = True … … 1604 1656 res@tiXAxisString = "["+unit(varn)+"]" 1605 1657 res@gsnRightString = " " 1606 if (xs .EQ. -1) then 1658 if (xs .EQ. -1) then 1607 1659 res@trXMinF = miniv 1608 1660 else … … 1610 1662 end if 1611 1663 if (xe .EQ. -1) then 1612 res@trXMaxF = maxiv 1664 res@trXMaxF = maxiv 1613 1665 else 1614 1666 res@trXMaxF = xe … … 1618 1670 end if 1619 1671 if (vNam(varn) .EQ. "w") then 1620 miniw=min(data(varn,:,:)) 1621 maxiw=max(data(varn,:,:)) 1672 miniw=min(data(varn,:,:))-min_value 1673 maxiw=max(data(varn,:,:))+max_value 1622 1674 if (over .EQ. 1) then 1623 1675 res@xyDashPattern = 2 … … 1633 1685 end if 1634 1686 if (xe .EQ. -1) then 1635 res@trXMaxF = maxiw 1687 res@trXMaxF = maxiw 1636 1688 else 1637 1689 res@trXMaxF = xe … … 1642 1694 1643 1695 if (vNam(varn) .EQ. "pt") then 1644 minipt=min(data(varn,:,:)) 1645 maxipt=max(data(varn,:,:)) 1696 minipt=min(data(varn,:,:))-min_value 1697 maxipt=max(data(varn,:,:))+max_value 1646 1698 if (over .EQ. 1) then 1647 1699 res@xyDashPattern = 0 … … 1656 1708 res@trXMinF = xs 1657 1709 end if 1658 if (xe .EQ. -1) then 1710 if (xe .EQ. -1) then 1659 1711 res@trXMaxF = maxipt 1660 1712 else … … 1665 1717 end if 1666 1718 if (vNam(varn) .EQ. "vpt") then 1667 minivpt=min(data(varn,:,:)) 1668 maxivpt=max(data(varn,:,:)) 1719 minivpt=min(data(varn,:,:))-min_value 1720 maxivpt=max(data(varn,:,:))+max_value 1669 1721 if (over .EQ. 1) then 1670 1722 res@xyDashPattern = 1 … … 1675 1727 res@gsnRightString = " " 1676 1728 if (xs .EQ. -1) then 1677 res@trXMinF = minivpt 1678 else 1679 res@trXMinF = xs 1680 end if 1681 if (xe .EQ. -1) then 1729 res@trXMinF = minivpt 1730 else 1731 res@trXMinF = xs 1732 end if 1733 if (xe .EQ. -1) then 1682 1734 res@trXMaxF = maxivpt 1683 1735 else … … 1688 1740 end if 1689 1741 if (vNam(varn) .EQ. "lpt") then 1690 minilpt=min(data(varn,:,:)) 1691 maxilpt=max(data(varn,:,:)) 1742 minilpt=min(data(varn,:,:))-min_value 1743 maxilpt=max(data(varn,:,:))+max_value 1692 1744 if (over .EQ. 1) then 1693 1745 res@xyDashPattern = 2 … … 1703 1755 end if 1704 1756 if (xe .EQ. -1) then 1705 res@trXMaxF = maxilpt 1757 res@trXMaxF = maxilpt 1706 1758 else 1707 1759 res@trXMaxF = xe … … 1712 1764 1713 1765 if (vNam(varn) .EQ. "q") then 1714 miniq=min(data(varn,:,:)) 1715 maxiq=max(data(varn,:,:)) 1766 miniq=min(data(varn,:,:))-min_value 1767 maxiq=max(data(varn,:,:))+max_value 1716 1768 if (over .EQ. 1) then 1717 1769 res@xyDashPattern = 0 … … 1727 1779 end if 1728 1780 if (xe .EQ. -1) then 1729 res@trXMaxF = maxilq 1781 res@trXMaxF = maxilq 1730 1782 else 1731 1783 res@trXMaxF = xe … … 1735 1787 end if 1736 1788 if (vNam(varn) .EQ. "qv") then 1737 miniqv=min(data(varn,:,:)) 1738 maxiqv=max(data(varn,:,:)) 1789 miniqv=min(data(varn,:,:))-min_value 1790 maxiqv=max(data(varn,:,:))+max_value 1739 1791 if (over .EQ. 1) then 1740 1792 res@xyDashPattern = 1 … … 1749 1801 res@trXMinF = xs 1750 1802 end if 1751 if (xe .EQ. -1) then 1803 if (xe .EQ. -1) then 1752 1804 res@trXMaxF = maxilqv 1753 1805 else … … 1758 1810 end if 1759 1811 if (vNam(varn) .EQ. "ql") then 1760 miniql=min(data(varn,:,:)) 1761 maxiql=max(data(varn,:,:)) 1812 miniql=min(data(varn,:,:))-min_value 1813 maxiql=max(data(varn,:,:))+max_value 1762 1814 if (over .EQ. 1) then 1763 1815 res@xyDashPattern = 2 … … 1772 1824 res@trXMinF = xs 1773 1825 end if 1774 if (xe .EQ. -1) then 1826 if (xe .EQ. -1) then 1775 1827 res@trXMaxF = maxiql 1776 1828 else … … 1782 1834 1783 1835 if (vNam(varn) .EQ. "e") then 1784 minie=min(data(varn,:,:)) 1785 maxie=max(data(varn,:,:)) 1836 minie=min(data(varn,:,:))-min_value 1837 maxie=max(data(varn,:,:))+max_value 1786 1838 if (over .EQ. 1) then 1787 1839 res@xyDashPattern = 0 … … 1796 1848 res@trXMinF = xs 1797 1849 end if 1798 if (xe .EQ. -1) then 1850 if (xe .EQ. -1) then 1799 1851 res@trXMaxF = maxie 1800 1852 else … … 1805 1857 end if 1806 1858 if (vNam(varn) .EQ. "es") then 1807 minies=min(data(varn,:,:)) 1808 maxies=max(data(varn,:,:)) 1859 minies=min(data(varn,:,:))-min_value 1860 maxies=max(data(varn,:,:))+max_value 1809 1861 if (over .EQ. 1) then 1810 1862 res@xyDashPattern = 1 … … 1814 1866 res@tiXAxisString = "["+unit(varn)+"]" 1815 1867 res@gsnRightString = " " 1816 if (xs .EQ. -1) then 1868 if (xs .EQ. -1) then 1817 1869 res@trXMinF = minies 1818 1870 else … … 1820 1872 end if 1821 1873 if (xe .EQ. -1) then 1822 res@trXMaxF = maxies 1874 res@trXMaxF = maxies 1823 1875 else 1824 1876 res@trXMaxF = xe … … 1829 1881 1830 1882 if (vNam(varn) .EQ. "km") then 1831 minikm=min(data(varn,:,:)) 1832 maxikm=max(data(varn,:,:)) 1883 minikm=min(data(varn,:,:))-min_value 1884 maxikm=max(data(varn,:,:))+max_value 1833 1885 if (over .EQ. 1) then 1834 1886 res@xyDashPattern = 0 … … 1838 1890 res@tiXAxisString = "["+unit(varn)+"]" 1839 1891 res@gsnRightString = " " 1840 if (xs .EQ. -1) then 1892 if (xs .EQ. -1) then 1841 1893 res@trXMinF = minikm 1842 1894 else 1843 1895 res@trXMinF = xs 1844 1896 end if 1845 if (xe .EQ. -1) then 1897 if (xe .EQ. -1) then 1846 1898 res@trXMaxF = maxikm 1847 1899 else … … 1852 1904 end if 1853 1905 if (vNam(varn) .EQ. "kh") then 1854 minikh=min(data(varn,:,:)) 1855 maxikh=max(data(varn,:,:)) 1906 minikh=min(data(varn,:,:))-min_value 1907 maxikh=max(data(varn,:,:))+max_value 1856 1908 if (over .EQ. 1) then 1857 1909 res@xyDashPattern = 1 … … 1866 1918 res@trXMinF = xs 1867 1919 end if 1868 if (xe .EQ. -1) then 1920 if (xe .EQ. -1) then 1869 1921 res@trXMaxF = maxikh 1870 1922 else … … 1876 1928 1877 1929 if (vNam(varn) .EQ. "wpup") then 1878 miniwpup=min(data(varn,:,:)) 1879 maxiwpup=max(data(varn,:,:)) 1930 miniwpup=min(data(varn,:,:))-min_value 1931 maxiwpup=max(data(varn,:,:))+max_value 1880 1932 if (over .EQ. 1) then 1881 1933 res@xyDashPattern = 0 … … 1890 1942 res@trXMinF = xs 1891 1943 end if 1892 if (xe .EQ. -1) then 1944 if (xe .EQ. -1) then 1893 1945 res@trXMaxF = maxiwpup 1894 1946 else … … 1899 1951 end if 1900 1952 if (vNam(varn) .EQ. "wsus") then 1901 miniwsus=min(data(varn,:,:)) 1902 maxiwsus=max(data(varn,:,:)) 1953 miniwsus=min(data(varn,:,:))-min_value 1954 maxiwsus=max(data(varn,:,:))+max_value 1903 1955 if (over .EQ. 1) then 1904 1956 res@xyDashPattern = 1 … … 1913 1965 res@trXMinF = xs 1914 1966 end if 1915 if (xe .EQ. -1) then 1967 if (xe .EQ. -1) then 1916 1968 res@trXMaxF = maxiwsus 1917 1969 else … … 1922 1974 end if 1923 1975 if (vNam(varn) .EQ. "wu") then 1924 miniwu=min(data(varn,:,:)) 1925 maxiwu=max(data(varn,:,:)) 1976 miniwu=min(data(varn,:,:))-min_value 1977 maxiwu=max(data(varn,:,:))+max_value 1926 1978 if (over .EQ. 1) then 1927 1979 res@xyDashPattern = 2 … … 1931 1983 res@tiXAxisString = "["+unit(varn)+"]" 1932 1984 res@gsnRightString = " " 1933 if (xs .EQ. -1) then 1985 if (xs .EQ. -1) then 1934 1986 res@trXMinF = miniwu 1935 1987 else 1936 1988 res@trXMinF = xs 1937 1989 end if 1938 if (xe .EQ. -1) then 1990 if (xe .EQ. -1) then 1939 1991 res@trXMaxF = maxiwu 1940 1992 else … … 1946 1998 1947 1999 if (vNam(varn) .EQ. "wpvp") then 1948 miniwpvp=min(data(varn,:,:)) 1949 maxiwpvp=max(data(varn,:,:)) 2000 miniwpvp=min(data(varn,:,:))-min_value 2001 maxiwpvp=max(data(varn,:,:))+max_value 1950 2002 if (over .EQ. 1) then 1951 2003 res@xyDashPattern = 0 … … 1960 2012 res@trXMinF = xs 1961 2013 end if 1962 if (xe .EQ. -1) then 2014 if (xe .EQ. -1) then 1963 2015 res@trXMaxF = maxiwpvp 1964 2016 else … … 1969 2021 end if 1970 2022 if (vNam(varn) .EQ. "wsvs") then 1971 miniwsvs=min(data(varn,:,:)) 1972 maxiwsvs=max(data(varn,:,:)) 2023 miniwsvs=min(data(varn,:,:))-min_value 2024 maxiwsvs=max(data(varn,:,:))+max_value 1973 2025 if (over .EQ. 1) then 1974 2026 res@xyDashPattern = 1 … … 1978 2030 res@tiXAxisString = "["+unit(varn)+"]" 1979 2031 res@gsnRightString = " " 1980 if (xs .EQ. -1) then 2032 if (xs .EQ. -1) then 1981 2033 res@trXMinF = miniwsvs 1982 2034 else 1983 2035 res@trXMinF = xs 1984 2036 end if 1985 if (xe .EQ. -1) then 2037 if (xe .EQ. -1) then 1986 2038 res@trXMaxF = maxiwsvs 1987 2039 else … … 1992 2044 end if 1993 2045 if (vNam(varn) .EQ. "wv") then 1994 miniwv=min(data(varn,:,:)) 1995 maxiwv=max(data(varn,:,:)) 2046 miniwv=min(data(varn,:,:))-min_value 2047 maxiwv=max(data(varn,:,:))+max_value 1996 2048 if (over .EQ. 1) then 1997 2049 res@xyDashPattern = 2 … … 2016 2068 2017 2069 if (vNam(varn) .EQ. "wpptp") then 2018 miniwpptp=min(data(varn,:,:)) 2019 maxiwpptp=max(data(varn,:,:)) 2070 miniwpptp=min(data(varn,:,:))-min_value 2071 maxiwpptp=max(data(varn,:,:))+max_value 2020 2072 if (over .EQ. 1) then 2021 2073 res@xyDashPattern = 0 … … 2039 2091 end if 2040 2092 if (vNam(varn) .EQ. "wspts") then 2041 miniwspts=min(data(varn,:,:)) 2042 maxiwspts=max(data(varn,:,:)) 2093 miniwspts=min(data(varn,:,:))-min_value 2094 maxiwspts=max(data(varn,:,:))+max_value 2043 2095 if (over .EQ. 1) then 2044 2096 res@xyDashPattern = 1 … … 2062 2114 end if 2063 2115 if (vNam(varn) .EQ. "wpt") then 2064 miniwpt=min(data(varn,:,:)) 2065 maxiwpt=max(data(varn,:,:)) 2116 miniwpt=min(data(varn,:,:))-min_value 2117 maxiwpt=max(data(varn,:,:))+max_value 2066 2118 if (over .EQ. 1) then 2067 2119 res@xyDashPattern = 2 … … 2086 2138 2087 2139 if (vNam(varn) .EQ. "wsptsBC") then 2088 miniwsptsBC=min(data(varn,:,:)) 2089 maxiwsptsBC=max(data(varn,:,:)) 2140 miniwsptsBC=min(data(varn,:,:))-min_value 2141 maxiwsptsBC=max(data(varn,:,:))+max_value 2090 2142 if (over .EQ. 1) then 2091 2143 res@xyDashPattern = 0 … … 2109 2161 end if 2110 2162 if (vNam(varn) .EQ. "wptBC") then 2111 miniwptBC=min(data(varn,:,:)) 2112 maxiwptBC=max(data(varn,:,:)) 2163 miniwptBC=min(data(varn,:,:))-min_value 2164 maxiwptBC=max(data(varn,:,:))+max_value 2113 2165 if (over .EQ. 1) then 2114 2166 res@xyDashPattern = 1 … … 2133 2185 2134 2186 if (vNam(varn) .EQ. "wpvptp") then 2135 miniwpvptp=min(data(varn,:,:)) 2136 maxiwpvptp=max(data(varn,:,:)) 2187 miniwpvptp=min(data(varn,:,:))-min_value 2188 maxiwpvptp=max(data(varn,:,:))+max_value 2137 2189 if (over .EQ. 1) then 2138 2190 res@xyDashPattern = 0 … … 2156 2208 end if 2157 2209 if (vNam(varn) .EQ. "wsvpts") then 2158 miniwsvpts=min(data(varn,:,:)) 2159 maxiwsvpts=max(data(varn,:,:)) 2210 miniwsvpts=min(data(varn,:,:))-min_value 2211 maxiwsvpts=max(data(varn,:,:))+max_value 2160 2212 if (over .EQ. 1) then 2161 2213 res@xyDashPattern = 1 … … 2179 2231 end if 2180 2232 if (vNam(varn) .EQ. "wvpt") then 2181 miniwvpt=min(data(varn,:,:)) 2182 maxiwvpt=max(data(varn,:,:)) 2233 miniwvpt=min(data(varn,:,:))-min_value 2234 maxiwvpt=max(data(varn,:,:))+max_value 2183 2235 if (over .EQ. 1) then 2184 2236 res@xyDashPattern = 2 … … 2203 2255 2204 2256 if (vNam(varn) .EQ. "wpqp") then 2205 miniwpqp=min(data(varn,:,:)) 2206 maxiwpqp=max(data(varn,:,:)) 2257 miniwpqp=min(data(varn,:,:))-min_value 2258 maxiwpqp=max(data(varn,:,:))+max_value 2207 2259 if (over .EQ. 1) then 2208 2260 res@xyDashPattern = 0 … … 2226 2278 end if 2227 2279 if (vNam(varn) .EQ. "wsqs") then 2228 miniwsqs=min(data(varn,:,:)) 2229 maxiwsqs=max(data(varn,:,:)) 2280 miniwsqs=min(data(varn,:,:))-min_value 2281 maxiwsqs=max(data(varn,:,:))+max_value 2230 2282 if (over .EQ. 1) then 2231 2283 res@xyDashPattern = 1 … … 2249 2301 end if 2250 2302 if (vNam(varn) .EQ. "wq") then 2251 miniwq=min(data(varn,:,:)) 2252 maxiwq=max(data(varn,:,:)) 2303 miniwq=min(data(varn,:,:))-min_value 2304 maxiwq=max(data(varn,:,:))+max_value 2253 2305 if (over .EQ. 1) then 2254 2306 res@xyDashPattern = 2 … … 2273 2325 2274 2326 if (vNam(varn) .EQ. "wpqvp") then 2275 miniwpqvp=min(data(varn,:,:)) 2276 maxiwpqvp=max(data(varn,:,:)) 2327 miniwpqvp=min(data(varn,:,:))-min_value 2328 maxiwpqvp=max(data(varn,:,:))+max_value 2277 2329 if (over .EQ. 1) then 2278 2330 res@xyDashPattern = 0 … … 2296 2348 end if 2297 2349 if (vNam(varn) .EQ. "wsqvs") then 2298 miniwsqvs=min(data(varn,:,:)) 2299 maxiwsqvs=max(data(varn,:,:)) 2350 miniwsqvs=min(data(varn,:,:))-min_value 2351 maxiwsqvs=max(data(varn,:,:))+max_value 2300 2352 if (over .EQ. 1) then 2301 2353 res@xyDashPattern = 1 … … 2319 2371 end if 2320 2372 if (vNam(varn) .EQ. "wqv") then 2321 miniwqv=min(data(varn,:,:)) 2322 maxiwqv=max(data(varn,:,:)) 2373 miniwqv=min(data(varn,:,:))-min_value 2374 maxiwqv=max(data(varn,:,:))+max_value 2323 2375 if (over .EQ. 1) then 2324 2376 res@xyDashPattern = 2 … … 2343 2395 2344 2396 if (vNam(varn) .EQ. "wpsp") then 2345 miniwpsp=min(data(varn,:,:)) 2346 maxiwpsp=max(data(varn,:,:)) 2397 miniwpsp=min(data(varn,:,:))-min_value 2398 maxiwpsp=max(data(varn,:,:))+max_value 2347 2399 if (over .EQ. 1) then 2348 2400 res@xyDashPattern = 0 … … 2366 2418 end if 2367 2419 if (vNam(varn) .EQ. "wsss") then 2368 miniwsss=min(data(varn,:,:)) 2369 maxiwsss=max(data(varn,:,:)) 2420 miniwsss=min(data(varn,:,:))-min_value 2421 maxiwsss=max(data(varn,:,:))+max_value 2370 2422 if (over .EQ. 1) then 2371 2423 res@xyDashPattern = 1 … … 2389 2441 end if 2390 2442 if (vNam(varn) .EQ. "ws") then 2391 miniws=min(data(varn,:,:)) 2392 maxiws=max(data(varn,:,:)) 2443 miniws=min(data(varn,:,:))-min_value 2444 maxiws=max(data(varn,:,:))+max_value 2393 2445 if (over .EQ. 1) then 2394 2446 res@xyDashPattern = 2 … … 2413 2465 2414 2466 if (vNam(varn) .EQ. "wpsap") then 2415 miniwpsap=min(data(varn,:,:)) 2416 maxiwpsap=max(data(varn,:,:)) 2467 miniwpsap=min(data(varn,:,:))-min_value 2468 maxiwpsap=max(data(varn,:,:))+max_value 2417 2469 if (over .EQ. 1) then 2418 2470 res@xyDashPattern = 0 … … 2436 2488 end if 2437 2489 if (vNam(varn) .EQ. "wssas") then 2438 miniwssas=min(data(varn,:,:)) 2439 maxiwssas=max(data(varn,:,:)) 2490 miniwssas=min(data(varn,:,:))-min_value 2491 maxiwssas=max(data(varn,:,:))+max_value 2440 2492 if (over .EQ. 1) then 2441 2493 res@xyDashPattern = 1 … … 2459 2511 end if 2460 2512 if (vNam(varn) .EQ. "wsa") then 2461 miniwsa=min(data(varn,:,:)) 2462 maxiwsa=max(data(varn,:,:)) 2513 miniwsa=min(data(varn,:,:))-min_value 2514 maxiwsa=max(data(varn,:,:))+max_value 2463 2515 if (over .EQ. 1) then 2464 2516 res@xyDashPattern = 2 … … 2483 2535 2484 2536 if (vNam(varn) .EQ. "us2") then 2485 minius2=min(data(varn,:,:)) 2486 maxius2=max(data(varn,:,:)) 2537 minius2=min(data(varn,:,:))-min_value 2538 maxius2=max(data(varn,:,:))+max_value 2487 2539 if (over .EQ. 1) then 2488 2540 res@xyDashPattern = 0 … … 2506 2558 end if 2507 2559 if (vNam(varn) .EQ. "vs2") then 2508 minivs2=min(data(varn,:,:)) 2509 maxivs2=max(data(varn,:,:)) 2560 minivs2=min(data(varn,:,:))-min_value 2561 maxivs2=max(data(varn,:,:))+max_value 2510 2562 if (over .EQ. 1) then 2511 2563 res@xyDashPattern = 1 … … 2529 2581 end if 2530 2582 if (vNam(varn) .EQ. "ws2") then 2531 miniws2=min(data(varn,:,:)) 2532 maxiws2=max(data(varn,:,:)) 2583 miniws2=min(data(varn,:,:))-min_value 2584 maxiws2=max(data(varn,:,:))+max_value 2533 2585 if (over .EQ. 1) then 2534 2586 res@xyDashPattern = 2 … … 2553 2605 2554 2606 if (vNam(varn) .EQ. "wsususodz") then 2555 miniwsususodz=min(data(varn,:,:)) 2556 maxiwsususodz=max(data(varn,:,:)) 2607 miniwsususodz=min(data(varn,:,:))-min_value 2608 maxiwsususodz=max(data(varn,:,:))+max_value 2557 2609 if (over .EQ. 1) then 2558 2610 res@xyDashPattern = 0 … … 2576 2628 end if 2577 2629 if (vNam(varn) .EQ. "wspsodz") then 2578 miniwspsodz=min(data(varn,:,:)) 2579 maxiwspsodz=max(data(varn,:,:)) 2630 miniwspsodz=min(data(varn,:,:))-min_value 2631 maxiwspsodz=max(data(varn,:,:))+max_value 2580 2632 if (over .EQ. 1) then 2581 2633 res@xyDashPattern = 1 … … 2599 2651 end if 2600 2652 if (vNam(varn) .EQ. "wpeodz") then 2601 miniwpeodz=min(data(varn,:,:)) 2602 maxiwpeodz=max(data(varn,:,:)) 2653 miniwpeodz=min(data(varn,:,:))-min_value 2654 maxiwpeodz=max(data(varn,:,:))+max_value 2603 2655 if (over .EQ. 1) then 2604 2656 res@xyDashPattern = 2 … … 2622 2674 end if 2623 2675 if (no_files .GT. 1) then 2676 print("nof="+nof+" und n="+n) 2624 2677 multi_plot(nof,n)=plot(n) 2625 2678 max_nof(nof,n)=max(data(varn,:,:)) … … 2635 2688 end if 2636 2689 delete(temp) 2690 delete(temp_att) 2637 2691 end if 2638 2692 end do … … 2680 2734 res@gsnLeftString = name(0,pl) 2681 2735 res@gsnRightString = unit_(0,pl) 2682 2736 2737 data_0(:,:) = min(min_nof(:,pl)) 2683 2738 plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res) 2684 2739 … … 2691 2746 lgres@lgLabelFont = "helvetica" 2692 2747 lgres@lgLabelFontHeightF = font_size_legend 2693 lgres@vpWidthF = max(string_len)*0.01 22694 lgres@vpHeightF = 0.0 4*no_files2748 lgres@vpWidthF = max(string_len)*0.015 2749 lgres@vpHeightF = 0.03*no_files 2695 2750 lgres@lgDashIndexes = multi_dash(no_files-1:0) 2696 2751 lbid = gsn_create_legend(wks,no_files,multi_legend(no_files-1:0),lgres) 2697 2752 2698 2753 amres = True 2699 amres@amParallelPosF = max(string_len)*0.01 +0.782754 amres@amParallelPosF = max(string_len)*0.012+0.78 2700 2755 amres@amOrthogonalPosF = -0.0315*no_files+0.431 2701 2756 annoid1 = gsn_add_annotation(plot0,lbid,amres) … … 2819 2874 2820 2875 z=z/norm_z 2876 2877 if (abs(min(data(varn,:,:))) .GT. 10)then 2878 min_value = abs(0.01*min(data(varn,:,:))) 2879 max_value = abs(0.01*max(data(varn,:,:))) 2880 else 2881 if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. abs(max(data(varn,:,:))) .GT. 0.01)then 2882 min_value = abs(0.1*max(data(varn,:,:))) 2883 max_value = abs(0.1*max(data(varn,:,:))) 2884 else 2885 if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. abs(min(data(varn,:,:))) .GT. 0.01)then 2886 min_value = abs(0.1*min(data(varn,:,:))) 2887 max_value = abs(0.1*min(data(varn,:,:))) 2888 else 2889 min_value = abs(0.1*min(data(varn,:,:))) 2890 max_value = abs(0.1*max(data(varn,:,:))) 2891 end if 2892 end if 2893 end if 2894 if (min(data(varn,:,:)) .EQ. 0 .AND. max(data(varn,:,:)) .EQ. 0)then 2895 min_value = 0.1 2896 max_value = 0.1 2897 end if 2821 2898 2822 2899 res@gsnLeftString = vNam(varn) … … 2828 2905 2829 2906 if (xs .EQ. -1) then 2830 res@trXMinF = min(data(varn,:,:)) 2907 res@trXMinF = min(data(varn,:,:))-min_value 2831 2908 else 2832 2909 res@trXMinF = xs 2833 2910 end if 2834 2911 if (xe .EQ. -1) then 2835 res@trXMaxF = max(data(varn,:,:)) 2912 res@trXMaxF = max(data(varn,:,:))+max_value 2836 2913 else 2837 2914 res@trXMaxF = xe -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r250 r324 402 402 color = ispan(2,237,step) 403 403 end if 404 else 405 color = 2 404 406 end if 405 407 if ( dash .eq. 0 ) then
Note: See TracChangeset
for help on using the changeset viewer.