<div dir="ltr"><div><div><div><div>Hi,<br>In this example input file is daily data or monthly data.<br><a href="https://www.ncl.ucar.edu/Applications/Scripts/regress_2.ncl">https://www.ncl.ucar.edu/Applications/Scripts/regress_2.ncl</a><br></div>Because, the netcdf file I use says, hours since but the file is monthly. So I&#39;m stuck with the unit conversion process.<br><br> ncdump -c <a href="http://precip.mon.mean.nc">precip.mon.mean.nc</a><br>netcdf precip.mon.mean {<br>dimensions:<br>    lon = 144 ;<br>    lat = 72 ;<br>    time = UNLIMITED ; // (436 currently)<br>variables:<br>    float lat(lat) ;<br>        lat:units = &quot;degrees_north&quot; ;<br>        lat:actual_range = 88.75f, -88.75f ;<br>        lat:long_name = &quot;Latitude&quot; ;<br>        lat:standard_name = &quot;latitude&quot; ;<br>        lat:axis = &quot;Y&quot; ;<br>    float lon(lon) ;<br>        lon:units = &quot;degrees_east&quot; ;<br>        lon:long_name = &quot;Longitude&quot; ;<br>        lon:actual_range = 1.25f, 358.75f ;<br>        lon:standard_name = &quot;longitude&quot; ;<br>        lon:axis = &quot;X&quot; ;<br>    double time(time) ;<br>        time:units = &quot;hours since 1800-01-01 00:00:0.0&quot; ;<br>        time:long_name = &quot;Time&quot; ;<br>        time:delta_t = &quot;0000-01-00 00:00:00&quot; ;<br>        time:avg_period = &quot;0000-01-00 00:00:00&quot; ;<br>        time:standard_name = &quot;time&quot; ;<br>        time:axis = &quot;T&quot; ;<br>        time:actual_range = 1569072., 1886808. ;<br>    float precip(time, lat, lon) ;<br>        precip:long_name = &quot;Average Monthly Rate of Precipitation&quot; ;<br>        precip:valid_range = 0.f, 70.f ;<br>        precip:units = &quot;mm/day&quot; ;<br>        precip:add_offset = 0.f ;<br>        precip:scale_factor = 1.f ;<br>        precip:missing_value = -9.96921e+36f ;<br>        precip:precision = 2s ;<br>        precip:least_significant_digit = 2s ;<br>        precip:var_desc = &quot;Precipitation&quot; ;<br>        precip:dataset = &quot;CPC Merged Analysis of Precipitation Standard&quot; ;<br>        precip:level_desc = &quot;Surface&quot; ;<br>        precip:statistic = &quot;Mean&quot; ;<br>        precip:parent_stat = &quot;Mean&quot; ;<br>        precip:actual_range = 0.f, 56.54f ;<br><br>// global attributes:<br>        :Conventions = &quot;COARDS&quot; ;<br>        :title = &quot;CPC Merged Analysis of Precipitation (excludes NCEP Reanalysis)&quot; ;<br>        :platform = &quot;Analyses&quot; ;<br>        :source = &quot;ftp <a href="http://ftp.cpc.ncep.noaa.gov">ftp.cpc.ncep.noaa.gov</a> precip/cmap/monthly&quot; ;<br>        :documentation = &quot;<a href="http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html">http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html</a>&quot; ;<br>        :references = &quot;<a href="http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html">http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html</a>&quot; ;<br>        :hisotry = &quot;Converted to chunked, deflated non-packed NetCDF4 Jul 2014&quot; ;<br>        :history = &quot;CPC Merged Analysis of Monthly Precipitation (excludes NCEP Reanalysis)&quot; ;<br>        :version = &quot;V1505&quot; ;<br>data:<br><br> lat = 88.75, 86.25, 83.75, 81.25, 78.75, 76.25, 73.75, 71.25, 68.75, 66.25, <br>    63.75, 61.25, 58.75, 56.25, 53.75, 51.25, 48.75, 46.25, 43.75, 41.25, <br>    38.75, 36.25, 33.75, 31.25, 28.75, 26.25, 23.75, 21.25, 18.75, 16.25, <br>    13.75, 11.25, 8.75, 6.25, 3.75, 1.25, -1.25, -3.75, -6.25, -8.75, -11.25, <br>    -13.75, -16.25, -18.75, -21.25, -23.75, -26.25, -28.75, -31.25, -33.75, <br>    -36.25, -38.75, -41.25, -43.75, -46.25, -48.75, -51.25, -53.75, -56.25, <br>    -58.75, -61.25, -63.75, -66.25, -68.75, -71.25, -73.75, -76.25, -78.75, <br>    -81.25, -83.75, -86.25, -88.75 ;<br><br> lon = 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25, 23.75, <br>    26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 41.25, 43.75, 46.25, 48.75, <br>    51.25, 53.75, 56.25, 58.75, 61.25, 63.75, 66.25, 68.75, 71.25, 73.75, <br>    76.25, 78.75, 81.25, 83.75, 86.25, 88.75, 91.25, 93.75, 96.25, 98.75, <br>    101.25, 103.75, 106.25, 108.75, 111.25, 113.75, 116.25, 118.75, 121.25, <br>    123.75, 126.25, 128.75, 131.25, 133.75, 136.25, 138.75, 141.25, 143.75, <br>    146.25, 148.75, 151.25, 153.75, 156.25, 158.75, 161.25, 163.75, 166.25, <br>    168.75, 171.25, 173.75, 176.25, 178.75, 181.25, 183.75, 186.25, 188.75, <br>    191.25, 193.75, 196.25, 198.75, 201.25, 203.75, 206.25, 208.75, 211.25, <br>    213.75, 216.25, 218.75, 221.25, 223.75, 226.25, 228.75, 231.25, 233.75, <br>    236.25, 238.75, 241.25, 243.75, 246.25, 248.75, 251.25, 253.75, 256.25, <br>    258.75, 261.25, 263.75, 266.25, 268.75, 271.25, 273.75, 276.25, 278.75, <br>    281.25, 283.75, 286.25, 288.75, 291.25, 293.75, 296.25, 298.75, 301.25, <br>    303.75, 306.25, 308.75, 311.25, 313.75, 316.25, 318.75, 321.25, 323.75, <br>    326.25, 328.75, 331.25, 333.75, 336.25, 338.75, 341.25, 343.75, 346.25, <br>    348.75, 351.25, 353.75, 356.25, 358.75 ;<br><br> time = 1569072, 1569816, 1570488, 1571232, 1571952, 1572696, 1573416, <br>    1574160, 1574904, 1575624, 1576368, 1577088, 1577832, 1578576, 1579272, <br>    1580016, 1580736, 1581480, 1582200, 1582944, 1583688, 1584408, 1585152, <br>    1585872, 1586616, 1587360, 1588032, 1588776, 1589496, 1590240, 1590960, <br>    1591704, 1592448, 1593168, 1593912, 1594632, 1595376, 1596120, 1596792, <br>    1597536, 1598256, 1599000, 1599720, 1600464, 1601208, 1601928, 1602672, <br>    1603392, 1604136, 1604880, 1605552, 1606296, 1607016, 1607760, 1608480, <br>    1609224, 1609968, 1610688, 1611432, 1612152, 1612896, 1613640, 1614336, <br>    1615080, 1615800, 1616544, 1617264, 1618008, 1618752, 1619472, 1620216, <br>    1620936, 1621680, 1622424, 1623096, 1623840, 1624560, 1625304, 1626024, <br>    1626768, 1627512, 1628232, 1628976, 1629696, 1630440, 1631184, 1631856, <br>    1632600, 1633320, 1634064, 1634784, 1635528, 1636272, 1636992, 1637736, <br>    1638456, 1639200, 1639944, 1640616, 1641360, 1642080, 1642824, 1643544, <br>    1644288, 1645032, 1645752, 1646496, 1647216, 1647960, 1648704, 1649400, <br>    1650144, 1650864, 1651608, 1652328, 1653072, 1653816, 1654536, 1655280, <br>    1656000, 1656744, 1657488, 1658160, 1658904, 1659624, 1660368, 1661088, <br>    1661832, 1662576, 1663296, 1664040, 1664760, 1665504, 1666248, 1666920, <br>    1667664, 1668384, 1669128, 1669848, 1670592, 1671336, 1672056, 1672800, <br>    1673520, 1674264, 1675008, 1675680, 1676424, 1677144, 1677888, 1678608, <br>    1679352, 1680096, 1680816, 1681560, 1682280, 1683024, 1683768, 1684464, <br>    1685208, 1685928, 1686672, 1687392, 1688136, 1688880, 1689600, 1690344, <br>    1691064, 1691808, 1692552, 1693224, 1693968, 1694688, 1695432, 1696152, <br>    1696896, 1697640, 1698360, 1699104, 1699824, 1700568, 1701312, 1701984, <br>    1702728, 1703448, 1704192, 1704912, 1705656, 1706400, 1707120, 1707864, <br>    1708584, 1709328, 1710072, 1710744, 1711488, 1712208, 1712952, 1713672, <br>    1714416, 1715160, 1715880, 1716624, 1717344, 1718088, 1718832, 1719528, <br>    1720272, 1720992, 1721736, 1722456, 1723200, 1723944, 1724664, 1725408, <br>    1726128, 1726872, 1727616, 1728288, 1729032, 1729752, 1730496, 1731216, <br>    1731960, 1732704, 1733424, 1734168, 1734888, 1735632, 1736376, 1737048, <br>    1737792, 1738512, 1739256, 1739976, 1740720, 1741464, 1742184, 1742928, <br>    1743648, 1744392, 1745136, 1745808, 1746552, 1747272, 1748016, 1748736, <br>    1749480, 1750224, 1750944, 1751688, 1752408, 1753152, 1753896, 1754592, <br>    1755336, 1756056, 1756800, 1757520, 1758264, 1759008, 1759728, 1760472, <br>    1761192, 1761936, 1762680, 1763352, 1764096, 1764816, 1765560, 1766280, <br>    1767024, 1767768, 1768488, 1769232, 1769952, 1770696, 1771440, 1772112, <br>    1772856, 1773576, 1774320, 1775040, 1775784, 1776528, 1777248, 1777992, <br>    1778712, 1779456, 1780200, 1780872, 1781616, 1782336, 1783080, 1783800, <br>    1784544, 1785288, 1786008, 1786752, 1787472, 1788216, 1788960, 1789656, <br>    1790400, 1791120, 1791864, 1792584, 1793328, 1794072, 1794792, 1795536, <br>    1796256, 1797000, 1797744, 1798416, 1799160, 1799880, 1800624, 1801344, <br>    1802088, 1802832, 1803552, 1804296, 1805016, 1805760, 1806504, 1807176, <br>    1807920, 1808640, 1809384, 1810104, 1810848, 1811592, 1812312, 1813056, <br>    1813776, 1814520, 1815264, 1815936, 1816680, 1817400, 1818144, 1818864, <br>    1819608, 1820352, 1821072, 1821816, 1822536, 1823280, 1824024, 1824720, <br>    1825464, 1826184, 1826928, 1827648, 1828392, 1829136, 1829856, 1830600, <br>    1831320, 1832064, 1832808, 1833480, 1834224, 1834944, 1835688, 1836408, <br>    1837152, 1837896, 1838616, 1839360, 1840080, 1840824, 1841568, 1842240, <br>    1842984, 1843704, 1844448, 1845168, 1845912, 1846656, 1847376, 1848120, <br>    1848840, 1849584, 1850328, 1851000, 1851744, 1852464, 1853208, 1853928, <br>    1854672, 1855416, 1856136, 1856880, 1857600, 1858344, 1859088, 1859784, <br>    1860528, 1861248, 1861992, 1862712, 1863456, 1864200, 1864920, 1865664, <br>    1866384, 1867128, 1867872, 1868544, 1869288, 1870008, 1870752, 1871472, <br>    1872216, 1872960, 1873680, 1874424, 1875144, 1875888, 1876632, 1877304, <br>    1878048, 1878768, 1879512, 1880232, 1880976, 1881720, 1882440, 1883184, <br>    1883904, 1884648, 1885392, 1886064, 1886808 ;<br><br><br><br></div>Could someone help me to overcome this?<br><br></div>Thank you,<br></div>Adv<br></div>