Tue May 20 22:34:05 2025 svd_snowfall_test(): python version: 3.10.12 numpy version: 1.26.4 Test svd_snowfall(). snowfall_trim(): Read snowfall file "snowfall_data.txt". Trim off first (YEAR) and last (TOTAL) items. Output as 8xYEARS array. Trimmed snowfall data array: Number of data rows M = 8 Number of data columns N = 134 snowfall_data_print(): 0: 1890.00 1.00 12.20 12.00 33.00 28.50 22.00 2.50 1: 1891.00 0.00 31.00 23.00 44.00 18.00 12.50 1.00 2: 1892.00 0.00 23.00 44.00 24.50 16.50 17.00 13.00 3: 1893.00 1.00 30.00 48.50 37.00 14.50 23.00 10.00 4: 1894.00 0.00 29.50 18.30 74.00 9.00 5.25 0.00 5: 1895.00 2.80 14.00 62.00 29.00 15.80 6.00 8.50 6: 1896.00 3.00 37.00 16.70 36.50 18.50 12.00 1.50 7: 1897.00 1.00 13.00 36.50 19.50 20.00 12.00 1.50 8: 1898.00 1.20 15.30 36.00 30.50 15.00 13.00 0.00 9: 1899.00 0.00 1.00 42.50 22.00 19.50 13.00 0.00 10: 1900.00 0.00 13.50 20.00 32.50 15.00 18.50 0.00 11: 1901.00 0.00 15.00 31.00 43.00 24.00 12.00 7.50 12: 1902.00 0.80 8.00 52.00 22.00 24.00 11.00 18.00 13: 1903.00 0.00 39.00 52.00 33.50 11.00 21.00 10.50 14: 1904.00 0.25 16.25 55.50 37.00 14.50 7.50 5.50 15: 1905.00 6.25 24.25 31.00 22.00 27.00 25.00 0.50 16: 1906.00 1.00 27.00 40.50 39.00 10.00 16.50 35.00 17: 1907.00 0.00 18.50 19.50 19.00 26.50 20.50 12.00 18: 1908.00 0.00 30.00 28.50 25.00 28.50 16.25 19.00 19: 1909.00 10.00 20.50 40.50 51.00 24.00 0.50 9.00 20: 1910.00 4.00 21.00 33.00 29.50 32.00 11.00 5.50 21: 1911.00 1.00 31.50 29.00 40.00 7.00 4.00 8.00 22: 1912.00 0.00 12.00 46.00 29.00 33.00 30.00 7.00 23: 1913.00 3.00 4.00 4.00 25.00 23.00 12.00 16.00 24: 1914.00 0.00 6.00 21.00 40.00 12.00 6.00 1.00 25: 1915.00 1.50 9.00 25.00 53.00 23.00 22.00 4.00 26: 1916.00 5.00 8.00 46.00 19.00 13.00 27.00 4.00 27: 1917.00 2.00 4.00 46.00 40.00 6.00 4.00 1.00 28: 1918.00 2.00 11.00 38.00 18.00 29.00 5.00 1.00 29: 1919.00 9.00 41.00 53.00 27.00 11.00 18.00 6.50 30: 1920.00 0.00 17.00 41.00 19.00 19.00 15.00 0.00 31: 1921.00 1.00 16.50 25.00 41.50 34.50 4.00 11.00 32: 1922.00 1.49 5.25 46.00 48.50 27.00 5.80 6.50 33: 1923.00 8.25 6.00 25.00 45.00 11.00 5.00 3.50 34: 1924.00 0.00 17.25 44.00 17.00 11.00 6.00 0.00 35: 1925.00 8.50 4.00 18.50 17.00 11.00 21.50 3.50 36: 1926.00 5.50 31.50 30.50 15.00 23.00 1.00 2.00 37: 1927.00 0.00 24.25 58.48 36.75 12.00 9.00 26.00 38: 1928.00 0.00 1.20 25.80 61.00 14.00 11.00 1.00 39: 1929.00 5.50 19.50 36.20 42.50 12.00 8.80 1.00 40: 1930.00 2.80 6.00 23.00 21.50 12.50 11.50 4.00 41: 1931.00 0.00 3.00 5.00 33.50 25.00 23.00 2.50 42: 1932.00 12.00 10.00 35.75 15.00 23.00 14.20 5.50 43: 1933.00 7.50 25.25 30.50 21.00 11.00 14.25 15.25 44: 1934.00 0.50 13.00 54.00 59.00 11.00 7.50 1.50 45: 1935.00 1.20 28.25 41.25 50.50 38.00 15.75 2.00 46: 1936.00 1.75 25.50 25.25 77.00 51.00 2.50 8.00 47: 1937.00 1.50 15.20 42.50 46.00 12.50 8.50 1.00 48: 1938.00 2.00 23.00 51.00 41.50 60.00 35.00 13.50 49: 1939.00 4.00 2.00 25.50 61.00 27.50 31.50 12.50 50: 1940.00 0.00 27.00 30.50 51.00 43.50 10.50 7.00 51: 1941.00 0.00 15.00 25.50 41.50 29.00 33.00 1.00 52: 1942.00 7.00 22.00 66.00 39.50 26.50 31.00 9.50 53: 1943.00 0.00 13.00 24.00 13.50 20.00 43.00 4.00 54: 1944.00 0.00 14.00 42.50 68.50 59.00 7.00 18.50 55: 1945.00 0.00 17.50 77.00 47.00 29.00 8.00 7.00 56: 1946.00 2.00 14.00 42.00 30.50 60.50 18.50 8.50 57: 1947.00 0.00 52.00 50.00 44.00 16.00 18.00 2.00 58: 1948.00 0.50 17.50 61.00 47.00 45.00 18.00 0.00 59: 1949.00 0.50 31.00 26.50 89.00 41.00 31.00 28.00 60: 1950.00 0.00 35.00 85.00 49.00 49.00 26.00 13.00 61: 1951.00 7.00 33.00 62.00 35.00 9.00 21.00 10.00 62: 1952.00 1.00 13.00 18.00 39.50 59.00 12.00 17.00 63: 1953.00 0.00 8.00 20.00 43.00 13.00 21.00 1.50 64: 1954.00 4.00 14.25 6.00 51.50 12.50 54.00 0.50 65: 1955.00 0.00 30.25 77.50 40.00 17.00 12.00 12.50 66: 1956.00 0.00 29.50 36.50 58.50 26.00 5.00 12.00 67: 1957.00 0.00 29.50 30.00 39.50 35.00 16.00 0.00 68: 1958.00 0.00 23.50 96.00 85.50 14.50 25.50 0.00 69: 1959.00 3.00 54.00 26.00 63.50 41.50 17.50 10.00 70: 1960.00 0.00 18.50 36.50 49.00 44.00 15.00 6.00 71: 1961.00 0.00 18.50 57.00 61.50 45.00 5.00 4.00 72: 1962.00 3.50 9.00 65.00 51.00 34.50 24.50 2.50 73: 1963.00 0.00 5.00 83.50 27.50 33.00 33.50 11.00 74: 1964.00 5.00 42.00 68.00 63.50 56.50 25.50 7.00 75: 1965.00 0.00 46.00 36.00 57.50 18.50 28.00 16.00 76: 1966.00 2.00 23.00 50.00 65.50 37.50 14.00 6.00 77: 1967.00 10.50 40.50 26.50 25.50 36.00 4.50 8.00 78: 1968.00 0.00 24.00 78.00 87.50 27.00 5.50 5.50 79: 1969.00 0.00 24.50 35.90 69.40 18.10 8.70 8.50 80: 1970.00 0.00 15.90 50.60 97.80 56.90 34.90 19.80 81: 1971.00 0.00 18.10 18.40 104.50 49.90 45.10 21.90 82: 1972.00 0.00 18.80 58.60 66.20 43.80 3.90 1.60 83: 1973.00 0.00 10.10 61.10 68.70 40.30 8.00 18.40 84: 1974.00 0.00 29.80 26.70 85.40 54.10 42.10 1.90 85: 1975.00 0.00 10.50 58.90 69.80 47.10 72.30 0.60 86: 1976.00 6.50 37.00 72.40 68.50 30.10 10.80 9.70 87: 1977.00 0.00 22.40 83.70 70.20 36.00 18.10 4.30 88: 1978.00 0.70 55.00 118.90 88.30 39.80 43.20 9.40 89: 1979.00 11.30 30.50 23.70 95.60 41.00 6.50 6.70 90: 1980.00 3.20 11.50 52.60 72.50 30.50 8.60 5.30 91: 1981.00 8.60 5.20 99.00 82.00 27.70 17.70 19.90 92: 1982.00 10.80 32.20 32.50 37.20 15.00 26.60 13.50 93: 1983.00 2.90 29.70 100.00 51.40 11.60 30.70 4.80 94: 1984.00 1.00 4.60 57.30 70.30 42.50 55.20 4.20 95: 1985.00 0.00 62.30 109.60 48.60 24.30 39.60 2.29 96: 1986.00 0.00 54.42 31.60 34.70 9.90 25.03 9.21 97: 1987.00 9.80 3.90 12.00 75.90 66.70 47.60 3.10 98: 1988.00 11.10 37.90 71.60 80.20 86.70 34.50 7.80 99: 1989.00 0.40 34.80 108.50 50.50 31.50 6.30 10.50 100: 1990.00 13.40 6.70 35.60 73.30 22.30 11.70 0.90 101: 1991.00 1.00 42.70 33.80 42.80 35.40 6.00 4.50 102: 1992.00 8.20 13.30 42.50 59.20 22.60 10.50 3.30 103: 1993.00 5.00 22.50 37.70 83.40 14.60 15.00 7.10 104: 1994.00 0.20 11.00 12.70 44.70 68.10 26.00 13.20 105: 1995.00 2.20 30.80 90.60 98.20 39.30 39.60 16.20 106: 1996.00 1.80 26.50 61.10 105.10 14.30 34.50 3.20 107: 1997.00 4.60 32.70 22.60 53.80 5.50 12.30 0.00 108: 1998.00 0.00 8.40 89.80 83.30 36.00 13.50 0.00 109: 1999.00 0.00 3.10 45.90 64.00 7.70 19.40 9.10 110: 2000.00 1.50 25.00 107.50 57.10 72.00 38.50 2.00 111: 2001.00 2.50 13.50 71.00 43.00 54.00 62.00 5.50 112: 2002.00 5.00 27.50 40.50 68.00 44.00 35.00 8.00 113: 2003.00 1.00 15.50 47.50 105.50 37.50 21.50 3.50 114: 2004.00 5.50 7.25 50.63 57.38 25.75 17.75 0.20 115: 2005.00 0.00 36.00 77.50 30.00 49.50 26.50 0.00 116: 2006.00 6.00 5.50 26.50 37.75 36.50 20.00 30.50 117: 2007.00 0.00 21.25 39.75 55.00 32.00 23.75 13.50 118: 2008.00 0.00 17.00 69.50 84.50 27.00 4.50 14.50 119: 2009.00 3.00 3.50 86.50 38.50 19.00 0.00 0.00 120: 2010.00 0.00 25.50 32.50 72.00 18.00 12.50 18.00 121: 2011.00 0.00 18.00 24.00 52.50 25.50 10.50 1.50 122: 2012.00 2.00 18.50 17.75 67.00 51.00 34.50 33.00 123: 2013.00 2.00 10.75 74.25 55.25 29.00 15.00 22.50 124: 2014.00 1.75 38.25 35.75 46.25 41.50 10.25 7.75 125: 2015.00 0.00 8.25 19.25 71.50 48.50 16.25 11.25 126: 2016.00 0.00 6.00 74.50 55.25 36.00 2.75 5.50 singular_value_display(): Look at the singular values. If the singular values are close, then the data is well spread out. If the singular values decay rapidly, then the data exhibits patterns, or is constrained to a lower-dimensional subspace. The singular values: 0: 22671.4 1: 302.034 2: 239.725 3: 179.722 4: 142.342 5: 135.285 6: 82.4483 7: 37.6247 Graphics saved as "singular_values.png" The cumulative energy: 0: 0.999557 1: 0.999734 2: 0.999846 3: 0.999909 4: 0.999948 5: 0.999984 6: 0.999997 7: 1 snowfall_low_rank(): Compute the rank 1 through rank 5 approximations to the data. Compare each of these to the 2016 snowfall data. Graphics saved as "rank_one_approximants.png" snowfall_u_basis_vectors(): Look at the first 6 modes in the SVD factor U. Each of these represents a pattern for snowfall over a year. The first mode is the pattern that is strongest in the data. Graphics saved as "u_modes.png" snowfall_v_basis_vectors(): Look at the first 6 modes in the SVD factor V. Each of these represents a pattern shared by all the months, and extending across all the sampling years Graphics saved as "v_modes.png" svd_snowfall_test(): Normal end of execution. Tue May 20 22:34:06 2025