diff --git a/1_Data_SWInput/SWRuns_InputData_ExperimentalDesign_v07.csv b/1_Data_SWInput/SWRuns_InputData_ExperimentalDesign_v07.csv new file mode 100644 index 00000000..d2fd77b7 --- /dev/null +++ b/1_Data_SWInput/SWRuns_InputData_ExperimentalDesign_v07.csv @@ -0,0 +1,3 @@ +Label,sw,filesin,prodin,siteparamin,soilsin,weathersetupin,cloudin,YearStart,YearEnd,LookupWeatherFolder,LookupClimateTempScenarios,LookupClimatePPTScenarios,LookupShiftedPPTScenarios,LookupShiftedPPTCategory,LookupSnowDensityFromTable,LookupTranspRegionsFromTable,LookupEvapCoeffFromTable,LookupTranspCoeffFromTable_Grass,LookupTranspCoeffFromTable_Shrub,LookupTranspCoeffFromTable_Tree,LookupTranspCoeffFromTable_Forb,LookupCarbonScenarios,PotentialNaturalVegetation_CompositionShrubsC3C4_Paruelo1996,PotentialNaturalVegetation_CompositionShrubs_Fraction,PotentialNaturalVegetation_CompositionC3_Fraction,PotentialNaturalVegetation_CompositionC4_Fraction,PotentialNaturalVegetation_CompositionAnnuals_Fraction,PotentialNaturalVegetation_CompositionForb_Fraction,PotentialNaturalVegetation_CompositionBareGround_Fraction,AdjMonthlyBioMass_Precipitation,AdjMonthlyBioMass_Temperature,AdjRootProfile,RootProfile_C3,RootProfile_C4,RootProfile_Annuals,RootProfile_Shrubs,RootProfile_Forb,Shrub_TotalBiomass_ScalingFactor,Shrub_LiveBiomass_ScalingFactor,Shrub_Litter_ScalingFactor,Grass_TotalBiomass_ScalingFactor,Grass_LiveBiomass_ScalingFactor,Grass_Litter_ScalingFactor,Tree_TotalBiomass_ScalingFactor,Tree_LiveBiomass_ScalingFactor,Tree_Litter_ScalingFactor,Forb_TotalBiomass_ScalingFactor,Forb_LiveBiomass_ScalingFactor,Forb_Litter_ScalingFactor,Vegetation_Biomass_ScalingSeason_AllGrowingORNongrowing,Vegetation_Height_ScalingFactor,PotentialNaturalVegetation_Composition_basedOnReferenceOrScenarioClimate,ClimateScenario_Temp_PerturbationInMeanSeasonalityBothOrNone,ClimateScenario_PPT_PerturbationInMeanSeasonalityBothOrNone,RunoffPercent_fromPondedWater,RunonPercent_fromPondedWater,Imperm_L1,Exclude_ClimateAmbient,Grass_HydRed_OnOff,Shrub_HydRed_OnOff,Tree_HydRed_OnOff,Forb_HydRed_OnOff,SoilTemp_deltaX_cm,SoilTemp_MaxDepth_cm,PET_multiplier,Grass_SWPcrit_MPa,Shrub_SWPcrit_MPa,Tree_SWPcrit_MPa,Forb_SWPcrit_MPa,UseCO2BiomassMultiplier,UseCO2WUEMultiplier,SoilTemp_Flag +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1 +DefaultSettings,,,,,,,,,,,,,,,Prairie,CONUSSOIL_BSE_EVERY10cm,,SchenkJackson2003_PCdry_grasses,SchenkJackson2003_PCdry_shrubs,FILL,SchenkJackson2003_PCdry_forbs,FILL,1,,,,,,,1,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,15,990,1,-3.5,-3.9,-2,-2,1,1,0 diff --git a/1_Data_SWInput/SWRuns_InputData_SoilLayers_v9.csv b/1_Data_SWInput/SWRuns_InputData_SoilLayers_v9.csv new file mode 100644 index 00000000..8554ab76 --- /dev/null +++ b/1_Data_SWInput/SWRuns_InputData_SoilLayers_v9.csv @@ -0,0 +1 @@ +Label,SoilDepth_cm,depth_L1,depth_L2,depth_L3,depth_L4,depth_L5,depth_L6,depth_L7,depth_L8,depth_L9,depth_L10,depth_L11,depth_L12,depth_L13,depth_L14,depth_L15,depth_L16,depth_L17,depth_L18,depth_L19,depth_L20 diff --git a/1_Data_SWInput/SWRuns_InputData_TreatmentDesign_v15.csv b/1_Data_SWInput/SWRuns_InputData_TreatmentDesign_v15.csv new file mode 100644 index 00000000..eb7266a5 --- /dev/null +++ b/1_Data_SWInput/SWRuns_InputData_TreatmentDesign_v15.csv @@ -0,0 +1,2 @@ +Label,sw,filesin,prodin,siteparamin,soilsin,weathersetupin,cloudin,YearStart,YearEnd,LookupWeatherFolder,LookupClimateTempScenarios,LookupClimatePPTScenarios,LookupShiftedPPTScenarios,LookupShiftedPPTCategory,LookupSnowDensityFromTable,LookupTranspRegionsFromTable,LookupEvapCoeffFromTable,LookupTranspCoeffFromTable_Grass,LookupTranspCoeffFromTable_Shrub,LookupTranspCoeffFromTable_Tree,LookupTranspCoeffFromTable_Forb,LookupCarbonScenarios,PotentialNaturalVegetation_CompositionShrubsC3C4_Paruelo1996,PotentialNaturalVegetation_CompositionShrubs_Fraction,PotentialNaturalVegetation_CompositionC3_Fraction,PotentialNaturalVegetation_CompositionC4_Fraction,PotentialNaturalVegetation_CompositionAnnuals_Fraction,PotentialNaturalVegetation_CompositionForb_Fraction,PotentialNaturalVegetation_CompositionBareGround_Fraction,AdjMonthlyBioMass_Precipitation,AdjMonthlyBioMass_Temperature,AdjRootProfile,RootProfile_C3,RootProfile_C4,RootProfile_Annuals,RootProfile_Shrubs,RootProfile_Forbs,Shrub_TotalBiomass_ScalingFactor,Shrub_LiveBiomass_ScalingFactor,Shrub_Litter_ScalingFactor,Grass_TotalBiomass_ScalingFactor,Grass_LiveBiomass_ScalingFactor,Grass_Litter_ScalingFactor,Tree_TotalBiomass_ScalingFactor,Tree_LiveBiomass_ScalingFactor,Tree_Litter_ScalingFactor,Forb_TotalBiomass_ScalingFactor,Forb_LiveBiomass_ScalingFactor,Forb_Litter_ScalingFactor,Vegetation_Biomass_ScalingSeason_AllGrowingORNongrowing,Vegetation_Height_ScalingFactor,PotentialNaturalVegetation_Composition_basedOnReferenceOrScenarioClimate,ClimateScenario_Temp_PerturbationInMeanSeasonalityBothOrNone,ClimateScenario_PPT_PerturbationInMeanSeasonalityBothOrNone,Exclude_ClimateAmbient,MaxTempDepth,UseCO2BiomassMultiplier,UseCO2WUEMultiplier +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/SWRuns_InputMaster_YOURPROJECT_v11.csv b/1_Data_SWInput/SWRuns_InputMaster_YOURPROJECT_v11.csv new file mode 100644 index 00000000..4928c647 --- /dev/null +++ b/1_Data_SWInput/SWRuns_InputMaster_YOURPROJECT_v11.csv @@ -0,0 +1 @@ +Label,site_id,Region,WeatherFolder,X_WGS84,Y_WGS84,ELEV_m,ASPECT,SLOPE,Include_YN diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/bouteloua.estab b/1_Data_SWInput/SoilWat2_defaults/Input/bouteloua.estab new file mode 100644 index 00000000..02e1f840 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/bouteloua.estab @@ -0,0 +1,18 @@ +bogr # 4-char name of species +# soil layer parameters +2 # number of layers affecting establishment +10. # SWP (bars) requirement for germination (top layer) +15. # SWP (bars) requirement for establishment (average of top layers) +# timing parameters in days +60 # first possible day of germination +180 # last possible day of germination +2 # min number of consecutive "wet" days for germination to occur +40 # max number of consecutive "dry" days after germination allowing estab +5 # min number of consecutive "wet" days after germination before establishment +15 # min number of days between germination and establishment +75 # max number of days between germination and establishment +# temperature parameters in C +5. # min temp threshold for germination +20. # max temp threshold for germination +0. # min temp threshold for establishment +20. # max temp threshold for establishment diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/bromus.estab b/1_Data_SWInput/SoilWat2_defaults/Input/bromus.estab new file mode 100644 index 00000000..29eb6880 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/bromus.estab @@ -0,0 +1,18 @@ +brte # 4-char name of species +# soil layer parameters +3 # number of layers affecting establishment - 45 cm Harris and Hulbert +10. # SWP (bars) requirement for germination (top layer) - Harris +15. # SWP (bars) requirement for establishment (average of top layers) - Harris +# timing parameters in days +200 # first possible day of germination - Hulbert and Harris +365 # last possible day of germination - Hulbert +6 # min number of consecutive "wet" days for germination to occur - Hurlbert and Harris +45 # max number of consecutive "dry" days after germination allowing estab - Harris (longtime) +6 # min number of consecutive "wet" days after germination before establishment - Harris +15 # min number of days between germination and establishment - Hulbert +90 # max number of days between germination and establishment - Harris and Hulbert +# temperature parameters in C +10. # min temp threshold for germination - Hulbert and Harris +30. # max temp threshold for germination - Hulbert and Harris +3. # min temp threshold for establishment - Harris +30. # max temp threshold for establishment - Harris and Hulbert diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/carbon.in b/1_Data_SWInput/SoilWat2_defaults/Input/carbon.in new file mode 100644 index 00000000..b06f93a0 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/carbon.in @@ -0,0 +1,1557 @@ +# This file holds atmospheric CO2 concentrations in PPM per scenario. +# The data is organized by year, with each year having a concentration value. + +# The number of years depends on what data is available. Only a reasonable +# range of years is needed (e.g. 1900-2150), though adding a few hundred in either +# direction will not noticeably hurt performance. + +# New scenarios are appended to this file. To do so, follow the existing pattern +# e.g. Scenario starts at year 0, then year/PPM combination begins after that + +# Note: If a SOILWAT2 run cannot find a requested year here, the program will exit + + +# Placeholder Scenario +0 Default +# Year PPM +1700 360.0 +1701 360.0 +1702 360.0 +1703 360.0 +1704 360.0 +1705 360.0 +1706 360.0 +1707 360.0 +1708 360.0 +1709 360.0 +1710 360.0 +1711 360.0 +1712 360.0 +1713 360.0 +1714 360.0 +1715 360.0 +1716 360.0 +1717 360.0 +1718 360.0 +1719 360.0 +1720 360.0 +1721 360.0 +1722 360.0 +1723 360.0 +1724 360.0 +1725 360.0 +1726 360.0 +1727 360.0 +1728 360.0 +1729 360.0 +1730 360.0 +1731 360.0 +1732 360.0 +1733 360.0 +1734 360.0 +1735 360.0 +1736 360.0 +1737 360.0 +1738 360.0 +1739 360.0 +1740 360.0 +1741 360.0 +1742 360.0 +1743 360.0 +1744 360.0 +1745 360.0 +1746 360.0 +1747 360.0 +1748 360.0 +1749 360.0 +1750 360.0 +1751 360.0 +1752 360.0 +1753 360.0 +1754 360.0 +1755 360.0 +1756 360.0 +1757 360.0 +1758 360.0 +1759 360.0 +1760 360.0 +1761 360.0 +1762 360.0 +1763 360.0 +1764 360.0 +1765 360.0 +1766 360.0 +1767 360.0 +1768 360.0 +1769 360.0 +1770 360.0 +1771 360.0 +1772 360.0 +1773 360.0 +1774 360.0 +1775 360.0 +1776 360.0 +1777 360.0 +1778 360.0 +1779 360.0 +1780 360.0 +1781 360.0 +1782 360.0 +1783 360.0 +1784 360.0 +1785 360.0 +1786 360.0 +1787 360.0 +1788 360.0 +1789 360.0 +1790 360.0 +1791 360.0 +1792 360.0 +1793 360.0 +1794 360.0 +1795 360.0 +1796 360.0 +1797 360.0 +1798 360.0 +1799 360.0 +1800 360.0 +1801 360.0 +1802 360.0 +1803 360.0 +1804 360.0 +1805 360.0 +1806 360.0 +1807 360.0 +1808 360.0 +1809 360.0 +1810 360.0 +1811 360.0 +1812 360.0 +1813 360.0 +1814 360.0 +1815 360.0 +1816 360.0 +1817 360.0 +1818 360.0 +1819 360.0 +1820 360.0 +1821 360.0 +1822 360.0 +1823 360.0 +1824 360.0 +1825 360.0 +1826 360.0 +1827 360.0 +1828 360.0 +1829 360.0 +1830 360.0 +1831 360.0 +1832 360.0 +1833 360.0 +1834 360.0 +1835 360.0 +1836 360.0 +1837 360.0 +1838 360.0 +1839 360.0 +1840 360.0 +1841 360.0 +1842 360.0 +1843 360.0 +1844 360.0 +1845 360.0 +1846 360.0 +1847 360.0 +1848 360.0 +1849 360.0 +1850 360.0 +1851 360.0 +1852 360.0 +1853 360.0 +1854 360.0 +1855 360.0 +1856 360.0 +1857 360.0 +1858 360.0 +1859 360.0 +1860 360.0 +1861 360.0 +1862 360.0 +1863 360.0 +1864 360.0 +1865 360.0 +1866 360.0 +1867 360.0 +1868 360.0 +1869 360.0 +1870 360.0 +1871 360.0 +1872 360.0 +1873 360.0 +1874 360.0 +1875 360.0 +1876 360.0 +1877 360.0 +1878 360.0 +1879 360.0 +1880 360.0 +1881 360.0 +1882 360.0 +1883 360.0 +1884 360.0 +1885 360.0 +1886 360.0 +1887 360.0 +1888 360.0 +1889 360.0 +1890 360.0 +1891 360.0 +1892 360.0 +1893 360.0 +1894 360.0 +1895 360.0 +1896 360.0 +1897 360.0 +1898 360.0 +1899 360.0 +1900 360.0 +1901 360.0 +1902 360.0 +1903 360.0 +1904 360.0 +1905 360.0 +1906 360.0 +1907 360.0 +1908 360.0 +1909 360.0 +1910 360.0 +1911 360.0 +1912 360.0 +1913 360.0 +1914 360.0 +1915 360.0 +1916 360.0 +1917 360.0 +1918 360.0 +1919 360.0 +1920 360.0 +1921 360.0 +1922 360.0 +1923 360.0 +1924 360.0 +1925 360.0 +1926 360.0 +1927 360.0 +1928 360.0 +1929 360.0 +1930 360.0 +1931 360.0 +1932 360.0 +1933 360.0 +1934 360.0 +1935 360.0 +1936 360.0 +1937 360.0 +1938 360.0 +1939 360.0 +1940 360.0 +1941 360.0 +1942 360.0 +1943 360.0 +1944 360.0 +1945 360.0 +1946 360.0 +1947 360.0 +1948 360.0 +1949 360.0 +1950 360.0 +1951 360.0 +1952 360.0 +1953 360.0 +1954 360.0 +1955 360.0 +1956 360.0 +1957 360.0 +1958 360.0 +1959 360.0 +1960 360.0 +1961 360.0 +1962 360.0 +1963 360.0 +1964 360.0 +1965 360.0 +1966 360.0 +1967 360.0 +1968 360.0 +1969 360.0 +1970 360.0 +1971 360.0 +1972 360.0 +1973 360.0 +1974 360.0 +1975 360.0 +1976 360.0 +1977 360.0 +1978 360.0 +1979 360.0 +1980 360.0 +1981 360.0 +1982 360.0 +1983 360.0 +1984 360.0 +1985 360.0 +1986 360.0 +1987 360.0 +1988 360.0 +1989 360.0 +1990 360.0 +1991 360.0 +1992 360.0 +1993 360.0 +1994 360.0 +1995 360.0 +1996 360.0 +1997 360.0 +1998 360.0 +1999 360.0 +2000 360.0 +2001 360.0 +2002 360.0 +2003 360.0 +2004 360.0 +2005 360.0 +2006 360.0 +2007 360.0 +2008 360.0 +2009 360.0 +2010 360.0 +2011 360.0 +2012 360.0 +2013 360.0 +2014 360.0 +2015 360.0 +2016 360.0 +2017 360.0 +2018 360.0 +2019 360.0 +2020 360.0 +2021 360.0 +2022 360.0 +2023 360.0 +2024 360.0 +2025 360.0 +2026 360.0 +2027 360.0 +2028 360.0 +2029 360.0 +2030 360.0 +2031 360.0 +2032 360.0 +2033 360.0 +2034 360.0 +2035 360.0 +2036 360.0 +2037 360.0 +2038 360.0 +2039 360.0 +2040 360.0 +2041 360.0 +2042 360.0 +2043 360.0 +2044 360.0 +2045 360.0 +2046 360.0 +2047 360.0 +2048 360.0 +2049 360.0 +2050 360.0 +2051 360.0 +2052 360.0 +2053 360.0 +2054 360.0 +2055 360.0 +2056 360.0 +2057 360.0 +2058 360.0 +2059 360.0 +2060 360.0 +2061 360.0 +2062 360.0 +2063 360.0 +2064 360.0 +2065 360.0 +2066 360.0 +2067 360.0 +2068 360.0 +2069 360.0 +2070 360.0 +2071 360.0 +2072 360.0 +2073 360.0 +2074 360.0 +2075 360.0 +2076 360.0 +2077 360.0 +2078 360.0 +2079 360.0 +2080 360.0 +2081 360.0 +2082 360.0 +2083 360.0 +2084 360.0 +2085 360.0 +2086 360.0 +2087 360.0 +2088 360.0 +2089 360.0 +2090 360.0 +2091 360.0 +2092 360.0 +2093 360.0 +2094 360.0 +2095 360.0 +2096 360.0 +2097 360.0 +2098 360.0 +2099 360.0 +2100 360.0 +2101 360.0 +2102 360.0 +2103 360.0 +2104 360.0 +2105 360.0 +2106 360.0 +2107 360.0 +2108 360.0 +2109 360.0 +2110 360.0 +2111 360.0 +2112 360.0 +2113 360.0 +2114 360.0 +2115 360.0 +2116 360.0 +2117 360.0 +2118 360.0 +2119 360.0 +2120 360.0 +2121 360.0 +2122 360.0 +2123 360.0 +2124 360.0 +2125 360.0 +2126 360.0 +2127 360.0 +2128 360.0 +2129 360.0 +2130 360.0 +2131 360.0 +2132 360.0 +2133 360.0 +2134 360.0 +2135 360.0 +2136 360.0 +2137 360.0 +2138 360.0 +2139 360.0 +2140 360.0 +2141 360.0 +2142 360.0 +2143 360.0 +2144 360.0 +2145 360.0 +2146 360.0 +2147 360.0 +2148 360.0 +2149 360.0 +2150 360.0 +2151 360.0 +2152 360.0 +2153 360.0 +2154 360.0 +2155 360.0 +2156 360.0 +2157 360.0 +2158 360.0 +2159 360.0 +2160 360.0 +2161 360.0 +2162 360.0 +2163 360.0 +2164 360.0 +2165 360.0 +2166 360.0 +2167 360.0 +2168 360.0 +2169 360.0 +2170 360.0 +2171 360.0 +2172 360.0 +2173 360.0 +2174 360.0 +2175 360.0 +2176 360.0 +2177 360.0 +2178 360.0 +2179 360.0 +2180 360.0 +2181 360.0 +2182 360.0 +2183 360.0 +2184 360.0 +2185 360.0 +2186 360.0 +2187 360.0 +2188 360.0 +2189 360.0 +2190 360.0 +2191 360.0 +2192 360.0 +2193 360.0 +2194 360.0 +2195 360.0 +2196 360.0 +2197 360.0 +2198 360.0 +2199 360.0 +2200 360.0 +2201 360.0 +2202 360.0 +2203 360.0 +2204 360.0 +2205 360.0 +2206 360.0 +2207 360.0 +2208 360.0 +2209 360.0 +2210 360.0 +2211 360.0 +2212 360.0 +2213 360.0 +2214 360.0 +2215 360.0 +2216 360.0 +2217 360.0 +2218 360.0 +2219 360.0 +2220 360.0 +2221 360.0 +2222 360.0 +2223 360.0 +2224 360.0 +2225 360.0 +2226 360.0 +2227 360.0 +2228 360.0 +2229 360.0 +2230 360.0 +2231 360.0 +2232 360.0 +2233 360.0 +2234 360.0 +2235 360.0 +2236 360.0 +2237 360.0 +2238 360.0 +2239 360.0 +2240 360.0 +2241 360.0 +2242 360.0 +2243 360.0 +2244 360.0 +2245 360.0 +2246 360.0 +2247 360.0 +2248 360.0 +2249 360.0 +2250 360.0 +2251 360.0 +2252 360.0 +2253 360.0 +2254 360.0 +2255 360.0 +2256 360.0 +2257 360.0 +2258 360.0 +2259 360.0 +2260 360.0 +2261 360.0 +2262 360.0 +2263 360.0 +2264 360.0 +2265 360.0 +2266 360.0 +2267 360.0 +2268 360.0 +2269 360.0 +2270 360.0 +2271 360.0 +2272 360.0 +2273 360.0 +2274 360.0 +2275 360.0 +2276 360.0 +2277 360.0 +2278 360.0 +2279 360.0 +2280 360.0 +2281 360.0 +2282 360.0 +2283 360.0 +2284 360.0 +2285 360.0 +2286 360.0 +2287 360.0 +2288 360.0 +2289 360.0 +2290 360.0 +2291 360.0 +2292 360.0 +2293 360.0 +2294 360.0 +2295 360.0 +2296 360.0 +2297 360.0 +2298 360.0 +2299 360.0 +2300 360.0 +2301 360.0 +2302 360.0 +2303 360.0 +2304 360.0 +2305 360.0 +2306 360.0 +2307 360.0 +2308 360.0 +2309 360.0 +2310 360.0 +2311 360.0 +2312 360.0 +2313 360.0 +2314 360.0 +2315 360.0 +2316 360.0 +2317 360.0 +2318 360.0 +2319 360.0 +2320 360.0 +2321 360.0 +2322 360.0 +2323 360.0 +2324 360.0 +2325 360.0 +2326 360.0 +2327 360.0 +2328 360.0 +2329 360.0 +2330 360.0 +2331 360.0 +2332 360.0 +2333 360.0 +2334 360.0 +2335 360.0 +2336 360.0 +2337 360.0 +2338 360.0 +2339 360.0 +2340 360.0 +2341 360.0 +2342 360.0 +2343 360.0 +2344 360.0 +2345 360.0 +2346 360.0 +2347 360.0 +2348 360.0 +2349 360.0 +2350 360.0 +2351 360.0 +2352 360.0 +2353 360.0 +2354 360.0 +2355 360.0 +2356 360.0 +2357 360.0 +2358 360.0 +2359 360.0 +2360 360.0 +2361 360.0 +2362 360.0 +2363 360.0 +2364 360.0 +2365 360.0 +2366 360.0 +2367 360.0 +2368 360.0 +2369 360.0 +2370 360.0 +2371 360.0 +2372 360.0 +2373 360.0 +2374 360.0 +2375 360.0 +2376 360.0 +2377 360.0 +2378 360.0 +2379 360.0 +2380 360.0 +2381 360.0 +2382 360.0 +2383 360.0 +2384 360.0 +2385 360.0 +2386 360.0 +2387 360.0 +2388 360.0 +2389 360.0 +2390 360.0 +2391 360.0 +2392 360.0 +2393 360.0 +2394 360.0 +2395 360.0 +2396 360.0 +2397 360.0 +2398 360.0 +2399 360.0 +2400 360.0 +2401 360.0 +2402 360.0 +2403 360.0 +2404 360.0 +2405 360.0 +2406 360.0 +2407 360.0 +2408 360.0 +2409 360.0 +2410 360.0 +2411 360.0 +2412 360.0 +2413 360.0 +2414 360.0 +2415 360.0 +2416 360.0 +2417 360.0 +2418 360.0 +2419 360.0 +2420 360.0 +2421 360.0 +2422 360.0 +2423 360.0 +2424 360.0 +2425 360.0 +2426 360.0 +2427 360.0 +2428 360.0 +2429 360.0 +2430 360.0 +2431 360.0 +2432 360.0 +2433 360.0 +2434 360.0 +2435 360.0 +2436 360.0 +2437 360.0 +2438 360.0 +2439 360.0 +2440 360.0 +2441 360.0 +2442 360.0 +2443 360.0 +2444 360.0 +2445 360.0 +2446 360.0 +2447 360.0 +2448 360.0 +2449 360.0 +2450 360.0 +2451 360.0 +2452 360.0 +2453 360.0 +2454 360.0 +2455 360.0 +2456 360.0 +2457 360.0 +2458 360.0 +2459 360.0 +2460 360.0 +2461 360.0 +2462 360.0 +2463 360.0 +2464 360.0 +2465 360.0 +2466 360.0 +2467 360.0 +2468 360.0 +2469 360.0 +2470 360.0 +2471 360.0 +2472 360.0 +2473 360.0 +2474 360.0 +2475 360.0 +2476 360.0 +2477 360.0 +2478 360.0 +2479 360.0 +2480 360.0 +2481 360.0 +2482 360.0 +2483 360.0 +2484 360.0 +2485 360.0 +2486 360.0 +2487 360.0 +2488 360.0 +2489 360.0 +2490 360.0 +2491 360.0 +2492 360.0 +2493 360.0 +2494 360.0 +2495 360.0 +2496 360.0 +2497 360.0 +2498 360.0 +2499 360.0 +2500 360.0 + +# Placeholder Scenario +0 RCP85 +# Year PPM +1765 278.05158 +1766 278.10615 +1767 278.22039 +1768 278.34305 +1769 278.47058 +1770 278.60047 +1771 278.73275 +1772 278.86881 +1773 279.00907 +1774 279.15318 +1775 279.3018 +1776 279.4568 +1777 279.61808 +1778 279.78192 +1779 279.9432 +1780 280.0974 +1781 280.2428 +1782 280.38168 +1783 280.51832 +1784 280.6572 +1785 280.8026 +1786 280.9568 +1787 281.11808 +1788 281.28192 +1789 281.4432 +1790 281.5982 +1791 281.74682 +1792 281.89093 +1793 282.03119 +1794 282.16725 +1795 282.29901 +1796 282.4268 +1797 282.55093 +1798 282.67123 +1799 282.7873 +1800 282.89901 +1801 283.00677 +1802 283.11093 +1803 283.21129 +1804 283.30737 +1805 283.39963 +1806 283.48978 +1807 283.57796 +1808 283.66116 +1809 283.73511 +1810 283.79676 +1811 283.84667 +1812 283.88853 +1813 283.92613 +1814 283.96267 +1815 284.00107 +1816 284.04267 +1817 284.08613 +1818 284.12853 +1819 284.16667 +1820 284.1982 +1821 284.22333 +1822 284.24427 +1823 284.26307 +1824 284.28133 +1825 284.30027 +1826 284.32 +1827 284.34 +1828 284.36 +1829 284.38 +1830 284.4 +1831 284.385 +1832 284.28 +1833 284.125 +1834 283.975 +1835 283.825 +1836 283.675 +1837 283.525 +1838 283.425 +1839 283.4 +1840 283.4 +1841 283.425 +1842 283.5 +1843 283.6 +1844 283.725 +1845 283.9 +1846 284.075 +1847 284.225 +1848 284.4 +1849 284.575 +1850 284.725 +1851 284.875 +1852 285 +1853 285.125 +1854 285.275 +1855 285.425 +1856 285.575 +1857 285.725 +1858 285.9 +1859 286.075 +1860 286.225 +1861 286.375 +1862 286.5 +1863 286.625 +1864 286.775 +1865 286.9 +1866 287 +1867 287.1 +1868 287.225 +1869 287.375 +1870 287.525 +1871 287.7 +1872 287.9 +1873 288.125 +1874 288.4 +1875 288.7 +1876 289.025 +1877 289.4 +1878 289.8 +1879 290.225 +1880 290.7 +1881 291.2 +1882 291.675 +1883 292.125 +1884 292.575 +1885 292.975 +1886 293.3 +1887 293.575 +1888 293.8 +1889 294 +1890 294.175 +1891 294.325 +1892 294.475 +1893 294.6 +1894 294.7 +1895 294.8 +1896 294.9 +1897 295.025 +1898 295.225 +1899 295.5 +1900 295.8 +1901 296.125 +1902 296.475 +1903 296.825 +1904 297.2 +1905 297.625 +1906 298.075 +1907 298.5 +1908 298.9 +1909 299.3 +1910 299.7 +1911 300.075 +1912 300.425 +1913 300.775 +1914 301.1 +1915 301.4 +1916 301.725 +1917 302.075 +1918 302.4 +1919 302.7 +1920 303.025 +1921 303.4 +1922 303.775 +1923 304.125 +1924 304.525 +1925 304.975 +1926 305.4 +1927 305.825 +1928 306.3 +1929 306.775 +1930 307.225 +1931 307.7 +1932 308.175 +1933 308.6 +1934 309 +1935 309.4 +1936 309.75 +1937 310 +1938 310.175 +1939 310.3 +1940 310.375 +1941 310.375 +1942 310.3 +1943 310.2 +1944 310.125 +1945 310.1 +1946 310.125 +1947 310.2 +1948 310.325 +1949 310.5 +1950 310.75 +1951 311.1 +1952 311.5 +1953 311.925 +1954 312.425 +1955 313 +1956 313.6 +1957 314.225 +1958 314.8475 +1959 315.5 +1960 316.2725 +1961 317.075 +1962 317.795 +1963 318.3975 +1964 318.925 +1965 319.6475 +1966 320.6475 +1967 321.605 +1968 322.635 +1969 323.9025 +1970 324.985 +1971 325.855 +1972 327.14 +1973 328.6775 +1974 329.7425 +1975 330.585 +1976 331.7475 +1977 333.2725 +1978 334.8475 +1979 336.525 +1980 338.36 +1981 339.7275 +1982 340.7925 +1983 342.1975 +1984 343.7825 +1985 345.2825 +1986 346.7975 +1987 348.645 +1988 350.7375 +1989 352.4875 +1990 353.855 +1991 355.0175 +1992 355.885 +1993 356.7775 +1994 358.1275 +1995 359.8375 +1996 361.4625 +1997 363.155 +1998 365.3225 +1999 367.3475 +2000 368.865 +2001 370.4675 +2002 372.5225 +2003 374.76 +2004 376.8125 +2005 378.8125 +2006 380.8275 +2007 382.7775 +2008 384.8 +2009 387.01226 +2010 389.32416 +2011 391.63801 +2012 394.00866 +2013 396.46384 +2014 399.00402 +2015 401.62793 +2016 404.32819 +2017 407.09588 +2018 409.92701 +2019 412.82151 +2020 415.78022 +2021 418.79629 +2022 421.86439 +2023 424.99469 +2024 428.19734 +2025 431.47473 +2026 434.82619 +2027 438.24456 +2028 441.7208 +2029 445.25085 +2030 448.83485 +2031 452.47359 +2032 456.177 +2033 459.96398 +2034 463.85181 +2035 467.85003 +2036 471.96047 +2037 476.18237 +2038 480.50799 +2039 484.92724 +2040 489.43545 +2041 494.03235 +2042 498.7297 +2043 503.52959 +2044 508.43266 +2045 513.45614 +2046 518.61062 +2047 523.90006 +2048 529.32418 +2049 534.8752 +2050 540.54279 +2051 546.32201 +2052 552.21189 +2053 558.2122 +2054 564.31311 +2055 570.51669 +2056 576.84343 +2057 583.30471 +2058 589.90539 +2059 596.64656 +2060 603.52045 +2061 610.5165 +2062 617.60526 +2063 624.76367 +2064 631.99471 +2065 639.29052 +2066 646.65274 +2067 654.09843 +2068 661.64491 +2069 669.30474 +2070 677.07762 +2071 684.95429 +2072 692.90196 +2073 700.89416 +2074 708.93159 +2075 717.01548 +2076 725.13597 +2077 733.30667 +2078 741.52368 +2079 749.80466 +2080 758.1823 +2081 766.64451 +2082 775.17446 +2083 783.75141 +2084 792.36578 +2085 801.0188 +2086 809.71464 +2087 818.42214 +2088 827.15719 +2089 835.95594 +2090 844.80471 +2091 853.72536 +2092 862.72597 +2093 871.7768 +2094 880.86435 +2095 889.98162 +2096 899.12407 +2097 908.28871 +2098 917.47137 +2099 926.66527 +2100 935.87437 +2101 945.13213 +2102 954.4662 +2103 963.83906 +2104 973.2408 +2105 982.68037 +2106 992.14288 +2107 1001.6311 +2108 1011.1191 +2109 1020.6085 +2110 1030.1004 +2111 1039.5892 +2112 1049.1233 +2113 1058.7002 +2114 1068.3216 +2115 1077.9995 +2116 1087.6999 +2117 1097.4303 +2118 1107.1765 +2119 1116.9122 +2120 1126.6592 +2121 1136.4015 +2122 1146.1344 +2123 1155.9064 +2124 1165.7401 +2125 1175.6176 +2126 1185.5295 +2127 1195.4833 +2128 1205.4772 +2129 1215.4661 +2130 1225.453 +2131 1235.4493 +2132 1245.419 +2133 1255.397 +2134 1265.4211 +2135 1275.4843 +2136 1285.5943 +2137 1295.7632 +2138 1305.9625 +2139 1316.1708 +2140 1326.3936 +2141 1336.6283 +2142 1346.8594 +2143 1357.0727 +2144 1367.2797 +2145 1377.5097 +2146 1387.793 +2147 1398.1376 +2148 1408.5226 +2149 1418.9467 +2150 1429.3969 +2151 1439.8354 +2152 1450.2111 +2153 1460.4793 +2154 1470.5915 +2155 1480.5564 +2156 1490.4552 +2157 1500.2994 +2158 1510.0573 +2159 1519.7332 +2160 1529.3276 +2161 1538.8274 +2162 1548.2214 +2163 1557.5025 +2164 1566.6838 +2165 1575.7093 +2166 1584.5792 +2167 1593.389 +2168 1602.1444 +2169 1610.8232 +2170 1619.4189 +2171 1627.9283 +2172 1636.3423 +2173 1644.6544 +2174 1652.8621 +2175 1660.9472 +2176 1668.8714 +2177 1676.6491 +2178 1684.3479 +2179 1691.9855 +2180 1699.5543 +2181 1707.0542 +2182 1714.4671 +2183 1721.7857 +2184 1728.9986 +2185 1736.073 +2186 1743.0204 +2187 1749.8272 +2188 1756.4845 +2189 1763.0469 +2190 1769.542 +2191 1775.972 +2192 1782.3281 +2193 1788.5985 +2194 1794.7605 +2195 1800.7999 +2196 1806.7334 +2197 1812.5201 +2198 1818.1423 +2199 1823.6498 +2200 1829.0556 +2201 1834.3733 +2202 1839.6122 +2203 1844.7812 +2204 1849.8682 +2205 1854.849 +2206 1859.7106 +2207 1864.4469 +2208 1869.0362 +2209 1873.4672 +2210 1877.784 +2211 1881.9947 +2212 1886.1097 +2213 1890.1554 +2214 1894.1313 +2215 1898.0123 +2216 1901.7766 +2217 1905.4235 +2218 1908.9603 +2219 1912.3445 +2220 1915.5465 +2221 1918.6217 +2222 1921.6126 +2223 1924.5227 +2224 1927.352 +2225 1930.1 +2226 1932.7513 +2227 1935.2926 +2228 1937.7127 +2229 1940.0103 +2230 1942.1583 +2231 1944.1572 +2232 1946.0278 +2233 1947.7762 +2234 1949.4392 +2235 1951.0121 +2236 1952.5138 +2237 1953.9433 +2238 1955.2718 +2239 1956.4604 +2240 1957.4929 +2241 1958.428 +2242 1959.1897 +2243 1959.7707 +2244 1960.2847 +2245 1960.7288 +2246 1961.0674 +2247 1961.3194 +2248 1961.4957 +2249 1961.5683 +2250 1961.5774 +2251 1961.5774 +2252 1961.5774 +2253 1961.5774 +2254 1961.5774 +2255 1961.5774 +2256 1961.5774 +2257 1961.5774 +2258 1961.5774 +2259 1961.5774 +2260 1961.5774 +2261 1961.5774 +2262 1961.5774 +2263 1961.5774 +2264 1961.5774 +2265 1961.5774 +2266 1961.5774 +2267 1961.5774 +2268 1961.5774 +2269 1961.5774 +2270 1961.5774 +2271 1961.5774 +2272 1961.5774 +2273 1961.5774 +2274 1961.5774 +2275 1961.5774 +2276 1961.5774 +2277 1961.5774 +2278 1961.5774 +2279 1961.5774 +2280 1961.5774 +2281 1961.5774 +2282 1961.5774 +2283 1961.5774 +2284 1961.5774 +2285 1961.5774 +2286 1961.5774 +2287 1961.5774 +2288 1961.5774 +2289 1961.5774 +2290 1961.5774 +2291 1961.5774 +2292 1961.5774 +2293 1961.5774 +2294 1961.5774 +2295 1961.5774 +2296 1961.5774 +2297 1961.5774 +2298 1961.5774 +2299 1961.5774 +2300 1961.5774 +2301 1961.5774 +2302 1961.5774 +2303 1961.5774 +2304 1961.5774 +2305 1961.5774 +2306 1961.5774 +2307 1961.5774 +2308 1961.5774 +2309 1961.5774 +2310 1961.5774 +2311 1961.5774 +2312 1961.5774 +2313 1961.5774 +2314 1961.5774 +2315 1961.5774 +2316 1961.5774 +2317 1961.5774 +2318 1961.5774 +2319 1961.5774 +2320 1961.5774 +2321 1961.5774 +2322 1961.5774 +2323 1961.5774 +2324 1961.5774 +2325 1961.5774 +2326 1961.5774 +2327 1961.5774 +2328 1961.5774 +2329 1961.5774 +2330 1961.5774 +2331 1961.5774 +2332 1961.5774 +2333 1961.5774 +2334 1961.5774 +2335 1961.5774 +2336 1961.5774 +2337 1961.5774 +2338 1961.5774 +2339 1961.5774 +2340 1961.5774 +2341 1961.5774 +2342 1961.5774 +2343 1961.5774 +2344 1961.5774 +2345 1961.5774 +2346 1961.5774 +2347 1961.5774 +2348 1961.5774 +2349 1961.5774 +2350 1961.5774 +2351 1961.5774 +2352 1961.5774 +2353 1961.5774 +2354 1961.5774 +2355 1961.5774 +2356 1961.5774 +2357 1961.5774 +2358 1961.5774 +2359 1961.5774 +2360 1961.5774 +2361 1961.5774 +2362 1961.5774 +2363 1961.5774 +2364 1961.5774 +2365 1961.5774 +2366 1961.5774 +2367 1961.5774 +2368 1961.5774 +2369 1961.5774 +2370 1961.5774 +2371 1961.5774 +2372 1961.5774 +2373 1961.5774 +2374 1961.5774 +2375 1961.5774 +2376 1961.5774 +2377 1961.5774 +2378 1961.5774 +2379 1961.5774 +2380 1961.5774 +2381 1961.5774 +2382 1961.5774 +2383 1961.5774 +2384 1961.5774 +2385 1961.5774 +2386 1961.5774 +2387 1961.5774 +2388 1961.5774 +2389 1961.5774 +2390 1961.5774 +2391 1961.5774 +2392 1961.5774 +2393 1961.5774 +2394 1961.5774 +2395 1961.5774 +2396 1961.5774 +2397 1961.5774 +2398 1961.5774 +2399 1961.5774 +2400 1961.5774 +2401 1961.5774 +2402 1961.5774 +2403 1961.5774 +2404 1961.5774 +2405 1961.5774 +2406 1961.5774 +2407 1961.5774 +2408 1961.5774 +2409 1961.5774 +2410 1961.5774 +2411 1961.5774 +2412 1961.5774 +2413 1961.5774 +2414 1961.5774 +2415 1961.5774 +2416 1961.5774 +2417 1961.5774 +2418 1961.5774 +2419 1961.5774 +2420 1961.5774 +2421 1961.5774 +2422 1961.5774 +2423 1961.5774 +2424 1961.5774 +2425 1961.5774 +2426 1961.5774 +2427 1961.5774 +2428 1961.5774 +2429 1961.5774 +2430 1961.5774 +2431 1961.5774 +2432 1961.5774 +2433 1961.5774 +2434 1961.5774 +2435 1961.5774 +2436 1961.5774 +2437 1961.5774 +2438 1961.5774 +2439 1961.5774 +2440 1961.5774 +2441 1961.5774 +2442 1961.5774 +2443 1961.5774 +2444 1961.5774 +2445 1961.5774 +2446 1961.5774 +2447 1961.5774 +2448 1961.5774 +2449 1961.5774 +2450 1961.5774 +2451 1961.5774 +2452 1961.5774 +2453 1961.5774 +2454 1961.5774 +2455 1961.5774 +2456 1961.5774 +2457 1961.5774 +2458 1961.5774 +2459 1961.5774 +2460 1961.5774 +2461 1961.5774 +2462 1961.5774 +2463 1961.5774 +2464 1961.5774 +2465 1961.5774 +2466 1961.5774 +2467 1961.5774 +2468 1961.5774 +2469 1961.5774 +2470 1961.5774 +2471 1961.5774 +2472 1961.5774 +2473 1961.5774 +2474 1961.5774 +2475 1961.5774 +2476 1961.5774 +2477 1961.5774 +2478 1961.5774 +2479 1961.5774 +2480 1961.5774 +2481 1961.5774 +2482 1961.5774 +2483 1961.5774 +2484 1961.5774 +2485 1961.5774 +2486 1961.5774 +2487 1961.5774 +2488 1961.5774 +2489 1961.5774 +2490 1961.5774 +2491 1961.5774 +2492 1961.5774 +2493 1961.5774 +2494 1961.5774 +2495 1961.5774 +2496 1961.5774 +2497 1961.5774 +2498 1961.5774 +2499 1961.5774 +2500 1961.5774 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/climate.in b/1_Data_SWInput/SoilWat2_defaults/Input/climate.in new file mode 100644 index 00000000..fcb88da5 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/climate.in @@ -0,0 +1,5 @@ +71.0 61.0 61.0 51.0 41.0 31.0 23.0 23.0 31.0 41.0 61.0 61.0 # (site: testing), sky cover (sunrise-sunset),%,Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +1.3 2.9 3.3 3.8 3.8 3.8 3.3 3.3 2.9 1.3 1.3 1.3 # Wind speed (m/s),Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +61.0 61.0 61.0 51.0 51.0 51.0 41.0 41.0 51.0 51.0 61.0 61.0 # rel. Humidity (%),Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 # transmissivity (rel), only used in petfunc, but falls out of the equations (a = trans * b, c = a / trans) +213.7 241.6 261.0 308.0 398.1 464.5 0.0 0.0 0.0 140.0 161.6 185.1 # snow density (kg/m3): Brown, R. D. and P. W. Mote. 2009. The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate 22:2124-2145. diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/estab.in b/1_Data_SWInput/SoilWat2_defaults/Input/estab.in new file mode 100644 index 00000000..fca38369 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/estab.in @@ -0,0 +1,15 @@ +# list of filenames for which to check establishment +# each filename pertains to a species and contains the +# soil moisture and timing parameters required for the +# species to establish in a given year. +# There is no limit to the number of files in the list. +# to suppress checking establishment, comment all the +# lines below. + +0 # use flag; 1=check establishment, 0=don't check, ignore following +Input/bouteloua.estab +Input/bromus.estab +#Input/aristida.estab +#Input/vulpia.estab +#Input/opuntia.estab + diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/mkv_covar.in b/1_Data_SWInput/SoilWat2_defaults/Input/mkv_covar.in new file mode 100644 index 00000000..ab9bf7e4 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/mkv_covar.in @@ -0,0 +1,53 @@ + 1 4.09095 -11.75333 66.69987 47.00704 47.00704 57.94161 + 2 5.07524 -10.93190 53.02502 31.26189 31.26189 46.42581 + 3 6.75619 -8.61286 46.20161 29.47819 29.47819 44.12457 + 4 6.44286 -8.09809 48.85500 25.54369 25.54369 38.53952 + 5 6.41714 -9.43857 59.18382 39.67454 39.67454 51.46308 + 6 6.41762 -10.04238 57.51994 36.14591 36.14591 47.21566 + 7 7.72095 -7.63571 58.77897 38.63592 38.63592 42.72459 + 8 9.41714 -6.12429 37.75597 16.92817 16.92817 28.07678 + 9 9.77524 -5.85810 59.67593 28.78425 28.78425 30.28952 + 10 10.22190 -5.53952 55.71664 29.09484 29.09484 37.85302 + 11 11.39381 -3.99810 44.27666 19.72915 19.72915 24.77043 + 12 11.34238 -4.35143 51.89852 25.60104 25.60104 33.38328 + 13 12.74143 -2.82381 55.43218 22.80525 22.80525 27.26919 + 14 13.95952 -2.12619 51.85478 22.19492 22.19492 23.69275 + 15 15.97048 -0.29286 39.52137 15.10007 15.10007 18.50411 + 16 16.94000 1.00524 46.99831 19.29108 19.29108 23.31380 + 17 18.15191 2.13000 37.37354 15.19548 15.19548 17.69244 + 18 19.20619 2.83381 39.15087 13.50122 13.50122 18.43440 + 19 19.45667 4.05286 37.28177 13.64406 13.64406 15.31714 + 20 22.19381 5.66143 30.50153 9.61995 9.61995 15.10037 + 21 22.37381 7.23810 29.12339 7.12800 7.12800 11.80476 + 22 22.27857 7.35571 32.83803 7.43075 7.43075 13.27004 + 23 24.73476 9.29191 31.09917 9.06215 9.06215 12.95844 + 24 25.95190 10.09524 29.36057 10.07034 10.07034 11.27116 + 25 27.89571 11.02667 25.82768 7.32102 7.32102 8.81851 + 26 30.02143 12.30857 22.53332 7.14346 7.14346 9.54489 + 27 31.35333 12.88238 19.39651 6.23719 6.23719 9.22202 + 28 30.71048 13.58762 21.76540 7.74126 7.74126 8.57852 + 29 30.63952 14.16571 18.77923 3.09218 3.09218 8.10685 + 30 29.89286 13.81810 22.95893 6.47323 6.47323 8.43106 + 31 30.08143 13.51810 25.93157 4.80564 4.80564 10.06589 + 32 29.66238 13.20619 31.11869 5.45778 5.45778 8.01780 + 33 29.41238 12.60667 14.03027 2.58246 2.58246 8.59470 + 34 29.44191 12.24476 17.47980 5.95840 5.95840 13.36840 + 35 29.11190 11.09143 23.30141 8.72382 8.72382 10.70309 + 36 28.11190 9.79905 25.86219 8.07237 8.07237 11.81933 + 37 24.50095 7.99571 41.42058 13.17011 13.17011 15.01103 + 38 23.46857 6.27333 41.75686 16.50865 16.50865 19.83661 + 39 22.94524 5.43762 36.96260 15.94613 15.94613 18.64848 + 40 21.93000 3.75095 30.89134 11.20822 11.20822 15.28586 + 41 19.53762 2.32714 54.85110 22.29983 22.29983 20.72419 + 42 18.04429 1.00857 39.97729 14.03168 14.03168 22.08739 + 43 17.40619 0.15952 33.42622 11.83403 11.83403 17.31008 + 44 13.11381 -2.46286 64.65277 30.42106 30.42106 30.85775 + 45 12.81048 -2.95095 43.62401 21.81805 21.81805 24.92921 + 46 10.62476 -3.81048 52.86667 23.42624 23.42624 24.64496 + 47 9.39524 -6.13095 43.79060 22.86378 22.86378 28.09152 + 48 6.50857 -7.71333 36.09792 20.78557 20.78557 30.67847 + 49 7.62524 -7.49429 61.16229 36.96698 36.96698 43.00993 + 50 6.54333 -8.46190 52.74619 34.71279 34.71279 42.76793 + 51 5.24381 -9.34667 78.88123 50.65813 50.65813 54.39869 + 52 5.02381 -10.59810 50.45092 30.97369 30.97369 43.13578 + 53 4.34000 -11.94333 50.22041 29.30007 29.30007 55.37910 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/mkv_prob.in b/1_Data_SWInput/SoilWat2_defaults/Input/mkv_prob.in new file mode 100644 index 00000000..f1919c6f --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/mkv_prob.in @@ -0,0 +1,366 @@ + 1 0.0000 0.1000 0.693 0.523 + 2 0.3333 0.0370 0.460 0.608 + 3 0.0000 0.0714 0.090 0.014 + 4 0.0000 0.0714 0.066 0.051 + 5 0.0000 0.0357 0.030 0.000 + 6 0.0000 0.1034 0.097 0.029 + 7 0.3333 0.0741 0.137 0.060 + 8 0.0000 0.0741 0.575 0.559 + 9 1.0000 0.0357 0.380 0.448 + 10 0.3333 0.0000 0.150 0.000 + 11 0.0000 0.0345 0.380 0.000 + 12 1.0000 0.0690 0.275 0.308 + 13 0.0000 0.0370 0.430 0.000 + 14 0.0000 0.0690 0.419 0.485 + 15 1.0000 0.0000 0.140 0.162 + 16 0.0000 0.1429 0.310 0.259 + 17 0.0000 0.1538 0.278 0.357 + 18 0.5000 0.1154 0.210 0.212 + 19 0.2000 0.0800 0.433 0.484 + 20 0.3333 0.0370 0.125 0.035 + 21 0.0000 0.0714 0.030 0 + 22 0.0000 0.1071 0.237 0.120 + 23 0.0000 0.0741 0.070 0.085 + 24 0.0000 0.0714 0.058 0.059 + 25 0.5000 0.0357 0.050 0.042 + 26 0.0000 0.1429 0.515 0.843 + 27 0.0000 0.0385 0.076 0.000 + 28 0.0000 0.1034 0.079 0.061 + 29 0.3333 0.0741 0.384 0.326 + 30 0.3333 0.0000 0.010 0.000 + 31 0.0000 0.0345 0.060 0.000 + 32 0.0000 0.1379 0.529 0.741 + 33 0.2500 0.0000 0.050 0.000 + 34 0.0000 0.1034 0.143 0.101 + 35 0.3333 0.0741 0.180 0.218 + 36 0.6667 0.1481 0.222 0.254 + 37 0.1667 0.1667 0.156 0.201 + 38 0.6000 0.0400 0.036 0.018 + 39 0.0000 0.0769 0.651 0.776 + 40 0.0000 0.0357 0.100 0.000 + 41 0.0000 0.1034 0.170 0.182 + 42 0.6667 0.1852 0.272 0.296 + 43 0.1429 0.1304 0.078 0.046 + 44 0.5000 0.0769 0.166 0.074 + 45 0.2500 0.0385 0.250 0.000 + 46 1.0000 0.1786 0.260 0.268 + 47 0.1429 0.0435 0.075 0.035 + 48 0.0000 0.1429 0.502 0.498 + 49 0.0000 0.0385 0.180 0.000 + 50 0.0000 0.0690 0.065 0.021 + 51 0.5000 0.1429 0.154 0.185 + 52 0.2000 0.1600 0.148 0.119 + 53 0.0000 0.0000 0.000 0.000 + 54 0.0000 0.0000 0.000 0.000 + 55 0.0000 0.1333 0.335 0.288 + 56 0.0000 0.0769 0.126 0.034 + 57 0.5000 0.0714 0.077 0.040 + 58 0.3333 0.0370 0.520 0.552 + 59 0.5000 0.0714 0.093 0.060 + 60 0.3333 0.0000 0.030 0.000 + 61 0.0000 0.0345 0.050 0.000 + 62 0.0000 0.1724 0.474 0.306 + 63 0.4000 0.1200 0.686 0.496 + 64 0.4000 0.2000 0.860 0.866 + 65 0.1429 0.1739 0.948 1.261 + 66 0.6000 0.2000 0.375 0.329 + 67 0.2500 0.0000 0.245 0.163 + 68 0.0000 0.0357 0.460 0.000 + 69 0.0000 0.1379 0.236 0.287 + 70 0.5000 0.0385 0.320 0.233 + 71 0.3333 0.1481 0.272 0.308 + 72 0.0000 0.0400 0.510 0.000 + 73 0.0000 0.1034 0.202 0.089 + 74 0.3333 0.0741 0.264 0.213 + 75 0.3333 0.1111 0.370 0.391 + 76 0.5000 0.0000 0.395 0.516 + 77 0.0000 0.2857 0.372 0.355 + 78 0.3750 0.0909 0.270 0.200 + 79 0.4000 0.1200 0.394 0.212 + 80 0.2000 0.2000 0.250 0.108 + 81 0.3333 0.0833 0.142 0.165 + 82 0.5000 0.2308 0.386 0.266 + 83 0.3750 0.1818 0.439 0.316 + 84 0.4286 0.1739 0.252 0.351 + 85 0.0000 0.0870 0.279 0.324 + 86 0.0000 0.0714 0.215 0.233 + 87 1.0000 0.1071 0.251 0.262 + 88 0.2000 0.1200 0.120 0.040 + 89 0.5000 0.1538 0.762 0.618 + 90 0.3333 0.0833 0.180 0.175 + 91 0.2500 0.1923 0.752 0.667 + 92 0.5000 0.0417 0.444 0.330 + 93 0.2500 0.3077 0.248 0.335 + 94 0.4444 0.3810 0.475 0.343 + 95 0.2500 0.1111 0.493 0.364 + 96 0.0000 0.0000 0.000 0.000 + 97 0.0000 0.1000 0.910 0.523 + 98 0.6667 0.0370 0.220 0.157 + 99 0.0000 0.1481 0.478 0.413 + 100 0.5000 0.1154 0.218 0.213 + 101 0.2000 0.1600 0.334 0.318 + 102 0.8000 0.1200 0.226 0.173 + 103 0.4286 0.0870 0.344 0.413 + 104 0.0000 0.1600 1.298 1.199 + 105 0.2500 0.1923 0.735 0.850 + 106 0.3333 0.0000 0.190 0.198 + 107 0.0000 0.1786 0.170 0.173 + 108 0.2000 0.3600 0.671 0.613 + 109 0.3000 0.3000 0.414 0.500 + 110 0.7778 0.1905 0.196 0.203 + 111 0.4545 0.1053 0.876 1.145 + 112 0.5714 0.2174 0.894 0.930 + 113 0.2222 0.0476 1.514 1.033 + 114 0.3333 0.2222 0.349 0.316 + 115 0.5714 0.2609 0.621 0.505 + 116 0.5000 0.1500 0.649 0.551 + 117 0.1250 0.3182 0.299 0.329 + 118 0.3750 0.1364 0.570 0.725 + 119 0.6667 0.2083 0.352 0.291 + 120 0.4444 0.0476 0.395 0.415 + 121 1.0000 0.2000 0.687 1.048 + 122 0.3000 0.1500 0.626 1.225 + 123 0.6667 0.2083 0.466 0.692 + 124 0.6667 0.1429 0.122 0.131 + 125 0.3333 0.3333 0.512 0.698 + 126 0.5000 0.1000 0.533 0.689 + 127 0.5714 0.1739 0.335 0.359 + 128 0.2500 0.1818 0.332 0.365 + 129 0.5000 0.2083 0.952 1.056 + 130 0.7500 0.1818 0.350 0.415 + 131 0.1000 0.3000 0.399 0.136 + 132 0.5714 0.4348 0.457 0.569 + 133 0.5714 0.1250 0.685 1.028 + 134 0.4000 0.2000 0.192 0.186 + 135 0.6250 0.1818 0.362 0.505 + 136 0.5556 0.3333 0.423 0.485 + 137 0.5833 0.3889 0.721 0.942 + 138 0.7143 0.0625 0.501 0.463 + 139 0.4545 0.0526 0.140 0.115 + 140 0.5000 0.3333 0.505 0.702 + 141 0.4545 0.1579 0.507 0.826 + 142 0.8750 0.1818 0.639 1.006 + 143 0.6364 0.1053 0.422 0.237 + 144 0.4444 0.3333 0.322 0.433 + 145 0.5455 0.1053 0.823 1.439 + 146 0.6250 0.3182 0.475 0.450 + 147 0.6667 0.3333 0.343 0.350 + 148 0.3571 0.3125 0.464 0.674 + 149 0.6000 0.3500 0.653 0.823 + 150 0.6154 0.2941 0.769 0.911 + 151 0.5385 0.2353 0.911 0.902 + 152 0.7273 0.1053 0.385 0.372 + 153 0.3000 0.3000 0.338 0.270 + 154 0.7778 0.1429 0.382 0.292 + 155 0.5000 0.2000 0.951 1.667 + 156 0.5556 0.2857 0.698 0.743 + 157 0.2727 0.0526 0.100 0.089 + 158 0.7500 0.2308 0.943 1.271 + 159 0.5556 0.4286 1.180 1.795 + 160 0.6429 0.2500 0.744 0.747 + 161 0.5385 0.5882 0.469 0.629 + 162 0.4118 0.3846 0.571 0.980 + 163 0.5833 0.3333 1.344 1.103 + 164 0.5385 0.2941 0.282 0.601 + 165 0.5000 0.1111 0.474 0.445 + 166 0.5000 0.1364 1.283 1.484 + 167 0.5714 0.2609 0.755 0.865 + 168 0.5000 0.2500 0.650 0.540 + 169 0.6000 0.2500 0.365 0.293 + 170 0.4545 0.1053 0.663 0.671 + 171 0.2857 0.1739 0.220 0.211 + 172 0.3333 0.2083 0.914 1.335 + 173 0.1429 0.0435 0.090 0.085 + 174 0.0000 0.2857 0.338 0.443 + 175 0.3750 0.1818 0.531 0.546 + 176 0.1429 0.2174 0.593 1.143 + 177 0.5000 0.2083 0.705 0.656 + 178 0.6250 0.2273 0.579 0.632 + 179 0.2000 0.0500 2.267 2.740 + 180 0.6667 0.1852 0.287 0.342 + 181 0.2857 0.1304 0.259 0.246 + 182 0.4000 0.2000 0.763 1.357 + 183 0.2857 0.1739 0.222 0.109 + 184 0.5000 0.2500 0.751 1.128 + 185 0.4444 0.2381 0.203 0.184 + 186 0.3333 0.1429 1.098 1.604 + 187 0.1667 0.1250 0.177 0.088 + 188 0.5000 0.1923 0.226 0.154 + 189 0.2857 0.1739 0.203 0.293 + 190 0.6667 0.2500 0.941 1.270 + 191 0.4000 0.2000 0.580 0.480 + 192 0.6250 0.2273 0.369 0.414 + 193 0.0000 0.1500 1.836 1.340 + 194 0.0000 0.2963 1.201 1.470 + 195 0.2500 0.2727 0.304 0.388 + 196 0.3750 0.1818 0.540 0.690 + 197 0.4286 0.1304 0.300 0.467 + 198 0.1667 0.2917 0.159 0.060 + 199 0.2500 0.2727 0.451 0.494 + 200 0.5000 0.2273 0.499 0.700 + 201 0.4444 0.2381 0.742 0.859 + 202 0.6667 0.4762 0.549 0.681 + 203 0.6875 0.2143 0.594 0.573 + 204 0.4286 0.2500 0.378 0.384 + 205 0.3000 0.2000 0.547 0.350 + 206 0.8571 0.1739 0.456 0.606 + 207 0.2000 0.2500 0.685 0.654 + 208 0.5714 0.2609 0.898 2.058 + 209 0.6000 0.4500 0.807 1.288 + 210 0.2667 0.2667 0.874 1.104 + 211 0.6250 0.1818 0.746 0.974 + 212 0.4444 0.2857 0.493 0.627 + 213 0.5000 0.2500 0.528 0.929 + 214 0.5000 0.1500 0.391 0.599 + 215 0.3750 0.2273 1.122 1.743 + 216 0.6250 0.2273 0.271 0.317 + 217 0.6000 0.3000 0.751 1.277 + 218 0.5000 0.1111 0.436 0.495 + 219 0.3750 0.2273 0.299 0.511 + 220 0.3750 0.2273 0.635 0.686 + 221 0.5000 0.2727 0.691 0.515 + 222 0.5000 0.2000 1.161 1.418 + 223 0.2222 0.0476 0.087 0.060 + 224 0.3333 0.3704 0.370 0.288 + 225 0.3636 0.1053 0.285 0.414 + 226 0.5000 0.1667 0.404 0.327 + 227 0.4286 0.1739 0.348 0.470 + 228 0.2857 0.3043 0.596 0.695 + 229 0.5556 0.1905 0.260 0.249 + 230 0.6667 0.1429 0.302 0.548 + 231 0.6667 0.0952 0.267 0.412 + 232 0.5000 0.2727 0.404 0.446 + 233 0.7000 0.2500 0.227 0.310 + 234 0.5833 0.1667 0.297 0.287 + 235 0.4000 0.2000 0.191 0.153 + 236 0.2500 0.1818 0.123 0.098 + 237 0.5000 0.0833 0.842 0.791 + 238 0.8000 0.1600 0.514 0.576 + 239 0.6250 0.1364 0.330 0.328 + 240 0.5000 0.3182 0.407 0.538 + 241 0.2727 0.0526 0.103 0.046 + 242 0.2500 0.1923 0.271 0.189 + 243 0.1667 0.2083 0.674 1.120 + 244 0.5000 0.2083 0.231 0.164 + 245 0.6250 0.2273 0.877 0.987 + 246 0.4000 0.2500 0.225 0.146 + 247 0.1111 0.1429 0.255 0.176 + 248 0.5000 0.1154 0.202 0.071 + 249 0.2000 0.1200 0.260 0.274 + 250 0.5000 0.2692 0.344 0.260 + 251 0.5556 0.1429 0.622 0.696 + 252 0.3750 0.0909 0.728 0.881 + 253 0.6000 0.1600 0.197 0.115 + 254 0.7143 0.3043 0.606 1.191 + 255 0.5000 0.1667 0.528 0.434 + 256 0.4444 0.1905 0.474 0.592 + 257 0.3750 0.1818 0.835 1.062 + 258 0.7143 0.1304 0.420 0.493 + 259 0.7500 0.2727 0.228 0.276 + 260 0.4167 0.1111 0.721 0.668 + 261 0.2857 0.1739 0.340 0.240 + 262 0.5000 0.1250 0.379 0.417 + 263 0.3333 0.1250 0.602 0.578 + 264 0.6000 0.2000 0.743 0.628 + 265 0.1250 0.1364 0.350 0.374 + 266 0.7500 0.1538 0.465 0.554 + 267 0.4286 0.1304 0.355 0.425 + 268 0.0000 0.1250 0.423 0.201 + 269 0.3333 0.0741 0.543 0.405 + 270 0.6667 0.0000 0.381 0.072 + 271 0.5000 0.0714 0.563 0.281 + 272 1.0000 0.2222 0.471 0.342 + 273 0.3333 0.0952 0.150 0.230 + 274 0.6000 0.0400 0.150 0.209 + 275 0.5000 0.0000 0.020 0.014 + 276 0.5000 0.1429 0.368 0.350 + 277 0.6000 0.1200 0.398 0.648 + 278 0.3333 0.1667 0.405 0.607 + 279 0.3333 0.1667 0.898 1.498 + 280 0.1667 0.0000 0.100 0.000 + 281 0.0000 0.2069 0.623 0.881 + 282 0.3333 0.1667 0.348 0.262 + 283 0.1667 0.1667 0.414 0.439 + 284 0.4000 0.1200 0.224 0.147 + 285 0.4000 0.0800 0.865 0.849 + 286 0.2500 0.1538 0.320 0.415 + 287 0.2000 0.2000 0.126 0.055 + 288 0.3333 0.0833 0.298 0.259 + 289 0.5000 0.1154 0.190 0.156 + 290 1.0000 0.1600 0.369 0.460 + 291 0.4444 0.0000 0.165 0.093 + 292 0.2500 0.0769 1.270 1.654 + 293 0.6667 0.1111 0.287 0.284 + 294 0.0000 0.1200 0.473 0.390 + 295 0.3333 0.1111 0.888 1.057 + 296 0.7500 0.0000 0.197 0.144 + 297 0.6667 0.0741 0.153 0.153 + 298 0.2500 0.2308 0.227 0.285 + 299 0.1429 0.0435 0.460 0.608 + 300 0.5000 0.0714 0.063 0.058 + 301 0.3333 0.0370 0.050 0 + 302 0.0000 0.0714 0.205 0.219 + 303 0.5000 0.1429 0.186 0.183 + 304 0.4000 0.1600 0.342 0.406 + 305 0.1667 0.1667 0.422 0.368 + 306 0.4000 0.2400 0.296 0.350 + 307 0.2500 0.0455 0.202 0.159 + 308 0.3333 0.0741 0.178 0.137 + 309 0.3333 0.0741 0.293 0.240 + 310 0.3333 0.1111 0.122 0.140 + 311 0.2500 0.1923 0.135 0.061 + 312 0.5000 0.0833 0.340 0.197 + 313 0.4000 0.2400 0.290 0.202 + 314 0.2500 0.0455 0.078 0.088 + 315 0.3333 0.0741 0.381 0.376 + 316 0.3333 0.0741 0.365 0.437 + 317 0.0000 0.1852 0.325 0.461 + 318 0.4000 0.0800 0.433 0.419 + 319 0.5000 0.1154 0.431 0.239 + 320 0.4000 0.1200 0.332 0.283 + 321 0.2000 0.1200 0.114 0.101 + 322 0.2500 0.0769 0.099 0.073 + 323 0.3333 0.0741 0.396 0.343 + 324 0.3333 0.0370 0.105 0.106 + 325 0.5000 0.0357 0.163 0.194 + 326 0.0000 0.0714 0.430 0.141 + 327 0.0000 0.1429 0.270 0.254 + 328 0.0000 0.1154 0.390 0.207 + 329 0.3333 0.0000 0.100 0.000 + 330 0.0000 0.1034 0.440 0.066 + 331 0.0000 0.0741 0.470 0.127 + 332 0.5000 0.0714 0.087 0.040 + 333 0.0000 0.0741 0.430 0.071 + 334 0.0000 0.0714 0.115 0.092 + 335 0.0000 0.1071 0.137 0.110 + 336 0.0000 0.0741 0.049 0.043 + 337 0.0000 0.0357 0.152 0.000 + 338 0.0000 0.1034 0.288 0.230 + 339 0.0000 0.0741 0.176 0.105 + 340 0.0000 0.1071 0.067 0.029 + 341 0.0000 0.0370 0.030 0.000 + 342 0.0000 0.0690 0.355 0.035 + 343 0.5000 0.1429 0.300 0.234 + 344 0.2000 0.0400 0.355 0.106 + 345 0.5000 0.0000 0.080 0.000 + 346 0.0000 0.0000 0.000 0.000 + 347 0.0000 0.0000 0.000 0.000 + 348 0.0000 0.1000 0.213 0.088 + 349 0.3333 0.0370 0.315 0.092 + 350 0.5000 0.0357 0.220 0.198 + 351 1.0000 0.1071 0.484 0.490 + 352 0.2000 0.0800 0.095 0.030 + 353 0.0000 0.0370 0.130 0.000 + 354 1.0000 0.1034 0.310 0.221 + 355 0.2500 0.1154 0.211 0.210 + 356 0.0000 0.0000 0.000 0.000 + 357 0.0000 0.0000 0.000 0.000 + 358 0.0000 0.0333 0.180 0.000 + 359 0.0000 0.0690 0.203 0.251 + 360 0.5000 0.0714 0.345 0.371 + 361 0.3333 0.0741 0.400 0.265 + 362 0.3333 0.0741 0.162 0.037 + 363 0.0000 0.0370 0.100 0.000 + 364 0.0000 0.0690 0.100 0 + 365 0.0000 0.0357 0.127 0.000 + 366 0.0000 0.0357 0.127 0.000 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/outsetup.in b/1_Data_SWInput/SoilWat2_defaults/Input/outsetup.in new file mode 100644 index 00000000..4f6a7908 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/outsetup.in @@ -0,0 +1,73 @@ +# Output setup file for SOILWAT2 +# +# Notes: +# Time periods available: DY,WK,MO,YR +# eg, if DY is chosen then 100,200 would mean to use the second hundred days +# But if YR is chosen, start and end numbers are in days so only those days +# are reported for the yearly average. +# Some keys from older versions (fortran and the c versions mimicking the fortran +# version) are not currently implemented: +# ALLH20, WTHR. +# +# ESTABL only produces yearly output, namely, DOY for each species requested. +# Thus, to minimize typo errors, all flags are ignored except the filename. +# Output is simply the day of the year establishment occurred for each species +# in each year of the model run. Refer to the estabs.in file for more info. +# +# DEEPSWC produces output only if the deepdrain flag is set in siteparam.in. +# +# Filename prefixes should not have a file extension. +# Case is unimportant. +# +# SUMTYPEs are one of the following: +# OFF - no output for this variable +# SUM - sum the variable for each day in the output period +# AVG - average the variable over the output period +# FIN - output value of final day in the period; soil water variables only. +# Note that SUM and AVG are the same if timeperiod = dy. +# +# (3-Sep-03) OUTSEP key indicates the output separator. This method +# allows older files to work with the new version. The default is a +# tab. Other options are 's', 't', or 'c' for space, tab, or comma (no quotes) +# or any other printable character as itself (eg, :;| etc). The given +# separator will apply to all of the output files. Note that only lowercase +# letters 's' or 't' are synonyms. +# +# (01/17/2013) TIMESTEP key indicates which periods you want to output. +# You can output all the periods at a time, just one, or however many +# you want. To change which periods to output type 'dy' for day, +# 'wk' for week, 'mo' for month, and 'yr' for year after TIMESTEP +# in any order. For example: 'TIMESTEP mo wk' will output for month and week +# + +OUTSEP c +TIMESTEP dy yr # must be lowercase + +# key SUMTYPE PERIOD start end filename_prefix comment + TEMP AVG WK 1 end temp_air /* max., min, average temperature (C) */ + PRECIP SUM MO 1 end precip /* total precip = sum(rain, snow), rain, snow-fall, snowmelt, and snowloss (cm) */ + SOILINFILT SUM YR 1 end infiltration /* water to infiltrate in top soil layer (cm), runoff (cm); (not-intercepted rain)+(snowmelt-runoff) */ + RUNOFF SUM WK 1 end runoff /* runoff/runon (cm): net runoff, runoff from ponded water, runoff from snowmelt, runon of surface water from hypothetical upslope neighbor */ + VWCBULK AVG MO 1 end vwc_bulk /* bulk volumetric soilwater (cm / layer) */ + VWCMATRIC AVG YR 1 end vwc_matric /* matric volumetric soilwater (cm / layer) */ + SWCBULK AVG DY 1 end swc_bulk /* bulk soilwater content (cm / cm layer); swc.l1(today) = swc.l1(yesterday)+inf_soil-lyrdrain.l1-transp.l1-evap_soil.l1; swc.li(today) = swc.li(yesterday)+lyrdrain.l(i-1)-lyrdrain.li-transp.li-evap_soil.li; swc.llast(today) = swc.llast(yesterday)+lyrdrain.l(last-1)-deepswc-transp.llast-evap_soil.llast */ + SWA AVG YR 1 end swa /* plant available soil water (cm / layer): trees, shrubs, forbs, grasses */ + SWABULK AVG MO 1 end swa_bulk /* DEFUNCT: MAY BE REMOVED IN FUTURE VERSIONS; bulk available soil water (cm/layer) = swc - wilting point */ + SWAMATRIC AVG YR 1 end swa_matric /* DEFUNCT: MAY BE REMOVED IN FUTURE VERSIONS; matric available soil water (cm/layer) = swc - wilting point */ + SWPMATRIC AVG WK 1 end swp_matric /* matric soilwater potential (-bars) */ + SURFACEWATER AVG DY 1 end surface_water /* surface water (cm) */ + TRANSP SUM YR 1 end transp /* transpiration from each soil layer (cm): total, trees, shrubs, forbs, grasses */ + EVAPSOIL SUM DY 1 end evap_soil /* bare-soil evaporation from each soil layer (cm) */ + EVAPSURFACE SUM WK 1 end evap_surface /* evaporation (cm): total, trees, shrubs, forbs, grasses, litter, surface water */ + INTERCEPTION SUM MO 1 end interception /* intercepted rain (cm): total, trees, shrubs, forbs, grasses, and litter (cm) */ + LYRDRAIN SUM DY 1 end percolation /* water percolated from each layer (cm) */ + HYDRED SUM WK 1 end hydred /* hydraulic redistribution from each layer (cm): total, trees, shrubs, forbs, grasses */ + AET SUM YR 1 end aet /* actual evapotr. (cm) */ + PET SUM DY 1 end pet /* potential evaptr (cm) */ + WETDAY SUM DY 1 end wetdays /* days above swc_wet */ + SNOWPACK AVG WK 1 end snowpack /* snowpack water equivalent (cm), snowdepth (cm); since snowpack is already summed, use avg - sum sums the sums = nonsense */ + DEEPSWC SUM MO 1 end deep_drain /* deep drainage into lowest layer (cm) */ + SOILTEMP AVG MO 1 end temp_soil /* soil temperature from each soil layer (in celsius) */ + ESTABL OFF YR 1 end estabs /* yearly establishment results */ + CO2EFFECTS AVG DY 1 end vegetation /* vegetation biomass: biomass (g/m2) for grasses, shrubs, trees, forbs, and total; live biomass (g/m2) fgrasses, shrubs, trees, forbs, and total; biomass CO2-effect (multiplier) for grasses, shrubs, trees, and forbs; WUE CO2-effect (multiplier) for grasses, shrubs, trees, and forbs + diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/siteparam.in b/1_Data_SWInput/SoilWat2_defaults/Input/siteparam.in new file mode 100644 index 00000000..a933074b --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/siteparam.in @@ -0,0 +1,82 @@ +# ---- SWC limits ---- +-1.0 # swc_min : cm/cm if 0 - <1.0, -bars if >= 1.0.; if < 0. then estimate residual water content for each layer +15.0 # swc_init: cm/cm if < 1.0, -bars if >= 1.0. +15.0 # swc_wet : cm/cm if < 1.0, -bars if >= 1.0. + +# ---- Model flags and coefficients ---- +0 # reset (1/0): reset/don't reset swc each new year +1 # deepdrain (1/0): allow/disallow deep drainage function. + # if deepdrain == 1, model expects extra layer in soils file. +1.0 # multiplier for PET (eg for climate change). +0.0 #proportion of ponded surface water removed as daily runoff (value ranges between 0 and 1; 0=no loss of surface water, 1=all ponded water lost via runoff) +0.0 #proportion of water that arrives at surface added as daily runon [from a hypothetical identical neighboring site] (value ranges between 0 and +inf; 0=no runon, >0: runon is occuring) + +# ---- Snow simulation parameters (SWAT2K model): Neitsch S, Arnold J, Kiniry J, Williams J. 2005. Soil and water assessment tool (SWAT) theoretical documentation. version 2005. Blackland Research Center, Texas Agricultural Experiment Station: Temple, TX. +# these parameters are RMSE optimized values for 10 random SNOTEL sites for western US +0.61 # TminAccu2 = Avg. air temp below which ppt is snow ( C) +1.54 # TmaxCrit = Snow temperature at which snow melt starts ( C) +0.1 # lambdasnow = Relative contribution of avg. air temperature to todays snow temperture vs. yesterday's snow temperature (0-1) +0.0 # RmeltMin = Minimum snow melt rate on winter solstice (cm/day/C) +0.27 # RmeltMax = Maximum snow melt rate on summer solstice (cm/day/C) + +# ---- Drainage coefficient ---- +0.02 # slow-drain coefficient per layer (cm/day). See Eqn 2.9 in ELM doc. + # ELM shows this as a value for each layer, but this way it's applied to all. + # (Q=.02 in ELM doc, .06 in FORTRAN version). + +# ---- Evaporation coefficients ---- +# These control the tangent function (tanfunc) which affects the amount of soil +# water extractable by evaporation and transpiration. +# These constants aren't documented by the ELM doc. +45. # rate shift (x value of inflection point). lower value shifts curve + # leftward, meaning less water lost to evap at a given swp. effectively + # shortens/extends high rate. +.1 # rate slope: lower value (eg .01) straightens S shape meaning more gradual + # reduction effect; higher value (.5) makes abrupt transition +.25 # inflection point (y-value of inflection point) +0.5 # range: diff btw upper and lower rates at the limits + +# ---- Transpiration Coefficients ---- +# comments from Evap constants apply. +45. # rate shift +.1 # rate shape +.5 # inflection point +1.1 # range + +# ---- Intrinsic site params: +0.681 # latitude of the site in radians +1000 # elevation of site (m a.s.l.) +0 # slope at site (degrees): no slope = 0 +-1 # aspect at site (degrees): N=0, E=90, S=180, W=270, no slope:-1 + +# ---- Soil Temperature Constants ---- +# from Parton 1978, ch. 2.2.2 Temperature-profile Submodel +300. # biomass limiter, 300 g/m^2 in Parton's equation for T1(avg daily temperature at the top of the soil) +15. # constant for T1 equation (used if biomass <= biomass limiter), 15 in Parton's equation +-4. # constant for T1 equation (used if biomass > biomass limiter), -4 in Parton's equation +600. # constant for T1 equation (used if biomass > biomass limiter), 600 in Parton's equation +0.00070 # constant for cs (soil-thermal conductivity) equation, 0.00070 in Parton's equation +0.00030 # constant for cs equation, 0.00030 in Parton's equation +0.18 # constant for sh (specific heat capacity) equation, 0.18 in Parton's equation +4.15 # constant soil temperature (Celsius) at the lower boundary (max depth); approximate by mean annual air temperature of site +15. # deltaX parameter for soil_temperature function, default is 15. (distance between profile points in cm) max depth (the next number) should be evenly divisible by this number +990. # max depth for the soil_temperature function equation, default is 990. this number should be evenly divisible by deltaX +1 # flag, 1 to calculate soil_temperature, 0 to not calculate soil_temperature + +# ---- CO2 Settings ---- +# Use biomass multiplier +1 +# Use water-usage efficiency multiplier +1 +# Scenario +RCP85 + +# ---- Transpiration regions ---- +# ndx : 1=shallow, 2=medium, 3=deep, 4=very deep +# layer: deepest layer number of the region. +# Layers are defined in soils.in. +# ndx layer + 1 3 + 2 5 + 3 8 +# 4 20 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/soils.in b/1_Data_SWInput/SoilWat2_defaults/Input/soils.in new file mode 100644 index 00000000..02e7f4f4 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/soils.in @@ -0,0 +1,17 @@ +# Soil layer definitions +# Location: +# +# depth = (cm) lower limit of layer; layers must be in order of depth. +# matricd = (g/cm^3) bulk density of soil in this layer. +# gravel_content = the percent volume of each layer composed of gravel (i.e., particles > 2mm) +# evco = (frac) proportion of total baresoil evap from this layer. +# trco = (frac) proportion of total transpiration from this layer for each vegetation type (tree, forb, shrub, grass) +# %sand = (frac) proportion of sand in layer (0-1.0). +# %clay = (frac) proportion of clay in layer (0-1.0). +# imperm = (frac) proportion of 'impermeability' to water percolation(/infiltration/drainage) in layer (0-1.0) +# soiltemp = the initial temperature of each soil layer (in celcius), from the day before the simulation starts +# Note that the evco and trco columns must sum to 1.0 or they will +# be normalized. +# +# depth matricd gravel_content evco trco_grass trco_shrub trco_tree trco_forb %sand %clay imperm soiltemp + 5.000 1.430 0.100 0.813 0.033 0.134 0.033 0.134 0.510 0.150 0.000 -1.000 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/swcsetup.in b/1_Data_SWInput/SoilWat2_defaults/Input/swcsetup.in new file mode 100644 index 00000000..3eaf3069 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/swcsetup.in @@ -0,0 +1,7 @@ +# Setup parameters for measured swc +# Location: - +# +0 # 1=use swcdata history data file, 0= don't use +swcdata # input data file prefix +1949 # first year of measurement data files +2 # method: 1=average with model; 2=measured+/- stderr diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/veg.in b/1_Data_SWInput/SoilWat2_defaults/Input/veg.in new file mode 100644 index 00000000..de253e5b --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/veg.in @@ -0,0 +1,152 @@ +# Plant production data file for SOILWAT2 +# Location: + +# ---- Composition of vegetation type components (0-1; must add up to 1) +# Grasses Shrubs Trees Forbs BareGround + 0.2 0.2 0.2 0.2 0.2 + + +# ---- Albedo +# Grasses Shrubs Trees Forbs BareGround + 0.167 0.143 0.106 0.167 0.15 # albedo: (Houldcroft et al. 2009) MODIS snowfree 'grassland', 'open shrub', ‘evergreen needle forest’ with MODIS albedo aggregated over pure IGBP cells where NDVI is greater than the 98th percentile NDVI + + +# ---- % Cover: divide standing LAI by this to get % cover +# Grasses Shrubs Trees Forbs + 3.0 2.22 5.0 3.0 + + +# -- Canopy height (cm) parameters either constant through season or as tanfunc with respect to biomass (g/m^2) +# Grasses Shrubs Trees Forbs + 300.0 0.0 0.0 300.0 # xinflec + 29.5 5.0 5.0 29.5 # yinflec + 85. 100. 3000. 85. # range + 0.002 0.003 0.00008 0.002 # slope + 0.0 50. 1200. 0.0 # if > 0 then constant canopy height (cm) + + +# --- Vegetation interception parameters for equation: intercepted rain = (a + b*veg) + (c+d*veg) * ppt; Grasses+Shrubs: veg=vegcov, Trees: veg=LAI +# Grasses Shrubs Trees Forbs + 0.0182 0. 0.00461 0.0182 # a + 0.0065 0.0026 0.01405 0.0065 # b + 0.0019 0. 0.0383 0.0019 # c + 0.0054 0.0033 0.0337 0.0054 # d + + +# --- Litter interception parameters for equation: intercepted rain = (a + b*litter) + (c+d*litter) * ppt +# Grasses Shrubs Trees Forbs + 0.0151 0.0151 0.0151 0.0151 # a + 0.00005 0.00005 0.00005 0.00005 # b + 0.0116 0.0116 0.0116 0.0116 # c + 0.00002 0.00002 0.00002 0.00002 # d + + +# ---- Parameter for partitioning of bare-soil evaporation and transpiration as in Es = exp(-param*LAI) +# Grasses Shrubs Trees Forbs + 1. 1. 0.41 1. # Trees: According to a regression based on a review by Daikoku, K., S. Hattori, A. Deguchi, Y. Aoki, M. Miyashita, K. Matsumoto, J. Akiyama, S. Iida, T. Toba, Y. Fujita, and T. Ohta. 2008. Influence of evaporation from the forest floor on evapotranspiration from the dry canopy. Hydrological Processes 22:4083-4096. + + +# ---- Parameter for scaling and limiting bare soil evaporation rate: if totagb (g/m2) > param then no bare-soil evaporation +# Grasses Shrubs Trees Forbs + 999. 999. 2099. 999. # + + +# --- Shade effects on transpiration based on live and dead biomass +# Grasses Shrubs Trees Forbs + 0.3 0.3 0.3 0.3 # shade scale + 150. 150. 150. 150. # shade maximal dead biomass + 300. 300. 0. 300. # tanfunc: xinflec + 12. 12. 0. 12. # yinflec + 34. 34. 2. 34. # range + 0.002 0.002 0.0002 0.002 # slope + + +# ---- Hydraulic redistribution: Ryel, Ryel R, Caldwell, Caldwell M, Yoder, Yoder C, Or, Or D, Leffler, Leffler A. 2002. Hydraulic redistribution in a stand of Artemisia tridentata: evaluation of benefits to transpiration assessed with a simulation model. Oecologia 130: 173-184. +# Grasses Shrubs Trees Forbs + 1 1 1 1 # flag to turn on/off (1/0) hydraulic redistribution + -0.2328 -0.2328 -0.2328 -0.2328 # maxCondroot - maximum radial soil-root conductance of the entire active root system for water (cm/-bar/day) = 0.097 cm/MPa/h + 10. 10. 10. 10. # swp50 - soil water potential (-bar) where conductance is reduced by 50% = -1. MPa + 3.22 3.22 3.22 3.22 # shapeCond - shaping parameter for the empirical relationship from van Genuchten to model relative soil-root conductance for water + + +# ---- Critical soil water potential (MPa), i.e., when transpiration rates cannot sustained anymore, for instance, for many crop species -1.5 MPa is assumed and called wilting point +# Grasses Shrubs Trees Forbs + -3.5 -3.9 -2.0 -2.0 + + +# ---- CO2 Coefficients: multiplier = Coeff1 * x^Coeff2 +# Coefficients assume that monthly biomass inputs reflect values for conditions at +# 360 ppm CO2, i.e., multiplier = 1 for x = 360 ppm CO2 +# Grasses Shrubs Trees Forbs + 0.1319 0.1319 0.1319 0.1319 # Biomass Coeff1 + 0.3442 0.3442 0.3442 0.3442 # Biomass Coeff2 + 25.158 25.158 25.158 25.158 # WUE Coeff1 + -0.548 -0.548 -0.548 -0.548 # WUE Coeff2 + + +# Grasslands component: +# -------------- Monthly production values ------------ +# Litter - dead leafy material on the ground (g/m^2 ). +# Biomass - living and dead/woody aboveground standing biomass (g/m^2). +# %Live - proportion of Biomass that is actually living (0-1.0). +# LAI_conv - monthly amount of biomass needed to produce LAI=1.0 (g/m^2). +# There should be 12 rows, one for each month, starting with January. +# +#Litter Biomass %Live LAI_conv + 75.0 150.0 0.00 300. # January + 80.0 150.0 0.00 300. # February + 85.0 150.0 0.10 300. # March + 90.0 170.0 0.20 300. # April + 50.0 190.0 0.40 300. # May + 50.0 220.0 0.60 300. # June + 50.0 250.0 0.40 300. # July + 55.0 220.0 0.60 300. # August + 60.0 190.0 0.40 300. # September + 65.0 180.0 0.20 300. # October + 70.0 170.0 0.10 300. # November + 75.0 160.0 0.00 300. # December + +# Shrublands component: +#Litter Biomass %Live LAI_conv +85.4 210.0 0.06 372 # January +88.2 212.0 0.08 372 # February +95.3 228.0 0.20 372 # March +100.5 272.0 0.33 372 # April +166.4 400.0 0.57 372 # May +186.0 404.0 0.55 372 # June +177.1 381.0 0.50 372 # July +212.2 352.0 0.46 372 # August +157.4 286.0 0.32 372 # September +124.9 235.0 0.15 372 # October +110.4 218.0 0.08 372 # November +104.3 214.0 0.06 372 # December + +# Forest component: +#Litter Biomass %Live LAI_conv +2000 15000 0.083 500 # January +2000 15000 0.083 500 # February +2000 15000 0.083 500 # March +2000 15000 0.083 500 # April +2000 15000 0.083 500 # May +2000 15000 0.083 500 # June +2000 15000 0.083 500 # July +2000 15000 0.083 500 # August +2000 15000 0.083 500 # September +2000 15000 0.083 500 # October +2000 15000 0.083 500 # November +2000 15000 0.083 500 # December + +# Forb component: +#Litter Biomass %Live LAI_conv + 75.0 150.0 0.00 300. # January + 80.0 150.0 0.00 300. # February + 85.0 150.0 0.10 300. # March + 90.0 170.0 0.20 300. # April + 50.0 190.0 0.40 300. # May + 50.0 220.0 0.60 300. # June + 50.0 250.0 0.40 300. # July + 55.0 220.0 0.60 300. # August + 60.0 190.0 0.40 300. # September + 65.0 180.0 0.20 300. # October + 70.0 170.0 0.10 300. # November + 75.0 160.0 0.00 300. # December diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/weathsetup.in b/1_Data_SWInput/SoilWat2_defaults/Input/weathsetup.in new file mode 100644 index 00000000..1d74f9f6 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/weathsetup.in @@ -0,0 +1,31 @@ +# Weather setup parameters +# +1 # 1 = simulate snow processes; 0 = no snow effects +0.0 # % of snow drift per snow event (+ indicates snow addition, - indicates snow taken away from site) +0.0 # % of snowmelt water as runoff/on per event (>0 indicates runoff, <0 indicates runon) +0 # 0 = use historical data only; 1 = use markov process for missing weather +1980 # first year to begin historical weather. +5 # number of days to use in the running average of temperature. + +# Monthly scaling parameters: +# Month 1 = January, Month 2 = February, etc. +# PPT = multiplicative for daily PPT; max(0, scale * ppt) +# MaxT = additive for daily max temperature [C]; scale + maxtemp +# MinT = additive for daily min temperature [C]; scale + mintemp +# SkyCover = additive for mean monthly sky cover [%]; min(100, max(0, scale + sky cover)) +# Wind = multiplicative for mean monthly wind speed; max(0, scale * wind speed) +# rH = additive for mean monthly relative humidity [%]; min(100, max(0, scale + rel. Humidity)) +# Transmissivity = multiplicative for mean monthly relative transmissivity; min(1, max(0, scale * transmissivity)) +#Mon PPT MaxT MinT SkyCover Wind rH Transmissivity +1 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +2 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +3 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +4 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +5 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +6 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +7 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +8 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +9 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +10 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +11 1.000 0.00 0.00 0.0 1.0 0.0 1.0 +12 1.000 0.00 0.00 0.0 1.0 0.0 1.0 diff --git a/1_Data_SWInput/SoilWat2_defaults/Input/years.in b/1_Data_SWInput/SoilWat2_defaults/Input/years.in new file mode 100644 index 00000000..b5ff1073 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/Input/years.in @@ -0,0 +1,7 @@ +# Model time definition file + +1980 # first year of simulation (but see weather and swc inputs) +2010 # last year of simulation +1 # first day of first year +365 # last day of last year +N # hemisphere (N, S) diff --git a/1_Data_SWInput/SoilWat2_defaults/files.in b/1_Data_SWInput/SoilWat2_defaults/files.in new file mode 100644 index 00000000..1084d689 --- /dev/null +++ b/1_Data_SWInput/SoilWat2_defaults/files.in @@ -0,0 +1,40 @@ +# List of input files for SOILWAT2 +# This is the first file read. + +# Model +Input/years.in # years for model operation +Output/logfile.log # errors or important info (can also be stdout) + +#Site +Input/siteparam.in # site parameters +Input/soils.in # soil layer definitions + +#Weather & climate +Input/weathsetup.in # weather parameters +Input/data_weather/weath # data file containing historical weather (can include path); PROGRAMMER NOTE: This is currently the 5th position; if this changes then update function SW_Files.c/SW_F_read() +Input/mkv_prob.in # precip probs; required for markov weather +Input/mkv_covar.in # covariance table required for markov weather +Input/climate.in # general atmospheric params + +#Vegetation +Input/veg.in # productivity values +Input/estab.in # plant establishment start file + +#CO2 +Input/carbon.in + +#SWC measurements +Input/swcsetup.in # params for handling measured swc + +#Output +Output/ # 'relative' path for output files: / for same directory, or e.g., Output/; PROGRAMMER NOTE: This is currently the 13th position; if this changes then update function SW_Files.c/SW_F_read() +Input/outsetup.in # define output quantities +Output/sw2_daily.csv #output +Output/sw2_weekly.csv #output +Output/sw2_monthly.csv #output +Output/sw2_yearly.csv #output + +Output/sw2_daily_slyrs.csv #output +Output/sw2_weekly_slyrs.csv #output +Output/sw2_monthly_slyrs.csv #output +Output/sw2_yearly_slyrs.csv #output diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Change_v11.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Change_v11.csv new file mode 100644 index 00000000..27d3f215 --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Change_v11.csv @@ -0,0 +1,2 @@ +"Label","PPTfactor_m1_sc00","PPTfactor_m2_sc00","PPTfactor_m3_sc00","PPTfactor_m4_sc00","PPTfactor_m5_sc00","PPTfactor_m6_sc00","PPTfactor_m7_sc00","PPTfactor_m8_sc00","PPTfactor_m9_sc00","PPTfactor_m10_sc00","PPTfactor_m11_sc00","PPTfactor_m12_sc00","deltaTempC_min_m1_sc00","deltaTempC_min_m2_sc00","deltaTempC_min_m3_sc00","deltaTempC_min_m4_sc00","deltaTempC_min_m5_sc00","deltaTempC_min_m6_sc00","deltaTempC_min_m7_sc00","deltaTempC_min_m8_sc00","deltaTempC_min_m9_sc00","deltaTempC_min_m10_sc00","deltaTempC_min_m11_sc00","deltaTempC_min_m12_sc00","deltaTempC_max_m1_sc00","deltaTempC_max_m2_sc00","deltaTempC_max_m3_sc00","deltaTempC_max_m4_sc00","deltaTempC_max_m5_sc00","deltaTempC_max_m6_sc00","deltaTempC_max_m7_sc00","deltaTempC_max_m8_sc00","deltaTempC_max_m9_sc00","deltaTempC_max_m10_sc00","deltaTempC_max_m11_sc00","deltaTempC_max_m12_sc00","PPTfactor_m1_sc01","PPTfactor_m2_sc01","PPTfactor_m3_sc01","PPTfactor_m4_sc01","PPTfactor_m5_sc01","PPTfactor_m6_sc01","PPTfactor_m7_sc01","PPTfactor_m8_sc01","PPTfactor_m9_sc01","PPTfactor_m10_sc01","PPTfactor_m11_sc01","PPTfactor_m12_sc01","deltaTempC_min_m1_sc01","deltaTempC_min_m2_sc01","deltaTempC_min_m3_sc01","deltaTempC_min_m4_sc01","deltaTempC_min_m5_sc01","deltaTempC_min_m6_sc01","deltaTempC_min_m7_sc01","deltaTempC_min_m8_sc01","deltaTempC_min_m9_sc01","deltaTempC_min_m10_sc01","deltaTempC_min_m11_sc01","deltaTempC_min_m12_sc01","deltaTempC_max_m1_sc01","deltaTempC_max_m2_sc01","deltaTempC_max_m3_sc01","deltaTempC_max_m4_sc01","deltaTempC_max_m5_sc01","deltaTempC_max_m6_sc01","deltaTempC_max_m7_sc01","deltaTempC_max_m8_sc01","deltaTempC_max_m9_sc01","deltaTempC_max_m10_sc01","deltaTempC_max_m11_sc01","deltaTempC_max_m12_sc01","PPTfactor_m1_sc02","PPTfactor_m2_sc02","PPTfactor_m3_sc02","PPTfactor_m4_sc02","PPTfactor_m5_sc02","PPTfactor_m6_sc02","PPTfactor_m7_sc02","PPTfactor_m8_sc02","PPTfactor_m9_sc02","PPTfactor_m10_sc02","PPTfactor_m11_sc02","PPTfactor_m12_sc02","deltaTempC_min_m1_sc02","deltaTempC_min_m2_sc02","deltaTempC_min_m3_sc02","deltaTempC_min_m4_sc02","deltaTempC_min_m5_sc02","deltaTempC_min_m6_sc02","deltaTempC_min_m7_sc02","deltaTempC_min_m8_sc02","deltaTempC_min_m9_sc02","deltaTempC_min_m10_sc02","deltaTempC_min_m11_sc02","deltaTempC_min_m12_sc02","deltaTempC_max_m1_sc02","deltaTempC_max_m2_sc02","deltaTempC_max_m3_sc02","deltaTempC_max_m4_sc02","deltaTempC_max_m5_sc02","deltaTempC_max_m6_sc02","deltaTempC_max_m7_sc02","deltaTempC_max_m8_sc02","deltaTempC_max_m9_sc02","deltaTempC_max_m10_sc02","deltaTempC_max_m11_sc02","deltaTempC_max_m12_sc02","PPTfactor_m1_sc03","PPTfactor_m2_sc03","PPTfactor_m3_sc03","PPTfactor_m4_sc03","PPTfactor_m5_sc03","PPTfactor_m6_sc03","PPTfactor_m7_sc03","PPTfactor_m8_sc03","PPTfactor_m9_sc03","PPTfactor_m10_sc03","PPTfactor_m11_sc03","PPTfactor_m12_sc03","deltaTempC_min_m1_sc03","deltaTempC_min_m2_sc03","deltaTempC_min_m3_sc03","deltaTempC_min_m4_sc03","deltaTempC_min_m5_sc03","deltaTempC_min_m6_sc03","deltaTempC_min_m7_sc03","deltaTempC_min_m8_sc03","deltaTempC_min_m9_sc03","deltaTempC_min_m10_sc03","deltaTempC_min_m11_sc03","deltaTempC_min_m12_sc03","deltaTempC_max_m1_sc03","deltaTempC_max_m2_sc03","deltaTempC_max_m3_sc03","deltaTempC_max_m4_sc03","deltaTempC_max_m5_sc03","deltaTempC_max_m6_sc03","deltaTempC_max_m7_sc03","deltaTempC_max_m8_sc03","deltaTempC_max_m9_sc03","deltaTempC_max_m10_sc03","deltaTempC_max_m11_sc03","deltaTempC_max_m12_sc03","PPTfactor_m1_sc04","PPTfactor_m2_sc04","PPTfactor_m3_sc04","PPTfactor_m4_sc04","PPTfactor_m5_sc04","PPTfactor_m6_sc04","PPTfactor_m7_sc04","PPTfactor_m8_sc04","PPTfactor_m9_sc04","PPTfactor_m10_sc04","PPTfactor_m11_sc04","PPTfactor_m12_sc04","deltaTempC_min_m1_sc04","deltaTempC_min_m2_sc04","deltaTempC_min_m3_sc04","deltaTempC_min_m4_sc04","deltaTempC_min_m5_sc04","deltaTempC_min_m6_sc04","deltaTempC_min_m7_sc04","deltaTempC_min_m8_sc04","deltaTempC_min_m9_sc04","deltaTempC_min_m10_sc04","deltaTempC_min_m11_sc04","deltaTempC_min_m12_sc04","deltaTempC_max_m1_sc04","deltaTempC_max_m2_sc04","deltaTempC_max_m3_sc04","deltaTempC_max_m4_sc04","deltaTempC_max_m5_sc04","deltaTempC_max_m6_sc04","deltaTempC_max_m7_sc04","deltaTempC_max_m8_sc04","deltaTempC_max_m9_sc04","deltaTempC_max_m10_sc04","deltaTempC_max_m11_sc04","deltaTempC_max_m12_sc04","PPTfactor_m1_sc05","PPTfactor_m2_sc05","PPTfactor_m3_sc05","PPTfactor_m4_sc05","PPTfactor_m5_sc05","PPTfactor_m6_sc05","PPTfactor_m7_sc05","PPTfactor_m8_sc05","PPTfactor_m9_sc05","PPTfactor_m10_sc05","PPTfactor_m11_sc05","PPTfactor_m12_sc05","deltaTempC_min_m1_sc05","deltaTempC_min_m2_sc05","deltaTempC_min_m3_sc05","deltaTempC_min_m4_sc05","deltaTempC_min_m5_sc05","deltaTempC_min_m6_sc05","deltaTempC_min_m7_sc05","deltaTempC_min_m8_sc05","deltaTempC_min_m9_sc05","deltaTempC_min_m10_sc05","deltaTempC_min_m11_sc05","deltaTempC_min_m12_sc05","deltaTempC_max_m1_sc05","deltaTempC_max_m2_sc05","deltaTempC_max_m3_sc05","deltaTempC_max_m4_sc05","deltaTempC_max_m5_sc05","deltaTempC_max_m6_sc05","deltaTempC_max_m7_sc05","deltaTempC_max_m8_sc05","deltaTempC_max_m9_sc05","deltaTempC_max_m10_sc05","deltaTempC_max_m11_sc05","deltaTempC_max_m12_sc05","PPTfactor_m1_sc06","PPTfactor_m2_sc06","PPTfactor_m3_sc06","PPTfactor_m4_sc06","PPTfactor_m5_sc06","PPTfactor_m6_sc06","PPTfactor_m7_sc06","PPTfactor_m8_sc06","PPTfactor_m9_sc06","PPTfactor_m10_sc06","PPTfactor_m11_sc06","PPTfactor_m12_sc06","deltaTempC_min_m1_sc06","deltaTempC_min_m2_sc06","deltaTempC_min_m3_sc06","deltaTempC_min_m4_sc06","deltaTempC_min_m5_sc06","deltaTempC_min_m6_sc06","deltaTempC_min_m7_sc06","deltaTempC_min_m8_sc06","deltaTempC_min_m9_sc06","deltaTempC_min_m10_sc06","deltaTempC_min_m11_sc06","deltaTempC_min_m12_sc06","deltaTempC_max_m1_sc06","deltaTempC_max_m2_sc06","deltaTempC_max_m3_sc06","deltaTempC_max_m4_sc06","deltaTempC_max_m5_sc06","deltaTempC_max_m6_sc06","deltaTempC_max_m7_sc06","deltaTempC_max_m8_sc06","deltaTempC_max_m9_sc06","deltaTempC_max_m10_sc06","deltaTempC_max_m11_sc06","deltaTempC_max_m12_sc06","PPTfactor_m1_sc07","PPTfactor_m2_sc07","PPTfactor_m3_sc07","PPTfactor_m4_sc07","PPTfactor_m5_sc07","PPTfactor_m6_sc07","PPTfactor_m7_sc07","PPTfactor_m8_sc07","PPTfactor_m9_sc07","PPTfactor_m10_sc07","PPTfactor_m11_sc07","PPTfactor_m12_sc07","deltaTempC_min_m1_sc07","deltaTempC_min_m2_sc07","deltaTempC_min_m3_sc07","deltaTempC_min_m4_sc07","deltaTempC_min_m5_sc07","deltaTempC_min_m6_sc07","deltaTempC_min_m7_sc07","deltaTempC_min_m8_sc07","deltaTempC_min_m9_sc07","deltaTempC_min_m10_sc07","deltaTempC_min_m11_sc07","deltaTempC_min_m12_sc07","deltaTempC_max_m1_sc07","deltaTempC_max_m2_sc07","deltaTempC_max_m3_sc07","deltaTempC_max_m4_sc07","deltaTempC_max_m5_sc07","deltaTempC_max_m6_sc07","deltaTempC_max_m7_sc07","deltaTempC_max_m8_sc07","deltaTempC_max_m9_sc07","deltaTempC_max_m10_sc07","deltaTempC_max_m11_sc07","deltaTempC_max_m12_sc07","PPTfactor_m1_sc08","PPTfactor_m2_sc08","PPTfactor_m3_sc08","PPTfactor_m4_sc08","PPTfactor_m5_sc08","PPTfactor_m6_sc08","PPTfactor_m7_sc08","PPTfactor_m8_sc08","PPTfactor_m9_sc08","PPTfactor_m10_sc08","PPTfactor_m11_sc08","PPTfactor_m12_sc08","deltaTempC_min_m1_sc08","deltaTempC_min_m2_sc08","deltaTempC_min_m3_sc08","deltaTempC_min_m4_sc08","deltaTempC_min_m5_sc08","deltaTempC_min_m6_sc08","deltaTempC_min_m7_sc08","deltaTempC_min_m8_sc08","deltaTempC_min_m9_sc08","deltaTempC_min_m10_sc08","deltaTempC_min_m11_sc08","deltaTempC_min_m12_sc08","deltaTempC_max_m1_sc08","deltaTempC_max_m2_sc08","deltaTempC_max_m3_sc08","deltaTempC_max_m4_sc08","deltaTempC_max_m5_sc08","deltaTempC_max_m6_sc08","deltaTempC_max_m7_sc08","deltaTempC_max_m8_sc08","deltaTempC_max_m9_sc08","deltaTempC_max_m10_sc08","deltaTempC_max_m11_sc08","deltaTempC_max_m12_sc08","PPTfactor_m1_sc09","PPTfactor_m2_sc09","PPTfactor_m3_sc09","PPTfactor_m4_sc09","PPTfactor_m5_sc09","PPTfactor_m6_sc09","PPTfactor_m7_sc09","PPTfactor_m8_sc09","PPTfactor_m9_sc09","PPTfactor_m10_sc09","PPTfactor_m11_sc09","PPTfactor_m12_sc09","deltaTempC_min_m1_sc09","deltaTempC_min_m2_sc09","deltaTempC_min_m3_sc09","deltaTempC_min_m4_sc09","deltaTempC_min_m5_sc09","deltaTempC_min_m6_sc09","deltaTempC_min_m7_sc09","deltaTempC_min_m8_sc09","deltaTempC_min_m9_sc09","deltaTempC_min_m10_sc09","deltaTempC_min_m11_sc09","deltaTempC_min_m12_sc09","deltaTempC_max_m1_sc09","deltaTempC_max_m2_sc09","deltaTempC_max_m3_sc09","deltaTempC_max_m4_sc09","deltaTempC_max_m5_sc09","deltaTempC_max_m6_sc09","deltaTempC_max_m7_sc09","deltaTempC_max_m8_sc09","deltaTempC_max_m9_sc09","deltaTempC_max_m10_sc09","deltaTempC_max_m11_sc09","deltaTempC_max_m12_sc09","PPTfactor_m1_sc10","PPTfactor_m2_sc10","PPTfactor_m3_sc10","PPTfactor_m4_sc10","PPTfactor_m5_sc10","PPTfactor_m6_sc10","PPTfactor_m7_sc10","PPTfactor_m8_sc10","PPTfactor_m9_sc10","PPTfactor_m10_sc10","PPTfactor_m11_sc10","PPTfactor_m12_sc10","deltaTempC_min_m1_sc10","deltaTempC_min_m2_sc10","deltaTempC_min_m3_sc10","deltaTempC_min_m4_sc10","deltaTempC_min_m5_sc10","deltaTempC_min_m6_sc10","deltaTempC_min_m7_sc10","deltaTempC_min_m8_sc10","deltaTempC_min_m9_sc10","deltaTempC_min_m10_sc10","deltaTempC_min_m11_sc10","deltaTempC_min_m12_sc10","deltaTempC_max_m1_sc10","deltaTempC_max_m2_sc10","deltaTempC_max_m3_sc10","deltaTempC_max_m4_sc10","deltaTempC_max_m5_sc10","deltaTempC_max_m6_sc10","deltaTempC_max_m7_sc10","deltaTempC_max_m8_sc10","deltaTempC_max_m9_sc10","deltaTempC_max_m10_sc10","deltaTempC_max_m11_sc10","deltaTempC_max_m12_sc10","PPTfactor_m1_sc11","PPTfactor_m2_sc11","PPTfactor_m3_sc11","PPTfactor_m4_sc11","PPTfactor_m5_sc11","PPTfactor_m6_sc11","PPTfactor_m7_sc11","PPTfactor_m8_sc11","PPTfactor_m9_sc11","PPTfactor_m10_sc11","PPTfactor_m11_sc11","PPTfactor_m12_sc11","deltaTempC_min_m1_sc11","deltaTempC_min_m2_sc11","deltaTempC_min_m3_sc11","deltaTempC_min_m4_sc11","deltaTempC_min_m5_sc11","deltaTempC_min_m6_sc11","deltaTempC_min_m7_sc11","deltaTempC_min_m8_sc11","deltaTempC_min_m9_sc11","deltaTempC_min_m10_sc11","deltaTempC_min_m11_sc11","deltaTempC_min_m12_sc11","deltaTempC_max_m1_sc11","deltaTempC_max_m2_sc11","deltaTempC_max_m3_sc11","deltaTempC_max_m4_sc11","deltaTempC_max_m5_sc11","deltaTempC_max_m6_sc11","deltaTempC_max_m7_sc11","deltaTempC_max_m8_sc11","deltaTempC_max_m9_sc11","deltaTempC_max_m10_sc11","deltaTempC_max_m11_sc11","deltaTempC_max_m12_sc11","PPTfactor_m1_sc12","PPTfactor_m2_sc12","PPTfactor_m3_sc12","PPTfactor_m4_sc12","PPTfactor_m5_sc12","PPTfactor_m6_sc12","PPTfactor_m7_sc12","PPTfactor_m8_sc12","PPTfactor_m9_sc12","PPTfactor_m10_sc12","PPTfactor_m11_sc12","PPTfactor_m12_sc12","deltaTempC_min_m1_sc12","deltaTempC_min_m2_sc12","deltaTempC_min_m3_sc12","deltaTempC_min_m4_sc12","deltaTempC_min_m5_sc12","deltaTempC_min_m6_sc12","deltaTempC_min_m7_sc12","deltaTempC_min_m8_sc12","deltaTempC_min_m9_sc12","deltaTempC_min_m10_sc12","deltaTempC_min_m11_sc12","deltaTempC_min_m12_sc12","deltaTempC_max_m1_sc12","deltaTempC_max_m2_sc12","deltaTempC_max_m3_sc12","deltaTempC_max_m4_sc12","deltaTempC_max_m5_sc12","deltaTempC_max_m6_sc12","deltaTempC_max_m7_sc12","deltaTempC_max_m8_sc12","deltaTempC_max_m9_sc12","deltaTempC_max_m10_sc12","deltaTempC_max_m11_sc12","deltaTempC_max_m12_sc12","PPTfactor_m1_sc13","PPTfactor_m2_sc13","PPTfactor_m3_sc13","PPTfactor_m4_sc13","PPTfactor_m5_sc13","PPTfactor_m6_sc13","PPTfactor_m7_sc13","PPTfactor_m8_sc13","PPTfactor_m9_sc13","PPTfactor_m10_sc13","PPTfactor_m11_sc13","PPTfactor_m12_sc13","deltaTempC_min_m1_sc13","deltaTempC_min_m2_sc13","deltaTempC_min_m3_sc13","deltaTempC_min_m4_sc13","deltaTempC_min_m5_sc13","deltaTempC_min_m6_sc13","deltaTempC_min_m7_sc13","deltaTempC_min_m8_sc13","deltaTempC_min_m9_sc13","deltaTempC_min_m10_sc13","deltaTempC_min_m11_sc13","deltaTempC_min_m12_sc13","deltaTempC_max_m1_sc13","deltaTempC_max_m2_sc13","deltaTempC_max_m3_sc13","deltaTempC_max_m4_sc13","deltaTempC_max_m5_sc13","deltaTempC_max_m6_sc13","deltaTempC_max_m7_sc13","deltaTempC_max_m8_sc13","deltaTempC_max_m9_sc13","deltaTempC_max_m10_sc13","deltaTempC_max_m11_sc13","deltaTempC_max_m12_sc13","PPTfactor_m1_sc14","PPTfactor_m2_sc14","PPTfactor_m3_sc14","PPTfactor_m4_sc14","PPTfactor_m5_sc14","PPTfactor_m6_sc14","PPTfactor_m7_sc14","PPTfactor_m8_sc14","PPTfactor_m9_sc14","PPTfactor_m10_sc14","PPTfactor_m11_sc14","PPTfactor_m12_sc14","deltaTempC_min_m1_sc14","deltaTempC_min_m2_sc14","deltaTempC_min_m3_sc14","deltaTempC_min_m4_sc14","deltaTempC_min_m5_sc14","deltaTempC_min_m6_sc14","deltaTempC_min_m7_sc14","deltaTempC_min_m8_sc14","deltaTempC_min_m9_sc14","deltaTempC_min_m10_sc14","deltaTempC_min_m11_sc14","deltaTempC_min_m12_sc14","deltaTempC_max_m1_sc14","deltaTempC_max_m2_sc14","deltaTempC_max_m3_sc14","deltaTempC_max_m4_sc14","deltaTempC_max_m5_sc14","deltaTempC_max_m6_sc14","deltaTempC_max_m7_sc14","deltaTempC_max_m8_sc14","deltaTempC_max_m9_sc14","deltaTempC_max_m10_sc14","deltaTempC_max_m11_sc14","deltaTempC_max_m12_sc14","PPTfactor_m1_sc15","PPTfactor_m2_sc15","PPTfactor_m3_sc15","PPTfactor_m4_sc15","PPTfactor_m5_sc15","PPTfactor_m6_sc15","PPTfactor_m7_sc15","PPTfactor_m8_sc15","PPTfactor_m9_sc15","PPTfactor_m10_sc15","PPTfactor_m11_sc15","PPTfactor_m12_sc15","deltaTempC_min_m1_sc15","deltaTempC_min_m2_sc15","deltaTempC_min_m3_sc15","deltaTempC_min_m4_sc15","deltaTempC_min_m5_sc15","deltaTempC_min_m6_sc15","deltaTempC_min_m7_sc15","deltaTempC_min_m8_sc15","deltaTempC_min_m9_sc15","deltaTempC_min_m10_sc15","deltaTempC_min_m11_sc15","deltaTempC_min_m12_sc15","deltaTempC_max_m1_sc15","deltaTempC_max_m2_sc15","deltaTempC_max_m3_sc15","deltaTempC_max_m4_sc15","deltaTempC_max_m5_sc15","deltaTempC_max_m6_sc15","deltaTempC_max_m7_sc15","deltaTempC_max_m8_sc15","deltaTempC_max_m9_sc15","deltaTempC_max_m10_sc15","deltaTempC_max_m11_sc15","deltaTempC_max_m12_sc15","PPTfactor_m1_sc16","PPTfactor_m2_sc16","PPTfactor_m3_sc16","PPTfactor_m4_sc16","PPTfactor_m5_sc16","PPTfactor_m6_sc16","PPTfactor_m7_sc16","PPTfactor_m8_sc16","PPTfactor_m9_sc16","PPTfactor_m10_sc16","PPTfactor_m11_sc16","PPTfactor_m12_sc16","deltaTempC_min_m1_sc16","deltaTempC_min_m2_sc16","deltaTempC_min_m3_sc16","deltaTempC_min_m4_sc16","deltaTempC_min_m5_sc16","deltaTempC_min_m6_sc16","deltaTempC_min_m7_sc16","deltaTempC_min_m8_sc16","deltaTempC_min_m9_sc16","deltaTempC_min_m10_sc16","deltaTempC_min_m11_sc16","deltaTempC_min_m12_sc16","deltaTempC_max_m1_sc16","deltaTempC_max_m2_sc16","deltaTempC_max_m3_sc16","deltaTempC_max_m4_sc16","deltaTempC_max_m5_sc16","deltaTempC_max_m6_sc16","deltaTempC_max_m7_sc16","deltaTempC_max_m8_sc16","deltaTempC_max_m9_sc16","deltaTempC_max_m10_sc16","deltaTempC_max_m11_sc16","deltaTempC_max_m12_sc16","PPTfactor_m1_sc17","PPTfactor_m2_sc17","PPTfactor_m3_sc17","PPTfactor_m4_sc17","PPTfactor_m5_sc17","PPTfactor_m6_sc17","PPTfactor_m7_sc17","PPTfactor_m8_sc17","PPTfactor_m9_sc17","PPTfactor_m10_sc17","PPTfactor_m11_sc17","PPTfactor_m12_sc17","deltaTempC_min_m1_sc17","deltaTempC_min_m2_sc17","deltaTempC_min_m3_sc17","deltaTempC_min_m4_sc17","deltaTempC_min_m5_sc17","deltaTempC_min_m6_sc17","deltaTempC_min_m7_sc17","deltaTempC_min_m8_sc17","deltaTempC_min_m9_sc17","deltaTempC_min_m10_sc17","deltaTempC_min_m11_sc17","deltaTempC_min_m12_sc17","deltaTempC_max_m1_sc17","deltaTempC_max_m2_sc17","deltaTempC_max_m3_sc17","deltaTempC_max_m4_sc17","deltaTempC_max_m5_sc17","deltaTempC_max_m6_sc17","deltaTempC_max_m7_sc17","deltaTempC_max_m8_sc17","deltaTempC_max_m9_sc17","deltaTempC_max_m10_sc17","deltaTempC_max_m11_sc17","deltaTempC_max_m12_sc17","PPTfactor_m1_sc18","PPTfactor_m2_sc18","PPTfactor_m3_sc18","PPTfactor_m4_sc18","PPTfactor_m5_sc18","PPTfactor_m6_sc18","PPTfactor_m7_sc18","PPTfactor_m8_sc18","PPTfactor_m9_sc18","PPTfactor_m10_sc18","PPTfactor_m11_sc18","PPTfactor_m12_sc18","deltaTempC_min_m1_sc18","deltaTempC_min_m2_sc18","deltaTempC_min_m3_sc18","deltaTempC_min_m4_sc18","deltaTempC_min_m5_sc18","deltaTempC_min_m6_sc18","deltaTempC_min_m7_sc18","deltaTempC_min_m8_sc18","deltaTempC_min_m9_sc18","deltaTempC_min_m10_sc18","deltaTempC_min_m11_sc18","deltaTempC_min_m12_sc18","deltaTempC_max_m1_sc18","deltaTempC_max_m2_sc18","deltaTempC_max_m3_sc18","deltaTempC_max_m4_sc18","deltaTempC_max_m5_sc18","deltaTempC_max_m6_sc18","deltaTempC_max_m7_sc18","deltaTempC_max_m8_sc18","deltaTempC_max_m9_sc18","deltaTempC_max_m10_sc18","deltaTempC_max_m11_sc18","deltaTempC_max_m12_sc18","PPTfactor_m1_sc19","PPTfactor_m2_sc19","PPTfactor_m3_sc19","PPTfactor_m4_sc19","PPTfactor_m5_sc19","PPTfactor_m6_sc19","PPTfactor_m7_sc19","PPTfactor_m8_sc19","PPTfactor_m9_sc19","PPTfactor_m10_sc19","PPTfactor_m11_sc19","PPTfactor_m12_sc19","deltaTempC_min_m1_sc19","deltaTempC_min_m2_sc19","deltaTempC_min_m3_sc19","deltaTempC_min_m4_sc19","deltaTempC_min_m5_sc19","deltaTempC_min_m6_sc19","deltaTempC_min_m7_sc19","deltaTempC_min_m8_sc19","deltaTempC_min_m9_sc19","deltaTempC_min_m10_sc19","deltaTempC_min_m11_sc19","deltaTempC_min_m12_sc19","deltaTempC_max_m1_sc19","deltaTempC_max_m2_sc19","deltaTempC_max_m3_sc19","deltaTempC_max_m4_sc19","deltaTempC_max_m5_sc19","deltaTempC_max_m6_sc19","deltaTempC_max_m7_sc19","deltaTempC_max_m8_sc19","deltaTempC_max_m9_sc19","deltaTempC_max_m10_sc19","deltaTempC_max_m11_sc19","deltaTempC_max_m12_sc19","PPTfactor_m1_sc20","PPTfactor_m2_sc20","PPTfactor_m3_sc20","PPTfactor_m4_sc20","PPTfactor_m5_sc20","PPTfactor_m6_sc20","PPTfactor_m7_sc20","PPTfactor_m8_sc20","PPTfactor_m9_sc20","PPTfactor_m10_sc20","PPTfactor_m11_sc20","PPTfactor_m12_sc20","deltaTempC_min_m1_sc20","deltaTempC_min_m2_sc20","deltaTempC_min_m3_sc20","deltaTempC_min_m4_sc20","deltaTempC_min_m5_sc20","deltaTempC_min_m6_sc20","deltaTempC_min_m7_sc20","deltaTempC_min_m8_sc20","deltaTempC_min_m9_sc20","deltaTempC_min_m10_sc20","deltaTempC_min_m11_sc20","deltaTempC_min_m12_sc20","deltaTempC_max_m1_sc20","deltaTempC_max_m2_sc20","deltaTempC_max_m3_sc20","deltaTempC_max_m4_sc20","deltaTempC_max_m5_sc20","deltaTempC_max_m6_sc20","deltaTempC_max_m7_sc20","deltaTempC_max_m8_sc20","deltaTempC_max_m9_sc20","deltaTempC_max_m10_sc20","deltaTempC_max_m11_sc20","deltaTempC_max_m12_sc20","PPTfactor_m1_sc21","PPTfactor_m2_sc21","PPTfactor_m3_sc21","PPTfactor_m4_sc21","PPTfactor_m5_sc21","PPTfactor_m6_sc21","PPTfactor_m7_sc21","PPTfactor_m8_sc21","PPTfactor_m9_sc21","PPTfactor_m10_sc21","PPTfactor_m11_sc21","PPTfactor_m12_sc21","deltaTempC_min_m1_sc21","deltaTempC_min_m2_sc21","deltaTempC_min_m3_sc21","deltaTempC_min_m4_sc21","deltaTempC_min_m5_sc21","deltaTempC_min_m6_sc21","deltaTempC_min_m7_sc21","deltaTempC_min_m8_sc21","deltaTempC_min_m9_sc21","deltaTempC_min_m10_sc21","deltaTempC_min_m11_sc21","deltaTempC_min_m12_sc21","deltaTempC_max_m1_sc21","deltaTempC_max_m2_sc21","deltaTempC_max_m3_sc21","deltaTempC_max_m4_sc21","deltaTempC_max_m5_sc21","deltaTempC_max_m6_sc21","deltaTempC_max_m7_sc21","deltaTempC_max_m8_sc21","deltaTempC_max_m9_sc21","deltaTempC_max_m10_sc21","deltaTempC_max_m11_sc21","deltaTempC_max_m12_sc21","PPTfactor_m1_sc22","PPTfactor_m2_sc22","PPTfactor_m3_sc22","PPTfactor_m4_sc22","PPTfactor_m5_sc22","PPTfactor_m6_sc22","PPTfactor_m7_sc22","PPTfactor_m8_sc22","PPTfactor_m9_sc22","PPTfactor_m10_sc22","PPTfactor_m11_sc22","PPTfactor_m12_sc22","deltaTempC_min_m1_sc22","deltaTempC_min_m2_sc22","deltaTempC_min_m3_sc22","deltaTempC_min_m4_sc22","deltaTempC_min_m5_sc22","deltaTempC_min_m6_sc22","deltaTempC_min_m7_sc22","deltaTempC_min_m8_sc22","deltaTempC_min_m9_sc22","deltaTempC_min_m10_sc22","deltaTempC_min_m11_sc22","deltaTempC_min_m12_sc22","deltaTempC_max_m1_sc22","deltaTempC_max_m2_sc22","deltaTempC_max_m3_sc22","deltaTempC_max_m4_sc22","deltaTempC_max_m5_sc22","deltaTempC_max_m6_sc22","deltaTempC_max_m7_sc22","deltaTempC_max_m8_sc22","deltaTempC_max_m9_sc22","deltaTempC_max_m10_sc22","deltaTempC_max_m11_sc22","deltaTempC_max_m12_sc22","PPTfactor_m1_sc23","PPTfactor_m2_sc23","PPTfactor_m3_sc23","PPTfactor_m4_sc23","PPTfactor_m5_sc23","PPTfactor_m6_sc23","PPTfactor_m7_sc23","PPTfactor_m8_sc23","PPTfactor_m9_sc23","PPTfactor_m10_sc23","PPTfactor_m11_sc23","PPTfactor_m12_sc23","deltaTempC_min_m1_sc23","deltaTempC_min_m2_sc23","deltaTempC_min_m3_sc23","deltaTempC_min_m4_sc23","deltaTempC_min_m5_sc23","deltaTempC_min_m6_sc23","deltaTempC_min_m7_sc23","deltaTempC_min_m8_sc23","deltaTempC_min_m9_sc23","deltaTempC_min_m10_sc23","deltaTempC_min_m11_sc23","deltaTempC_min_m12_sc23","deltaTempC_max_m1_sc23","deltaTempC_max_m2_sc23","deltaTempC_max_m3_sc23","deltaTempC_max_m4_sc23","deltaTempC_max_m5_sc23","deltaTempC_max_m6_sc23","deltaTempC_max_m7_sc23","deltaTempC_max_m8_sc23","deltaTempC_max_m9_sc23","deltaTempC_max_m10_sc23","deltaTempC_max_m11_sc23","deltaTempC_max_m12_sc23","PPTfactor_m1_sc24","PPTfactor_m2_sc24","PPTfactor_m3_sc24","PPTfactor_m4_sc24","PPTfactor_m5_sc24","PPTfactor_m6_sc24","PPTfactor_m7_sc24","PPTfactor_m8_sc24","PPTfactor_m9_sc24","PPTfactor_m10_sc24","PPTfactor_m11_sc24","PPTfactor_m12_sc24","deltaTempC_min_m1_sc24","deltaTempC_min_m2_sc24","deltaTempC_min_m3_sc24","deltaTempC_min_m4_sc24","deltaTempC_min_m5_sc24","deltaTempC_min_m6_sc24","deltaTempC_min_m7_sc24","deltaTempC_min_m8_sc24","deltaTempC_min_m9_sc24","deltaTempC_min_m10_sc24","deltaTempC_min_m11_sc24","deltaTempC_min_m12_sc24","deltaTempC_max_m1_sc24","deltaTempC_max_m2_sc24","deltaTempC_max_m3_sc24","deltaTempC_max_m4_sc24","deltaTempC_max_m5_sc24","deltaTempC_max_m6_sc24","deltaTempC_max_m7_sc24","deltaTempC_max_m8_sc24","deltaTempC_max_m9_sc24","deltaTempC_max_m10_sc24","deltaTempC_max_m11_sc24","deltaTempC_max_m12_sc24","PPTfactor_m1_sc25","PPTfactor_m2_sc25","PPTfactor_m3_sc25","PPTfactor_m4_sc25","PPTfactor_m5_sc25","PPTfactor_m6_sc25","PPTfactor_m7_sc25","PPTfactor_m8_sc25","PPTfactor_m9_sc25","PPTfactor_m10_sc25","PPTfactor_m11_sc25","PPTfactor_m12_sc25","deltaTempC_min_m1_sc25","deltaTempC_min_m2_sc25","deltaTempC_min_m3_sc25","deltaTempC_min_m4_sc25","deltaTempC_min_m5_sc25","deltaTempC_min_m6_sc25","deltaTempC_min_m7_sc25","deltaTempC_min_m8_sc25","deltaTempC_min_m9_sc25","deltaTempC_min_m10_sc25","deltaTempC_min_m11_sc25","deltaTempC_min_m12_sc25","deltaTempC_max_m1_sc25","deltaTempC_max_m2_sc25","deltaTempC_max_m3_sc25","deltaTempC_max_m4_sc25","deltaTempC_max_m5_sc25","deltaTempC_max_m6_sc25","deltaTempC_max_m7_sc25","deltaTempC_max_m8_sc25","deltaTempC_max_m9_sc25","deltaTempC_max_m10_sc25","deltaTempC_max_m11_sc25","deltaTempC_max_m12_sc25","PPTfactor_m1_sc26","PPTfactor_m2_sc26","PPTfactor_m3_sc26","PPTfactor_m4_sc26","PPTfactor_m5_sc26","PPTfactor_m6_sc26","PPTfactor_m7_sc26","PPTfactor_m8_sc26","PPTfactor_m9_sc26","PPTfactor_m10_sc26","PPTfactor_m11_sc26","PPTfactor_m12_sc26","deltaTempC_min_m1_sc26","deltaTempC_min_m2_sc26","deltaTempC_min_m3_sc26","deltaTempC_min_m4_sc26","deltaTempC_min_m5_sc26","deltaTempC_min_m6_sc26","deltaTempC_min_m7_sc26","deltaTempC_min_m8_sc26","deltaTempC_min_m9_sc26","deltaTempC_min_m10_sc26","deltaTempC_min_m11_sc26","deltaTempC_min_m12_sc26","deltaTempC_max_m1_sc26","deltaTempC_max_m2_sc26","deltaTempC_max_m3_sc26","deltaTempC_max_m4_sc26","deltaTempC_max_m5_sc26","deltaTempC_max_m6_sc26","deltaTempC_max_m7_sc26","deltaTempC_max_m8_sc26","deltaTempC_max_m9_sc26","deltaTempC_max_m10_sc26","deltaTempC_max_m11_sc26","deltaTempC_max_m12_sc26","PPTfactor_m1_sc27","PPTfactor_m2_sc27","PPTfactor_m3_sc27","PPTfactor_m4_sc27","PPTfactor_m5_sc27","PPTfactor_m6_sc27","PPTfactor_m7_sc27","PPTfactor_m8_sc27","PPTfactor_m9_sc27","PPTfactor_m10_sc27","PPTfactor_m11_sc27","PPTfactor_m12_sc27","deltaTempC_min_m1_sc27","deltaTempC_min_m2_sc27","deltaTempC_min_m3_sc27","deltaTempC_min_m4_sc27","deltaTempC_min_m5_sc27","deltaTempC_min_m6_sc27","deltaTempC_min_m7_sc27","deltaTempC_min_m8_sc27","deltaTempC_min_m9_sc27","deltaTempC_min_m10_sc27","deltaTempC_min_m11_sc27","deltaTempC_min_m12_sc27","deltaTempC_max_m1_sc27","deltaTempC_max_m2_sc27","deltaTempC_max_m3_sc27","deltaTempC_max_m4_sc27","deltaTempC_max_m5_sc27","deltaTempC_max_m6_sc27","deltaTempC_max_m7_sc27","deltaTempC_max_m8_sc27","deltaTempC_max_m9_sc27","deltaTempC_max_m10_sc27","deltaTempC_max_m11_sc27","deltaTempC_max_m12_sc27","PPTfactor_m1_sc28","PPTfactor_m2_sc28","PPTfactor_m3_sc28","PPTfactor_m4_sc28","PPTfactor_m5_sc28","PPTfactor_m6_sc28","PPTfactor_m7_sc28","PPTfactor_m8_sc28","PPTfactor_m9_sc28","PPTfactor_m10_sc28","PPTfactor_m11_sc28","PPTfactor_m12_sc28","deltaTempC_min_m1_sc28","deltaTempC_min_m2_sc28","deltaTempC_min_m3_sc28","deltaTempC_min_m4_sc28","deltaTempC_min_m5_sc28","deltaTempC_min_m6_sc28","deltaTempC_min_m7_sc28","deltaTempC_min_m8_sc28","deltaTempC_min_m9_sc28","deltaTempC_min_m10_sc28","deltaTempC_min_m11_sc28","deltaTempC_min_m12_sc28","deltaTempC_max_m1_sc28","deltaTempC_max_m2_sc28","deltaTempC_max_m3_sc28","deltaTempC_max_m4_sc28","deltaTempC_max_m5_sc28","deltaTempC_max_m6_sc28","deltaTempC_max_m7_sc28","deltaTempC_max_m8_sc28","deltaTempC_max_m9_sc28","deltaTempC_max_m10_sc28","deltaTempC_max_m11_sc28","deltaTempC_max_m12_sc28","PPTfactor_m1_sc29","PPTfactor_m2_sc29","PPTfactor_m3_sc29","PPTfactor_m4_sc29","PPTfactor_m5_sc29","PPTfactor_m6_sc29","PPTfactor_m7_sc29","PPTfactor_m8_sc29","PPTfactor_m9_sc29","PPTfactor_m10_sc29","PPTfactor_m11_sc29","PPTfactor_m12_sc29","deltaTempC_min_m1_sc29","deltaTempC_min_m2_sc29","deltaTempC_min_m3_sc29","deltaTempC_min_m4_sc29","deltaTempC_min_m5_sc29","deltaTempC_min_m6_sc29","deltaTempC_min_m7_sc29","deltaTempC_min_m8_sc29","deltaTempC_min_m9_sc29","deltaTempC_min_m10_sc29","deltaTempC_min_m11_sc29","deltaTempC_min_m12_sc29","deltaTempC_max_m1_sc29","deltaTempC_max_m2_sc29","deltaTempC_max_m3_sc29","deltaTempC_max_m4_sc29","deltaTempC_max_m5_sc29","deltaTempC_max_m6_sc29","deltaTempC_max_m7_sc29","deltaTempC_max_m8_sc29","deltaTempC_max_m9_sc29","deltaTempC_max_m10_sc29","deltaTempC_max_m11_sc29","deltaTempC_max_m12_sc29","PPTfactor_m1_sc30","PPTfactor_m2_sc30","PPTfactor_m3_sc30","PPTfactor_m4_sc30","PPTfactor_m5_sc30","PPTfactor_m6_sc30","PPTfactor_m7_sc30","PPTfactor_m8_sc30","PPTfactor_m9_sc30","PPTfactor_m10_sc30","PPTfactor_m11_sc30","PPTfactor_m12_sc30","deltaTempC_min_m1_sc30","deltaTempC_min_m2_sc30","deltaTempC_min_m3_sc30","deltaTempC_min_m4_sc30","deltaTempC_min_m5_sc30","deltaTempC_min_m6_sc30","deltaTempC_min_m7_sc30","deltaTempC_min_m8_sc30","deltaTempC_min_m9_sc30","deltaTempC_min_m10_sc30","deltaTempC_min_m11_sc30","deltaTempC_min_m12_sc30","deltaTempC_max_m1_sc30","deltaTempC_max_m2_sc30","deltaTempC_max_m3_sc30","deltaTempC_max_m4_sc30","deltaTempC_max_m5_sc30","deltaTempC_max_m6_sc30","deltaTempC_max_m7_sc30","deltaTempC_max_m8_sc30","deltaTempC_max_m9_sc30","deltaTempC_max_m10_sc30","deltaTempC_max_m11_sc30","deltaTempC_max_m12_sc30","PPTfactor_m1_sc31","PPTfactor_m2_sc31","PPTfactor_m3_sc31","PPTfactor_m4_sc31","PPTfactor_m5_sc31","PPTfactor_m6_sc31","PPTfactor_m7_sc31","PPTfactor_m8_sc31","PPTfactor_m9_sc31","PPTfactor_m10_sc31","PPTfactor_m11_sc31","PPTfactor_m12_sc31","deltaTempC_min_m1_sc31","deltaTempC_min_m2_sc31","deltaTempC_min_m3_sc31","deltaTempC_min_m4_sc31","deltaTempC_min_m5_sc31","deltaTempC_min_m6_sc31","deltaTempC_min_m7_sc31","deltaTempC_min_m8_sc31","deltaTempC_min_m9_sc31","deltaTempC_min_m10_sc31","deltaTempC_min_m11_sc31","deltaTempC_min_m12_sc31","deltaTempC_max_m1_sc31","deltaTempC_max_m2_sc31","deltaTempC_max_m3_sc31","deltaTempC_max_m4_sc31","deltaTempC_max_m5_sc31","deltaTempC_max_m6_sc31","deltaTempC_max_m7_sc31","deltaTempC_max_m8_sc31","deltaTempC_max_m9_sc31","deltaTempC_max_m10_sc31","deltaTempC_max_m11_sc31","deltaTempC_max_m12_sc31","PPTfactor_m1_sc32","PPTfactor_m2_sc32","PPTfactor_m3_sc32","PPTfactor_m4_sc32","PPTfactor_m5_sc32","PPTfactor_m6_sc32","PPTfactor_m7_sc32","PPTfactor_m8_sc32","PPTfactor_m9_sc32","PPTfactor_m10_sc32","PPTfactor_m11_sc32","PPTfactor_m12_sc32","deltaTempC_min_m1_sc32","deltaTempC_min_m2_sc32","deltaTempC_min_m3_sc32","deltaTempC_min_m4_sc32","deltaTempC_min_m5_sc32","deltaTempC_min_m6_sc32","deltaTempC_min_m7_sc32","deltaTempC_min_m8_sc32","deltaTempC_min_m9_sc32","deltaTempC_min_m10_sc32","deltaTempC_min_m11_sc32","deltaTempC_min_m12_sc32","deltaTempC_max_m1_sc32","deltaTempC_max_m2_sc32","deltaTempC_max_m3_sc32","deltaTempC_max_m4_sc32","deltaTempC_max_m5_sc32","deltaTempC_max_m6_sc32","deltaTempC_max_m7_sc32","deltaTempC_max_m8_sc32","deltaTempC_max_m9_sc32","deltaTempC_max_m10_sc32","deltaTempC_max_m11_sc32","deltaTempC_max_m12_sc32" +"UseInformationToCreateSoilWatRuns",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Values_v11.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Values_v11.csv new file mode 100644 index 00000000..79e56528 --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_ClimateScenarios_Values_v11.csv @@ -0,0 +1,2 @@ +Label,PPTmm_m1_sc00,PPTmm_m2_sc00,PPTmm_m3_sc00,PPTmm_m4_sc00,PPTmm_m5_sc00,PPTmm_m6_sc00,PPTmm_m7_sc00,PPTmm_m8_sc00,PPTmm_m9_sc00,PPTmm_m10_sc00,PPTmm_m11_sc00,PPTmm_m12_sc00,TempC_min_m1_sc00,TempC_min_m2_sc00,TempC_min_m3_sc00,TempC_min_m4_sc00,TempC_min_m5_sc00,TempC_min_m6_sc00,TempC_min_m7_sc00,TempC_min_m8_sc00,TempC_min_m9_sc00,TempC_min_m10_sc00,TempC_min_m11_sc00,TempC_min_m12_sc00,TempC_max_m1_sc00,TempC_max_m2_sc00,TempC_max_m3_sc00,TempC_max_m4_sc00,TempC_max_m5_sc00,TempC_max_m6_sc00,TempC_max_m7_sc00,TempC_max_m8_sc00,TempC_max_m9_sc00,TempC_max_m10_sc00,TempC_max_m11_sc00,TempC_max_m12_sc00,PPTmm_m1_sc01,PPTmm_m2_sc01,PPTmm_m3_sc01,PPTmm_m4_sc01,PPTmm_m5_sc01,PPTmm_m6_sc01,PPTmm_m7_sc01,PPTmm_m8_sc01,PPTmm_m9_sc01,PPTmm_m10_sc01,PPTmm_m11_sc01,PPTmm_m12_sc01,TempC_min_m1_sc01,TempC_min_m2_sc01,TempC_min_m3_sc01,TempC_min_m4_sc01,TempC_min_m5_sc01,TempC_min_m6_sc01,TempC_min_m7_sc01,TempC_min_m8_sc01,TempC_min_m9_sc01,TempC_min_m10_sc01,TempC_min_m11_sc01,TempC_min_m12_sc01,TempC_max_m1_sc01,TempC_max_m2_sc01,TempC_max_m3_sc01,TempC_max_m4_sc01,TempC_max_m5_sc01,TempC_max_m6_sc01,TempC_max_m7_sc01,TempC_max_m8_sc01,TempC_max_m9_sc01,TempC_max_m10_sc01,TempC_max_m11_sc01,TempC_max_m12_sc01,PPTmm_m1_sc02,PPTmm_m2_sc02,PPTmm_m3_sc02,PPTmm_m4_sc02,PPTmm_m5_sc02,PPTmm_m6_sc02,PPTmm_m7_sc02,PPTmm_m8_sc02,PPTmm_m9_sc02,PPTmm_m10_sc02,PPTmm_m11_sc02,PPTmm_m12_sc02,TempC_min_m1_sc02,TempC_min_m2_sc02,TempC_min_m3_sc02,TempC_min_m4_sc02,TempC_min_m5_sc02,TempC_min_m6_sc02,TempC_min_m7_sc02,TempC_min_m8_sc02,TempC_min_m9_sc02,TempC_min_m10_sc02,TempC_min_m11_sc02,TempC_min_m12_sc02,TempC_max_m1_sc02,TempC_max_m2_sc02,TempC_max_m3_sc02,TempC_max_m4_sc02,TempC_max_m5_sc02,TempC_max_m6_sc02,TempC_max_m7_sc02,TempC_max_m8_sc02,TempC_max_m9_sc02,TempC_max_m10_sc02,TempC_max_m11_sc02,TempC_max_m12_sc02,PPTmm_m1_sc03,PPTmm_m2_sc03,PPTmm_m3_sc03,PPTmm_m4_sc03,PPTmm_m5_sc03,PPTmm_m6_sc03,PPTmm_m7_sc03,PPTmm_m8_sc03,PPTmm_m9_sc03,PPTmm_m10_sc03,PPTmm_m11_sc03,PPTmm_m12_sc03,TempC_min_m1_sc03,TempC_min_m2_sc03,TempC_min_m3_sc03,TempC_min_m4_sc03,TempC_min_m5_sc03,TempC_min_m6_sc03,TempC_min_m7_sc03,TempC_min_m8_sc03,TempC_min_m9_sc03,TempC_min_m10_sc03,TempC_min_m11_sc03,TempC_min_m12_sc03,TempC_max_m1_sc03,TempC_max_m2_sc03,TempC_max_m3_sc03,TempC_max_m4_sc03,TempC_max_m5_sc03,TempC_max_m6_sc03,TempC_max_m7_sc03,TempC_max_m8_sc03,TempC_max_m9_sc03,TempC_max_m10_sc03,TempC_max_m11_sc03,TempC_max_m12_sc03,PPTmm_m1_sc04,PPTmm_m2_sc04,PPTmm_m3_sc04,PPTmm_m4_sc04,PPTmm_m5_sc04,PPTmm_m6_sc04,PPTmm_m7_sc04,PPTmm_m8_sc04,PPTmm_m9_sc04,PPTmm_m10_sc04,PPTmm_m11_sc04,PPTmm_m12_sc04,TempC_min_m1_sc04,TempC_min_m2_sc04,TempC_min_m3_sc04,TempC_min_m4_sc04,TempC_min_m5_sc04,TempC_min_m6_sc04,TempC_min_m7_sc04,TempC_min_m8_sc04,TempC_min_m9_sc04,TempC_min_m10_sc04,TempC_min_m11_sc04,TempC_min_m12_sc04,TempC_max_m1_sc04,TempC_max_m2_sc04,TempC_max_m3_sc04,TempC_max_m4_sc04,TempC_max_m5_sc04,TempC_max_m6_sc04,TempC_max_m7_sc04,TempC_max_m8_sc04,TempC_max_m9_sc04,TempC_max_m10_sc04,TempC_max_m11_sc04,TempC_max_m12_sc04,PPTmm_m1_sc05,PPTmm_m2_sc05,PPTmm_m3_sc05,PPTmm_m4_sc05,PPTmm_m5_sc05,PPTmm_m6_sc05,PPTmm_m7_sc05,PPTmm_m8_sc05,PPTmm_m9_sc05,PPTmm_m10_sc05,PPTmm_m11_sc05,PPTmm_m12_sc05,TempC_min_m1_sc05,TempC_min_m2_sc05,TempC_min_m3_sc05,TempC_min_m4_sc05,TempC_min_m5_sc05,TempC_min_m6_sc05,TempC_min_m7_sc05,TempC_min_m8_sc05,TempC_min_m9_sc05,TempC_min_m10_sc05,TempC_min_m11_sc05,TempC_min_m12_sc05,TempC_max_m1_sc05,TempC_max_m2_sc05,TempC_max_m3_sc05,TempC_max_m4_sc05,TempC_max_m5_sc05,TempC_max_m6_sc05,TempC_max_m7_sc05,TempC_max_m8_sc05,TempC_max_m9_sc05,TempC_max_m10_sc05,TempC_max_m11_sc05,TempC_max_m12_sc05,PPTmm_m1_sc06,PPTmm_m2_sc06,PPTmm_m3_sc06,PPTmm_m4_sc06,PPTmm_m5_sc06,PPTmm_m6_sc06,PPTmm_m7_sc06,PPTmm_m8_sc06,PPTmm_m9_sc06,PPTmm_m10_sc06,PPTmm_m11_sc06,PPTmm_m12_sc06,TempC_min_m1_sc06,TempC_min_m2_sc06,TempC_min_m3_sc06,TempC_min_m4_sc06,TempC_min_m5_sc06,TempC_min_m6_sc06,TempC_min_m7_sc06,TempC_min_m8_sc06,TempC_min_m9_sc06,TempC_min_m10_sc06,TempC_min_m11_sc06,TempC_min_m12_sc06,TempC_max_m1_sc06,TempC_max_m2_sc06,TempC_max_m3_sc06,TempC_max_m4_sc06,TempC_max_m5_sc06,TempC_max_m6_sc06,TempC_max_m7_sc06,TempC_max_m8_sc06,TempC_max_m9_sc06,TempC_max_m10_sc06,TempC_max_m11_sc06,TempC_max_m12_sc06,PPTmm_m1_sc07,PPTmm_m2_sc07,PPTmm_m3_sc07,PPTmm_m4_sc07,PPTmm_m5_sc07,PPTmm_m6_sc07,PPTmm_m7_sc07,PPTmm_m8_sc07,PPTmm_m9_sc07,PPTmm_m10_sc07,PPTmm_m11_sc07,PPTmm_m12_sc07,TempC_min_m1_sc07,TempC_min_m2_sc07,TempC_min_m3_sc07,TempC_min_m4_sc07,TempC_min_m5_sc07,TempC_min_m6_sc07,TempC_min_m7_sc07,TempC_min_m8_sc07,TempC_min_m9_sc07,TempC_min_m10_sc07,TempC_min_m11_sc07,TempC_min_m12_sc07,TempC_max_m1_sc07,TempC_max_m2_sc07,TempC_max_m3_sc07,TempC_max_m4_sc07,TempC_max_m5_sc07,TempC_max_m6_sc07,TempC_max_m7_sc07,TempC_max_m8_sc07,TempC_max_m9_sc07,TempC_max_m10_sc07,TempC_max_m11_sc07,TempC_max_m12_sc07,PPTmm_m1_sc08,PPTmm_m2_sc08,PPTmm_m3_sc08,PPTmm_m4_sc08,PPTmm_m5_sc08,PPTmm_m6_sc08,PPTmm_m7_sc08,PPTmm_m8_sc08,PPTmm_m9_sc08,PPTmm_m10_sc08,PPTmm_m11_sc08,PPTmm_m12_sc08,TempC_min_m1_sc08,TempC_min_m2_sc08,TempC_min_m3_sc08,TempC_min_m4_sc08,TempC_min_m5_sc08,TempC_min_m6_sc08,TempC_min_m7_sc08,TempC_min_m8_sc08,TempC_min_m9_sc08,TempC_min_m10_sc08,TempC_min_m11_sc08,TempC_min_m12_sc08,TempC_max_m1_sc08,TempC_max_m2_sc08,TempC_max_m3_sc08,TempC_max_m4_sc08,TempC_max_m5_sc08,TempC_max_m6_sc08,TempC_max_m7_sc08,TempC_max_m8_sc08,TempC_max_m9_sc08,TempC_max_m10_sc08,TempC_max_m11_sc08,TempC_max_m12_sc08,PPTmm_m1_sc09,PPTmm_m2_sc09,PPTmm_m3_sc09,PPTmm_m4_sc09,PPTmm_m5_sc09,PPTmm_m6_sc09,PPTmm_m7_sc09,PPTmm_m8_sc09,PPTmm_m9_sc09,PPTmm_m10_sc09,PPTmm_m11_sc09,PPTmm_m12_sc09,TempC_min_m1_sc09,TempC_min_m2_sc09,TempC_min_m3_sc09,TempC_min_m4_sc09,TempC_min_m5_sc09,TempC_min_m6_sc09,TempC_min_m7_sc09,TempC_min_m8_sc09,TempC_min_m9_sc09,TempC_min_m10_sc09,TempC_min_m11_sc09,TempC_min_m12_sc09,TempC_max_m1_sc09,TempC_max_m2_sc09,TempC_max_m3_sc09,TempC_max_m4_sc09,TempC_max_m5_sc09,TempC_max_m6_sc09,TempC_max_m7_sc09,TempC_max_m8_sc09,TempC_max_m9_sc09,TempC_max_m10_sc09,TempC_max_m11_sc09,TempC_max_m12_sc09,PPTmm_m1_sc10,PPTmm_m2_sc10,PPTmm_m3_sc10,PPTmm_m4_sc10,PPTmm_m5_sc10,PPTmm_m6_sc10,PPTmm_m7_sc10,PPTmm_m8_sc10,PPTmm_m9_sc10,PPTmm_m10_sc10,PPTmm_m11_sc10,PPTmm_m12_sc10,TempC_min_m1_sc10,TempC_min_m2_sc10,TempC_min_m3_sc10,TempC_min_m4_sc10,TempC_min_m5_sc10,TempC_min_m6_sc10,TempC_min_m7_sc10,TempC_min_m8_sc10,TempC_min_m9_sc10,TempC_min_m10_sc10,TempC_min_m11_sc10,TempC_min_m12_sc10,TempC_max_m1_sc10,TempC_max_m2_sc10,TempC_max_m3_sc10,TempC_max_m4_sc10,TempC_max_m5_sc10,TempC_max_m6_sc10,TempC_max_m7_sc10,TempC_max_m8_sc10,TempC_max_m9_sc10,TempC_max_m10_sc10,TempC_max_m11_sc10,TempC_max_m12_sc10,PPTmm_m1_sc11,PPTmm_m2_sc11,PPTmm_m3_sc11,PPTmm_m4_sc11,PPTmm_m5_sc11,PPTmm_m6_sc11,PPTmm_m7_sc11,PPTmm_m8_sc11,PPTmm_m9_sc11,PPTmm_m10_sc11,PPTmm_m11_sc11,PPTmm_m12_sc11,TempC_min_m1_sc11,TempC_min_m2_sc11,TempC_min_m3_sc11,TempC_min_m4_sc11,TempC_min_m5_sc11,TempC_min_m6_sc11,TempC_min_m7_sc11,TempC_min_m8_sc11,TempC_min_m9_sc11,TempC_min_m10_sc11,TempC_min_m11_sc11,TempC_min_m12_sc11,TempC_max_m1_sc11,TempC_max_m2_sc11,TempC_max_m3_sc11,TempC_max_m4_sc11,TempC_max_m5_sc11,TempC_max_m6_sc11,TempC_max_m7_sc11,TempC_max_m8_sc11,TempC_max_m9_sc11,TempC_max_m10_sc11,TempC_max_m11_sc11,TempC_max_m12_sc11,PPTmm_m1_sc12,PPTmm_m2_sc12,PPTmm_m3_sc12,PPTmm_m4_sc12,PPTmm_m5_sc12,PPTmm_m6_sc12,PPTmm_m7_sc12,PPTmm_m8_sc12,PPTmm_m9_sc12,PPTmm_m10_sc12,PPTmm_m11_sc12,PPTmm_m12_sc12,TempC_min_m1_sc12,TempC_min_m2_sc12,TempC_min_m3_sc12,TempC_min_m4_sc12,TempC_min_m5_sc12,TempC_min_m6_sc12,TempC_min_m7_sc12,TempC_min_m8_sc12,TempC_min_m9_sc12,TempC_min_m10_sc12,TempC_min_m11_sc12,TempC_min_m12_sc12,TempC_max_m1_sc12,TempC_max_m2_sc12,TempC_max_m3_sc12,TempC_max_m4_sc12,TempC_max_m5_sc12,TempC_max_m6_sc12,TempC_max_m7_sc12,TempC_max_m8_sc12,TempC_max_m9_sc12,TempC_max_m10_sc12,TempC_max_m11_sc12,TempC_max_m12_sc12,PPTmm_m1_sc13,PPTmm_m2_sc13,PPTmm_m3_sc13,PPTmm_m4_sc13,PPTmm_m5_sc13,PPTmm_m6_sc13,PPTmm_m7_sc13,PPTmm_m8_sc13,PPTmm_m9_sc13,PPTmm_m10_sc13,PPTmm_m11_sc13,PPTmm_m12_sc13,TempC_min_m1_sc13,TempC_min_m2_sc13,TempC_min_m3_sc13,TempC_min_m4_sc13,TempC_min_m5_sc13,TempC_min_m6_sc13,TempC_min_m7_sc13,TempC_min_m8_sc13,TempC_min_m9_sc13,TempC_min_m10_sc13,TempC_min_m11_sc13,TempC_min_m12_sc13,TempC_max_m1_sc13,TempC_max_m2_sc13,TempC_max_m3_sc13,TempC_max_m4_sc13,TempC_max_m5_sc13,TempC_max_m6_sc13,TempC_max_m7_sc13,TempC_max_m8_sc13,TempC_max_m9_sc13,TempC_max_m10_sc13,TempC_max_m11_sc13,TempC_max_m12_sc13,PPTmm_m1_sc14,PPTmm_m2_sc14,PPTmm_m3_sc14,PPTmm_m4_sc14,PPTmm_m5_sc14,PPTmm_m6_sc14,PPTmm_m7_sc14,PPTmm_m8_sc14,PPTmm_m9_sc14,PPTmm_m10_sc14,PPTmm_m11_sc14,PPTmm_m12_sc14,TempC_min_m1_sc14,TempC_min_m2_sc14,TempC_min_m3_sc14,TempC_min_m4_sc14,TempC_min_m5_sc14,TempC_min_m6_sc14,TempC_min_m7_sc14,TempC_min_m8_sc14,TempC_min_m9_sc14,TempC_min_m10_sc14,TempC_min_m11_sc14,TempC_min_m12_sc14,TempC_max_m1_sc14,TempC_max_m2_sc14,TempC_max_m3_sc14,TempC_max_m4_sc14,TempC_max_m5_sc14,TempC_max_m6_sc14,TempC_max_m7_sc14,TempC_max_m8_sc14,TempC_max_m9_sc14,TempC_max_m10_sc14,TempC_max_m11_sc14,TempC_max_m12_sc14,PPTmm_m1_sc15,PPTmm_m2_sc15,PPTmm_m3_sc15,PPTmm_m4_sc15,PPTmm_m5_sc15,PPTmm_m6_sc15,PPTmm_m7_sc15,PPTmm_m8_sc15,PPTmm_m9_sc15,PPTmm_m10_sc15,PPTmm_m11_sc15,PPTmm_m12_sc15,TempC_min_m1_sc15,TempC_min_m2_sc15,TempC_min_m3_sc15,TempC_min_m4_sc15,TempC_min_m5_sc15,TempC_min_m6_sc15,TempC_min_m7_sc15,TempC_min_m8_sc15,TempC_min_m9_sc15,TempC_min_m10_sc15,TempC_min_m11_sc15,TempC_min_m12_sc15,TempC_max_m1_sc15,TempC_max_m2_sc15,TempC_max_m3_sc15,TempC_max_m4_sc15,TempC_max_m5_sc15,TempC_max_m6_sc15,TempC_max_m7_sc15,TempC_max_m8_sc15,TempC_max_m9_sc15,TempC_max_m10_sc15,TempC_max_m11_sc15,TempC_max_m12_sc15,PPTmm_m1_sc16,PPTmm_m2_sc16,PPTmm_m3_sc16,PPTmm_m4_sc16,PPTmm_m5_sc16,PPTmm_m6_sc16,PPTmm_m7_sc16,PPTmm_m8_sc16,PPTmm_m9_sc16,PPTmm_m10_sc16,PPTmm_m11_sc16,PPTmm_m12_sc16,TempC_min_m1_sc16,TempC_min_m2_sc16,TempC_min_m3_sc16,TempC_min_m4_sc16,TempC_min_m5_sc16,TempC_min_m6_sc16,TempC_min_m7_sc16,TempC_min_m8_sc16,TempC_min_m9_sc16,TempC_min_m10_sc16,TempC_min_m11_sc16,TempC_min_m12_sc16,TempC_max_m1_sc16,TempC_max_m2_sc16,TempC_max_m3_sc16,TempC_max_m4_sc16,TempC_max_m5_sc16,TempC_max_m6_sc16,TempC_max_m7_sc16,TempC_max_m8_sc16,TempC_max_m9_sc16,TempC_max_m10_sc16,TempC_max_m11_sc16,TempC_max_m12_sc16,PPTmm_m1_sc17,PPTmm_m2_sc17,PPTmm_m3_sc17,PPTmm_m4_sc17,PPTmm_m5_sc17,PPTmm_m6_sc17,PPTmm_m7_sc17,PPTmm_m8_sc17,PPTmm_m9_sc17,PPTmm_m10_sc17,PPTmm_m11_sc17,PPTmm_m12_sc17,TempC_min_m1_sc17,TempC_min_m2_sc17,TempC_min_m3_sc17,TempC_min_m4_sc17,TempC_min_m5_sc17,TempC_min_m6_sc17,TempC_min_m7_sc17,TempC_min_m8_sc17,TempC_min_m9_sc17,TempC_min_m10_sc17,TempC_min_m11_sc17,TempC_min_m12_sc17,TempC_max_m1_sc17,TempC_max_m2_sc17,TempC_max_m3_sc17,TempC_max_m4_sc17,TempC_max_m5_sc17,TempC_max_m6_sc17,TempC_max_m7_sc17,TempC_max_m8_sc17,TempC_max_m9_sc17,TempC_max_m10_sc17,TempC_max_m11_sc17,TempC_max_m12_sc17,PPTmm_m1_sc18,PPTmm_m2_sc18,PPTmm_m3_sc18,PPTmm_m4_sc18,PPTmm_m5_sc18,PPTmm_m6_sc18,PPTmm_m7_sc18,PPTmm_m8_sc18,PPTmm_m9_sc18,PPTmm_m10_sc18,PPTmm_m11_sc18,PPTmm_m12_sc18,TempC_min_m1_sc18,TempC_min_m2_sc18,TempC_min_m3_sc18,TempC_min_m4_sc18,TempC_min_m5_sc18,TempC_min_m6_sc18,TempC_min_m7_sc18,TempC_min_m8_sc18,TempC_min_m9_sc18,TempC_min_m10_sc18,TempC_min_m11_sc18,TempC_min_m12_sc18,TempC_max_m1_sc18,TempC_max_m2_sc18,TempC_max_m3_sc18,TempC_max_m4_sc18,TempC_max_m5_sc18,TempC_max_m6_sc18,TempC_max_m7_sc18,TempC_max_m8_sc18,TempC_max_m9_sc18,TempC_max_m10_sc18,TempC_max_m11_sc18,TempC_max_m12_sc18,PPTmm_m1_sc19,PPTmm_m2_sc19,PPTmm_m3_sc19,PPTmm_m4_sc19,PPTmm_m5_sc19,PPTmm_m6_sc19,PPTmm_m7_sc19,PPTmm_m8_sc19,PPTmm_m9_sc19,PPTmm_m10_sc19,PPTmm_m11_sc19,PPTmm_m12_sc19,TempC_min_m1_sc19,TempC_min_m2_sc19,TempC_min_m3_sc19,TempC_min_m4_sc19,TempC_min_m5_sc19,TempC_min_m6_sc19,TempC_min_m7_sc19,TempC_min_m8_sc19,TempC_min_m9_sc19,TempC_min_m10_sc19,TempC_min_m11_sc19,TempC_min_m12_sc19,TempC_max_m1_sc19,TempC_max_m2_sc19,TempC_max_m3_sc19,TempC_max_m4_sc19,TempC_max_m5_sc19,TempC_max_m6_sc19,TempC_max_m7_sc19,TempC_max_m8_sc19,TempC_max_m9_sc19,TempC_max_m10_sc19,TempC_max_m11_sc19,TempC_max_m12_sc19,PPTmm_m1_sc20,PPTmm_m2_sc20,PPTmm_m3_sc20,PPTmm_m4_sc20,PPTmm_m5_sc20,PPTmm_m6_sc20,PPTmm_m7_sc20,PPTmm_m8_sc20,PPTmm_m9_sc20,PPTmm_m10_sc20,PPTmm_m11_sc20,PPTmm_m12_sc20,TempC_min_m1_sc20,TempC_min_m2_sc20,TempC_min_m3_sc20,TempC_min_m4_sc20,TempC_min_m5_sc20,TempC_min_m6_sc20,TempC_min_m7_sc20,TempC_min_m8_sc20,TempC_min_m9_sc20,TempC_min_m10_sc20,TempC_min_m11_sc20,TempC_min_m12_sc20,TempC_max_m1_sc20,TempC_max_m2_sc20,TempC_max_m3_sc20,TempC_max_m4_sc20,TempC_max_m5_sc20,TempC_max_m6_sc20,TempC_max_m7_sc20,TempC_max_m8_sc20,TempC_max_m9_sc20,TempC_max_m10_sc20,TempC_max_m11_sc20,TempC_max_m12_sc20,PPTmm_m1_sc21,PPTmm_m2_sc21,PPTmm_m3_sc21,PPTmm_m4_sc21,PPTmm_m5_sc21,PPTmm_m6_sc21,PPTmm_m7_sc21,PPTmm_m8_sc21,PPTmm_m9_sc21,PPTmm_m10_sc21,PPTmm_m11_sc21,PPTmm_m12_sc21,TempC_min_m1_sc21,TempC_min_m2_sc21,TempC_min_m3_sc21,TempC_min_m4_sc21,TempC_min_m5_sc21,TempC_min_m6_sc21,TempC_min_m7_sc21,TempC_min_m8_sc21,TempC_min_m9_sc21,TempC_min_m10_sc21,TempC_min_m11_sc21,TempC_min_m12_sc21,TempC_max_m1_sc21,TempC_max_m2_sc21,TempC_max_m3_sc21,TempC_max_m4_sc21,TempC_max_m5_sc21,TempC_max_m6_sc21,TempC_max_m7_sc21,TempC_max_m8_sc21,TempC_max_m9_sc21,TempC_max_m10_sc21,TempC_max_m11_sc21,TempC_max_m12_sc21,PPTmm_m1_sc22,PPTmm_m2_sc22,PPTmm_m3_sc22,PPTmm_m4_sc22,PPTmm_m5_sc22,PPTmm_m6_sc22,PPTmm_m7_sc22,PPTmm_m8_sc22,PPTmm_m9_sc22,PPTmm_m10_sc22,PPTmm_m11_sc22,PPTmm_m12_sc22,TempC_min_m1_sc22,TempC_min_m2_sc22,TempC_min_m3_sc22,TempC_min_m4_sc22,TempC_min_m5_sc22,TempC_min_m6_sc22,TempC_min_m7_sc22,TempC_min_m8_sc22,TempC_min_m9_sc22,TempC_min_m10_sc22,TempC_min_m11_sc22,TempC_min_m12_sc22,TempC_max_m1_sc22,TempC_max_m2_sc22,TempC_max_m3_sc22,TempC_max_m4_sc22,TempC_max_m5_sc22,TempC_max_m6_sc22,TempC_max_m7_sc22,TempC_max_m8_sc22,TempC_max_m9_sc22,TempC_max_m10_sc22,TempC_max_m11_sc22,TempC_max_m12_sc22,PPTmm_m1_sc23,PPTmm_m2_sc23,PPTmm_m3_sc23,PPTmm_m4_sc23,PPTmm_m5_sc23,PPTmm_m6_sc23,PPTmm_m7_sc23,PPTmm_m8_sc23,PPTmm_m9_sc23,PPTmm_m10_sc23,PPTmm_m11_sc23,PPTmm_m12_sc23,TempC_min_m1_sc23,TempC_min_m2_sc23,TempC_min_m3_sc23,TempC_min_m4_sc23,TempC_min_m5_sc23,TempC_min_m6_sc23,TempC_min_m7_sc23,TempC_min_m8_sc23,TempC_min_m9_sc23,TempC_min_m10_sc23,TempC_min_m11_sc23,TempC_min_m12_sc23,TempC_max_m1_sc23,TempC_max_m2_sc23,TempC_max_m3_sc23,TempC_max_m4_sc23,TempC_max_m5_sc23,TempC_max_m6_sc23,TempC_max_m7_sc23,TempC_max_m8_sc23,TempC_max_m9_sc23,TempC_max_m10_sc23,TempC_max_m11_sc23,TempC_max_m12_sc23,PPTmm_m1_sc24,PPTmm_m2_sc24,PPTmm_m3_sc24,PPTmm_m4_sc24,PPTmm_m5_sc24,PPTmm_m6_sc24,PPTmm_m7_sc24,PPTmm_m8_sc24,PPTmm_m9_sc24,PPTmm_m10_sc24,PPTmm_m11_sc24,PPTmm_m12_sc24,TempC_min_m1_sc24,TempC_min_m2_sc24,TempC_min_m3_sc24,TempC_min_m4_sc24,TempC_min_m5_sc24,TempC_min_m6_sc24,TempC_min_m7_sc24,TempC_min_m8_sc24,TempC_min_m9_sc24,TempC_min_m10_sc24,TempC_min_m11_sc24,TempC_min_m12_sc24,TempC_max_m1_sc24,TempC_max_m2_sc24,TempC_max_m3_sc24,TempC_max_m4_sc24,TempC_max_m5_sc24,TempC_max_m6_sc24,TempC_max_m7_sc24,TempC_max_m8_sc24,TempC_max_m9_sc24,TempC_max_m10_sc24,TempC_max_m11_sc24,TempC_max_m12_sc24,PPTmm_m1_sc25,PPTmm_m2_sc25,PPTmm_m3_sc25,PPTmm_m4_sc25,PPTmm_m5_sc25,PPTmm_m6_sc25,PPTmm_m7_sc25,PPTmm_m8_sc25,PPTmm_m9_sc25,PPTmm_m10_sc25,PPTmm_m11_sc25,PPTmm_m12_sc25,TempC_min_m1_sc25,TempC_min_m2_sc25,TempC_min_m3_sc25,TempC_min_m4_sc25,TempC_min_m5_sc25,TempC_min_m6_sc25,TempC_min_m7_sc25,TempC_min_m8_sc25,TempC_min_m9_sc25,TempC_min_m10_sc25,TempC_min_m11_sc25,TempC_min_m12_sc25,TempC_max_m1_sc25,TempC_max_m2_sc25,TempC_max_m3_sc25,TempC_max_m4_sc25,TempC_max_m5_sc25,TempC_max_m6_sc25,TempC_max_m7_sc25,TempC_max_m8_sc25,TempC_max_m9_sc25,TempC_max_m10_sc25,TempC_max_m11_sc25,TempC_max_m12_sc25,PPTmm_m1_sc26,PPTmm_m2_sc26,PPTmm_m3_sc26,PPTmm_m4_sc26,PPTmm_m5_sc26,PPTmm_m6_sc26,PPTmm_m7_sc26,PPTmm_m8_sc26,PPTmm_m9_sc26,PPTmm_m10_sc26,PPTmm_m11_sc26,PPTmm_m12_sc26,TempC_min_m1_sc26,TempC_min_m2_sc26,TempC_min_m3_sc26,TempC_min_m4_sc26,TempC_min_m5_sc26,TempC_min_m6_sc26,TempC_min_m7_sc26,TempC_min_m8_sc26,TempC_min_m9_sc26,TempC_min_m10_sc26,TempC_min_m11_sc26,TempC_min_m12_sc26,TempC_max_m1_sc26,TempC_max_m2_sc26,TempC_max_m3_sc26,TempC_max_m4_sc26,TempC_max_m5_sc26,TempC_max_m6_sc26,TempC_max_m7_sc26,TempC_max_m8_sc26,TempC_max_m9_sc26,TempC_max_m10_sc26,TempC_max_m11_sc26,TempC_max_m12_sc26,PPTmm_m1_sc27,PPTmm_m2_sc27,PPTmm_m3_sc27,PPTmm_m4_sc27,PPTmm_m5_sc27,PPTmm_m6_sc27,PPTmm_m7_sc27,PPTmm_m8_sc27,PPTmm_m9_sc27,PPTmm_m10_sc27,PPTmm_m11_sc27,PPTmm_m12_sc27,TempC_min_m1_sc27,TempC_min_m2_sc27,TempC_min_m3_sc27,TempC_min_m4_sc27,TempC_min_m5_sc27,TempC_min_m6_sc27,TempC_min_m7_sc27,TempC_min_m8_sc27,TempC_min_m9_sc27,TempC_min_m10_sc27,TempC_min_m11_sc27,TempC_min_m12_sc27,TempC_max_m1_sc27,TempC_max_m2_sc27,TempC_max_m3_sc27,TempC_max_m4_sc27,TempC_max_m5_sc27,TempC_max_m6_sc27,TempC_max_m7_sc27,TempC_max_m8_sc27,TempC_max_m9_sc27,TempC_max_m10_sc27,TempC_max_m11_sc27,TempC_max_m12_sc27,PPTmm_m1_sc28,PPTmm_m2_sc28,PPTmm_m3_sc28,PPTmm_m4_sc28,PPTmm_m5_sc28,PPTmm_m6_sc28,PPTmm_m7_sc28,PPTmm_m8_sc28,PPTmm_m9_sc28,PPTmm_m10_sc28,PPTmm_m11_sc28,PPTmm_m12_sc28,TempC_min_m1_sc28,TempC_min_m2_sc28,TempC_min_m3_sc28,TempC_min_m4_sc28,TempC_min_m5_sc28,TempC_min_m6_sc28,TempC_min_m7_sc28,TempC_min_m8_sc28,TempC_min_m9_sc28,TempC_min_m10_sc28,TempC_min_m11_sc28,TempC_min_m12_sc28,TempC_max_m1_sc28,TempC_max_m2_sc28,TempC_max_m3_sc28,TempC_max_m4_sc28,TempC_max_m5_sc28,TempC_max_m6_sc28,TempC_max_m7_sc28,TempC_max_m8_sc28,TempC_max_m9_sc28,TempC_max_m10_sc28,TempC_max_m11_sc28,TempC_max_m12_sc28,PPTmm_m1_sc29,PPTmm_m2_sc29,PPTmm_m3_sc29,PPTmm_m4_sc29,PPTmm_m5_sc29,PPTmm_m6_sc29,PPTmm_m7_sc29,PPTmm_m8_sc29,PPTmm_m9_sc29,PPTmm_m10_sc29,PPTmm_m11_sc29,PPTmm_m12_sc29,TempC_min_m1_sc29,TempC_min_m2_sc29,TempC_min_m3_sc29,TempC_min_m4_sc29,TempC_min_m5_sc29,TempC_min_m6_sc29,TempC_min_m7_sc29,TempC_min_m8_sc29,TempC_min_m9_sc29,TempC_min_m10_sc29,TempC_min_m11_sc29,TempC_min_m12_sc29,TempC_max_m1_sc29,TempC_max_m2_sc29,TempC_max_m3_sc29,TempC_max_m4_sc29,TempC_max_m5_sc29,TempC_max_m6_sc29,TempC_max_m7_sc29,TempC_max_m8_sc29,TempC_max_m9_sc29,TempC_max_m10_sc29,TempC_max_m11_sc29,TempC_max_m12_sc29,PPTmm_m1_sc30,PPTmm_m2_sc30,PPTmm_m3_sc30,PPTmm_m4_sc30,PPTmm_m5_sc30,PPTmm_m6_sc30,PPTmm_m7_sc30,PPTmm_m8_sc30,PPTmm_m9_sc30,PPTmm_m10_sc30,PPTmm_m11_sc30,PPTmm_m12_sc30,TempC_min_m1_sc30,TempC_min_m2_sc30,TempC_min_m3_sc30,TempC_min_m4_sc30,TempC_min_m5_sc30,TempC_min_m6_sc30,TempC_min_m7_sc30,TempC_min_m8_sc30,TempC_min_m9_sc30,TempC_min_m10_sc30,TempC_min_m11_sc30,TempC_min_m12_sc30,TempC_max_m1_sc30,TempC_max_m2_sc30,TempC_max_m3_sc30,TempC_max_m4_sc30,TempC_max_m5_sc30,TempC_max_m6_sc30,TempC_max_m7_sc30,TempC_max_m8_sc30,TempC_max_m9_sc30,TempC_max_m10_sc30,TempC_max_m11_sc30,TempC_max_m12_sc30,PPTmm_m1_sc31,PPTmm_m2_sc31,PPTmm_m3_sc31,PPTmm_m4_sc31,PPTmm_m5_sc31,PPTmm_m6_sc31,PPTmm_m7_sc31,PPTmm_m8_sc31,PPTmm_m9_sc31,PPTmm_m10_sc31,PPTmm_m11_sc31,PPTmm_m12_sc31,TempC_min_m1_sc31,TempC_min_m2_sc31,TempC_min_m3_sc31,TempC_min_m4_sc31,TempC_min_m5_sc31,TempC_min_m6_sc31,TempC_min_m7_sc31,TempC_min_m8_sc31,TempC_min_m9_sc31,TempC_min_m10_sc31,TempC_min_m11_sc31,TempC_min_m12_sc31,TempC_max_m1_sc31,TempC_max_m2_sc31,TempC_max_m3_sc31,TempC_max_m4_sc31,TempC_max_m5_sc31,TempC_max_m6_sc31,TempC_max_m7_sc31,TempC_max_m8_sc31,TempC_max_m9_sc31,TempC_max_m10_sc31,TempC_max_m11_sc31,TempC_max_m12_sc31,PPTmm_m1_sc32,PPTmm_m2_sc32,PPTmm_m3_sc32,PPTmm_m4_sc32,PPTmm_m5_sc32,PPTmm_m6_sc32,PPTmm_m7_sc32,PPTmm_m8_sc32,PPTmm_m9_sc32,PPTmm_m10_sc32,PPTmm_m11_sc32,PPTmm_m12_sc32,TempC_min_m1_sc32,TempC_min_m2_sc32,TempC_min_m3_sc32,TempC_min_m4_sc32,TempC_min_m5_sc32,TempC_min_m6_sc32,TempC_min_m7_sc32,TempC_min_m8_sc32,TempC_min_m9_sc32,TempC_min_m10_sc32,TempC_min_m11_sc32,TempC_min_m12_sc32,TempC_max_m1_sc32,TempC_max_m2_sc32,TempC_max_m3_sc32,TempC_max_m4_sc32,TempC_max_m5_sc32,TempC_max_m6_sc32,TempC_max_m7_sc32,TempC_max_m8_sc32,TempC_max_m9_sc32,TempC_max_m10_sc32,TempC_max_m11_sc32,TempC_max_m12_sc32 +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_cloud_v10.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_cloud_v10.csv new file mode 100644 index 00000000..531ec30b --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_cloud_v10.csv @@ -0,0 +1,2 @@ +Label,SkyC_1,SkyC_2,SkyC_3,SkyC_4,SkyC_5,SkyC_6,SkyC_7,SkyC_8,SkyC_9,SkyC_10,SkyC_11,SkyC_12,SkyC_Source,wind_ms_1,wind_ms_2,wind_ms_3,wind_ms_4,wind_ms_5,wind_ms_6,wind_ms_7,wind_ms_8,wind_ms_9,wind_ms_10,wind_ms_11,wind_ms_12,Wind_Source,RH_1,RH_2,RH_3,RH_4,RH_5,RH_6,RH_7,RH_8,RH_9,RH_10,RH_11,RH_12,RH_Source,snowd_1,snowd_2,snowd_3,snowd_4,snowd_5,snowd_6,snowd_7,snowd_8,snowd_9,snowd_10,snowd_11,snowd_12,SnowD_Hemisphere,SnowD_Source +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_prod_v11.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_prod_v11.csv new file mode 100644 index 00000000..64b783d3 --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_prod_v11.csv @@ -0,0 +1,2 @@ +"Label","Composition_GrassFraction","Composition_ShrubFraction","Composition_TreeFraction","Composition_ForbFraction","Composition_BareGround","BareGround_Albedo","Grass_Albedo","Grass_CanopyHeight_Constant_cm","Grass_HydRed_OnOff","Grass_SWPcrit_MPa","Grass_Litter_m1","Grass_Litter_m2","Grass_Litter_m3","Grass_Litter_m4","Grass_Litter_m5","Grass_Litter_m6","Grass_Litter_m7","Grass_Litter_m8","Grass_Litter_m9","Grass_Litter_m10","Grass_Litter_m11","Grass_Litter_m12","Grass_Biomass_m1","Grass_Biomass_m2","Grass_Biomass_m3","Grass_Biomass_m4","Grass_Biomass_m5","Grass_Biomass_m6","Grass_Biomass_m7","Grass_Biomass_m8","Grass_Biomass_m9","Grass_Biomass_m10","Grass_Biomass_m11","Grass_Biomass_m12","Grass_FractionLive_m1","Grass_FractionLive_m2","Grass_FractionLive_m3","Grass_FractionLive_m4","Grass_FractionLive_m5","Grass_FractionLive_m6","Grass_FractionLive_m7","Grass_FractionLive_m8","Grass_FractionLive_m9","Grass_FractionLive_m10","Grass_FractionLive_m11","Grass_FractionLive_m12","Grass_LAIconv_m1","Grass_LAIconv_m2","Grass_LAIconv_m3","Grass_LAIconv_m4","Grass_LAIconv_m5","Grass_LAIconv_m6","Grass_LAIconv_m7","Grass_LAIconv_m8","Grass_LAIconv_m9","Grass_LAIconv_m10","Grass_LAIconv_m11","Grass_LAIconv_m12","Shrub_Albedo","Shrub_CanopyHeight_Constant_cm","Shrub_HydRed_OnOff","Shrub_SWPcrit_MPa","Shrub_Litter_m1","Shrub_Litter_m2","Shrub_Litter_m3","Shrub_Litter_m4","Shrub_Litter_m5","Shrub_Litter_m6","Shrub_Litter_m7","Shrub_Litter_m8","Shrub_Litter_m9","Shrub_Litter_m10","Shrub_Litter_m11","Shrub_Litter_m12","Shrub_Biomass_m1","Shrub_Biomass_m2","Shrub_Biomass_m3","Shrub_Biomass_m4","Shrub_Biomass_m5","Shrub_Biomass_m6","Shrub_Biomass_m7","Shrub_Biomass_m8","Shrub_Biomass_m9","Shrub_Biomass_m10","Shrub_Biomass_m11","Shrub_Biomass_m12","Shrub_FractionLive_m1","Shrub_FractionLive_m2","Shrub_FractionLive_m3","Shrub_FractionLive_m4","Shrub_FractionLive_m5","Shrub_FractionLive_m6","Shrub_FractionLive_m7","Shrub_FractionLive_m8","Shrub_FractionLive_m9","Shrub_FractionLive_m10","Shrub_FractionLive_m11","Shrub_FractionLive_m12","Shrub_LAIconv_m1","Shrub_LAIconv_m2","Shrub_LAIconv_m3","Shrub_LAIconv_m4","Shrub_LAIconv_m5","Shrub_LAIconv_m6","Shrub_LAIconv_m7","Shrub_LAIconv_m8","Shrub_LAIconv_m9","Shrub_LAIconv_m10","Shrub_LAIconv_m11","Shrub_LAIconv_m12","Tree_Albedo","Tree_CanopyHeight_Constant_cm","Tree_HydRed_OnOff","Tree_SWPcrit_MPa","Tree_Litter_m1","Tree_Litter_m2","Tree_Litter_m3","Tree_Litter_m4","Tree_Litter_m5","Tree_Litter_m6","Tree_Litter_m7","Tree_Litter_m8","Tree_Litter_m9","Tree_Litter_m10","Tree_Litter_m11","Tree_Litter_m12","Tree_Biomass_m1","Tree_Biomass_m2","Tree_Biomass_m3","Tree_Biomass_m4","Tree_Biomass_m5","Tree_Biomass_m6","Tree_Biomass_m7","Tree_Biomass_m8","Tree_Biomass_m9","Tree_Biomass_m10","Tree_Biomass_m11","Tree_Biomass_m12","Tree_FractionLive_m1","Tree_FractionLive_m2","Tree_FractionLive_m3","Tree_FractionLive_m4","Tree_FractionLive_m5","Tree_FractionLive_m6","Tree_FractionLive_m7","Tree_FractionLive_m8","Tree_FractionLive_m9","Tree_FractionLive_m10","Tree_FractionLive_m11","Tree_FractionLive_m12","Tree_LAIconv_m1","Tree_LAIconv_m2","Tree_LAIconv_m3","Tree_LAIconv_m4","Tree_LAIconv_m5","Tree_LAIconv_m6","Tree_LAIconv_m7","Tree_LAIconv_m8","Tree_LAIconv_m9","Tree_LAIconv_m10","Tree_LAIconv_m11","Tree_LAIconv_m12","Forb_Albedo","Forb_CanopyHeight_Constant_cm","Forb_HydRed_OnOff","Forb_SWPcrit_MPa","Forb_Litter_m1","Forb_Litter_m2","Forb_Litter_m3","Forb_Litter_m4","Forb_Litter_m5","Forb_Litter_m6","Forb_Litter_m7","Forb_Litter_m8","Forb_Litter_m9","Forb_Litter_m10","Forb_Litter_m11","Forb_Litter_m12","Forb_Biomass_m1","Forb_Biomass_m2","Forb_Biomass_m3","Forb_Biomass_m4","Forb_Biomass_m5","Forb_Biomass_m6","Forb_Biomass_m7","Forb_Biomass_m8","Forb_Biomass_m9","Forb_Biomass_m10","Forb_Biomass_m11","Forb_Biomass_m12","Forb_FractionLive_m1","Forb_FractionLive_m2","Forb_FractionLive_m3","Forb_FractionLive_m4","Forb_FractionLive_m5","Forb_FractionLive_m6","Forb_FractionLive_m7","Forb_FractionLive_m8","Forb_FractionLive_m9","Forb_FractionLive_m10","Forb_FractionLive_m11","Forb_FractionLive_m12","Forb_LAIconv_m1","Forb_LAIconv_m2","Forb_LAIconv_m3","Forb_LAIconv_m4","Forb_LAIconv_m5","Forb_LAIconv_m6","Forb_LAIconv_m7","Forb_LAIconv_m8","Forb_LAIconv_m9","Forb_LAIconv_m10","Forb_LAIconv_m11","Forb_LAIconv_m12" +"UseInformationToCreateSoilWatRuns",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_siteparam_v14.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_siteparam_v14.csv new file mode 100644 index 00000000..2096c534 --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_siteparam_v14.csv @@ -0,0 +1,2 @@ +Label,SWC_min,SWC_init,SWC_wet,SWC_YearlyReset,SWC_Deepdrain,PET_multiplier,SoilTemp_Flag,SoilTempC_atUpperBoundary,SoilTempC_atLowerBoundary,SoilTemp_BiomassLimiter_gPERm2,SoilTemp_T1constant_a,SoilTemp_T1constant_b,SoilTemp_T1constant_c,SoilTemp_SoilThermCondct,SoilTemp_cs_constant,SoilTemp_SpecificHeatCapacity,SoilTemp_deltaX_cm,SoilTemp_MaxDepth_cm,Latitude,Altitude,Slope,Aspect,RunoffPercent_fromPondedWater,RunonPercent_fromPondedWater,Param_UnsaturatedPercolation +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_soils_v12.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_soils_v12.csv new file mode 100644 index 00000000..b39c0995 --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_soils_v12.csv @@ -0,0 +1,2 @@ +Label,Matricd_L1,GravelContent_L1,EvapCoeff_L1,Grass_TranspCoeff_L1,Shrub_TranspCoeff_L1,Tree_TranspCoeff_L1,Forb_TranspCoeff_L1,TranspRegion_L1,Sand_L1,Clay_L1,TOC_GperKG_L1,Imperm_L1,SoilTemp_L1,Matricd_L2,GravelContent_L2,EvapCoeff_L2,Grass_TranspCoeff_L2,Shrub_TranspCoeff_L2,Tree_TranspCoeff_L2,Forb_TranspCoeff_L2,TranspRegion_L2,Sand_L2,Clay_L2,TOC_GperKG_L2,Imperm_L2,SoilTemp_L2,Matricd_L3,GravelContent_L3,EvapCoeff_L3,Grass_TranspCoeff_L3,Shrub_TranspCoeff_L3,Tree_TranspCoeff_L3,Forb_TranspCoeff_L3,TranspRegion_L3,Sand_L3,Clay_L3,TOC_GperKG_L3,Imperm_L3,SoilTemp_L3,Matricd_L4,GravelContent_L4,EvapCoeff_L4,Grass_TranspCoeff_L4,Shrub_TranspCoeff_L4,Tree_TranspCoeff_L4,Forb_TranspCoeff_L4,TranspRegion_L4,Sand_L4,Clay_L4,TOC_GperKG_L4,Imperm_L4,SoilTemp_L4,Matricd_L5,GravelContent_L5,EvapCoeff_L5,Grass_TranspCoeff_L5,Shrub_TranspCoeff_L5,Tree_TranspCoeff_L5,Forb_TranspCoeff_L5,TranspRegion_L5,Sand_L5,Clay_L5,TOC_GperKG_L5,Imperm_L5,SoilTemp_L5,Matricd_L6,GravelContent_L6,EvapCoeff_L6,Grass_TranspCoeff_L6,Shrub_TranspCoeff_L6,Tree_TranspCoeff_L6,Forb_TranspCoeff_L6,TranspRegion_L6,Sand_L6,Clay_L6,TOC_GperKG_L6,Imperm_L6,SoilTemp_L6,Matricd_L7,GravelContent_L7,EvapCoeff_L7,Grass_TranspCoeff_L7,Shrub_TranspCoeff_L7,Tree_TranspCoeff_L7,Forb_TranspCoeff_L7,TranspRegion_L7,Sand_L7,Clay_L7,TOC_GperKG_L7,Imperm_L7,SoilTemp_L7,Matricd_L8,GravelContent_L8,EvapCoeff_L8,Grass_TranspCoeff_L8,Shrub_TranspCoeff_L8,Tree_TranspCoeff_L8,Forb_TranspCoeff_L8,TranspRegion_L8,Sand_L8,Clay_L8,TOC_GperKG_L8,Imperm_L8,SoilTemp_L8,Matricd_L9,GravelContent_L9,EvapCoeff_L9,Grass_TranspCoeff_L9,Shrub_TranspCoeff_L9,Tree_TranspCoeff_L9,Forb_TranspCoeff_L9,TranspRegion_L9,Sand_L9,Clay_L9,TOC_GperKG_L9,Imperm_L9,SoilTemp_L9,Matricd_L10,GravelContent_L10,EvapCoeff_L10,Grass_TranspCoeff_L10,Shrub_TranspCoeff_L10,Tree_TranspCoeff_L10,Forb_TranspCoeff_L10,TranspRegion_L10,Sand_L10,Clay_L10,TOC_GperKG_L10,Imperm_L10,SoilTemp_L10,Matricd_L11,GravelContent_L11,EvapCoeff_L11,Grass_TranspCoeff_L11,Shrub_TranspCoeff_L11,Tree_TranspCoeff_L11,Forb_TranspCoeff_L11,TranspRegion_L11,Sand_L11,Clay_L11,TOC_GperKG_L11,Imperm_L11,SoilTemp_L11,Matricd_L12,GravelContent_L12,EvapCoeff_L12,Grass_TranspCoeff_L12,Shrub_TranspCoeff_L12,Tree_TranspCoeff_L12,Forb_TranspCoeff_L12,TranspRegion_L12,Sand_L12,Clay_L12,TOC_GperKG_L12,Imperm_L12,SoilTemp_L12,Matricd_L13,GravelContent_L13,EvapCoeff_L13,Grass_TranspCoeff_L13,Shrub_TranspCoeff_L13,Tree_TranspCoeff_L13,Forb_TranspCoeff_L13,TranspRegion_L13,Sand_L13,Clay_L13,TOC_GperKG_L13,Imperm_L13,SoilTemp_L13,Matricd_L14,GravelContent_L14,EvapCoeff_L14,Grass_TranspCoeff_L14,Shrub_TranspCoeff_L14,Tree_TranspCoeff_L14,Forb_TranspCoeff_L14,TranspRegion_L14,Sand_L14,Clay_L14,TOC_GperKG_L14,Imperm_L14,SoilTemp_L14,Matricd_L15,GravelContent_L15,EvapCoeff_L15,Grass_TranspCoeff_L15,Shrub_TranspCoeff_L15,Tree_TranspCoeff_L15,Forb_TranspCoeff_L15,TranspRegion_L15,Sand_L15,Clay_L15,TOC_GperKG_L15,Imperm_L15,SoilTemp_L15,Matricd_L16,GravelContent_L16,EvapCoeff_L16,Grass_TranspCoeff_L16,Shrub_TranspCoeff_L16,Tree_TranspCoeff_L16,Forb_TranspCoeff_L16,TranspRegion_L16,Sand_L16,Clay_L16,TOC_GperKG_L16,Imperm_L16,SoilTemp_L16,Matricd_L17,GravelContent_L17,EvapCoeff_L17,Grass_TranspCoeff_L17,Shrub_TranspCoeff_L17,Tree_TranspCoeff_L17,Forb_TranspCoeff_L17,TranspRegion_L17,Sand_L17,Clay_L17,TOC_GperKG_L17,Imperm_L17,SoilTemp_L17,Matricd_L18,GravelContent_L18,EvapCoeff_L18,Grass_TranspCoeff_L18,Shrub_TranspCoeff_L18,Tree_TranspCoeff_L18,Forb_TranspCoeff_L18,TranspRegion_L18,Sand_L18,Clay_L18,TOC_GperKG_L18,Imperm_L18,SoilTemp_L18,Matricd_L19,GravelContent_L19,EvapCoeff_L19,Grass_TranspCoeff_L19,Shrub_TranspCoeff_L19,Tree_TranspCoeff_L19,Forb_TranspCoeff_L19,TranspRegion_L19,Sand_L19,Clay_L19,TOC_GperKG_L19,Imperm_L19,SoilTemp_L19,Matricd_L20,GravelContent_L20,EvapCoeff_L20,Grass_TranspCoeff_L20,Shrub_TranspCoeff_L20,Tree_TranspCoeff_L20,Forb_TranspCoeff_L20,TranspRegion_L20,Sand_L20,Clay_L20,TOC_GperKG_L20,Imperm_L20,SoilTemp_L20 +UseInformationToCreateSoilWatRuns,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/1_Data_SWInput/datafiles/SWRuns_InputData_weathersetup_v10.csv b/1_Data_SWInput/datafiles/SWRuns_InputData_weathersetup_v10.csv new file mode 100644 index 00000000..7377a9ea --- /dev/null +++ b/1_Data_SWInput/datafiles/SWRuns_InputData_weathersetup_v10.csv @@ -0,0 +1,2 @@ +Label,SnowFlag,SnowDrift_Percent,RunOffOnPerSnowmelt_Percent +UseInformationToCreateSoilWatRuns,0,0,0 diff --git a/1_Data_SWInput/regeneration/ArtemisiaTridentataNotSpecifiedSubspecies.csv b/1_Data_SWInput/regeneration/ArtemisiaTridentataNotSpecifiedSubspecies.csv new file mode 100644 index 00000000..d8561638 --- /dev/null +++ b/1_Data_SWInput/regeneration/ArtemisiaTridentataNotSpecifiedSubspecies.csv @@ -0,0 +1,31 @@ +"X","default","X.Artemisia.tridentata.regeneration.according.to.model..2012.02.15..drs...Parameters" +"Doy_SeedDispersalStart0",324.5569743," #defines start of 'Regeneration Year' RY doy=289 <-> 15-Oct <-> RYdoy=1 (in a non-leap year) for a site with meanTJan=0" +"SeedDispersalStart_DependencyOnMeanTempJanuary",2.039915438," # [doy/Kelvin]; defines start of regeneration year = Doy_SeedDispersalStart0 + SeedDispersalStart_DependencyOnMeanTempJanuary * meanTJan [Sept to end of Nov for meanTJan=±15C; warmer sites - later seeds]" +"GerminationPeriods_0ResetOr1Resume",1," #0=reset, if after start of favorable conditions for germination conditions became unfavorable, then kills all germinating seedlings and restarts with new seeds; 1=resume, germinating seedlings wait through unfavorable conditions to resume at rebegin of favorable conditions" +"Temp_ExperiencedUnderneathSnowcover",3.406591694," #C" +"Temp_MaximumForGermination",43.84200172," #C" +"Temp_MinimumForGermination",3.620305876," #C" +"SWP_MinimumForGermination",-0.447054684," #MPa" +"SeedlingGrowth_0StopOr1Resume",1," #0=stop, if conditions turn unfavorable, then growth for entire season is stopped; 1=resume, if unfavorable conditions turn favorable, then resume growth" +"SWE_MaximumForSeedlingGrowth",0," #mm" +"Days_SnowCover_MaximumForSeedlingSurvival",31," #days" +"Temp_MinimumForSeedlingGrowth",-2.616505128," #C" +"Temp_MaximumForSeedlingGrowth",34.46478864," #C" +"Temp_MinimumForSeedlingSurvival",-9.25483659," #C" +"Temp_MaximumForSeedlingSurvival",34.46478864," #C" +"SWP_ChronicMaximumForSeedlingSurvival",-0.03333," #MPa, here saturation defined as just a little less than field capacity" +"Days_ChronicMaximumForSeedlingSurvival",56,"" +"SWP_ChronicMinimumForSeedlingSurvival",-2.259034726," #MPa" +"Days_ChronicMinimumForSeedlingSurvival",49,"" +"SWP_AcuteMinimumForSeedlingSurvival",-3.278547773," #MPa" +"SoilDepth_RelevantToGermination",3," #cm" +"Seedling_SoilDepth.PO",74," #mm, minimum rooting depth" +"Seedling_SoilDepth.K",1765," #mm, maximum rooting depth" +"Seedling_SoilDepth.r",0.189413231," #rate of root growth" +"Hardegree_a",0.649614337," #1/day > 0" +"Hardegree_b",13.7107755,"#Celsius, optimal temperature" +"Hardegree_c",-116.2694843,"#1/Kelvin, abs=kurtosis, sign=skewness; if c>0 then c > -(T-b)(d^2-1)/d else if c<0 then c < -(T-b)(d^2-1)/d" +"Hardegree_d",0.365901519,"#unit-less > 0 & != 1, 'angle of peak'" +"TimeToGerminate_k1_meanJanTemp",-0.395946153," #[day/C]" +"TimeToGerminate_k2_meanJanTempXIncubationTemp",0.267351215," #[day/(C*C)]" +"TimeToGerminate_k3_IncubationSWP",-3.538845403," #[day/MPa]" diff --git a/1_Data_SWInput/treatments/LookupCarbonScenarios/Documentation_LookupCarbonScenarios.txt b/1_Data_SWInput/treatments/LookupCarbonScenarios/Documentation_LookupCarbonScenarios.txt new file mode 100644 index 00000000..56ade37f --- /dev/null +++ b/1_Data_SWInput/treatments/LookupCarbonScenarios/Documentation_LookupCarbonScenarios.txt @@ -0,0 +1,24 @@ +Author: Zachary Kramer +Email: kramer.zachary.nau@gmail.com +Date: 11/10/17 + +Each column represents a scenario of ppm values for atmospheric carbon dioxide. The row number represents the year, whereas the value in the row/column combo is the ppm value. + +In the experimental/treatment designs, a user can enable LookupCarbonScenarios and provide either "FILL" or a scenario name, both of which are case-insensitive. + +If "FILL" is provided, the scenario name will be automatically extracted from what is being simulated and used in the lookup. The default scenario uses the default values of 360 ppm for every year. + +If a value other than "FILL" is provided, that value will be used in the lookup. + +rSFSW2 will search this CSV for the scenario name, ensure the ppm data is valid, and pass the ppm data to SOILWAT2 via the swCarbon class. This ppm data will be used in the CO2 power equations defined in SOILWAT2/SW_Carbon.c to calculate multipliers for biomass and water-use efficiency. + +You can see the ppm values that were used in sw_input.RData under swRunScenariosData[[1 or scenario index]]@carbon@CO2ppm + +You can see the resulting multipliers in sw_output.RData under runDataSC@CO2effects + + +Data for scenarios RCP85 +have been downloaded on Aug 22, 2016 from the website "RCP Concentration Calculations and Data: Final Version, background data, acknowledgements and further info" (http://www.pik-potsdam.de/~mmalte/rcps/). We extracted the columns "CO2" (3rd column) from the files 'scenario_MIDYEAR_CONCENTRATIONS.DAT'. + +Description of the data sets: +Meinshausen, M., S. J. Smith, K. V. Calvin, J. S. Daniel, M. L. T. Kainuma, J.-F. Lamarque, K. Matsumoto, S. A. Montzka, S. C. B. Raper, K. Riahi, A. M. Thomson, G. J. M. Velders and D. van Vuuren (2011). "The RCP Greenhouse Gas Concentrations and their Extension from 1765 to 2300." Climatic Change (Special Issue), DOI: 10.1007/s10584-011-0156-z diff --git a/1_Data_SWInput/treatments/LookupCarbonScenarios/LookupCarbonScenarios.csv b/1_Data_SWInput/treatments/LookupCarbonScenarios/LookupCarbonScenarios.csv new file mode 100644 index 00000000..59a1b899 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupCarbonScenarios/LookupCarbonScenarios.csv @@ -0,0 +1,737 @@ +Year,Default,RCP85,20TH_CENTURY,RCP3PD,RCP45,RCP6 +1765,360,278.05158,278.05158,278.05158,278.05158,278.05158 +1766,360,278.10615,278.10615,278.10615,278.10615,278.10615 +1767,360,278.22039,278.22039,278.22039,278.22039,278.22039 +1768,360,278.34305,278.34305,278.34305,278.34305,278.34305 +1769,360,278.47058,278.47058,278.47058,278.47058,278.47058 +1770,360,278.60047,278.60047,278.60047,278.60047,278.60047 +1771,360,278.73275,278.73275,278.73275,278.73275,278.73275 +1772,360,278.86881,278.86881,278.86881,278.86881,278.86881 +1773,360,279.00907,279.00907,279.00907,279.00907,279.00907 +1774,360,279.15318,279.15318,279.15318,279.15318,279.15318 +1775,360,279.3018,279.3018,279.3018,279.3018,279.3018 +1776,360,279.4568,279.4568,279.4568,279.4568,279.4568 +1777,360,279.61808,279.61808,279.61808,279.61808,279.61808 +1778,360,279.78192,279.78192,279.78192,279.78192,279.78192 +1779,360,279.9432,279.9432,279.9432,279.9432,279.9432 +1780,360,280.0974,280.0974,280.0974,280.0974,280.0974 +1781,360,280.2428,280.2428,280.2428,280.2428,280.2428 +1782,360,280.38168,280.38168,280.38168,280.38168,280.38168 +1783,360,280.51832,280.51832,280.51832,280.51832,280.51832 +1784,360,280.6572,280.6572,280.6572,280.6572,280.6572 +1785,360,280.8026,280.8026,280.8026,280.8026,280.8026 +1786,360,280.9568,280.9568,280.9568,280.9568,280.9568 +1787,360,281.11808,281.11808,281.11808,281.11808,281.11808 +1788,360,281.28192,281.28192,281.28192,281.28192,281.28192 +1789,360,281.4432,281.4432,281.4432,281.4432,281.4432 +1790,360,281.5982,281.5982,281.5982,281.5982,281.5982 +1791,360,281.74682,281.74682,281.74682,281.74682,281.74682 +1792,360,281.89093,281.89093,281.89093,281.89093,281.89093 +1793,360,282.03119,282.03119,282.03119,282.03119,282.03119 +1794,360,282.16725,282.16725,282.16725,282.16725,282.16725 +1795,360,282.29901,282.29901,282.29901,282.29901,282.29901 +1796,360,282.4268,282.4268,282.4268,282.4268,282.4268 +1797,360,282.55093,282.55093,282.55093,282.55093,282.55093 +1798,360,282.67123,282.67123,282.67123,282.67123,282.67123 +1799,360,282.7873,282.7873,282.7873,282.7873,282.7873 +1800,360,282.89901,282.89901,282.89901,282.89901,282.89901 +1801,360,283.00677,283.00677,283.00677,283.00677,283.00677 +1802,360,283.11093,283.11093,283.11093,283.11093,283.11093 +1803,360,283.21129,283.21129,283.21129,283.21129,283.21129 +1804,360,283.30737,283.30737,283.30737,283.30737,283.30737 +1805,360,283.39963,283.39963,283.39963,283.39963,283.39963 +1806,360,283.48978,283.48978,283.48978,283.48978,283.48978 +1807,360,283.57796,283.57796,283.57796,283.57796,283.57796 +1808,360,283.66116,283.66116,283.66116,283.66116,283.66116 +1809,360,283.73511,283.73511,283.73511,283.73511,283.73511 +1810,360,283.79676,283.79676,283.79676,283.79676,283.79676 +1811,360,283.84667,283.84667,283.84667,283.84667,283.84667 +1812,360,283.88853,283.88853,283.88853,283.88853,283.88853 +1813,360,283.92613,283.92613,283.92613,283.92613,283.92613 +1814,360,283.96267,283.96267,283.96267,283.96267,283.96267 +1815,360,284.00107,284.00107,284.00107,284.00107,284.00107 +1816,360,284.04267,284.04267,284.04267,284.04267,284.04267 +1817,360,284.08613,284.08613,284.08613,284.08613,284.08613 +1818,360,284.12853,284.12853,284.12853,284.12853,284.12853 +1819,360,284.16667,284.16667,284.16667,284.16667,284.16667 +1820,360,284.1982,284.1982,284.1982,284.1982,284.1982 +1821,360,284.22333,284.22333,284.22333,284.22333,284.22333 +1822,360,284.24427,284.24427,284.24427,284.24427,284.24427 +1823,360,284.26307,284.26307,284.26307,284.26307,284.26307 +1824,360,284.28133,284.28133,284.28133,284.28133,284.28133 +1825,360,284.30027,284.30027,284.30027,284.30027,284.30027 +1826,360,284.32,284.32,284.32,284.32,284.32 +1827,360,284.34,284.34,284.34,284.34,284.34 +1828,360,284.36,284.36,284.36,284.36,284.36 +1829,360,284.38,284.38,284.38,284.38,284.38 +1830,360,284.4,284.4,284.4,284.4,284.4 +1831,360,284.385,284.385,284.385,284.385,284.385 +1832,360,284.28,284.28,284.28,284.28,284.28 +1833,360,284.125,284.125,284.125,284.125,284.125 +1834,360,283.975,283.975,283.975,283.975,283.975 +1835,360,283.825,283.825,283.825,283.825,283.825 +1836,360,283.675,283.675,283.675,283.675,283.675 +1837,360,283.525,283.525,283.525,283.525,283.525 +1838,360,283.425,283.425,283.425,283.425,283.425 +1839,360,283.4,283.4,283.4,283.4,283.4 +1840,360,283.4,283.4,283.4,283.4,283.4 +1841,360,283.425,283.425,283.425,283.425,283.425 +1842,360,283.5,283.5,283.5,283.5,283.5 +1843,360,283.6,283.6,283.6,283.6,283.6 +1844,360,283.725,283.725,283.725,283.725,283.725 +1845,360,283.9,283.9,283.9,283.9,283.9 +1846,360,284.075,284.075,284.075,284.075,284.075 +1847,360,284.225,284.225,284.225,284.225,284.225 +1848,360,284.4,284.4,284.4,284.4,284.4 +1849,360,284.575,284.575,284.575,284.575,284.575 +1850,360,284.725,284.725,284.725,284.725,284.725 +1851,360,284.875,284.875,284.875,284.875,284.875 +1852,360,285,285,285,285,285 +1853,360,285.125,285.125,285.125,285.125,285.125 +1854,360,285.275,285.275,285.275,285.275,285.275 +1855,360,285.425,285.425,285.425,285.425,285.425 +1856,360,285.575,285.575,285.575,285.575,285.575 +1857,360,285.725,285.725,285.725,285.725,285.725 +1858,360,285.9,285.9,285.9,285.9,285.9 +1859,360,286.075,286.075,286.075,286.075,286.075 +1860,360,286.225,286.225,286.225,286.225,286.225 +1861,360,286.375,286.375,286.375,286.375,286.375 +1862,360,286.5,286.5,286.5,286.5,286.5 +1863,360,286.625,286.625,286.625,286.625,286.625 +1864,360,286.775,286.775,286.775,286.775,286.775 +1865,360,286.9,286.9,286.9,286.9,286.9 +1866,360,287,287,287,287,287 +1867,360,287.1,287.1,287.1,287.1,287.1 +1868,360,287.225,287.225,287.225,287.225,287.225 +1869,360,287.375,287.375,287.375,287.375,287.375 +1870,360,287.525,287.525,287.525,287.525,287.525 +1871,360,287.7,287.7,287.7,287.7,287.7 +1872,360,287.9,287.9,287.9,287.9,287.9 +1873,360,288.125,288.125,288.125,288.125,288.125 +1874,360,288.4,288.4,288.4,288.4,288.4 +1875,360,288.7,288.7,288.7,288.7,288.7 +1876,360,289.025,289.025,289.025,289.025,289.025 +1877,360,289.4,289.4,289.4,289.4,289.4 +1878,360,289.8,289.8,289.8,289.8,289.8 +1879,360,290.225,290.225,290.225,290.225,290.225 +1880,360,290.7,290.7,290.7,290.7,290.7 +1881,360,291.2,291.2,291.2,291.2,291.2 +1882,360,291.675,291.675,291.675,291.675,291.675 +1883,360,292.125,292.125,292.125,292.125,292.125 +1884,360,292.575,292.575,292.575,292.575,292.575 +1885,360,292.975,292.975,292.975,292.975,292.975 +1886,360,293.3,293.3,293.3,293.3,293.3 +1887,360,293.575,293.575,293.575,293.575,293.575 +1888,360,293.8,293.8,293.8,293.8,293.8 +1889,360,294,294,294,294,294 +1890,360,294.175,294.175,294.175,294.175,294.175 +1891,360,294.325,294.325,294.325,294.325,294.325 +1892,360,294.475,294.475,294.475,294.475,294.475 +1893,360,294.6,294.6,294.6,294.6,294.6 +1894,360,294.7,294.7,294.7,294.7,294.7 +1895,360,294.8,294.8,294.8,294.8,294.8 +1896,360,294.9,294.9,294.9,294.9,294.9 +1897,360,295.025,295.025,295.025,295.025,295.025 +1898,360,295.225,295.225,295.225,295.225,295.225 +1899,360,295.5,295.5,295.5,295.5,295.5 +1900,360,295.8,295.8,295.8,295.8,295.8 +1901,360,296.125,296.125,296.125,296.125,296.125 +1902,360,296.475,296.475,296.475,296.475,296.475 +1903,360,296.825,296.825,296.825,296.825,296.825 +1904,360,297.2,297.2,297.2,297.2,297.2 +1905,360,297.625,297.625,297.625,297.625,297.625 +1906,360,298.075,298.075,298.075,298.075,298.075 +1907,360,298.5,298.5,298.5,298.5,298.5 +1908,360,298.9,298.9,298.9,298.9,298.9 +1909,360,299.3,299.3,299.3,299.3,299.3 +1910,360,299.7,299.7,299.7,299.7,299.7 +1911,360,300.075,300.075,300.075,300.075,300.075 +1912,360,300.425,300.425,300.425,300.425,300.425 +1913,360,300.775,300.775,300.775,300.775,300.775 +1914,360,301.1,301.1,301.1,301.1,301.1 +1915,360,301.4,301.4,301.4,301.4,301.4 +1916,360,301.725,301.725,301.725,301.725,301.725 +1917,360,302.075,302.075,302.075,302.075,302.075 +1918,360,302.4,302.4,302.4,302.4,302.4 +1919,360,302.7,302.7,302.7,302.7,302.7 +1920,360,303.025,303.025,303.025,303.025,303.025 +1921,360,303.4,303.4,303.4,303.4,303.4 +1922,360,303.775,303.775,303.775,303.775,303.775 +1923,360,304.125,304.125,304.125,304.125,304.125 +1924,360,304.525,304.525,304.525,304.525,304.525 +1925,360,304.975,304.975,304.975,304.975,304.975 +1926,360,305.4,305.4,305.4,305.4,305.4 +1927,360,305.825,305.825,305.825,305.825,305.825 +1928,360,306.3,306.3,306.3,306.3,306.3 +1929,360,306.775,306.775,306.775,306.775,306.775 +1930,360,307.225,307.225,307.225,307.225,307.225 +1931,360,307.7,307.7,307.7,307.7,307.7 +1932,360,308.175,308.175,308.175,308.175,308.175 +1933,360,308.6,308.6,308.6,308.6,308.6 +1934,360,309,309,309,309,309 +1935,360,309.4,309.4,309.4,309.4,309.4 +1936,360,309.75,309.75,309.75,309.75,309.75 +1937,360,310,310,310,310,310 +1938,360,310.175,310.175,310.175,310.175,310.175 +1939,360,310.3,310.3,310.3,310.3,310.3 +1940,360,310.375,310.375,310.375,310.375,310.375 +1941,360,310.375,310.375,310.375,310.375,310.375 +1942,360,310.3,310.3,310.3,310.3,310.3 +1943,360,310.2,310.2,310.2,310.2,310.2 +1944,360,310.125,310.125,310.125,310.125,310.125 +1945,360,310.1,310.1,310.1,310.1,310.1 +1946,360,310.125,310.125,310.125,310.125,310.125 +1947,360,310.2,310.2,310.2,310.2,310.2 +1948,360,310.325,310.325,310.325,310.325,310.325 +1949,360,310.5,310.5,310.5,310.5,310.5 +1950,360,310.75,310.75,310.75,310.75,310.75 +1951,360,311.1,311.1,311.1,311.1,311.1 +1952,360,311.5,311.5,311.5,311.5,311.5 +1953,360,311.925,311.925,311.925,311.925,311.925 +1954,360,312.425,312.425,312.425,312.425,312.425 +1955,360,313,313,313,313,313 +1956,360,313.6,313.6,313.6,313.6,313.6 +1957,360,314.225,314.225,314.225,314.225,314.225 +1958,360,314.8475,314.8475,314.8475,314.8475,314.8475 +1959,360,315.5,315.5,315.5,315.5,315.5 +1960,360,316.2725,316.2725,316.2725,316.2725,316.2725 +1961,360,317.075,317.075,317.075,317.075,317.075 +1962,360,317.795,317.795,317.795,317.795,317.795 +1963,360,318.3975,318.3975,318.3975,318.3975,318.3975 +1964,360,318.925,318.925,318.925,318.925,318.925 +1965,360,319.6475,319.6475,319.6475,319.6475,319.6475 +1966,360,320.6475,320.6475,320.6475,320.6475,320.6475 +1967,360,321.605,321.605,321.605,321.605,321.605 +1968,360,322.635,322.635,322.635,322.635,322.635 +1969,360,323.9025,323.9025,323.9025,323.9025,323.9025 +1970,360,324.985,324.985,324.985,324.985,324.985 +1971,360,325.855,325.855,325.855,325.855,325.855 +1972,360,327.14,327.14,327.14,327.14,327.14 +1973,360,328.6775,328.6775,328.6775,328.6775,328.6775 +1974,360,329.7425,329.7425,329.7425,329.7425,329.7425 +1975,360,330.585,330.585,330.585,330.585,330.585 +1976,360,331.7475,331.7475,331.7475,331.7475,331.7475 +1977,360,333.2725,333.2725,333.2725,333.2725,333.2725 +1978,360,334.8475,334.8475,334.8475,334.8475,334.8475 +1979,360,336.525,336.525,336.525,336.525,336.525 +1980,360,338.36,338.36,338.36,338.36,338.36 +1981,360,339.7275,339.7275,339.7275,339.7275,339.7275 +1982,360,340.7925,340.7925,340.7925,340.7925,340.7925 +1983,360,342.1975,342.1975,342.1975,342.1975,342.1975 +1984,360,343.7825,343.7825,343.7825,343.7825,343.7825 +1985,360,345.2825,345.2825,345.2825,345.2825,345.2825 +1986,360,346.7975,346.7975,346.7975,346.7975,346.7975 +1987,360,348.645,348.645,348.645,348.645,348.645 +1988,360,350.7375,350.7375,350.7375,350.7375,350.7375 +1989,360,352.4875,352.4875,352.4875,352.4875,352.4875 +1990,360,353.855,353.855,353.855,353.855,353.855 +1991,360,355.0175,355.0175,355.0175,355.0175,355.0175 +1992,360,355.885,355.885,355.885,355.885,355.885 +1993,360,356.7775,356.7775,356.7775,356.7775,356.7775 +1994,360,358.1275,358.1275,358.1275,358.1275,358.1275 +1995,360,359.8375,359.8375,359.8375,359.8375,359.8375 +1996,360,361.4625,361.4625,361.4625,361.4625,361.4625 +1997,360,363.155,363.155,363.155,363.155,363.155 +1998,360,365.3225,365.3225,365.3225,365.3225,365.3225 +1999,360,367.3475,367.3475,367.3475,367.3475,367.3475 +2000,360,368.865,368.865,368.865,368.865,368.865 +2001,360,370.4675,370.4675,370.4675,370.4675,370.4675 +2002,360,372.5225,372.5225,372.5225,372.5225,372.5225 +2003,360,374.76,374.76,374.76,374.76,374.76 +2004,360,376.8125,376.8125,376.8125,376.8125,376.8125 +2005,360,378.8125,378.8125,378.8125,378.8125,378.8125 +2006,360,380.8275,,380.8275,380.8275,380.8275 +2007,360,382.7775,,382.7775,382.7775,382.7775 +2008,360,384.8,,384.8,384.8,384.8 +2009,360,387.01226,,387.00054,386.9516,386.93455 +2010,360,389.32416,,389.28521,389.12785,389.0715 +2011,360,391.63801,,391.56252,391.27357,391.1665 +2012,360,394.00866,,393.84273,393.4211,393.24066 +2013,360,396.46384,,396.11734,395.58283,395.29786 +2014,360,399.00402,,398.39568,397.76408,397.34576 +2015,360,401.62793,,400.68068,399.96631,399.38717 +2016,360,404.32819,,402.9683,402.18432,401.41789 +2017,360,407.09588,,405.25182,404.41077,403.43127 +2018,360,409.92701,,407.52882,406.64292,405.42513 +2019,360,412.82151,,409.80029,408.8817,407.40083 +2020,360,415.78022,,412.06783,411.12868,409.36026 +2021,360,418.79629,,414.32565,413.37804,411.29764 +2022,360,421.86439,,416.51662,415.63944,413.21903 +2023,360,424.99469,,418.60322,417.93551,415.14445 +2024,360,428.19734,,420.60132,420.27395,417.08292 +2025,360,431.47473,,422.51575,422.65593,419.03635 +2026,360,434.82619,,424.34901,425.07983,421.0038 +2027,360,438.24456,,426.09675,427.53791,422.97812 +2028,360,441.7208,,427.75232,430.0206,424.95028 +2029,360,445.25085,,429.31381,432.5234,426.91631 +2030,360,448.83485,,430.78315,435.04594,428.87629 +2031,360,452.47359,,432.16344,437.58886,430.832 +2032,360,456.177,,433.43618,440.13137,432.80746 +2033,360,459.96398,,434.59273,442.66419,434.83148 +2034,360,463.85181,,435.65302,445.20699,436.91619 +2035,360,467.85003,,436.62804,447.76978,439.06785 +2036,360,471.96047,,437.52158,450.35539,441.28581 +2037,360,476.18237,,438.33433,452.96337,443.5672 +2038,360,480.50799,,439.06015,455.58649,445.90288 +2039,360,484.92724,,439.69061,458.2152,448.28176 +2040,360,489.43545,,440.2224,460.84499,450.69811 +2041,360,494.03235,,440.65666,463.47549,453.15021 +2042,360,498.7297,,441.02476,466.09336,455.64509 +2043,360,503.52959,,441.34651,468.67807,458.18181 +2044,360,508.43266,,441.621,471.23389,460.76247 +2045,360,513.45614,,441.8644,473.78031,463.4053 +2046,360,518.61062,,442.08482,476.32819,466.11968 +2047,360,523.90006,,442.2834,478.88085,468.90757 +2048,360,529.32418,,442.4583,481.43826,471.76784 +2049,360,534.8752,,442.60091,483.99308,474.69236 +2050,360,540.54279,,442.70046,486.53532,477.67043 +2051,360,546.32201,,442.75184,489.06035,480.69694 +2052,360,552.21189,,442.761,491.53558,483.77696 +2053,360,558.2122,,442.73417,493.93186,486.9156 +2054,360,564.31311,,442.66263,496.24365,490.1025 +2055,360,570.51669,,442.54767,498.47436,493.33845 +2056,360,576.84343,,442.40642,500.64502,496.64173 +2057,360,583.30471,,442.24833,502.76788,500.02229 +2058,360,589.90539,,442.07535,504.84729,503.48287 +2059,360,596.64656,,441.88625,506.88408,507.02296 +2060,360,603.52045,,441.67274,508.87135,510.63443 +2061,360,610.5165,,441.42415,510.79905,514.30531 +2062,360,617.60526,,441.1345,512.64717,518.02671 +2063,360,624.76367,,440.80284,514.40151,521.79702 +2064,360,631.99471,,440.43041,516.06461,525.61935 +2065,360,639.29052,,440.01021,517.62854,529.48604 +2066,360,646.65274,,439.54473,519.09606,533.3998 +2067,360,654.09843,,439.05222,520.48828,537.38147 +2068,360,661.64491,,438.54291,521.81772,541.44308 +2069,360,669.30474,,438.01932,523.08871,545.58888 +2070,360,677.07762,,437.48062,524.30217,549.81989 +2071,360,684.95429,,436.91878,525.45089,554.12904 +2072,360,692.90196,,436.34251,526.50901,558.48622 +2073,360,700.89416,,435.76436,527.45707,562.86724 +2074,360,708.93159,,435.18189,528.29593,567.27205 +2075,360,717.01548,,434.595,529.02718,571.70141 +2076,360,725.13597,,433.99542,529.64253,576.14574 +2077,360,733.30667,,433.38456,530.14419,580.6064 +2078,360,741.52368,,432.77961,530.55341,585.10462 +2079,360,749.80466,,432.18978,530.88313,589.65317 +2080,360,758.1823,,431.61659,531.13797,594.25683 +2081,360,766.64451,,431.05847,531.31935,598.9179 +2082,360,775.17446,,430.51026,531.48991,603.53811 +2083,360,783.75141,,429.96413,531.70213,608.01988 +2084,360,792.36578,,429.41411,531.94208,612.36372 +2085,360,801.0188,,428.85906,532.20472,616.57173 +2086,360,809.71464,,428.2991,532.48672,620.64773 +2087,360,818.42214,,427.72652,532.77553,624.58304 +2088,360,827.15719,,427.14308,533.06978,628.38085 +2089,360,835.95594,,426.56607,533.38792,632.06458 +2090,360,844.80471,,426.00472,533.74072,635.64876 +2091,360,853.72536,,425.46065,534.13086,639.14086 +2092,360,862.72597,,424.93745,534.55754,642.59729 +2093,360,871.7768,,424.43129,535.01142,646.06094 +2094,360,880.86435,,423.93083,535.47962,649.51513 +2095,360,889.98162,,423.43058,535.95487,652.95074 +2096,360,899.12407,,422.92945,536.4351,656.36419 +2097,360,908.28871,,422.42761,536.91986,659.75421 +2098,360,917.47137,,421.91753,537.39855,663.10742 +2099,360,926.66527,,421.40111,537.87136,666.42313 +2100,360,935.87437,,420.89546,538.3583,669.72317 +2101,360,945.13213,,420.40998,538.8715,673.02173 +2102,360,954.4662,,419.94532,539.38819,676.29128 +2103,360,963.83906,,419.49831,539.88381,679.50127 +2104,360,973.2408,,419.05981,540.35213,682.64541 +2105,360,982.68037,,418.61902,540.78203,685.71141 +2106,360,992.14288,,418.17082,541.16804,688.69282 +2107,360,1001.6311,,417.71454,541.50962,691.58868 +2108,360,1011.1191,,417.2507,541.80769,694.39983 +2109,360,1020.6085,,416.77219,542.05261,697.11406 +2110,360,1030.1004,,416.28127,542.24555,699.73157 +2111,360,1039.5892,,415.79518,542.40767,702.27614 +2112,360,1049.1233,,415.32319,542.55941,704.7639 +2113,360,1058.7002,,414.86696,542.71221,707.20265 +2114,360,1068.3216,,414.42496,542.86612,709.5953 +2115,360,1077.9995,,413.98893,543.01262,711.93394 +2116,360,1087.6999,,413.54867,543.13926,714.20507 +2117,360,1097.4303,,413.09942,543.23925,716.40081 +2118,360,1107.1765,,412.64076,543.31105,718.51915 +2119,360,1116.9122,,412.17338,543.35475,720.56005 +2120,360,1126.6592,,411.69045,543.35993,722.51007 +2121,360,1136.4015,,411.19435,543.32712,724.36814 +2122,360,1146.1344,,410.70228,543.28815,726.15805 +2123,360,1155.9064,,410.22339,543.26597,727.8964 +2124,360,1165.7401,,409.7593,543.26382,729.59084 +2125,360,1175.6176,,409.30847,543.28162,731.24405 +2126,360,1185.5295,,408.8627,543.31031,732.84773 +2127,360,1195.4833,,408.41656,543.337,734.38928 +2128,360,1205.4772,,407.96956,543.35452,735.86182 +2129,360,1215.4661,,407.52073,543.36102,737.26278 +2130,360,1225.453,,407.07051,543.35628,738.59171 +2131,360,1235.4493,,406.61189,543.32954,739.83434 +2132,360,1245.419,,406.14707,543.28277,740.98904 +2133,360,1255.397,,405.69286,543.23814,742.0798 +2134,360,1265.4211,,405.25809,543.20814,743.1235 +2135,360,1275.4843,,404.84413,543.19691,744.12799 +2136,360,1285.5943,,404.44922,543.20476,745.09601 +2137,360,1295.7632,,404.06507,543.22301,746.01899 +2138,360,1305.9625,,403.68161,543.23901,746.88224 +2139,360,1316.1708,,403.29415,543.2458,747.67691 +2140,360,1326.3936,,402.90226,543.24169,748.40031 +2141,360,1336.6283,,402.50662,543.22663,749.05184 +2142,360,1346.8594,,402.10056,543.18977,749.6169 +2143,360,1357.0727,,401.68653,543.13128,750.09334 +2144,360,1367.2797,,401.28131,543.07193,750.50572 +2145,360,1377.5097,,400.89375,543.02451,750.87141 +2146,360,1387.793,,400.52523,542.9934,751.19813 +2147,360,1398.1376,,400.17404,542.97911,751.4889 +2148,360,1408.5226,,399.83204,542.97309,751.73512 +2149,360,1418.9467,,399.4893,542.96279,751.92185 +2150,360,1429.3969,,399.14131,542.95532,751.99877 +2151,360,1439.8354,,398.78772,542.95532,751.99877 +2152,360,1450.2111,,398.42927,542.95532,751.99877 +2153,360,1460.4793,,398.0595,542.95532,751.99877 +2154,360,1470.5915,,397.68091,542.95532,751.99877 +2155,360,1480.5564,,397.31021,542.95532,751.99877 +2156,360,1490.4552,,396.95616,542.95532,751.99877 +2157,360,1500.2994,,396.62009,542.95532,751.99877 +2158,360,1510.0573,,396.3003,542.95532,751.99877 +2159,360,1519.7332,,395.98871,542.95532,751.99877 +2160,360,1529.3276,,395.67554,542.95532,751.99877 +2161,360,1538.8274,,395.35634,542.95532,751.99877 +2162,360,1548.2214,,395.03085,542.95532,751.99877 +2163,360,1557.5025,,394.69985,542.95532,751.99877 +2164,360,1566.6838,,394.357,542.95532,751.99877 +2165,360,1575.7093,,394.00489,542.95532,751.99877 +2166,360,1584.5792,,393.6601,542.95532,751.99877 +2167,360,1593.389,,393.33128,542.95532,751.99877 +2168,360,1602.1444,,393.01974,542.95532,751.99877 +2169,360,1610.8232,,392.72374,542.95532,751.99877 +2170,360,1619.4189,,392.43525,542.95532,751.99877 +2171,360,1627.9283,,392.1446,542.95532,751.99877 +2172,360,1636.3423,,391.84744,542.95532,751.99877 +2173,360,1644.6544,,391.54354,542.95532,751.99877 +2174,360,1652.8621,,391.2337,542.95532,751.99877 +2175,360,1660.9472,,390.91172,542.95532,751.99877 +2176,360,1668.8714,,390.58024,542.95532,751.99877 +2177,360,1676.6491,,390.25571,542.95532,751.99877 +2178,360,1684.3479,,389.94668,542.95532,751.99877 +2179,360,1691.9855,,389.65441,542.95532,751.99877 +2180,360,1699.5543,,389.37713,542.95532,751.99877 +2181,360,1707.0542,,389.10687,542.95532,751.99877 +2182,360,1714.4671,,388.83404,542.95532,751.99877 +2183,360,1721.7857,,388.55437,542.95532,751.99877 +2184,360,1728.9986,,388.26765,542.95532,751.99877 +2185,360,1736.073,,387.97473,542.95532,751.99877 +2186,360,1743.0204,,387.6695,542.95532,751.99877 +2187,360,1749.8272,,387.35465,542.95532,751.99877 +2188,360,1756.4845,,387.04651,542.95532,751.99877 +2189,360,1763.0469,,386.75353,542.95532,751.99877 +2190,360,1769.542,,386.47692,542.95532,751.99877 +2191,360,1775.972,,386.21487,542.95532,751.99877 +2192,360,1782.3281,,385.95946,542.95532,751.99877 +2193,360,1788.5985,,385.70118,542.95532,751.99877 +2194,360,1794.7605,,385.43582,542.95532,751.99877 +2195,360,1800.7999,,385.16322,542.95532,751.99877 +2196,360,1806.7334,,384.88424,542.95532,751.99877 +2197,360,1812.5201,,384.59286,542.95532,751.99877 +2198,360,1818.1423,,384.29183,542.95532,751.99877 +2199,360,1823.6498,,383.99735,542.95532,751.99877 +2200,360,1829.0556,,383.71778,542.95532,751.99877 +2201,360,1834.3733,,383.45425,542.95532,751.99877 +2202,360,1839.6122,,383.20495,542.95532,751.99877 +2203,360,1844.7812,,382.96197,542.95532,751.99877 +2204,360,1849.8682,,382.71591,542.95532,751.99877 +2205,360,1854.849,,382.4626,542.95532,751.99877 +2206,360,1859.7106,,382.20191,542.95532,751.99877 +2207,360,1864.4469,,381.93471,542.95532,751.99877 +2208,360,1869.0362,,381.6551,542.95532,751.99877 +2209,360,1873.4672,,381.36585,542.95532,751.99877 +2210,360,1877.784,,381.08304,542.95532,751.99877 +2211,360,1881.9947,,380.81494,542.95532,751.99877 +2212,360,1886.1097,,380.56263,542.95532,751.99877 +2213,360,1890.1554,,380.32426,542.95532,751.99877 +2214,360,1894.1313,,380.09195,542.95532,751.99877 +2215,360,1898.0123,,379.85638,542.95532,751.99877 +2216,360,1901.7766,,379.61345,542.95532,751.99877 +2217,360,1905.4235,,379.36304,542.95532,751.99877 +2218,360,1908.9603,,379.10604,542.95532,751.99877 +2219,360,1912.3445,,378.83665,542.95532,751.99877 +2220,360,1915.5465,,378.55765,542.95532,751.99877 +2221,360,1918.6217,,378.28503,542.95532,751.99877 +2222,360,1921.6126,,378.02696,542.95532,751.99877 +2223,360,1924.5227,,377.78445,542.95532,751.99877 +2224,360,1927.352,,377.55563,542.95532,751.99877 +2225,360,1930.1,,377.33266,542.95532,751.99877 +2226,360,1932.7513,,377.10629,542.95532,751.99877 +2227,360,1935.2926,,376.87246,542.95532,751.99877 +2228,360,1937.7127,,376.63109,542.95532,751.99877 +2229,360,1940.0103,,376.38308,542.95532,751.99877 +2230,360,1942.1583,,376.12271,542.95532,751.99877 +2231,360,1944.1572,,375.85281,542.95532,751.99877 +2232,360,1946.0278,,375.58923,542.95532,751.99877 +2233,360,1947.7762,,375.34006,542.95532,751.99877 +2234,360,1949.4392,,375.10628,542.95532,751.99877 +2235,360,1951.0121,,374.88595,542.95532,751.99877 +2236,360,1952.5138,,374.67128,542.95532,751.99877 +2237,360,1953.9433,,374.4531,542.95532,751.99877 +2238,360,1955.2718,,374.22739,542.95532,751.99877 +2239,360,1956.4604,,373.9941,542.95532,751.99877 +2240,360,1957.4929,,373.75412,542.95532,751.99877 +2241,360,1958.428,,373.50184,542.95532,751.99877 +2242,360,1959.1897,,373.24011,542.95532,751.99877 +2243,360,1959.7707,,372.98467,542.95532,751.99877 +2244,360,1960.2847,,372.74353,542.95532,751.99877 +2245,360,1960.7288,,372.51759,542.95532,751.99877 +2246,360,1961.0674,,372.30492,542.95532,751.99877 +2247,360,1961.3194,,372.09773,542.95532,751.99877 +2248,360,1961.4957,,371.88692,542.95532,751.99877 +2249,360,1961.5683,,371.66854,542.95532,751.99877 +2250,360,1961.5774,,371.44254,542.95532,751.99877 +2251,360,1961.5774,,371.20984,542.95532,751.99877 +2252,360,1961.5774,,370.96489,542.95532,751.99877 +2253,360,1961.5774,,370.71059,542.95532,751.99877 +2254,360,1961.5774,,370.46256,542.95532,751.99877 +2255,360,1961.5774,,370.22872,542.95532,751.99877 +2256,360,1961.5774,,370.00993,542.95532,751.99877 +2257,360,1961.5774,,369.80422,542.95532,751.99877 +2258,360,1961.5774,,369.60385,542.95532,751.99877 +2259,360,1961.5774,,369.39976,542.95532,751.99877 +2260,360,1961.5774,,369.18806,542.95532,751.99877 +2261,360,1961.5774,,368.96871,542.95532,751.99877 +2262,360,1961.5774,,368.74266,542.95532,751.99877 +2263,360,1961.5774,,368.50442,542.95532,751.99877 +2264,360,1961.5774,,368.25693,542.95532,751.99877 +2265,360,1961.5774,,368.0157,542.95532,751.99877 +2266,360,1961.5774,,367.78857,542.95532,751.99877 +2267,360,1961.5774,,367.57635,542.95532,751.99877 +2268,360,1961.5774,,367.37703,542.95532,751.99877 +2269,360,1961.5774,,367.1829,542.95532,751.99877 +2270,360,1961.5774,,366.98498,542.95532,751.99877 +2271,360,1961.5774,,366.77941,542.95532,751.99877 +2272,360,1961.5774,,366.56619,542.95532,751.99877 +2273,360,1961.5774,,366.34625,542.95532,751.99877 +2274,360,1961.5774,,366.11421,542.95532,751.99877 +2275,360,1961.5774,,365.873,542.95532,751.99877 +2276,360,1961.5774,,365.63806,542.95532,751.99877 +2277,360,1961.5774,,365.41713,542.95532,751.99877 +2278,360,1961.5774,,365.21098,542.95532,751.99877 +2279,360,1961.5774,,365.01757,542.95532,751.99877 +2280,360,1961.5774,,364.82921,542.95532,751.99877 +2281,360,1961.5774,,364.63699,542.95532,751.99877 +2282,360,1961.5774,,364.4371,542.95532,751.99877 +2283,360,1961.5774,,364.22954,542.95532,751.99877 +2284,360,1961.5774,,364.01526,542.95532,751.99877 +2285,360,1961.5774,,363.78896,542.95532,751.99877 +2286,360,1961.5774,,363.5536,542.95532,751.99877 +2287,360,1961.5774,,363.32451,542.95532,751.99877 +2288,360,1961.5774,,363.10935,542.95532,751.99877 +2289,360,1961.5774,,362.90884,542.95532,751.99877 +2290,360,1961.5774,,362.72091,542.95532,751.99877 +2291,360,1961.5774,,362.53791,542.95532,751.99877 +2292,360,1961.5774,,362.35099,542.95532,751.99877 +2293,360,1961.5774,,362.15637,542.95532,751.99877 +2294,360,1961.5774,,361.95408,542.95532,751.99877 +2295,360,1961.5774,,361.74508,542.95532,751.99877 +2296,360,1961.5774,,361.52413,542.95532,751.99877 +2297,360,1961.5774,,361.29423,542.95532,751.99877 +2298,360,1961.5774,,361.0706,542.95532,751.99877 +2299,360,1961.5774,,360.86083,542.95532,751.99877 +2300,360,1961.5774,,360.66558,542.95532,751.99877 +2301,360,1961.5774,,360.48278,542.95532,751.99877 +2302,360,1961.5774,,360.30479,542.95532,751.99877 +2303,360,1961.5774,,360.12281,542.95532,751.99877 +2304,360,1961.5774,,359.93311,542.95532,751.99877 +2305,360,1961.5774,,359.73574,542.95532,751.99877 +2306,360,1961.5774,,359.53167,542.95532,751.99877 +2307,360,1961.5774,,359.31573,542.95532,751.99877 +2308,360,1961.5774,,359.09095,542.95532,751.99877 +2309,360,1961.5774,,358.87244,542.95532,751.99877 +2310,360,1961.5774,,358.66772,542.95532,751.99877 +2311,360,1961.5774,,358.47742,542.95532,751.99877 +2312,360,1961.5774,,358.29942,542.95532,751.99877 +2313,360,1961.5774,,358.12611,542.95532,751.99877 +2314,360,1961.5774,,357.94876,542.95532,751.99877 +2315,360,1961.5774,,357.76367,542.95532,751.99877 +2316,360,1961.5774,,357.57092,542.95532,751.99877 +2317,360,1961.5774,,357.37148,542.95532,751.99877 +2318,360,1961.5774,,357.16025,542.95532,751.99877 +2319,360,1961.5774,,356.94027,542.95532,751.99877 +2320,360,1961.5774,,356.72659,542.95532,751.99877 +2321,360,1961.5774,,356.52662,542.95532,751.99877 +2322,360,1961.5774,,356.34097,542.95532,751.99877 +2323,360,1961.5774,,356.16748,542.95532,751.99877 +2324,360,1961.5774,,355.99857,542.95532,751.99877 +2325,360,1961.5774,,355.82557,542.95532,751.99877 +2326,360,1961.5774,,355.64482,542.95532,751.99877 +2327,360,1961.5774,,355.45642,542.95532,751.99877 +2328,360,1961.5774,,355.26133,542.95532,751.99877 +2329,360,1961.5774,,355.05453,542.95532,751.99877 +2330,360,1961.5774,,354.8391,542.95532,751.99877 +2331,360,1961.5774,,354.62997,542.95532,751.99877 +2332,360,1961.5774,,354.43449,542.95532,751.99877 +2333,360,1961.5774,,354.25322,542.95532,751.99877 +2334,360,1961.5774,,354.08399,542.95532,751.99877 +2335,360,1961.5774,,353.91923,542.95532,751.99877 +2336,360,1961.5774,,353.75033,542.95532,751.99877 +2337,360,1961.5774,,353.57367,542.95532,751.99877 +2338,360,1961.5774,,353.38936,542.95532,751.99877 +2339,360,1961.5774,,353.19838,542.95532,751.99877 +2340,360,1961.5774,,352.99578,542.95532,751.99877 +2341,360,1961.5774,,352.78464,542.95532,751.99877 +2342,360,1961.5774,,352.57981,542.95532,751.99877 +2343,360,1961.5774,,352.38859,542.95532,751.99877 +2344,360,1961.5774,,352.21147,542.95532,751.99877 +2345,360,1961.5774,,352.04626,542.95532,751.99877 +2346,360,1961.5774,,351.88542,542.95532,751.99877 +2347,360,1961.5774,,351.72039,542.95532,751.99877 +2348,360,1961.5774,,351.5476,542.95532,751.99877 +2349,360,1961.5774,,351.36717,542.95532,751.99877 +2350,360,1961.5774,,351.18007,542.95532,751.99877 +2351,360,1961.5774,,350.98144,542.95532,751.99877 +2352,360,1961.5774,,350.77437,542.95532,751.99877 +2353,360,1961.5774,,350.57364,542.95532,751.99877 +2354,360,1961.5774,,350.38645,542.95532,751.99877 +2355,360,1961.5774,,350.21326,542.95532,751.99877 +2356,360,1961.5774,,350.05186,542.95532,751.99877 +2357,360,1961.5774,,349.89473,542.95532,751.99877 +2358,360,1961.5774,,349.73338,542.95532,751.99877 +2359,360,1961.5774,,349.56425,542.95532,751.99877 +2360,360,1961.5774,,349.38748,542.95532,751.99877 +2361,360,1961.5774,,349.20408,542.95532,751.99877 +2362,360,1961.5774,,349.00921,542.95532,751.99877 +2363,360,1961.5774,,348.80602,542.95532,751.99877 +2364,360,1961.5774,,348.60917,542.95532,751.99877 +2365,360,1961.5774,,348.42581,542.95532,751.99877 +2366,360,1961.5774,,348.25637,542.95532,751.99877 +2367,360,1961.5774,,348.09859,542.95532,751.99877 +2368,360,1961.5774,,347.94498,542.95532,751.99877 +2369,360,1961.5774,,347.78711,542.95532,751.99877 +2370,360,1961.5774,,347.62145,542.95532,751.99877 +2371,360,1961.5774,,347.44817,542.95532,751.99877 +2372,360,1961.5774,,347.26827,542.95532,751.99877 +2373,360,1961.5774,,347.07699,542.95532,751.99877 +2374,360,1961.5774,,346.87749,542.95532,751.99877 +2375,360,1961.5774,,346.68435,542.95532,751.99877 +2376,360,1961.5774,,346.50464,542.95532,751.99877 +2377,360,1961.5774,,346.33875,542.95532,751.99877 +2378,360,1961.5774,,346.18441,542.95532,751.99877 +2379,360,1961.5774,,346.03416,542.95532,751.99877 +2380,360,1961.5774,,345.8796,542.95532,751.99877 +2381,360,1961.5774,,345.71725,542.95532,751.99877 +2382,360,1961.5774,,345.54729,542.95532,751.99877 +2383,360,1961.5774,,345.37072,542.95532,751.99877 +2384,360,1961.5774,,345.18286,542.95532,751.99877 +2385,360,1961.5774,,344.98687,542.95532,751.99877 +2386,360,1961.5774,,344.79727,542.95532,751.99877 +2387,360,1961.5774,,344.62105,542.95532,751.99877 +2388,360,1961.5774,,344.45856,542.95532,751.99877 +2389,360,1961.5774,,344.3075,542.95532,751.99877 +2390,360,1961.5774,,344.16044,542.95532,751.99877 +2391,360,1961.5774,,344.00903,542.95532,751.99877 +2392,360,1961.5774,,343.84983,542.95532,751.99877 +2393,360,1961.5774,,343.68304,542.95532,751.99877 +2394,360,1961.5774,,343.50965,542.95532,751.99877 +2395,360,1961.5774,,343.32505,542.95532,751.99877 +2396,360,1961.5774,,343.13243,542.95532,751.99877 +2397,360,1961.5774,,342.9462,542.95532,751.99877 +2398,360,1961.5774,,342.77331,542.95532,751.99877 +2399,360,1961.5774,,342.61407,542.95532,751.99877 +2400,360,1961.5774,,342.46614,542.95532,751.99877 +2401,360,1961.5774,,342.32213,542.95532,751.99877 +2402,360,1961.5774,,342.17373,542.95532,751.99877 +2403,360,1961.5774,,342.01754,542.95532,751.99877 +2404,360,1961.5774,,341.85376,542.95532,751.99877 +2405,360,1961.5774,,341.68342,542.95532,751.99877 +2406,360,1961.5774,,341.50194,542.95532,751.99877 +2407,360,1961.5774,,341.31253,542.95532,751.99877 +2408,360,1961.5774,,341.12955,542.95532,751.99877 +2409,360,1961.5774,,340.95985,542.95532,751.99877 +2410,360,1961.5774,,340.80371,542.95532,751.99877 +2411,360,1961.5774,,340.65878,542.95532,751.99877 +2412,360,1961.5774,,340.51768,542.95532,751.99877 +2413,360,1961.5774,,340.37215,542.95532,751.99877 +2414,360,1961.5774,,340.21884,542.95532,751.99877 +2415,360,1961.5774,,340.05795,542.95532,751.99877 +2416,360,1961.5774,,339.89052,542.95532,751.99877 +2417,360,1961.5774,,339.71203,542.95532,751.99877 +2418,360,1961.5774,,339.52571,542.95532,751.99877 +2419,360,1961.5774,,339.34583,542.95532,751.99877 +2420,360,1961.5774,,339.17919,542.95532,751.99877 +2421,360,1961.5774,,339.02602,542.95532,751.99877 +2422,360,1961.5774,,338.88397,542.95532,751.99877 +2423,360,1961.5774,,338.74565,542.95532,751.99877 +2424,360,1961.5774,,338.60288,542.95532,751.99877 +2425,360,1961.5774,,338.45232,542.95532,751.99877 +2426,360,1961.5774,,338.2942,542.95532,751.99877 +2427,360,1961.5774,,338.12955,542.95532,751.99877 +2428,360,1961.5774,,337.95392,542.95532,751.99877 +2429,360,1961.5774,,337.77057,542.95532,751.99877 +2430,360,1961.5774,,337.59367,542.95532,751.99877 +2431,360,1961.5774,,337.42997,542.95532,751.99877 +2432,360,1961.5774,,337.27966,542.95532,751.99877 +2433,360,1961.5774,,337.14036,542.95532,751.99877 +2434,360,1961.5774,,337.00472,542.95532,751.99877 +2435,360,1961.5774,,336.86458,542.95532,751.99877 +2436,360,1961.5774,,336.71666,542.95532,751.99877 +2437,360,1961.5774,,336.5612,542.95532,751.99877 +2438,360,1961.5774,,336.39922,542.95532,751.99877 +2439,360,1961.5774,,336.22635,542.95532,751.99877 +2440,360,1961.5774,,336.04585,542.95532,751.99877 +2441,360,1961.5774,,335.87182,542.95532,751.99877 +2442,360,1961.5774,,335.71094,542.95532,751.99877 +2443,360,1961.5774,,335.56338,542.95532,751.99877 +2444,360,1961.5774,,335.42672,542.95532,751.99877 +2445,360,1961.5774,,335.29364,542.95532,751.99877 +2446,360,1961.5774,,335.15604,542.95532,751.99877 +2447,360,1961.5774,,335.01065,542.95532,751.99877 +2448,360,1961.5774,,334.85773,542.95532,751.99877 +2449,360,1961.5774,,334.69833,542.95532,751.99877 +2450,360,1961.5774,,334.52811,542.95532,751.99877 +2451,360,1961.5774,,334.35035,542.95532,751.99877 +2452,360,1961.5774,,334.17908,542.95532,751.99877 +2453,360,1961.5774,,334.02092,542.95532,751.99877 +2454,360,1961.5774,,333.876,542.95532,751.99877 +2455,360,1961.5774,,333.74189,542.95532,751.99877 +2456,360,1961.5774,,333.61127,542.95532,751.99877 +2457,360,1961.5774,,333.4761,542.95532,751.99877 +2458,360,1961.5774,,333.33315,542.95532,751.99877 +2459,360,1961.5774,,333.18269,542.95532,751.99877 +2460,360,1961.5774,,333.02576,542.95532,751.99877 +2461,360,1961.5774,,332.85808,542.95532,751.99877 +2462,360,1961.5774,,332.68296,542.95532,751.99877 +2463,360,1961.5774,,332.51436,542.95532,751.99877 +2464,360,1961.5774,,332.35883,542.95532,751.99877 +2465,360,1961.5774,,332.21645,542.95532,751.99877 +2466,360,1961.5774,,332.08479,542.95532,751.99877 +2467,360,1961.5774,,331.95654,542.95532,751.99877 +2468,360,1961.5774,,331.82371,542.95532,751.99877 +2469,360,1961.5774,,331.68311,542.95532,751.99877 +2470,360,1961.5774,,331.535,542.95532,751.99877 +2471,360,1961.5774,,331.38045,542.95532,751.99877 +2472,360,1961.5774,,331.21523,542.95532,751.99877 +2473,360,1961.5774,,331.04267,542.95532,751.99877 +2474,360,1961.5774,,330.87664,542.95532,751.99877 +2475,360,1961.5774,,330.72364,542.95532,751.99877 +2476,360,1961.5774,,330.58372,542.95532,751.99877 +2477,360,1961.5774,,330.45441,542.95532,751.99877 +2478,360,1961.5774,,330.32845,542.95532,751.99877 +2479,360,1961.5774,,330.19788,542.95532,751.99877 +2480,360,1961.5774,,330.05953,542.95532,751.99877 +2481,360,1961.5774,,329.9137,542.95532,751.99877 +2482,360,1961.5774,,329.76144,542.95532,751.99877 +2483,360,1961.5774,,329.5986,542.95532,751.99877 +2484,360,1961.5774,,329.4285,542.95532,751.99877 +2485,360,1961.5774,,329.26495,542.95532,751.99877 +2486,360,1961.5774,,329.11439,542.95532,751.99877 +2487,360,1961.5774,,328.97684,542.95532,751.99877 +2488,360,1961.5774,,328.84981,542.95532,751.99877 +2489,360,1961.5774,,328.72606,542.95532,751.99877 +2490,360,1961.5774,,328.59766,542.95532,751.99877 +2491,360,1961.5774,,328.46149,542.95532,751.99877 +2492,360,1961.5774,,328.31785,542.95532,751.99877 +2493,360,1961.5774,,328.16781,542.95532,751.99877 +2494,360,1961.5774,,328.00726,542.95532,751.99877 +2495,360,1961.5774,,327.83954,542.95532,751.99877 +2496,360,1961.5774,,327.6784,542.95532,751.99877 +2497,360,1961.5774,,327.53021,542.95532,751.99877 +2498,360,1961.5774,,327.39495,542.95532,751.99877 +2499,360,1961.5774,,327.27012,542.95532,751.99877 +2500,360,1961.5774,,327.2098,542.95532,751.99877 diff --git a/1_Data_SWInput/treatments/LookupClimatePPTScenarios/climate.ppt.csv b/1_Data_SWInput/treatments/LookupClimatePPTScenarios/climate.ppt.csv new file mode 100644 index 00000000..5788f932 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupClimatePPTScenarios/climate.ppt.csv @@ -0,0 +1,13 @@ +Month,Current,B1monthly.SnowCat1,B1monthly.SnowCat2,B1monthly.SnowCat3,B1monthly.SnowCat4,A2monthly.SnowCat1,A2monthly.SnowCat2,A2monthly.SnowCat3,A2monthly.SnowCat4 +1,1,1.08,1.05,1.06,1.04,1.2,1.1,1.14,1.1 +2,1,1.08,0.97,1.04,0.99,1.25,1.32,1.26,1.26 +3,1,1.07,1.01,1.01,0.99,1.19,1.13,1.13,1.1 +4,1,1.18,1.14,1.17,1.13,1.1,1.04,1.05,1.01 +5,1,0.97,0.88,0.94,0.9,0.84,0.71,0.74,0.7 +6,1,0.88,0.84,0.86,0.83,0.82,0.76,0.76,0.76 +7,1,0.99,1.08,1.06,1.06,0.99,1.13,1.09,1.1 +8,1,0.95,0.96,1,0.99,1.06,1.48,1.31,1.4 +9,1,1.04,1.1,1.07,1.08,0.94,1.08,1.03,1.03 +10,1,1.02,0.99,1,0.99,1.04,1.07,1.04,1.05 +11,1,1.07,1.07,1.1,1.06,1.15,1.15,1.16,1.14 +12,1,1.14,1.08,1.13,1.08,1.19,1.2,1.18,1.17 diff --git a/1_Data_SWInput/treatments/LookupClimateTempScenarios/climate.temp.csv b/1_Data_SWInput/treatments/LookupClimateTempScenarios/climate.temp.csv new file mode 100644 index 00000000..9a144aaa --- /dev/null +++ b/1_Data_SWInput/treatments/LookupClimateTempScenarios/climate.temp.csv @@ -0,0 +1,13 @@ +Month,Current,B1monthly.SnowCat1,B1monthly.SnowCat2,B1monthly.SnowCat3,B1monthly.SnowCat4,A2monthly.SnowCat1,A2monthly.SnowCat2,A2monthly.SnowCat3,A2monthly.SnowCat4 +1,0,2.31,2.46,2.35,2.48,3.61,3.78,3.74,3.76 +2,0,2.24,2.17,2.06,2.09,3.83,4.17,4.00,4.02 +3,0,2.39,2.76,2.52,2.72,3.26,3.72,3.41,3.61 +4,0,2.26,2.24,2.26,2.20,3.17,3.48,3.44,3.52 +5,0,2.28,2.31,2.41,2.35,3.89,4.09,4.19,4.15 +6,0,3.54,3.72,3.70,3.74,5.09,5.44,5.54,5.54 +7,0,3.81,3.85,3.83,3.89,6.50,6.59,6.52,6.59 +8,0,4.28,4.35,4.26,4.28,6.94,6.89,6.70,6.81 +9,0,4.04,4.02,3.94,3.91,6.56,6.48,6.46,6.44 +10,0,2.85,2.80,2.91,2.89,4.50,4.48,4.52,4.52 +11,0,2.87,2.74,2.83,2.74,3.44,3.41,3.52,3.43 +12,0,3.30,3.13,3.09,3.09,3.39,3.50,3.52,3.46 diff --git a/1_Data_SWInput/treatments/LookupEvapCoeffFromTable/BareSoilEvaporationCoefficientsPerSoilLayer.csv b/1_Data_SWInput/treatments/LookupEvapCoeffFromTable/BareSoilEvaporationCoefficientsPerSoilLayer.csv new file mode 100644 index 00000000..13fe65fa --- /dev/null +++ b/1_Data_SWInput/treatments/LookupEvapCoeffFromTable/BareSoilEvaporationCoefficientsPerSoilLayer.csv @@ -0,0 +1,9 @@ +,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15,L16,L17,L18,L19,L20,Source +Shortgrass,,,,,,,,,,,,,,,,,,,,, +BigSagebrushSteppe,,,,,,,,,,,,,,,,,,,,, +BigSagebrushShrubland,,,,,,,,,,,,,,,,,,,,, +BigSagebrushMontane,,,,,,,,,,,,,,,,,,,,, +LodgepolePine,,,,,,,,,,,,,,,,,,,,, +YourOwn,,,,,,,,,,,,,,,,,,,,, +Test1,0.55,0.15,0.2,0.1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,TV +Test2,0.55,0.2,0.15,0.1,,,,,,,,,,,,,,,,, diff --git a/1_Data_SWInput/treatments/LookupShiftedPPTScenarios/shifted.ppt.csv b/1_Data_SWInput/treatments/LookupShiftedPPTScenarios/shifted.ppt.csv new file mode 100644 index 00000000..33229943 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupShiftedPPTScenarios/shifted.ppt.csv @@ -0,0 +1,121 @@ +Category1,Current_m1,Current_m2,Current_m3,Current_m4,Current_m5,Current_m6,Current_m7,Current_m8,Current_m9,Current_m10,Current_m11,Current_m12,ShiftedWinter_m1,ShiftedWinter_m2,ShiftedWinter_m3,ShiftedWinter_m4,ShiftedWinter_m5,ShiftedWinter_m6,ShiftedWinter_m7,ShiftedWinter_m8,ShiftedWinter_m9,ShiftedWinter_m10,ShiftedWinter_m11,ShiftedWinter_m12,ShiftedSummer_m1,ShiftedSummer_m2,ShiftedSummer_m3,ShiftedSummer_m4,ShiftedSummer_m5,ShiftedSummer_m6,ShiftedSummer_m7,ShiftedSummer_m8,ShiftedSummer_m9,ShiftedSummer_m10,ShiftedSummer_m11,ShiftedSummer_m12 +MS1_bs_028_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.809,1.809,1.809,0.7,0.7,0.7,0.7,0.7,0.7,1.809,1.809,1.809,0.191,0.191,0.191,1.3,1.3,1.3,1.3,1.3,1.3,0.191,0.191,0.191 +MS1_bs_045_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.977,1.977,1.977,0.7,0.7,0.7,0.7,0.7,0.7,1.977,1.977,1.977,0.023,0.023,0.023,1.3,1.3,1.3,1.3,1.3,1.3,0.023,0.023,0.023 +MS1_bs_066_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.146,1.146,1.146,0.7,0.7,0.7,0.7,0.7,0.7,1.146,1.146,1.146,0.854,0.854,0.854,1.3,1.3,1.3,1.3,1.3,1.3,0.854,0.854,0.854 +MS1_bs_075_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.143,1.143,1.143,0.7,0.7,0.7,0.7,0.7,0.7,1.143,1.143,1.143,0.857,0.857,0.857,1.3,1.3,1.3,1.3,1.3,1.3,0.857,0.857,0.857 +MS1_bs_087_05454,1,1,1,1,1,1,1,1,1,1,1,1,2.178,2.178,2.178,0.7,0.7,0.7,0.7,0.7,0.7,2.178,2.178,2.178,0,0,0,1.3,1.3,1.3,1.3,1.3,1.3,0,0,0 +MS1_bs_090_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.988,1.988,1.988,0.7,0.7,0.7,0.7,0.7,0.7,1.988,1.988,1.988,0.012,0.012,0.012,1.3,1.3,1.3,1.3,1.3,1.3,0.012,0.012,0.012 +MS1_bs_094_05454,1,1,1,1,1,1,1,1,1,1,1,1,2.15,2.15,2.15,0.7,0.7,0.7,0.7,0.7,0.7,2.15,2.15,2.15,0,0,0,1.3,1.3,1.3,1.3,1.3,1.3,0,0,0 +MS1_bs_118_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.134,1.134,1.134,0.7,0.7,0.7,0.7,0.7,0.7,1.134,1.134,1.134,0.866,0.866,0.866,1.3,1.3,1.3,1.3,1.3,1.3,0.866,0.866,0.866 +MS1_bs_122_05454,1,1,1,1,1,1,1,1,1,1,1,1,2.09,2.09,2.09,0.7,0.7,0.7,0.7,0.7,0.7,2.09,2.09,2.09,0,0,0,1.3,1.3,1.3,1.3,1.3,1.3,0,0,0 +MS1_bs_133_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.148,1.148,1.148,0.7,0.7,0.7,0.7,0.7,0.7,1.148,1.148,1.148,0.852,0.852,0.852,1.3,1.3,1.3,1.3,1.3,1.3,0.852,0.852,0.852 +MS1_bs_136_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.382,1.382,1.382,0.7,0.7,0.7,0.7,0.7,0.7,1.382,1.382,1.382,0.618,0.618,0.618,1.3,1.3,1.3,1.3,1.3,1.3,0.618,0.618,0.618 +MS1_bs_157_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.16,1.16,1.16,0.7,0.7,0.7,0.7,0.7,0.7,1.16,1.16,1.16,0.84,0.84,0.84,1.3,1.3,1.3,1.3,1.3,1.3,0.84,0.84,0.84 +MS1_bs_228_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.567,1.567,1.567,0.7,0.7,0.7,0.7,0.7,0.7,1.567,1.567,1.567,0.433,0.433,0.433,1.3,1.3,1.3,1.3,1.3,1.3,0.433,0.433,0.433 +MS1_bs_246_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.531,1.531,1.531,0.7,0.7,0.7,0.7,0.7,0.7,1.531,1.531,1.531,0.469,0.469,0.469,1.3,1.3,1.3,1.3,1.3,1.3,0.469,0.469,0.469 +MS1_bs_249_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.394,1.394,1.394,0.7,0.7,0.7,0.7,0.7,0.7,1.394,1.394,1.394,0.606,0.606,0.606,1.3,1.3,1.3,1.3,1.3,1.3,0.606,0.606,0.606 +MS1_bs_259_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.747,1.747,1.747,0.7,0.7,0.7,0.7,0.7,0.7,1.747,1.747,1.747,0.253,0.253,0.253,1.3,1.3,1.3,1.3,1.3,1.3,0.253,0.253,0.253 +MS1_bs_295_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.168,1.168,1.168,0.7,0.7,0.7,0.7,0.7,0.7,1.168,1.168,1.168,0.832,0.832,0.832,1.3,1.3,1.3,1.3,1.3,1.3,0.832,0.832,0.832 +MS1_bs_298_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.564,1.564,1.564,0.7,0.7,0.7,0.7,0.7,0.7,1.564,1.564,1.564,0.436,0.436,0.436,1.3,1.3,1.3,1.3,1.3,1.3,0.436,0.436,0.436 +MS1_bs_300_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.427,1.427,1.427,0.7,0.7,0.7,0.7,0.7,0.7,1.427,1.427,1.427,0.573,0.573,0.573,1.3,1.3,1.3,1.3,1.3,1.3,0.573,0.573,0.573 +MS1_bs_324_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.852,1.852,1.852,0.7,0.7,0.7,0.7,0.7,0.7,1.852,1.852,1.852,0.148,0.148,0.148,1.3,1.3,1.3,1.3,1.3,1.3,0.148,0.148,0.148 +MS1_bs_328_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.145,1.145,1.145,0.7,0.7,0.7,0.7,0.7,0.7,1.145,1.145,1.145,0.855,0.855,0.855,1.3,1.3,1.3,1.3,1.3,1.3,0.855,0.855,0.855 +MS1_bs_334_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.517,1.517,1.517,0.7,0.7,0.7,0.7,0.7,0.7,1.517,1.517,1.517,0.483,0.483,0.483,1.3,1.3,1.3,1.3,1.3,1.3,0.483,0.483,0.483 +MS1_bs_369_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.192,1.192,1.192,0.7,0.7,0.7,0.7,0.7,0.7,1.192,1.192,1.192,0.808,0.808,0.808,1.3,1.3,1.3,1.3,1.3,1.3,0.808,0.808,0.808 +MS1_bs_385_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.198,1.198,1.198,0.7,0.7,0.7,0.7,0.7,0.7,1.198,1.198,1.198,0.802,0.802,0.802,1.3,1.3,1.3,1.3,1.3,1.3,0.802,0.802,0.802 +MS1_bs_395_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.87,1.87,1.87,0.7,0.7,0.7,0.7,0.7,0.7,1.87,1.87,1.87,0.13,0.13,0.13,1.3,1.3,1.3,1.3,1.3,1.3,0.13,0.13,0.13 +MS1_bs_409_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.2,1.2,1.2,0.7,0.7,0.7,0.7,0.7,0.7,1.2,1.2,1.2,0.8,0.8,0.8,1.3,1.3,1.3,1.3,1.3,1.3,0.8,0.8,0.8 +MS1_bs_431_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.412,1.412,1.412,0.7,0.7,0.7,0.7,0.7,0.7,1.412,1.412,1.412,0.588,0.588,0.588,1.3,1.3,1.3,1.3,1.3,1.3,0.588,0.588,0.588 +MS1_bs_463_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.464,1.464,1.464,0.7,0.7,0.7,0.7,0.7,0.7,1.464,1.464,1.464,0.536,0.536,0.536,1.3,1.3,1.3,1.3,1.3,1.3,0.536,0.536,0.536 +MS1_bs_489_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.218,1.218,1.218,0.7,0.7,0.7,0.7,0.7,0.7,1.218,1.218,1.218,0.782,0.782,0.782,1.3,1.3,1.3,1.3,1.3,1.3,0.782,0.782,0.782 +MS1_bs_548_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.346,1.346,1.346,0.7,0.7,0.7,0.7,0.7,0.7,1.346,1.346,1.346,0.654,0.654,0.654,1.3,1.3,1.3,1.3,1.3,1.3,0.654,0.654,0.654 +MS1_bs_553_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.26,1.26,1.26,0.7,0.7,0.7,0.7,0.7,0.7,1.26,1.26,1.26,0.74,0.74,0.74,1.3,1.3,1.3,1.3,1.3,1.3,0.74,0.74,0.74 +MS1_bs_557_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.829,1.829,1.829,0.7,0.7,0.7,0.7,0.7,0.7,1.829,1.829,1.829,0.171,0.171,0.171,1.3,1.3,1.3,1.3,1.3,1.3,0.171,0.171,0.171 +MS1_bs_562_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.534,1.534,1.534,0.7,0.7,0.7,0.7,0.7,0.7,1.534,1.534,1.534,0.466,0.466,0.466,1.3,1.3,1.3,1.3,1.3,1.3,0.466,0.466,0.466 +MS1_bs_570_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.344,1.344,1.344,0.7,0.7,0.7,0.7,0.7,0.7,1.344,1.344,1.344,0.656,0.656,0.656,1.3,1.3,1.3,1.3,1.3,1.3,0.656,0.656,0.656 +MS1_bs_577_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.265,1.265,1.265,0.7,0.7,0.7,0.7,0.7,0.7,1.265,1.265,1.265,0.735,0.735,0.735,1.3,1.3,1.3,1.3,1.3,1.3,0.735,0.735,0.735 +MS1_bs_630_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.311,1.311,1.311,0.7,0.7,0.7,0.7,0.7,0.7,1.311,1.311,1.311,0.689,0.689,0.689,1.3,1.3,1.3,1.3,1.3,1.3,0.689,0.689,0.689 +MS1_bs_639_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.144,1.144,1.144,0.7,0.7,0.7,0.7,0.7,0.7,1.144,1.144,1.144,0.856,0.856,0.856,1.3,1.3,1.3,1.3,1.3,1.3,0.856,0.856,0.856 +MS1_bs_705_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.191,1.191,1.191,0.7,0.7,0.7,0.7,0.7,0.7,1.191,1.191,1.191,0.809,0.809,0.809,1.3,1.3,1.3,1.3,1.3,1.3,0.809,0.809,0.809 +MS1_bs_714_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.308,1.308,1.308,0.7,0.7,0.7,0.7,0.7,0.7,1.308,1.308,1.308,0.692,0.692,0.692,1.3,1.3,1.3,1.3,1.3,1.3,0.692,0.692,0.692 +MS1_bs_725_05454,1,1,1,1,1,1,1,1,1,1,1,1,2.04,2.04,2.04,0.7,0.7,0.7,0.7,0.7,0.7,2.04,2.04,2.04,0,0,0,1.3,1.3,1.3,1.3,1.3,1.3,0,0,0 +MS1_bs_727_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.15,1.15,1.15,0.7,0.7,0.7,0.7,0.7,0.7,1.15,1.15,1.15,0.85,0.85,0.85,1.3,1.3,1.3,1.3,1.3,1.3,0.85,0.85,0.85 +MS1_bs_743_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.169,1.169,1.169,0.7,0.7,0.7,0.7,0.7,0.7,1.169,1.169,1.169,0.831,0.831,0.831,1.3,1.3,1.3,1.3,1.3,1.3,0.831,0.831,0.831 +MS1_bs_745_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.215,1.215,1.215,0.7,0.7,0.7,0.7,0.7,0.7,1.215,1.215,1.215,0.785,0.785,0.785,1.3,1.3,1.3,1.3,1.3,1.3,0.785,0.785,0.785 +MS1_bs_766_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.22,1.22,1.22,0.7,0.7,0.7,0.7,0.7,0.7,1.22,1.22,1.22,0.78,0.78,0.78,1.3,1.3,1.3,1.3,1.3,1.3,0.78,0.78,0.78 +MS1_bs_807_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.163,1.163,1.163,0.7,0.7,0.7,0.7,0.7,0.7,1.163,1.163,1.163,0.837,0.837,0.837,1.3,1.3,1.3,1.3,1.3,1.3,0.837,0.837,0.837 +MS1_bs_816_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.222,1.222,1.222,0.7,0.7,0.7,0.7,0.7,0.7,1.222,1.222,1.222,0.778,0.778,0.778,1.3,1.3,1.3,1.3,1.3,1.3,0.778,0.778,0.778 +MS1_bs_821_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.431,1.431,1.431,0.7,0.7,0.7,0.7,0.7,0.7,1.431,1.431,1.431,0.569,0.569,0.569,1.3,1.3,1.3,1.3,1.3,1.3,0.569,0.569,0.569 +MS1_bs_830_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.269,1.269,1.269,0.7,0.7,0.7,0.7,0.7,0.7,1.269,1.269,1.269,0.731,0.731,0.731,1.3,1.3,1.3,1.3,1.3,1.3,0.731,0.731,0.731 +MS1_bs_832_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.76,1.76,1.76,0.7,0.7,0.7,0.7,0.7,0.7,1.76,1.76,1.76,0.24,0.24,0.24,1.3,1.3,1.3,1.3,1.3,1.3,0.24,0.24,0.24 +MS1_bs_833_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.212,1.212,1.212,0.7,0.7,0.7,0.7,0.7,0.7,1.212,1.212,1.212,0.788,0.788,0.788,1.3,1.3,1.3,1.3,1.3,1.3,0.788,0.788,0.788 +MS1_bs_841_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.248,1.248,1.248,0.7,0.7,0.7,0.7,0.7,0.7,1.248,1.248,1.248,0.752,0.752,0.752,1.3,1.3,1.3,1.3,1.3,1.3,0.752,0.752,0.752 +MS1_bs_859_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.704,1.704,1.704,0.7,0.7,0.7,0.7,0.7,0.7,1.704,1.704,1.704,0.296,0.296,0.296,1.3,1.3,1.3,1.3,1.3,1.3,0.296,0.296,0.296 +MS1_bs_862_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.284,1.284,1.284,0.7,0.7,0.7,0.7,0.7,0.7,1.284,1.284,1.284,0.716,0.716,0.716,1.3,1.3,1.3,1.3,1.3,1.3,0.716,0.716,0.716 +MS1_bs_885_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.15,1.15,1.15,0.7,0.7,0.7,0.7,0.7,0.7,1.15,1.15,1.15,0.85,0.85,0.85,1.3,1.3,1.3,1.3,1.3,1.3,0.85,0.85,0.85 +MS1_bs_906_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.227,1.227,1.227,0.7,0.7,0.7,0.7,0.7,0.7,1.227,1.227,1.227,0.773,0.773,0.773,1.3,1.3,1.3,1.3,1.3,1.3,0.773,0.773,0.773 +MS1_bs_918_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.271,1.271,1.271,0.7,0.7,0.7,0.7,0.7,0.7,1.271,1.271,1.271,0.729,0.729,0.729,1.3,1.3,1.3,1.3,1.3,1.3,0.729,0.729,0.729 +MS1_bs_923_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.25,1.25,1.25,0.7,0.7,0.7,0.7,0.7,0.7,1.25,1.25,1.25,0.75,0.75,0.75,1.3,1.3,1.3,1.3,1.3,1.3,0.75,0.75,0.75 +MS1_bs_931_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.289,1.289,1.289,0.7,0.7,0.7,0.7,0.7,0.7,1.289,1.289,1.289,0.711,0.711,0.711,1.3,1.3,1.3,1.3,1.3,1.3,0.711,0.711,0.711 +MS1_bs_962_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.162,1.162,1.162,0.7,0.7,0.7,0.7,0.7,0.7,1.162,1.162,1.162,0.838,0.838,0.838,1.3,1.3,1.3,1.3,1.3,1.3,0.838,0.838,0.838 +MS1_bs_986_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.223,1.223,1.223,0.7,0.7,0.7,0.7,0.7,0.7,1.223,1.223,1.223,0.777,0.777,0.777,1.3,1.3,1.3,1.3,1.3,1.3,0.777,0.777,0.777 +MS1_bs_1014_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.263,1.263,1.263,0.7,0.7,0.7,0.7,0.7,0.7,1.263,1.263,1.263,0.737,0.737,0.737,1.3,1.3,1.3,1.3,1.3,1.3,0.737,0.737,0.737 +MS1_bs_1044_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.151,1.151,1.151,0.7,0.7,0.7,0.7,0.7,0.7,1.151,1.151,1.151,0.849,0.849,0.849,1.3,1.3,1.3,1.3,1.3,1.3,0.849,0.849,0.849 +MS1_bs_1071_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.163,1.163,1.163,0.7,0.7,0.7,0.7,0.7,0.7,1.163,1.163,1.163,0.837,0.837,0.837,1.3,1.3,1.3,1.3,1.3,1.3,0.837,0.837,0.837 +MS1_bs_1077_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.79,1.79,1.79,0.7,0.7,0.7,0.7,0.7,0.7,1.79,1.79,1.79,0.21,0.21,0.21,1.3,1.3,1.3,1.3,1.3,1.3,0.21,0.21,0.21 +MS1_bs_1085_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.144,1.144,1.144,0.7,0.7,0.7,0.7,0.7,0.7,1.144,1.144,1.144,0.856,0.856,0.856,1.3,1.3,1.3,1.3,1.3,1.3,0.856,0.856,0.856 +MS1_bs_1096_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.18,1.18,1.18,0.7,0.7,0.7,0.7,0.7,0.7,1.18,1.18,1.18,0.82,0.82,0.82,1.3,1.3,1.3,1.3,1.3,1.3,0.82,0.82,0.82 +MS1_bs_1120_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.284,1.284,1.284,0.7,0.7,0.7,0.7,0.7,0.7,1.284,1.284,1.284,0.716,0.716,0.716,1.3,1.3,1.3,1.3,1.3,1.3,0.716,0.716,0.716 +MS1_bs_1129_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.563,1.563,1.563,0.7,0.7,0.7,0.7,0.7,0.7,1.563,1.563,1.563,0.437,0.437,0.437,1.3,1.3,1.3,1.3,1.3,1.3,0.437,0.437,0.437 +MS1_bs_1138_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.36,1.36,1.36,0.7,0.7,0.7,0.7,0.7,0.7,1.36,1.36,1.36,0.64,0.64,0.64,1.3,1.3,1.3,1.3,1.3,1.3,0.64,0.64,0.64 +MS1_bs_1142_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.164,1.164,1.164,0.7,0.7,0.7,0.7,0.7,0.7,1.164,1.164,1.164,0.836,0.836,0.836,1.3,1.3,1.3,1.3,1.3,1.3,0.836,0.836,0.836 +MS1_bs_1157_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.607,1.607,1.607,0.7,0.7,0.7,0.7,0.7,0.7,1.607,1.607,1.607,0.393,0.393,0.393,1.3,1.3,1.3,1.3,1.3,1.3,0.393,0.393,0.393 +MS1_bs_1169_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.431,1.431,1.431,0.7,0.7,0.7,0.7,0.7,0.7,1.431,1.431,1.431,0.569,0.569,0.569,1.3,1.3,1.3,1.3,1.3,1.3,0.569,0.569,0.569 +MS1_bs_1192_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.254,1.254,1.254,0.7,0.7,0.7,0.7,0.7,0.7,1.254,1.254,1.254,0.746,0.746,0.746,1.3,1.3,1.3,1.3,1.3,1.3,0.746,0.746,0.746 +MS1_bs_1197_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.221,1.221,1.221,0.7,0.7,0.7,0.7,0.7,0.7,1.221,1.221,1.221,0.779,0.779,0.779,1.3,1.3,1.3,1.3,1.3,1.3,0.779,0.779,0.779 +MS1_bs_1205_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.232,1.232,1.232,0.7,0.7,0.7,0.7,0.7,0.7,1.232,1.232,1.232,0.768,0.768,0.768,1.3,1.3,1.3,1.3,1.3,1.3,0.768,0.768,0.768 +MS1_bs_1215_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.276,1.276,1.276,0.7,0.7,0.7,0.7,0.7,0.7,1.276,1.276,1.276,0.724,0.724,0.724,1.3,1.3,1.3,1.3,1.3,1.3,0.724,0.724,0.724 +MS1_bs_1262_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.499,1.499,1.499,0.7,0.7,0.7,0.7,0.7,0.7,1.499,1.499,1.499,0.501,0.501,0.501,1.3,1.3,1.3,1.3,1.3,1.3,0.501,0.501,0.501 +MS1_bs_1273_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.211,1.211,1.211,0.7,0.7,0.7,0.7,0.7,0.7,1.211,1.211,1.211,0.789,0.789,0.789,1.3,1.3,1.3,1.3,1.3,1.3,0.789,0.789,0.789 +MS1_bs_1288_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.213,1.213,1.213,0.7,0.7,0.7,0.7,0.7,0.7,1.213,1.213,1.213,0.787,0.787,0.787,1.3,1.3,1.3,1.3,1.3,1.3,0.787,0.787,0.787 +MS1_bs_1316_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.256,1.256,1.256,0.7,0.7,0.7,0.7,0.7,0.7,1.256,1.256,1.256,0.744,0.744,0.744,1.3,1.3,1.3,1.3,1.3,1.3,0.744,0.744,0.744 +MS1_bs_1317_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.218,1.218,1.218,0.7,0.7,0.7,0.7,0.7,0.7,1.218,1.218,1.218,0.782,0.782,0.782,1.3,1.3,1.3,1.3,1.3,1.3,0.782,0.782,0.782 +MS1_bs_1352_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.341,1.341,1.341,0.7,0.7,0.7,0.7,0.7,0.7,1.341,1.341,1.341,0.659,0.659,0.659,1.3,1.3,1.3,1.3,1.3,1.3,0.659,0.659,0.659 +MS1_bs_1363_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.197,1.197,1.197,0.7,0.7,0.7,0.7,0.7,0.7,1.197,1.197,1.197,0.803,0.803,0.803,1.3,1.3,1.3,1.3,1.3,1.3,0.803,0.803,0.803 +MS1_bs_1365_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.259,1.259,1.259,0.7,0.7,0.7,0.7,0.7,0.7,1.259,1.259,1.259,0.741,0.741,0.741,1.3,1.3,1.3,1.3,1.3,1.3,0.741,0.741,0.741 +MS1_bs_1370_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.505,1.505,1.505,0.7,0.7,0.7,0.7,0.7,0.7,1.505,1.505,1.505,0.495,0.495,0.495,1.3,1.3,1.3,1.3,1.3,1.3,0.495,0.495,0.495 +MS1_bs_1393_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.342,1.342,1.342,0.7,0.7,0.7,0.7,0.7,0.7,1.342,1.342,1.342,0.658,0.658,0.658,1.3,1.3,1.3,1.3,1.3,1.3,0.658,0.658,0.658 +MS1_bs_1409_05454,1,1,1,1,1,1,1,1,1,1,1,1,1.282,1.282,1.282,0.7,0.7,0.7,0.7,0.7,0.7,1.282,1.282,1.282,0.718,0.718,0.718,1.3,1.3,1.3,1.3,1.3,1.3,0.718,0.718,0.718 +MS1_bs_1450_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.268,1.268,1.268,0.7,0.7,0.7,0.7,0.7,0.7,1.268,1.268,1.268,0.732,0.732,0.732,1.3,1.3,1.3,1.3,1.3,1.3,0.732,0.732,0.732 +MS1_bs_1455_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.239,1.239,1.239,0.7,0.7,0.7,0.7,0.7,0.7,1.239,1.239,1.239,0.761,0.761,0.761,1.3,1.3,1.3,1.3,1.3,1.3,0.761,0.761,0.761 +MS1_bs_1466_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.235,1.235,1.235,0.7,0.7,0.7,0.7,0.7,0.7,1.235,1.235,1.235,0.765,0.765,0.765,1.3,1.3,1.3,1.3,1.3,1.3,0.765,0.765,0.765 +MS1_bs_1478_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.293,1.293,1.293,0.7,0.7,0.7,0.7,0.7,0.7,1.293,1.293,1.293,0.707,0.707,0.707,1.3,1.3,1.3,1.3,1.3,1.3,0.707,0.707,0.707 +MS1_bs_1480_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.278,1.278,1.278,0.7,0.7,0.7,0.7,0.7,0.7,1.278,1.278,1.278,0.722,0.722,0.722,1.3,1.3,1.3,1.3,1.3,1.3,0.722,0.722,0.722 +MS1_bs_1484_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.391,1.391,1.391,0.7,0.7,0.7,0.7,0.7,0.7,1.391,1.391,1.391,0.609,0.609,0.609,1.3,1.3,1.3,1.3,1.3,1.3,0.609,0.609,0.609 +MS1_bs_1491_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.435,1.435,1.435,0.7,0.7,0.7,0.7,0.7,0.7,1.435,1.435,1.435,0.565,0.565,0.565,1.3,1.3,1.3,1.3,1.3,1.3,0.565,0.565,0.565 +MS1_bs_1495_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.244,1.244,1.244,0.7,0.7,0.7,0.7,0.7,0.7,1.244,1.244,1.244,0.756,0.756,0.756,1.3,1.3,1.3,1.3,1.3,1.3,0.756,0.756,0.756 +MS1_bs_1501_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.387,1.387,1.387,0.7,0.7,0.7,0.7,0.7,0.7,1.387,1.387,1.387,0.613,0.613,0.613,1.3,1.3,1.3,1.3,1.3,1.3,0.613,0.613,0.613 +MS1_bs_1524_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.356,1.356,1.356,0.7,0.7,0.7,0.7,0.7,0.7,1.356,1.356,1.356,0.644,0.644,0.644,1.3,1.3,1.3,1.3,1.3,1.3,0.644,0.644,0.644 +MS1_bs_1527_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.297,1.297,1.297,0.7,0.7,0.7,0.7,0.7,0.7,1.297,1.297,1.297,0.703,0.703,0.703,1.3,1.3,1.3,1.3,1.3,1.3,0.703,0.703,0.703 +MS1_bs_1542_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.102,1.102,1.102,0.7,0.7,0.7,0.7,0.7,0.7,1.102,1.102,1.102,0.898,0.898,0.898,1.3,1.3,1.3,1.3,1.3,1.3,0.898,0.898,0.898 +MS1_bs_1547_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.275,1.275,1.275,0.7,0.7,0.7,0.7,0.7,0.7,1.275,1.275,1.275,0.725,0.725,0.725,1.3,1.3,1.3,1.3,1.3,1.3,0.725,0.725,0.725 +MS1_bs_1548_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.3,1.3,1.3,0.7,0.7,0.7,0.7,0.7,0.7,1.3,1.3,1.3,0.7,0.7,0.7,1.3,1.3,1.3,1.3,1.3,1.3,0.7,0.7,0.7 +MS1_bs_1551_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.364,1.364,1.364,0.7,0.7,0.7,0.7,0.7,0.7,1.364,1.364,1.364,0.636,0.636,0.636,1.3,1.3,1.3,1.3,1.3,1.3,0.636,0.636,0.636 +MS1_bs_1569_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.118,1.118,1.118,0.7,0.7,0.7,0.7,0.7,0.7,1.118,1.118,1.118,0.882,0.882,0.882,1.3,1.3,1.3,1.3,1.3,1.3,0.882,0.882,0.882 +MS1_bs_1571_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.246,1.246,1.246,0.7,0.7,0.7,0.7,0.7,0.7,1.246,1.246,1.246,0.754,0.754,0.754,1.3,1.3,1.3,1.3,1.3,1.3,0.754,0.754,0.754 +MS1_bs_1575_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.26,1.26,1.26,0.7,0.7,0.7,0.7,0.7,0.7,1.26,1.26,1.26,0.74,0.74,0.74,1.3,1.3,1.3,1.3,1.3,1.3,0.74,0.74,0.74 +MS1_bs_1581_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.263,1.263,1.263,0.7,0.7,0.7,0.7,0.7,0.7,1.263,1.263,1.263,0.737,0.737,0.737,1.3,1.3,1.3,1.3,1.3,1.3,0.737,0.737,0.737 +MS1_bs_1590_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.32,1.32,1.32,0.7,0.7,0.7,0.7,0.7,0.7,1.32,1.32,1.32,0.68,0.68,0.68,1.3,1.3,1.3,1.3,1.3,1.3,0.68,0.68,0.68 +MS1_bs_1612_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.256,1.256,1.256,0.7,0.7,0.7,0.7,0.7,0.7,1.256,1.256,1.256,0.744,0.744,0.744,1.3,1.3,1.3,1.3,1.3,1.3,0.744,0.744,0.744 +MS1_bs_1622_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.276,1.276,1.276,0.7,0.7,0.7,0.7,0.7,0.7,1.276,1.276,1.276,0.724,0.724,0.724,1.3,1.3,1.3,1.3,1.3,1.3,0.724,0.724,0.724 +MS1_bs_1624_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.257,1.257,1.257,0.7,0.7,0.7,0.7,0.7,0.7,1.257,1.257,1.257,0.743,0.743,0.743,1.3,1.3,1.3,1.3,1.3,1.3,0.743,0.743,0.743 +MS1_bs_1633_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.331,1.331,1.331,0.7,0.7,0.7,0.7,0.7,0.7,1.331,1.331,1.331,0.669,0.669,0.669,1.3,1.3,1.3,1.3,1.3,1.3,0.669,0.669,0.669 +MS1_bs_1643_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.4,1.4,1.4,0.7,0.7,0.7,0.7,0.7,0.7,1.4,1.4,1.4,0.6,0.6,0.6,1.3,1.3,1.3,1.3,1.3,1.3,0.6,0.6,0.6 +MS1_bs_1652_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.337,1.337,1.337,0.7,0.7,0.7,0.7,0.7,0.7,1.337,1.337,1.337,0.663,0.663,0.663,1.3,1.3,1.3,1.3,1.3,1.3,0.663,0.663,0.663 +MS1_bs_1663_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.29,1.29,1.29,0.7,0.7,0.7,0.7,0.7,0.7,1.29,1.29,1.29,0.71,0.71,0.71,1.3,1.3,1.3,1.3,1.3,1.3,0.71,0.71,0.71 +MS1_bs_1667_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.296,1.296,1.296,0.7,0.7,0.7,0.7,0.7,0.7,1.296,1.296,1.296,0.704,0.704,0.704,1.3,1.3,1.3,1.3,1.3,1.3,0.704,0.704,0.704 +MS1_bs_1681_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.077,1.077,1.077,0.7,0.7,0.7,0.7,0.7,0.7,1.077,1.077,1.077,0.923,0.923,0.923,1.3,1.3,1.3,1.3,1.3,1.3,0.923,0.923,0.923 +MS1_bs_1695_05455,1,1,1,1,1,1,1,1,1,1,1,1,1.507,1.507,1.507,0.7,0.7,0.7,0.7,0.7,0.7,1.507,1.507,1.507,0.493,0.493,0.493,1.3,1.3,1.3,1.3,1.3,1.3,0.493,0.493,0.493 +MS1_bs_1731_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.307,1.307,1.307,0.7,0.7,0.7,0.7,0.7,0.7,1.307,1.307,1.307,0.693,0.693,0.693,1.3,1.3,1.3,1.3,1.3,1.3,0.693,0.693,0.693 +MS1_bs_1741_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.066,1.066,1.066,0.7,0.7,0.7,0.7,0.7,0.7,1.066,1.066,1.066,0.934,0.934,0.934,1.3,1.3,1.3,1.3,1.3,1.3,0.934,0.934,0.934 +MS1_bs_1742_05257,1,1,1,1,1,1,1,1,1,1,1,1,1.053,1.053,1.053,0.7,0.7,0.7,0.7,0.7,0.7,1.053,1.053,1.053,0.947,0.947,0.947,1.3,1.3,1.3,1.3,1.3,1.3,0.947,0.947,0.947 diff --git a/1_Data_SWInput/treatments/LookupSnowDensityFromTable/MeanMonthlySnowDensities_v2.csv b/1_Data_SWInput/treatments/LookupSnowDensityFromTable/MeanMonthlySnowDensities_v2.csv new file mode 100644 index 00000000..caf5c23d --- /dev/null +++ b/1_Data_SWInput/treatments/LookupSnowDensityFromTable/MeanMonthlySnowDensities_v2.csv @@ -0,0 +1,8 @@ +,January,February,March,April,May,June,July,August,September,October,November,December,Hemisphere,Source +Tundra,230.3,242.7,254.4,273.6,311.7,369.3,NA,NA,NA,200,210.7,218.1,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +Taiga,193.1,205.9,221.8,263.2,319,393.4,NA,NA,NA,160,176.9,179.8,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +Maritime,216.5,248.5,283.3,332,396.3,501,NA,NA,NA,160,183.5,197.7,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +Ephemeral,316.8,337.3,364.3,404.6,458.6,509.8,NA,NA,NA,250,300,335.1,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +Prairie,213.7,241.6,261,308,398.1,464.5,NA,NA,NA,140,161.6,185.1,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +Alpine,207.2,241.5,263.5,312,399.6,488.9,NA,NA,NA,160,172,181.6,N,"Brown RD, Mote PW (2009) The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate, 22, 2124-2145." +YourOwn,,,,,,,,,,,,,, diff --git a/1_Data_SWInput/treatments/LookupTranspCoeffFromTable/TranspirationCoefficients_v2.csv b/1_Data_SWInput/treatments/LookupTranspCoeffFromTable/TranspirationCoefficients_v2.csv new file mode 100644 index 00000000..99e18c61 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupTranspCoeffFromTable/TranspirationCoefficients_v2.csv @@ -0,0 +1,253 @@ +,Soil layer,Soil depth cm,Pinuscontorta_10yrsSeedling,BigSagebrushEcosystem_cm,Shortgrass_JBB_cm,Shortgrass3,ShortgrassSteppe_MeanOf_Liang1989Singh1998_cm,ShortgrassSteppe_MeanOf_Liang1989Singh1998_WeightedByShrub_cm,FILL,C3_John,C4_John,Annuals_John,SchenkJackson2003_PCdry_shrubs,SchenkJackson2003_PCdry_grasses,SchenkJackson2003_PCdry_forbs,Jacksonetal1996_crops +LayerORDepthCM,Layer,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM,DepthCM +Source,,,"Nadeau LB, Pluth DJ (1997) Spatial distribution of lodgepole pine and white spruce seedling roots 10 years after deep tillage of a Gray Luvisol. Canadian Journal of Forest Research-Revue Canadienne De Recherche Forestiere, 27, 1606-1613.",,"Bradford JB, Lauenroth WK (2006) Controls over invasion of Bromus tectorum: the importance of climate, soil, disturbance and seed availability. Journal of Vegetation Science, 17, 693-704.",Dave Smith Thesis (2003),,,,,,,,,, +,L1,1,0.045999057,0.026667041,0.033333333,0.028,0.03886502,0.039583235,0.005,0.03,0.03886502,0.03,0.0226053662,0.0355186014,0.0355186014,0.039 +,L2,2,0.045999057,0.026667041,0.033333333,0.028,0.03886502,0.039583235,0.005,0.03,0.03886502,0.03,0.0220943636,0.0342570304,0.0342570304,0.037479 +,L3,3,0.045999057,0.026667041,0.033333333,0.028,0.03886502,0.039583235,0.005,0.03,0.03886502,0.03,0.0215949124,0.0330402685,0.0330402685,0.036017319 +,L4,4,0.045999057,0.026667041,0.012416667,0.028,0.03886502,0.039583235,0.005,0.03,0.03886502,0.03,0.0211067515,0.0318667244,0.0318667244,0.0346126436 +,L5,5,0.045999057,0.026667041,0.012416667,0.028,0.03886502,0.039583235,0.005,0.03,0.03886502,0.03,0.0206296257,0.0307348629,0.0307348629,0.0332627505 +,L6,6,0.045999057,0.01868376,0.012416667,0.028,0.03886502,0.039583235,0.005,0.025,0.03886502,0.025,0.0201632855,0.0296432036,0.0296432036,0.0319655032 +,L7,7,0.045999057,0.01868376,0.012416667,0.028,0.03886502,0.039583235,0.005,0.025,0.03886502,0.025,0.019707487,0.0285903185,0.0285903185,0.0307188486 +,L8,8,0.045999057,0.01868376,0.012416667,0.028,0.03886502,0.039583235,0.005,0.025,0.03886502,0.025,0.019261992,0.0275748303,0.0275748303,0.0295208135 +,L9,9,0.034474051,0.01868376,0.012416667,0.028,0.03886502,0.039583235,0.005,0.025,0.03886502,0.025,0.0188265677,0.0265954109,0.0265954109,0.0283695017 +,L10,10,0.034474051,0.01868376,0.012416667,0.028,0.03886502,0.039583235,0.005,0.025,0.03886502,0.025,0.0184009862,0.0256507791,0.0256507791,0.0272630912 +,L11,11,0.034474051,0.017583578,0.012416667,0.028,0.03886502,0.039583235,0.005,0.0175,0.025076242,0.0175,0.0179850252,0.0247396993,0.0247396993,0.0261998306 +,L12,12,0.034474051,0.017583578,0.012416667,0.028,0.03886502,0.039583235,0.005,0.0175,0.025076242,0.0175,0.0175784671,0.0238609798,0.0238609798,0.0251780372 +,L13,13,0.034474051,0.017583578,0.012416667,0.028,0.03886502,0.039583235,0.005,0.0175,0.025076242,0.0175,0.0171810994,0.0230134712,0.0230134712,0.0241960938 +,L14,14,0.034474051,0.017583578,0.012416667,0.028,0.03886502,0.039583235,0.005,0.0175,0.025076242,0.0175,0.0167927144,0.0221960649,0.0221960649,0.0232524461 +,L15,15,0.034474051,0.017583578,0.012416667,0.028,0.03886502,0.039583235,0.005,0.0175,0.025076242,0.0175,0.0164131089,0.0214076917,0.0214076917,0.0223456007 +,L16,16,0.034474051,0.017583578,0.0226,0.014,0.011287464,0.011688716,0.005,0.0175,0.025076242,0.0175,0.0160420846,0.0206473204,0.0206473204,0.0214741223 +,L17,17,0.034474051,0.017583578,0.0226,0.014,0.011287464,0.011688716,0.005,0.0175,0.025076242,0.0175,0.0156794474,0.0199139565,0.0199139565,0.0206366315 +,L18,18,0.034474051,0.017583578,0.0226,0.014,0.011287464,0.011688716,0.005,0.0175,0.025076242,0.0175,0.0153250077,0.0192066406,0.0192066406,0.0198318029 +,L19,19,0.006020819,0.017583578,0.0226,0.014,0.011287464,0.011688716,0.005,0.0175,0.025076242,0.0175,0.0149785803,0.0185244476,0.0185244476,0.0190583626 +,L20,20,0.006020819,0.017583578,0.0226,0.014,0.011287464,0.011688716,0.005,0.0175,0.025076242,0.0175,0.014639984,0.0178664851,0.0178664851,0.0183150864 +,,21,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0143090418,0.0172318925,0.0172318925,0.0176007981 +,,22,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0139855807,0.0166198398,0.0166198398,0.0169143669 +,,23,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0136694315,0.0160295264,0.0160295264,0.0162547066 +,,24,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.013360429,0.01546018,0.01546018,0.0156207731 +,,25,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0130584116,0.014911056,0.014911056,0.0150115629 +,,26,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0127632214,0.0143814362,0.0143814362,0.014426112 +,,27,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0124747041,0.0138706277,0.0138706277,0.0138634936 +,,28,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0121927089,0.0133779624,0.0133779624,0.0133228174 +,,29,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0119170882,0.0129027959,0.0129027959,0.0128032275 +,,30,0.006020819,0.017428202,0.0226,0.014,0.011287464,0.011688716,0.005,0.0125,0.016849537,0.0125,0.0116476981,0.0124445066,0.0124445066,0.0123039016 +,,31,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0113843976,0.0120024951,0.0120024951,0.0118240494 +,,32,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0111270491,0.0115761833,0.0115761833,0.0113629115 +,,33,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0108755181,0.0111650135,0.0111650135,0.010919758 +,,34,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.010629673,0.0107684478,0.0107684478,0.0104938874 +,,35,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0103893854,0.0103859676,0.0103859676,0.0100846258 +,,36,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0101545295,0.0100170725,0.0100170725,0.0096913254 +,,37,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0099249827,0.0096612801,0.0096612801,0.0093133637 +,,38,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0097006248,0.009318125,0.009318125,0.0089501425 +,,39,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0094813386,0.0089871582,0.0089871582,0.008601087 +,,40,0.006020819,0.010957611,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0125,0.009190117,0.0125,0.0092670095,0.0086679469,0.0086679469,0.0082656446 +,,41,0.006020819,0.008919208,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0075,0.002980377,0.0075,0.0090575254,0.0083600736,0.0083600736,0.0079432844 +,,42,0.006020819,0.008919208,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0075,0.002980377,0.0075,0.0088527767,0.0080631354,0.0080631354,0.0076334963 +,,43,0.006020819,0.008919208,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0075,0.002980377,0.0075,0.0086526564,0.0077767442,0.0077767442,0.00733579 +,,44,0.006020819,0.008919208,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0075,0.002980377,0.0075,0.00845706,0.0075005251,0.0075005251,0.0070496942 +,,45,0.006020819,0.008919208,0.0124,0.011333333,0.005562073,0.005794424,0.005,0.0075,0.002980377,0.0075,0.008265885,0.0072341169,0.0072341169,0.0067747561 +,,46,0.006020819,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0080790317,0.0069771712,0.0069771712,0.0065105406 +,,47,0.006020819,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0078964022,0.0067293518,0.0067293518,0.0062566295 +,,48,0.006020819,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0077179011,0.0064903347,0.0064903347,0.006012621 +,,49,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0075434351,0.0062598071,0.0062598071,0.0057781288 +,,50,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.007372913,0.0060374675,0.0060374675,0.0055527817 +,,51,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0072062456,0.0058230251,0.0058230251,0.0053362232 +,,52,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0070433458,0.0056161994,0.0056161994,0.0051281105 +,,53,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0068841284,0.0054167198,0.0054167198,0.0049281142 +,,54,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0067285102,0.0052243255,0.0052243255,0.0047359178 +,,55,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0065764097,0.0050387648,0.0050387648,0.004551217 +,,56,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0064277476,0.0048597949,0.0048597949,0.0043737195 +,,57,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.006282446,0.0046871818,0.0046871818,0.0042031445 +,,58,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.006140429,0.0045206996,0.0045206996,0.0040392218 +,,59,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0060016223,0.0043601307,0.0043601307,0.0038816922 +,,60,0.002666061,0.008919208,0.0076,0.008666667,0.00427272,0.004451149,0.005,0.0075,0.002980377,0.0075,0.0058659535,0.004205265,0.004205265,0.0037303062 +,,61,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0057333514,0.0040558998,0.0040558998,0.0035848242 +,,62,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0056037469,0.0039118399,0.0039118399,0.0034450161 +,,63,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0054770722,0.0037728969,0.0037728969,0.0033106605 +,,64,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.005353261,0.0036388888,0.0036388888,0.0031815447 +,,65,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0052322485,0.0035096406,0.0035096406,0.0030574645 +,,66,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0051139716,0.0033849831,0.0033849831,0.0029382233 +,,67,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0049983684,0.0032647532,0.0032647532,0.0028236326 +,,68,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0048853785,0.0031487937,0.0031487937,0.002713511 +,,69,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0047749427,0.003036953,0.003036953,0.002607684 +,,70,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0046670034,0.0029290847,0.0029290847,0.0025059844 +,,71,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0045615041,0.0028250477,0.0028250477,0.002408251 +,,72,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0044583896,0.0027247059,0.0027247059,0.0023143292 +,,73,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0043576061,0.0026279282,0.0026279282,0.0022240703 +,,74,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0042591008,0.0025345879,0.0025345879,0.0021373316 +,,75,0.002666061,0.00504449,0.007466667,0.003333333,0.00320082,0.003258413,0.005,0.005,0.001238582,0.005,0.0041628223,0.0024445628,0.0024445628,0.0020539757 +,,76,0.002666061,0.00504449,,0.001333333,0.002319047,0.001831562,0.005,0.005,0.001238582,0.005,0.0040687201,0.0023577354,0.0023577354,0.0019738706 +,,77,0.002666061,0.00504449,,0.001333333,0.002319047,0.001831562,0.005,0.005,0.001238582,0.005,0.0039767452,0.0022739919,0.0022739919,0.0018968897 +,,78,0.002666061,0.00504449,,0.001333333,0.002319047,0.001831562,0.005,0.005,0.001238582,0.005,0.0038868494,0.0021932229,0.0021932229,0.001822911 +,,79,0.002666061,0.00504449,,0.001333333,0.002319047,0.001831562,0.005,0.005,0.001238582,0.005,0.0037989858,0.0021153227,0.0021153227,0.0017518174 +,,80,0.002666061,0.00504449,,0.001333333,0.002319047,0.001831562,0.005,0.005,0.001238582,0.005,0.0037131083,0.0020401894,0.0020401894,0.0016834966 +,,81,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0036291722,0.0019677247,0.0019677247,0.0016178402 +,,82,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0035471334,0.0018978339,0.0018978339,0.0015547444 +,,83,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0034669491,0.0018304255,0.0018304255,0.0014941094 +,,84,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0033885775,0.0017654113,0.0017654113,0.0014358391 +,,85,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0033119774,0.0017027064,0.0017027064,0.0013798414 +,,86,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.003237109,0.0016422286,0.0016422286,0.0013260276 +,,87,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0031639329,0.001583899,0.001583899,0.0012743125 +,,88,0.002666061,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0030924111,0.0015276411,0.0015276411,0.0012246143 +,,89,,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.003022506,0.0014733814,0.0014733814,0.0011768544 +,,90,,0.000871862,,0.001333333,0.002319047,0.001831562,0.005,0.002,0.000395293,0.002,0.0029541811,0.001421049,0.001421049,0.001130957 +,,91,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0028874008,0.0013705753,0.0013705753,0.0010868497 +,,92,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.00282213,0.0013218944,0.0013218944,0.0010444626 +,,93,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0027583348,0.0012749425,0.0012749425,0.0010037285 +,,94,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0026959816,0.0012296584,0.0012296584,0.0009645831 +,,95,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0026350379,0.0011859826,0.0011859826,0.0009269644 +,,96,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0025754719,0.0011438582,0.0011438582,0.0008908128 +,,97,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0025172525,0.0011032299,0.0011032299,0.0008560711 +,,98,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.002460349,0.0010640448,0.0010640448,0.0008226843 +,,99,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.002404732,0.0010262514,0.0010262514,0.0007905996 +,,100,,0.000871862,,,0.000158117,0.00000807,0.005,0.002,0.000395293,0.002,0.0023503721,0.0009898004,0.0009898004,0.0007597662 +,,101,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0022972411,0.000954644,0.000954644,0.0007301353 +,,102,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0022453111,0.0009207364,0.0009207364,0.0007016601 +,,103,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.002194555,0.0008880331,0.0008880331,0.0006742953 +,,104,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0021449463,0.0008564914,0.0008564914,0.0006479978 +,,105,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.002096459,0.0008260701,0.0008260701,0.0006227259 +,,106,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0020490678,0.0007967292,0.0007967292,0.0005984396 +,,107,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0020027479,0.0007684305,0.0007684305,0.0005751004 +,,108,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.001957475,0.0007411369,0.0007411369,0.0005526715 +,,109,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0019132256,0.0007148128,0.0007148128,0.0005311173 +,,110,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0018699764,0.0006894236,0.0006894236,0.0005104038 +,,111,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0018277049,0.0006649363,0.0006649363,0.000490498 +,,112,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.001786389,0.0006413187,0.0006413187,0.0004713686 +,,113,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.001746007,0.0006185399,0.0006185399,0.0004529852 +,,114,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0017065379,0.0005965703,0.0005965703,0.0004353188 +,,115,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.001667961,0.0005753809,0.0005753809,0.0004183414 +,,116,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0016302561,0.0005549442,0.0005549442,0.000402026 +,,117,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0015934035,0.0005352333,0.0005352333,0 +,,118,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0015573841,0.0005162226,0.0005162226,0 +,,119,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0015221788,0.0004978871,0.0004978871,0 +,,120,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0014877694,0.0004802028,0.0004802028,0 +,,121,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0014541379,0.0004631467,0.0004631467,0 +,,122,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0014212665,0.0004466964,0.0004466964,0 +,,123,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0013891383,0.0004308304,0.0004308304,0 +,,124,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0013577363,0.0004155279,0.0004155279,0 +,,125,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0013270442,0.0004007689,0.0004007689,0 +,,126,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0012970459,0.0003865341,0.0003865341,0 +,,127,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0012677257,0.000372805,0.000372805,0 +,,128,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0012390683,0,0,0 +,,129,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0012110587,0,0,0 +,,130,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0011836822,0,0,0 +,,131,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0011569247,0,0,0 +,,132,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.001130772,0,0,0 +,,133,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0011052105,0,0,0 +,,134,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0010802268,0,0,0 +,,135,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0010558078,0,0,0 +,,136,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0010319409,0,0,0 +,,137,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0010086135,0,0,0 +,,138,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0009858134,0,0,0 +,,139,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0009635288,0,0,0 +,,140,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0009417478,0,0,0 +,,141,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0009204593,0,0,0 +,,142,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.000899652,0,0,0 +,,143,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.000879315,0,0,0 +,,144,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0008594378,0,0,0 +,,145,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0008400099,0,0,0 +,,146,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0008210211,0,0,0 +,,147,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0008024617,0,0,0 +,,148,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0007843217,0,0,0 +,,149,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0007665918,0,0,0 +,,150,,0.000299494,,,0.000158117,0.00000807,0.005,0.0002,0.000158117,0.0002,0.0007492627,0,0,0 +,,151,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0007323254,0,0,0 +,,152,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0007157709,0,0,0 +,,153,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006995906,0,0,0 +,,154,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006837761,0,0,0 +,,155,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006683191,0,0,0 +,,156,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006532115,0,0,0 +,,157,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006384454,0,0,0 +,,158,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006240131,0,0,0 +,,159,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0006099071,0,0,0 +,,160,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005961199,0,0,0 +,,161,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005826444,0,0,0 +,,162,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005694735,0,0,0 +,,163,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005566004,0,0,0 +,,164,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005440182,0,0,0 +,,165,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005317205,0,0,0 +,,166,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005197008,0,0,0 +,,167,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0005079527,0,0,0 +,,168,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004964703,0,0,0 +,,169,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004852474,0,0,0 +,,170,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004742782,0,0,0 +,,171,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004635569,0,0,0 +,,172,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004530781,0,0,0 +,,173,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004428361,0,0,0 +,,174,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004328256,0,0,0 +,,175,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004230414,0,0,0 +,,176,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004134784,0,0,0 +,,177,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0004041316,0,0,0 +,,178,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.000394996,0,0,0 +,,179,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.000386067,0,0,0 +,,180,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003773398,0,0,0 +,,181,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003688099,0,0,0 +,,182,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003604728,0,0,0 +,,183,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003523242,0,0,0 +,,184,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003443598,0,0,0 +,,185,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003365754,0,0,0 +,,186,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.000328967,0,0,0 +,,187,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003215306,0,0,0 +,,188,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003142623,0,0,0 +,,189,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003071583,0,0,0 +,,190,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0003002148,0,0,0 +,,191,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002934284,0,0,0 +,,192,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002867953,0,0,0 +,,193,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002803122,0,0,0 +,,194,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002739756,0,0,0 +,,195,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002677823,0,0,0 +,,196,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.000261729,0,0,0 +,,197,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002558125,0,0,0 +,,198,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002500298,0,0,0 +,,199,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002443778,0,0,0 +,,200,,0.0000207,,,0.000158117,0.00000807,0.005,,,,0.0002388535,0,0,0 +,,201,,,,,,,,,,,0.0002334542,0,0,0 +,,202,,,,,,,,,,,0,0,0,0 +,,203,,,,,,,,,,,0,0,0,0 +,,204,,,,,,,,,,,0,0,0,0 +,,205,,,,,,,,,,,0,0,0,0 +,,206,,,,,,,,,,,0,0,0,0 +,,207,,,,,,,,,,,0,0,0,0 +,,208,,,,,,,,,,,0,0,0,0 +,,209,,,,,,,,,,,0,0,0,0 +,,210,,,,,,,,,,,0,0,0,0 +,,211,,,,,,,,,,,0,0,0,0 +,,212,,,,,,,,,,,0,0,0,0 +,,213,,,,,,,,,,,0,0,0,0 +,,214,,,,,,,,,,,0,0,0,0 +,,215,,,,,,,,,,,0,0,0,0 +,,216,,,,,,,,,,,0,0,0,0 +,,217,,,,,,,,,,,0,0,0,0 +,,218,,,,,,,,,,,0,0,0,0 +,,219,,,,,,,,,,,0,0,0,0 +,,220,,,,,,,,,,,0,0,0,0 +,,221,,,,,,,,,,,0,0,0,0 +,,222,,,,,,,,,,,0,0,0,0 +,,223,,,,,,,,,,,0,0,0,0 +,,224,,,,,,,,,,,0,0,0,0 +,,225,,,,,,,,,,,0,0,0,0 +,,226,,,,,,,,,,,0,0,0,0 +,,227,,,,,,,,,,,0,0,0,0 +,,228,,,,,,,,,,,0,0,0,0 +,,229,,,,,,,,,,,0,0,0,0 +,,230,,,,,,,,,,,0,0,0,0 +,,231,,,,,,,,,,,0,0,0,0 +,,232,,,,,,,,,,,0,0,0,0 +,,233,,,,,,,,,,,0,0,0,0 +,,234,,,,,,,,,,,0,0,0,0 +,,235,,,,,,,,,,,0,0,0,0 +,,236,,,,,,,,,,,0,0,0,0 +,,237,,,,,,,,,,,0,0,0,0 +,,238,,,,,,,,,,,0,0,0,0 +,,239,,,,,,,,,,,0,0,0,0 +,,240,,,,,,,,,,,0,0,0,0 +,,241,,,,,,,,,,,0,0,0,0 +,,242,,,,,,,,,,,0,0,0,0 +,,243,,,,,,,,,,,0,0,0,0 +,,244,,,,,,,,,,,0,0,0,0 +,,245,,,,,,,,,,,0,0,0,0 +,,246,,,,,,,,,,,0,0,0,0 +,,247,,,,,,,,,,,0,0,0,0 +,,248,,,,,,,,,,,0,0,0,0 +,,249,,,,,,,,,,,0,0,0,0 +,,250,,,,,,,,,,,0,0,0,0 diff --git a/1_Data_SWInput/treatments/LookupTranspRegionsFromTable/TranspirationRegionsPerSoilLayer.csv b/1_Data_SWInput/treatments/LookupTranspRegionsFromTable/TranspirationRegionsPerSoilLayer.csv new file mode 100644 index 00000000..6a095e25 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupTranspRegionsFromTable/TranspirationRegionsPerSoilLayer.csv @@ -0,0 +1,13 @@ +,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15,L16,L17,L18,L19,L20,Source +Shortgrass,,,,,,,,,,,,,,,,,,,,,test +BigSagebrushSteppe,,,,,,,,,,,,,,,,,,,,,test +BigSagebrushShrubland,,,,,,,,,,,,,,,,,,,,,test +BigSagebrushMontane,,,,,,,,,,,,,,,,,,,,,test +LodgepolePine,,,,,,,,,,,,,,,,,,,,,test +YourOwn,,,,,,,,,,,,,,,,,,,,,test +CONUSSOIL_BSE,1,1,1,2,2,2,3,3,,,,,,,,,,,,,test +CONUSSOIL_Grassland,1,1,1,2,2,3,3,,,,,,,,,,,,,,test +WISE,1,1,2,2,3,3,,,,,,,,,,,,,,, +WISE_ExtraTop5cm,1,1,1,2,2,3,3,,,,,,,,,,,,,, +CONUSSOIL_BSE_EVERY10cm,1,1,1,2,2,2,2,3,3,3,,,,,,,,,,, +CONUSSOIL_Grass_EVERY10cm,1,1,1,2,2,3,3,3,,,,,,,,,,,,, diff --git a/1_Data_SWInput/treatments/LookupVegetationComposition/VegetationComposition_MeanMonthly_v5.csv b/1_Data_SWInput/treatments/LookupVegetationComposition/VegetationComposition_MeanMonthly_v5.csv new file mode 100644 index 00000000..3d75a18a --- /dev/null +++ b/1_Data_SWInput/treatments/LookupVegetationComposition/VegetationComposition_MeanMonthly_v5.csv @@ -0,0 +1,14 @@ +,Shrubs (Schlaepfer et al 2012),,,C3 Grasses,,,C4 Grasses,,,Annual grasses,, +Month,Sh Litter,Sh Biomass,Sh Perc Live,C3 Litter,C3 Biomass,C3 Perc Live,C4 Litter,C4 Biomass,C4 Perc Live,Annual Litter,Annual Biomass,Annual Perc Live +January,125,250,0.1,70,120,0.001,70,120,0.001,60,0.001,1 +February,125,250,0.1,75,125,0.075,75,120,0.001,55,20,1 +March,110,260,0.14,80,135,0.35,80,120,0.1,50,100,1 +April,100,300,0.25,85,155,0.55,85,130,0.25,45,180,1 +May,165,500,0.55,40,175,0.9,40,135,0.4,30,220,1 +June,180,500,0.55,35,210,0.9,35,175,0.85,60,180,1 +July,180,475,0.55,45,195,0.85,45,210,0.9,120,100,1 +August,250,450,0.47,45,170,0.7,45,200,0.9,180,20,1 +September,215,350,0.36,50,135,0.4,50,165,0.65,140,0.001,1 +October,165,275,0.19,65,130,0.15,65,150,0.25,100,0.001,1 +November,140,250,0.1,65,130,0.075,65,140,0.1,75,0.001,1 +December,125,250,0.1,70,120,0.001,70,130,0.001,60,0.001,1 diff --git a/1_Data_SWInput/treatments/LookupWeatherFolder/Weather_Test/weath.2010 b/1_Data_SWInput/treatments/LookupWeatherFolder/Weather_Test/weath.2010 new file mode 100644 index 00000000..95d57248 --- /dev/null +++ b/1_Data_SWInput/treatments/LookupWeatherFolder/Weather_Test/weath.2010 @@ -0,0 +1,368 @@ +# weather for year = 2010 +# DOY Tmax(C) Tmin(C) PPT(cm) +1 4.58 -11.34 0.0 +2 3.38 -10.05 0.0 +3 1.97 -13.63 0.0 +4 1.84 -13.79 0.0 +5 2.12 -13.44 0.0 +6 3.78 -10.9 0.02 +7 3.3 -8.1 0.01 +8 4.47 -3.57 0.31 +9 5.21 -6.87 0.24 +10 -1.31 -5.19 0.0 +11 -0.96 -6.06 0.0 +12 7.99 -5.73 1.17 +13 8.03 -1.94 0.45 +14 5.77 -8.24 0.0 +15 4.75 -7.76 0.0 +16 4.27 -8.4 0.0 +17 5.84 -7.23 0.0 +18 2.89 -4.59 1.08 +19 3.03 -7.93 0.66 +20 0.08 -5.36 0.42 +21 1.35 -11.52 0.26 +22 0.01 -12.32 0.07 +23 1.7 -12.73 0.0 +24 -0.61 -12.95 0.01 +25 -0.4 -9.77 0.6 +26 1.15 -7.31 0.07 +27 1.35 -5.57 0.04 +28 1.69 -7.81 0.0 +29 1.93 -6.33 0.0 +30 2.81 -7.05 0.0 +31 5.33 -9.45 0.0 +32 5.05 -8.64 0.0 +33 4.57 -5.75 0.01 +34 6.93 -7.0 0.0 +35 5.51 -6.5 0.0 +36 9.23 -3.12 0.0 +37 5.4 -4.41 2.61 +38 2.54 -4.04 1.58 +39 2.95 -3.5 0.0 +40 1.05 -4.61 0.02 +41 3.92 -6.36 0.0 +42 7.43 -4.21 0.0 +43 10.08 -4.11 0.0 +44 11.3 -6.48 0.0 +45 11.47 -7.55 0.0 +46 12.21 -5.07 0.0 +47 11.38 -5.39 0.0 +48 11.38 -5.92 0.0 +49 10.38 -7.07 0.0 +50 7.32 -7.4 0.15 +51 4.36 -5.98 0.94 +52 1.96 -6.17 0.46 +53 -0.31 -12.24 0.02 +54 1.15 -11.22 0.07 +55 5.08 -6.32 0.86 +56 7.4 -8.47 0.0 +57 12.03 -6.62 1.1 +58 6.99 -4.49 0.47 +59 7.91 -4.12 0.0 +60 8.28 -6.27 0.0 +61 9.76 -4.23 0.0 +62 9.2 -5.67 0.07 +63 7.86 -8.11 0.04 +64 6.19 -8.14 0.0 +65 7.37 -4.47 0.03 +66 7.87 -5.05 0.0 +67 8.32 -6.16 0.0 +68 6.72 -7.7 0.1 +69 5.03 -6.91 0.07 +70 4.8 -11.85 0.0 +71 10.06 -7.09 0.04 +72 9.78 -6.66 0.08 +73 4.17 -12.67 0.0 +74 8.96 -11.83 0.0 +75 14.02 -7.73 0.0 +76 16.68 -3.58 0.0 +77 16.22 -5.62 0.0 +78 12.1 -10.57 0.0 +79 14.07 -8.03 0.0 +80 15.25 -4.43 0.0 +81 15.84 -3.14 0.0 +82 13.19 -9.08 0.0 +83 12.74 -8.24 0.0 +84 15.83 -4.75 0.0 +85 9.51 -8.15 0.0 +86 11.93 -9.22 0.0 +87 14.1 -6.13 0.0 +88 17.9 -1.64 0.0 +89 16.44 0.81 0.24 +90 6.42 -5.03 0.24 +91 5.83 -11.19 0.0 +92 6.24 -11.0 0.0 +93 8.32 -6.84 0.0 +94 7.78 -11.02 0.12 +95 4.7 -6.8 0.21 +96 5.91 -8.88 0.0 +97 13.31 -9.4 0.0 +98 17.08 -6.61 0.0 +99 15.75 -5.72 0.0 +100 13.12 -5.58 0.0 +101 13.94 -1.8 0.0 +102 9.55 -4.17 0.0 +103 10.6 -8.3 0.0 +104 14.52 -7.48 0.0 +105 16.8 -4.45 0.0 +106 17.77 -1.42 0.0 +107 19.04 -5.0 0.0 +108 20.99 -3.47 0.0 +109 20.72 -1.93 0.0 +110 15.38 0.82 0.39 +111 6.25 -5.49 1.38 +112 3.41 -3.45 1.9 +113 7.99 -4.17 0.0 +114 18.03 -3.77 0.0 +115 16.33 -2.66 0.0 +116 20.58 -3.04 0.0 +117 19.83 4.76 0.0 +118 8.18 -1.58 0.04 +119 7.29 -5.79 0.0 +120 10.33 -6.52 0.0 +121 12.6 -5.06 0.0 +122 14.66 -4.47 0.0 +123 18.8 -4.49 0.0 +124 17.83 1.69 0.0 +125 15.61 1.64 0.0 +126 14.72 -6.8 0.0 +127 16.15 -8.12 0.0 +128 17.01 -2.28 0.0 +129 14.01 -3.5 0.04 +130 10.8 -3.74 0.23 +131 8.72 -5.28 0.03 +132 10.65 -4.39 0.0 +133 16.28 -4.45 0.0 +134 19.54 -3.7 0.0 +135 21.57 -0.94 0.0 +136 21.9 2.14 0.0 +137 20.64 7.32 0.04 +138 16.38 -1.99 0.0 +139 16.02 -1.24 0.0 +140 19.23 3.83 0.0 +141 15.48 -1.97 0.0 +142 11.16 -5.71 0.25 +143 9.16 -6.89 0.03 +144 12.03 -2.13 0.0 +145 15.92 -5.04 0.03 +146 15.31 -0.06 0.0 +147 13.21 -1.24 0.0 +148 11.73 -2.59 0.0 +149 13.04 -5.0 0.0 +150 20.92 -2.0 0.0 +151 21.2 5.86 0.0 +152 20.84 7.55 0.0 +153 23.13 2.45 0.0 +154 23.47 10.58 0.0 +155 22.86 11.84 0.0 +156 26.41 7.86 0.0 +157 28.86 11.72 0.0 +158 27.84 9.97 0.0 +159 27.27 5.03 0.0 +160 24.74 11.41 0.0 +161 20.41 2.68 0.0 +162 16.28 4.71 0.0 +163 18.94 3.8 0.0 +164 23.87 1.64 0.0 +165 27.42 2.46 0.0 +166 26.15 5.63 0.0 +167 21.24 2.55 0.0 +168 21.94 -1.47 0.0 +169 23.33 0.56 0.0 +170 23.8 0.99 0.0 +171 23.64 1.1 0.0 +172 22.28 4.15 0.0 +173 25.79 1.6 0.0 +174 28.26 5.96 0.0 +175 27.47 6.3 0.0 +176 23.81 10.3 0.0 +177 26.48 6.04 0.0 +178 30.97 6.32 0.0 +179 33.41 10.28 0.0 +180 32.33 11.57 0.0 +181 28.77 6.34 0.0 +182 28.85 4.02 0.0 +183 27.7 4.7 0.0 +184 25.05 4.36 0.0 +185 24.84 2.85 0.0 +186 29.57 4.67 0.0 +187 28.93 6.93 0.0 +188 29.36 7.18 0.0 +189 30.6 8.75 0.0 +190 30.77 9.82 0.0 +191 30.82 7.45 0.0 +192 31.46 7.29 0.0 +193 31.71 10.5 0.0 +194 30.82 9.93 0.0 +195 30.63 8.54 0.0 +196 33.81 9.55 0.03 +197 32.96 13.13 0.0 +198 33.98 9.31 0.0 +199 33.51 9.95 0.0 +200 33.25 5.37 0.0 +201 32.72 7.15 0.0 +202 31.82 8.6 0.0 +203 31.68 7.24 0.0 +204 33.35 9.69 0.0 +205 33.7 11.14 0.03 +206 32.45 14.06 0.3 +207 28.67 8.46 0.17 +208 30.47 8.58 0.0 +209 31.69 8.25 0.0 +210 31.75 9.71 0.0 +211 32.4 9.26 0.0 +212 31.75 7.42 0.0 +213 30.38 4.51 0.0 +214 29.89 6.34 0.0 +215 30.85 3.81 0.0 +216 30.68 6.9 0.0 +217 30.97 6.83 0.0 +218 30.69 6.83 0.0 +219 30.15 7.73 0.0 +220 29.0 8.2 0.07 +221 27.2 6.0 0.0 +222 28.5 7.32 0.0 +223 27.21 9.15 0.0 +224 25.55 4.05 0.0 +225 26.79 4.58 0.0 +226 30.22 7.52 0.0 +227 30.34 10.29 0.0 +228 30.05 6.82 0.0 +229 31.12 7.06 0.0 +230 31.98 8.89 0.0 +231 30.03 4.66 0.0 +232 29.24 4.56 0.0 +233 30.71 10.69 0.0 +234 27.71 8.47 0.0 +235 26.23 3.33 0.0 +236 27.08 3.0 0.0 +237 31.4 6.06 0.0 +238 33.06 12.13 0.0 +239 32.01 9.02 0.0 +240 28.44 9.22 0.0 +241 19.45 5.03 0.0 +242 15.51 0.69 0.0 +243 21.21 0.78 0.0 +244 25.37 1.48 0.0 +245 28.71 3.11 0.0 +246 30.7 5.85 0.0 +247 30.78 4.53 0.0 +248 28.31 2.09 0.0 +249 24.24 -0.92 0.0 +250 26.94 -0.15 0.0 +251 26.27 8.4 0.0 +252 18.4 -0.53 0.0 +253 19.84 -1.3 0.0 +254 24.57 -1.14 0.0 +255 26.12 1.72 0.0 +256 24.55 2.9 0.0 +257 24.98 0.8 0.0 +258 26.31 0.95 0.0 +259 26.73 1.9 0.0 +260 27.43 1.86 0.0 +261 27.95 2.1 0.0 +262 25.15 4.42 0.0 +263 22.36 -0.43 0.0 +264 23.73 -1.65 0.0 +265 21.73 2.97 0.0 +266 23.65 -1.72 0.0 +267 25.72 0.0 0.0 +268 27.95 -0.21 0.0 +269 29.27 1.32 0.0 +270 29.31 1.27 0.0 +271 30.74 2.26 0.0 +272 30.65 3.12 0.0 +273 30.75 2.87 0.0 +274 30.17 4.91 0.04 +275 27.81 6.16 0.11 +276 21.27 7.68 1.71 +277 12.02 5.16 2.34 +278 10.2 3.54 4.11 +279 12.62 -1.13 0.99 +280 12.91 1.65 0.12 +281 14.46 -1.9 0.02 +282 18.34 -0.58 0.0 +283 20.43 0.95 0.0 +284 18.55 1.8 0.0 +285 17.64 -0.79 0.0 +286 19.61 -1.72 0.0 +287 21.77 -0.7 0.0 +288 22.64 0.09 0.0 +289 21.18 1.98 0.0 +290 17.26 5.63 0.29 +291 14.32 2.59 0.29 +292 16.54 -0.17 0.3 +293 17.78 -2.48 0.0 +294 18.71 -0.7 0.0 +295 16.39 -1.44 0.0 +296 13.12 2.09 0.0 +297 13.11 5.99 3.22 +298 11.58 -0.37 0.0 +299 9.14 -7.65 0.0 +300 8.48 -10.82 0.0 +301 14.65 -8.4 0.0 +302 15.22 -5.58 0.09 +303 12.85 -2.82 0.01 +304 12.74 -3.26 0.0 +305 15.17 -5.24 0.0 +306 16.29 -4.88 0.0 +307 17.97 -4.21 0.0 +308 18.54 -2.82 0.0 +309 19.32 -1.01 0.0 +310 17.62 1.1 0.0 +311 12.72 0.98 0.46 +312 6.76 -4.49 0.04 +313 6.36 -12.03 0.0 +314 3.92 -7.94 0.34 +315 5.25 -8.49 0.08 +316 8.92 -10.45 0.0 +317 9.44 -9.3 0.0 +318 10.55 -8.33 0.0 +319 12.68 -5.7 0.0 +320 15.05 -7.64 0.0 +321 12.17 -10.53 0.0 +322 16.26 -6.85 0.0 +323 13.46 1.51 0.23 +324 10.14 -4.7 0.69 +325 3.1 -8.46 0.04 +326 0.25 -7.36 0.0 +327 3.02 -3.98 0.3 +328 -0.71 -16.21 0.0 +329 -3.21 -18.78 0.0 +330 0.7 -17.61 0.06 +331 4.58 -14.49 0.1 +332 0.94 -10.94 0.0 +333 -0.71 -17.17 0.0 +334 -0.49 -16.2 0.0 +335 3.16 -11.88 0.0 +336 12.54 -11.36 0.0 +337 10.26 -8.08 0.0 +338 8.35 -2.87 0.05 +339 2.42 -6.0 0.72 +340 9.52 -5.29 0.0 +341 8.77 -9.19 0.0 +342 10.86 -9.35 0.0 +343 11.06 -0.76 0.0 +344 12.36 1.21 0.0 +345 14.28 -2.83 0.0 +346 11.56 -9.17 0.0 +347 11.99 -10.63 0.04 +348 9.26 -5.26 0.36 +349 8.33 -5.9 0.0 +350 1.88 -7.66 0.04 +351 -1.9 -10.19 1.88 +352 5.54 -7.61 3.04 +353 5.81 -1.31 1.79 +354 1.13 -3.86 0.29 +355 0.05 -9.93 0.0 +356 2.77 -8.86 0.01 +357 4.31 -9.71 0.0 +358 2.96 -17.77 0.0 +359 7.18 -9.6 0.0 +360 5.36 -8.39 0.0 +361 4.62 -7.64 0.0 +362 5.08 -7.54 0.3 +363 3.94 -4.9 0.03 +364 0.49 -14.83 0.25 +365 -5.2 -16.46 0.0 +366 0.0 0.0 0.0 diff --git a/1_Data_SWInput/treatments/tr_cloudin/cloud.in b/1_Data_SWInput/treatments/tr_cloudin/cloud.in new file mode 100644 index 00000000..cfd44a31 --- /dev/null +++ b/1_Data_SWInput/treatments/tr_cloudin/cloud.in @@ -0,0 +1,5 @@ +71.0 61.0 61.0 51.0 41.0 31.0 23.0 23.0 31.0 41.0 61.0 61.0 # (site: 002_-119.415_39.046 ), sky cover (sunrise-sunset),%,Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +1.3 2.9 3.3 3.8 3.8 3.8 3.3 3.3 2.9 1.3 1.3 1.3 # Wind speed (m/s),Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +61.0 61.0 61.0 51.0 51.0 51.0 41.0 41.0 51.0 51.0 61.0 61.0 # rel. Humidity (%),Climate Atlas of the US,http://cdo.ncdc.noaa.gov/cgi-bin/climaps/climaps.pl +1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 # transmissivity (rel), only used in petfunc, but falls out of the equations (a = trans * b, c = a / trans) +213.7 241.6 261.0 308.0 398.1 464.5 0.0 0.0 0.0 140.0 161.6 185.1 # snow density (kg/m3): Brown, R. D. and P. W. Mote. 2009. The response of Northern Hemisphere snow cover to a changing climate. Journal of Climate 22:2124-2145. diff --git a/1_Data_SWInput/treatments/tr_prodin/prod.in b/1_Data_SWInput/treatments/tr_prodin/prod.in new file mode 100644 index 00000000..738f56e2 --- /dev/null +++ b/1_Data_SWInput/treatments/tr_prodin/prod.in @@ -0,0 +1,143 @@ +# Plant production data file for SOILWAT +# Location: + +# ---- Composition of vegetation type components (0-1; must add up to 1) +# Grasses Shrubs Trees Forbs Bare Ground +0.0 0.0 0.0 1.0 0.0 + + +# ---- Albedo +# Grasses Shrubs Trees Forbs Bare Ground +0.167 0.143 0.106 0.167 0.15 # albedo: (Houldcroft et al. 2009) MODIS snowfree 'grassland', 'open shrub', ‘evergreen needle forest’ with MODIS albedo aggregated over pure IGBP cells where NDVI is greater than the 98th percentile NDVI + + +# ---- % Cover: divide standing LAI by this to get % cover +# Grasses Shrubs Trees Forbs +3.0 2.22 5. 3.0 + + +# -- Canopy height (cm) parameters either constant through season or as tanfunc with respect to biomass (g/m^2) +# Grasses Shrubs Trees Forbs +300.0 0.0 0.0 300.0 # xinflec +29.5 5.0 5.0 29.5 # yinflec +85. 100. 3000. 85. # range +0.002 0.003 0.00008 0.002 # slope +0. 50. 1200. 0. # if > 0 then constant canopy height (cm) + + +# --- Vegetation interception parameters for equation: intercepted rain = (a + b*veg) + (c+d*veg) * ppt; Grasses+Shrubs: veg=vegcov, Trees: veg=LAI +# Grasses Shrubs Trees Forbs +0.0182 0. 0.00461 0.0182 # a +0.0065 0.0026 0.01405 0.0065 # b +0.0019 0. 0.0383 0.0019 # c +0.0054 0.0033 0.0337 0.0054 # d + + +# --- Litter interception parameters for equation: intercepted rain = (a + b*litter) + (c+d*litter) * ppt +# Grass-Litter Shrub-Litter Tree-Litter Forbs-Litter +0.0151 0.0151 0.0151 0.0151 # a +0.00005 0.00005 0.00005 0.00005 # b +0.0116 0.0116 0.0116 0.0116 # c +0.00002 0.00002 0.00002 0.00002 # d + + +# ---- Parameter for partitioning of bare-soil evaporation and transpiration as in Es = exp(-param*LAI) +# Grasses Shrubs Trees Forbs +1. 1. 0.41 1. # Trees: According to a regression based on a review by Daikoku, K., S. Hattori, A. Deguchi, Y. Aoki, M. Miyashita, K. Matsumoto, J. Akiyama, S. Iida, T. Toba, Y. Fujita, and T. Ohta. 2008. Influence of evaporation from the forest floor on evapotranspiration from the dry canopy. Hydrological Processes 22:4083-4096. + + +# ---- Parameter for scaling and limiting bare soil evaporation rate: if totagb (g/m2) > param then no bare-soil evaporation +# Grasses Shrubs Trees Forbs +999. 999. 2099. 999. # + + +# --- Shade effects on transpiration based on live and dead biomass +# Grasses Shrubs Trees Forbs +0.3 0.3 0.3 0.3 # shade scale +150. 150. 150. 150. # shade maximal dead biomass +300. 300. 0. 300. # tanfunc: xinflec +12. 12. 0. 12. # yinflec +34. 34. 2. 34. # range +0.002 0.002 0.0002 0.002 # slope + + +# ---- Hydraulic redistribution: Ryel, Ryel R, Caldwell, Caldwell M, Yoder, Yoder C, Or, Or D, Leffler, Leffler A. 2002. Hydraulic redistribution in a stand of Artemisia tridentata: evaluation of benefits to transpiration assessed with a simulation model. Oecologia 130: 173-184. +# Grasses Shrubs Trees Forbs +1 1 1 1 # flag to turn on/off (1/0) hydraulic redistribution +-0.2328 -0.2328 -0.2328 -0.2328 # maxCondroot - maximum radial soil-root conductance of the entire active root system for water (cm/-bar/day) = 0.097 cm/MPa/h +10. 10. 10. 10. # swp50 - soil water potential (-bar) where conductance is reduced by 50% = -1. MPa +3.22 3.22 3.22 3.22 # shapeCond - shaping parameter for the empirical relationship from van Genuchten to model relative soil-root conductance for water + + +# ---- Critical soil water potential (MPa), i.e., when transpiration rates cannot sustained anymore, for instance, for many crop species -1.5 MPa is assumed and called wilting point +# Grasses Shrubs Trees Forbs +-3.5 -3.9 -2.0 -2.0 + + +# Grasslands component: +# -------------- Monthly production values ------------ +# Litter - dead leafy material on the ground (g/m^2 ). +# Biomass - living and dead/woody aboveground standing biomass (g/m^2). +# %Live - proportion of Biomass that is actually living (0-1.0). +# LAI_conv - monthly amount of biomass needed to produce LAI=1.0 (g/m^2). +# There should be 12 rows, one for each month, starting with January. +# +#Litter Biomass %Live LAI_conv + 75.0 150.0 0.00 300. # January + 80.0 150.0 0.00 300. # February + 85.0 150.0 0.10 300. # March + 90.0 170.0 0.20 300. # April + 50.0 190.0 0.40 300. # May + 50.0 220.0 0.60 300. # June + 50.0 250.0 0.40 300. # July + 55.0 220.0 0.60 300. # August + 60.0 190.0 0.40 300. # September + 65.0 180.0 0.20 300. # October + 70.0 170.0 0.10 300. # November + 75.0 160.0 0.00 300. # December + +# Shrublands component: +#Litter Biomass %Live LAI_conv +85.4 210.0 0.06 372 # January +88.2 212.0 0.08 372 # February +95.3 228.0 0.20 372 # March +100.5 272.0 0.33 372 # April +166.4 400.0 0.57 372 # May +186.0 404.0 0.55 372 # June +177.1 381.0 0.50 372 # July +212.2 352.0 0.46 372 # August +157.4 286.0 0.32 372 # September +124.9 235.0 0.15 372 # October +110.4 218.0 0.08 372 # November +104.3 214.0 0.06 372 # December + +# Forest component: +#Litter Biomass %Live LAI_conv +2000 15000 0.083 500 # January +2000 15000 0.083 500 # February +2000 15000 0.083 500 # March +2000 15000 0.083 500 # April +2000 15000 0.083 500 # May +2000 15000 0.083 500 # June +2000 15000 0.083 500 # July +2000 15000 0.083 500 # August +2000 15000 0.083 500 # September +2000 15000 0.083 500 # October +2000 15000 0.083 500 # November +2000 15000 0.083 500 # December + +# FORB component: +#Litter Biomass %Live LAI_conv + 75.0 150.0 0.00 300. # January + 80.0 150.0 0.00 300. # February + 85.0 150.0 0.10 300. # March + 90.0 170.0 0.20 300. # April + 50.0 190.0 0.40 300. # May + 50.0 220.0 0.60 300. # June + 50.0 250.0 0.40 300. # July + 55.0 220.0 0.60 300. # August + 60.0 190.0 0.40 300. # September + 65.0 180.0 0.20 300. # October + 70.0 170.0 0.10 300. # November + 75.0 160.0 0.00 300. # December + diff --git a/1_Data_SWInput/treatments/tr_siteparamin/siteparam.in b/1_Data_SWInput/treatments/tr_siteparamin/siteparam.in new file mode 100644 index 00000000..e243b74c --- /dev/null +++ b/1_Data_SWInput/treatments/tr_siteparamin/siteparam.in @@ -0,0 +1,74 @@ +# ---- SWC limits ---- +-1 # swc_min : cm/cm if 0 - <1.0, -bars if >= 1.0.; if < 0. then estimate residual water content for each layer +15. # swc_init: cm/cm if < 1.0, -bars if >= 1.0. +15. # swc_wet : cm/cm if < 1.0, -bars if >= 1.0. + +# ---- Model flags and coefficients ---- +0 # reset (1/0): reset/don't reset swc each new year +1 # deepdrain (1/0): allow/disallow deep drainage function. + # if deepdrain == 1, model expects extra layer in soils file. +1 # multiplier for PET (eg for climate change). +0 #proportion of ponded surface water removed as runoff daily (value ranges between 0 and 1; 0=no loss of surface water, 1=all ponded water lost via runoff) + +# ---- Snow simulation parameters (SWAT2K model): Neitsch S, Arnold J, Kiniry J, Williams J. 2005. Soil and water assessment tool (SWAT) theoretical documentation. version 2005. Blackland Research Center, Texas Agricultural Experiment Station: Temple, TX. +# these parameters are RMSE optimized values for 10 random SNOTEL sites for western US +0.61 # TminAccu2 = Avg. air temp below which ppt is snow ( C) +1.54 # TmaxCrit = Snow temperature at which snow melt starts ( C) +0.10 # lambdasnow = Relative contribution of avg. air temperature to todays snow temperture vs. yesterday's snow temperature (0-1) +0.0 # RmeltMin = Minimum snow melt rate on winter solstice (cm/day/C) +0.27 # RmeltMax = Maximum snow melt rate on summer solstice (cm/day/C) + +# ---- Drainage coefficient ---- +0.02 # slow-drain coefficient per layer (cm/day). See Eqn 2.9 in ELM doc. + # ELM shows this as a value for each layer, but this way it's applied to all. + # (Q=.02 in ELM doc, .06 in FORTRAN version). + +# ---- Evaporation coefficients ---- +# These control the tangent function (tanfunc) which affects the amount of soil +# water extractable by evaporation and transpiration. +# These constants aren't documented by the ELM doc. +45. # rate shift (x value of inflection point). lower value shifts curve + # leftward, meaning less water lost to evap at a given swp. effectively + # shortens/extends high rate. +.1 # rate slope: lower value (eg .01) straightens S shape meaning more gradual + # reduction effect; higher value (.5) makes abrupt transition +.25 # inflection point (y-value of inflection point) +0.5 # range: diff btw upper and lower rates at the limits + +# ---- Transpiration Coefficients ---- +# comments from Evap constants apply. +45. # rate shift +.1 # rate shape +.5 # inflection point +1.1 # range + +# ---- Intrinsic site params: +0.681 # latitude of the site in radians +1651 # altitude of site (m a.s.l.) +0 # slope at site (degrees): no slope = 0 +-1 # aspect at site (degrees): N=0, E=90, S=180, W=270, no slope:-1 + +# ---- Soil Temperature Constants ---- +# from Parton 1978, ch. 2.2.2 Temperature-profile Submodel +300. # biomass limiter, 300 g/m^2 in Parton's equation for T1(avg daily temperature at the top of the soil) +15. # constant for T1 equation (used if biomass <= biomass limiter), 15 in Parton's equation +-4. # constant for T1 equation (used if biomass > biomass limiter), -4 in Parton's equation +600. # constant for T1 equation (used if biomass > biomass limiter), 600 in Parton's equation +0.00070 # constant for cs (soil-thermal conductivity) equation, 0.00070 in Parton's equation +0.00030 # constant for cs equation, 0.00030 in Parton's equation +0.18 # constant for sh (specific heat capacity) equation, 0.18 in Parton's equation +6.69 # constant mean air temperature (the soil temperature at the lower boundary, 180 cm) in celsius +15. # deltaX parameter for soil_temperature function, default is 15. (distance between profile points in cm) max depth (the next number) should be evenly divisible by this number +990. # max depth for the soil_temperature function equation, default is 180. this number should be evenly divisible by deltaX +1 # flag, 1 to calculate soil_temperature, 0 to not calculate soil_temperature + + +# ---- Transpiration regions ---- +# ndx : 1=shallow, 2=medium, 3=deep, 4=very deep +# layer: deepest layer number of the region. +# Layers are defined in soils.in. +# ndx layer + 1 6 + 2 9 + 3 11 +# 4 8 diff --git a/1_Data_SWInput/treatments/tr_soilsin/soils.in b/1_Data_SWInput/treatments/tr_soilsin/soils.in new file mode 100644 index 00000000..cbe2f759 --- /dev/null +++ b/1_Data_SWInput/treatments/tr_soilsin/soils.in @@ -0,0 +1,24 @@ +# Soil layer definitions +# Location: +# +# depth = (cm) lower limit of layer; layers must be in order of depth. +# matricd = (g/cm^3) bulk density of soil in this layer. +# gravel_content = the percent volume of each layer composed of gravel (i.e., particles > 2mm) +# evco = (frac) proportion of total baresoil evap from this layer. +# trco = (frac) proportion of total transpiration from this layer for each vegetation type (tree, forb, shrub, grass) +# %sand = (frac) proportion of sand in layer (0-1.0). +# %clay = (frac) proportion of clay in layer (0-1.0). +# imperm = (frac) proportion of 'impermeability' to water percolation(/infiltration/drainage) in layer (0-1.0) +# soiltemp = the initial temperature of each soil layer (in celcius), from the day before the simulation starts +# Note that the evco and trco columns must sum to 1.0 or they will +# be normalized. +# +# depth matricd gravel_content evco trco_grass trco_shrub trco_tree trco_forb %sand %clay imperm soiltemp + 5.000 1.430 0.000 0.812 0.033 0.134 0.033 0.134 0.510 0.150 0.000 0.186 + 10.000 1.410 0.000 0.153 0.033 0.094 0.033 0.094 0.440 0.260 0.000 0.372 + 20.000 1.390 0.000 0.034 0.067 0.176 0.067 0.176 0.350 0.410 0.000 0.744 + 30.000 1.390 0.000 0.000 0.067 0.175 0.067 0.175 0.320 0.450 0.000 1.116 + 40.000 1.380 0.000 0.000 0.067 0.110 0.067 0.110 0.310 0.470 0.000 1.488 + 60.000 1.150 0.000 0.000 0.133 0.179 0.133 0.179 0.320 0.470 0.000 2.232 + 80.000 1.310 0.000 0.000 0.133 0.101 0.133 0.101 0.570 0.280 0.000 2.975 + 85.000 1.310 0.000 0.000 0.133 0.101 0.133 0.101 0.570 0.280 0.000 2.975 diff --git a/1_Data_SWInput/treatments/tr_weathersetupin/weathsetup.in b/1_Data_SWInput/treatments/tr_weathersetupin/weathsetup.in new file mode 100644 index 00000000..2c65d632 --- /dev/null +++ b/1_Data_SWInput/treatments/tr_weathersetupin/weathsetup.in @@ -0,0 +1,32 @@ +# Weather setup parameters +# Location: Chimney Park, WY (41.068° N, 106.1195° W, 2740 m elevation) +# +1 # 1=allow snow accumulation, 0=no snow effects. +0.0 # % of snow drift per snow event (+ indicates snow addition, - indicates snow taken away from site) +0.0 # % of snowmelt water as runoff/on per event (>0 indicates runoff, <0 indicates runon) +0 # 0=use historical data only, 1=use markov process for missing weather. +1979 # first year to begin historical weather. +5 # number of days to use in the running average of temperature. + +# Monthly scaling parameters. +# Month 1 = January, Month 2 = February, etc. +# PPT = multiplicative for PPT (scale*ppt). +# MaxT = additive for max temp (scale+maxtemp). +# MinT = additive for min temp (scale+mintemp). +# SkyCover = additive for mean monthly sky cover [%]; min(100, max(0, scale + sky cover)) +# Wind = multiplicative for mean monthly wind speed; max(0, scale * wind speed) +# rH = additive for mean monthly relative humidity [%]; min(100, max(0, scale + rel. Humidity)) +# Transmissivity = multiplicative for mean monthly relative transmissivity; min(1, max(0, scale * transmissivity)) +#Mon PPT MaxT MinT SkyCover Wind rH Transmissivity + 1 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 2 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 3 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 4 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 5 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 6 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 7 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 8 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 9 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 10 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 11 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 + 12 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 diff --git a/DESCRIPTION b/DESCRIPTION index afdba5d2..0fe95e5c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,9 +41,6 @@ Suggests: testthat, covr, lintr -Remotes: - github::khufkens/daymetr, - github::dschlaep/weathergen LinkingTo: Rcpp LazyData: true diff --git a/DESCRIPTION without remotes b/DESCRIPTION without remotes new file mode 100644 index 00000000..ce18e764 --- /dev/null +++ b/DESCRIPTION without remotes @@ -0,0 +1,54 @@ +Package: rSFSW2 +Title: Simulation Framework for SOILWAT2 +Version: 2.0.0-9029-generalized_agg_funs +Date: 2017-06-06 +Authors@R: c(person("Daniel", "Schlaepfer", email = "daniel.schlaepfer@unibas.ch", role = c("aut", "cre")), + person("Caitlin", "Andrews", role = "ctb"), + person("Ryan", "Murphy", role = "ctb")) +Description: Setting up, carrying out, and analyzing ecosystem water balance + simulation experiments with SOILWAT2. +Depends: + R (>= 3.3.0) +Imports: + rSOILWAT2 (>= 1.2.6), + RSQLite (>= 1.1), + DBI (>= 0.5), + Rcpp (>= 0.12.7), + raster (>= 2.5.8), + sp (>= 1.2.3), + methods +Suggests: + Rmpi (>= 0.6-6), + parallel, + rgdal (>= 1.1.10), + rgeos (>= 0.3.19), + ncdf4 (>= 1.15), + RCurl (>= 1.95.4.8), + fastmatch (>= 1.0.4), + iotools (>= 0.1-12), + circular (>= 0.4.7), + Hmisc (>= 4.0-2), + SPEI (>= 1.6), + qmap (>= 1.0.4), + daymetr (>= 1.0), + weathergen (>= 0.1.2), + lubridate, + zoo, + dplyr, + knitr, + rmarkdown, + testthat, + covr +Remotes: + github::khufkens/daymetr, + github::dschlaep/weathergen +LinkingTo: + Rcpp +LazyData: true +ByteCompile: true +NeedsCompilation: yes +License: GPL-3 + file LICENSE +URL: https://github.com/Burke-Lauenroth-Lab/rSFSW2 +BugReports: https://github.com/Burke-Lauenroth-Lab/rSFSW2/issues +RoxygenNote: 6.0.1 +VignetteBuilder: knitr diff --git a/R/ExtractData_ClimateDownscaling.R b/R/ExtractData_ClimateDownscaling.R index 20a1f9d3..230ecbb2 100644 --- a/R/ExtractData_ClimateDownscaling.R +++ b/R/ExtractData_ClimateDownscaling.R @@ -1,5 +1,5 @@ #---Downscaling/bias-correction functions - +print('Start ExtractData_ClimateDOwn') #' Meta data for climate scenarios #' @export climscen_metadata <- function() { diff --git a/R/Miscellaneous_Functions.R b/R/Miscellaneous_Functions.R index 02d08dae..f1f30314 100644 --- a/R/Miscellaneous_Functions.R +++ b/R/Miscellaneous_Functions.R @@ -24,6 +24,8 @@ #' `debugger(`path/to/file/last.dump.rda`)` #' #' @export +print('Start Misc_Functions') + set_options_warn_error <- function(debug.warn.level = 1L, debug.dump.objects = FALSE, dir_prj = ".", verbose = FALSE) { @@ -294,9 +296,53 @@ dir_safe_create <- function(paths, showWarnings = FALSE, recursive = TRUE, mode invisible(temp) } +future_time_window_aggregation <- function(sim_time){ + # Add future time windows for aggregation of simulation output + sim_time[["agg_years"]] <- c(sim_time[["agg_years.current1"]], + future = apply(future_yrs, 1, function(x) x["DSfut_startyr"]:x["DSfut_endyr"]) + ) + + # Time windows of current and future simulation periods + sim_time[["sim_windows"]] <- c( + current = list(sim_time[["simstartyr"]]:sim_time[["endyr"]]), + future = apply(future_yrs, 1, function(x) x["DSfut_startyr"]:x["DSfut_endyr"]) + ) +} + +degree_days <- function(temp_C, base_C = 0) { + res <- temp_C - base_C + res[res < 0] <- 0 -sw_dailyC4_TempVar <- function(dailyTempMin, dailyTempMean, simTime2) { + res +} + +soil_status <- function(..., swp_crit, time_N, is_dry = TRUE) { + swp <- list(...) + if (is.null(names(swp))) + names(swp) <- paste0("V", seq_along(swp)) + + out <- list() + mat_crits <- list() + ncols <- vapply(swp, function(x) dim(x)[2], FUN.VALUE = NA_real_) + +print("'soil_status' needs fixing") +#TODO(drs) +# for (k in seq_along(swp)) { +# if (k > 1 && +# mat_crit <- array(swp_crit, dim = c(length(swp_crit), time_N)) +# +# +# mat_crit1 <- matrix(swp_crit, nrow = time_N, ncol = length(swp_crit), byrow = TRUE) + + if (is_dry) { + lapply(swp, function(x) x < mat_crit) + } else { + lapply(swp, function(x) x >= mat_crit) + } +} + +sw_dailyC4_TempVar <- function(dailyTempMin, dailyTempMean, simTime2, return_yearly = FALSE) { #Variables to estimate percent C4 species in North America: Teeri JA, Stowe LG (1976) Climatic patterns and the distribution of C4 grasses in North America. Oecologia, 23, 1-12. temp7 <- simTime2$month_ForEachUsedDay_NSadj == 7 @@ -306,19 +352,37 @@ sw_dailyC4_TempVar <- function(dailyTempMin, dailyTempMean, simTime2) { temp <- rle(x > 0) if (any(temp$values)) max(temp$lengths[temp$values], na.rm = TRUE) else 0 }) - temp_base65F <- dailyTempMean - 18.333 # 18.333 C = 65 F with (65 - 32) * 5 / 9 - temp_base65F[temp_base65F < 0] <- 0 + + temp_base65F <- degree_days(dailyTempMean - 18.333, 0) # 18.333 C = 65 F with (65 - 32) * 5 / 9 DegreeDaysAbove65F_DaysC <- tapply(temp_base65F, simTime2$year_ForEachUsedDay_NSadj, sum) nyrs <- seq_along(Month7th_MinTemp_C) #if southern Hemisphere, then 7th month of last year is not included - temp <- cbind(Month7th_MinTemp_C[nyrs], + ydat <- cbind(Month7th_MinTemp_C[nyrs], LengthFreezeFreeGrowingPeriod_Days[nyrs], DegreeDaysAbove65F_DaysC[nyrs]) - res <- c(apply(temp, 2, mean), apply(temp, 2, stats::sd)) - temp <- c("Month7th_NSadj_MinTemp_C", - "LengthFreezeFreeGrowingPeriod_NSadj_Days", - "DegreeDaysAbove65F_NSadj_DaysC") - names(res) <- c(temp, paste0(temp, ".sd")) + dimnames(ydat) <- list(NULL, + c("Month7th_NSadj_MinTemp_C", + "LengthFreezeFreeGrowingPeriod_NSadj_Days", + "DegreeDaysAbove65F_NSadj_DaysC") + ) + + if (return_yearly) { + yrs_have <- as.integer(names(Month7th_MinTemp_C[nyrs])) + + if (all(yrs_have == simTime$useyrs)) { + res <- cbind(Years = yrs_have, ydat) + + } else { + res <- matrix(NA, nrow = simTime$no.useyr, ncol = 4, + dimnames = list(NULL, c("Years", colnames(ydat)))) + res[, "Years"] <- simTime$useyrs + res[, -1] <- ydat[match(simTime$useyrs, yrs_have), ] + } + + } else { + res <- c(apply(ydat, 2, mean), apply(ydat, 2, sd)) + names(res) <- c(colnames(ydat), paste0(colnames(ydat), ".sd")) + } res } @@ -501,6 +565,65 @@ endDoyAfterDuration <- function(x, duration = 10) { } } +dailyRegeneration_bySWPSnow_ThisYear_YN <- function(x, opts) { + # calculate season doys + snowcover <- ifelse(x[,2] > 0, 1, 0) + r <- rle(snowcover) + rseries <- ifelse(r$values==0, 1:length(r$values), 0) + then <- which(rseries==rseries[rseries>0][which.max(r$lengths[rseries>0])]) + + sstart <- if (inherits(opts[["season.start"]], "character")) { + # calculate last day of the longest snowpack + if (then == 1) 1 else cumsum(r$lengths)[then - 1] + } else { + opts[["season.start"]] + } + send <- if (inherits(opts[["season.end"]], "character")) { + # calculate first day of the longest snowpack + min(c(cumsum(r$lengths)[then]+1, length(snowcover))) + } else { + opts[["season.end"]] + } + + i_season <- sstart:send + if(length(i_season) > 0){ + swp.season <- x[i_season,1] + gs <- rle(ifelse(swp.season >= opts[["germination.swp.surface"]], 1, 0)) + es <- rle(ifelse(swp.season >= opts[["establishment.swp.surface"]] , 1, 0)) + + reg <- 0 + # get vector of establishment starts and ends + establishment.start.dos <- establishment.end.dos <- NULL + for(esi in 1:length(es$lengths)){ + if(es$lengths[esi] >= opts[["establishment.duration"]] & es$values[esi] > 0){ + establishment.start.dos <- c(establishment.start.dos, ifelse(esi == 1, 1, cumsum(es$lengths)[esi-1]+1)) + establishment.end.dos <- c(establishment.end.dos, cumsum(es$lengths)[esi]) + } + } + + # check if any germination period matches up with an establishment period + if(length(establishment.end.dos) > 0){ + for(gsi in 1:length(gs$lengths)){ + if(gs$lengths[gsi] >= opts[["germination.duration"]] & gs$values[gsi] > 0){ + germination.start.dos <- ifelse(gsi == 1, 1, cumsum(gs$lengths)[gsi-1]+1) + germination.end.dos <- cumsum(gs$lengths)[gsi] + if( any( ((germination.start.dos + opts[["germination.duration"]] >= establishment.start.dos) & + (germination.start.dos + opts[["germination.duration"]] + opts[["establishment.duration"]] <= establishment.end.dos)) | + ((germination.end.dos + opts[["establishment.swp.surface"]] >= establishment.start.dos) & + (germination.end.dos + opts[["establishment.swp.surface"]] + opts[["establishment.duration"]] <= establishment.end.dos)) ) ){ + reg <- reg + 1 + } + } + } + } + + } else { + reg <- 0 + } + + reg > 0 +} + #' Calculates temperate dryland criteria #' @@ -953,6 +1076,16 @@ update_datasource_masterfield <- function(MMC, sim_size, SWRunInformation, fname SWRunInformation } +season_diff_NS <- function(simTime2, t_unit = "day") { + switch(t_unit, + day = , + days = simTime2$doy_ForEachUsedDay_NSadj[1] - simTime2$doy_ForEachUsedDay[1], + month = , + months = simTime2$month_ForEachUsedMonth_NSadj[1] - simTime2$month_ForEachUsedMonth[1], + + stop("'season_diff_NS': unknown time unit")) +} + #' Check availability and version of a command-line tool #' @@ -1007,4 +1140,4 @@ check_cltool <- function(tool, v_expected, stop_on_mismatch = FALSE) { invisible(TRUE) } -check_cltool <- memoise::memoise(check_cltool) +check_cltool <- memoise::memoise(check_cltool) \ No newline at end of file diff --git a/R/OutputAggregation.R b/R/OutputAggregation.R new file mode 100644 index 00000000..2cef2f28 --- /dev/null +++ b/R/OutputAggregation.R @@ -0,0 +1,276 @@ +print('Ran OutputAggregation file\n') +#---------------------------------------------------------------------------------------# + +#------CODE developed and written by +# - Daniel R Schlaepfer (dschlaep@uwyo.edu, drs): 2009-2016 +#for contact and further information see also: sites.google.com/site/drschlaepfer + +#------DISCLAIMER: This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +#---------------------------------------------------------------------------------------# + +#' Function to produce an aggregating function +#' +#' @param agg_fun_defs A data.frame with two columns: 'id' of type integer and 'agg_fun' +#' of type character. See \code{Details}. +#' @param circular A logical value. If \code{TRUE} then circular functions are used. +#' +#' @details +#' The aggregation functions are determined based on the entries in the column 'agg_fun'. +#' Currently, implemented functions are \code{mean}, \code{sd}, \code{quantile}, +#' \code{median}, \code{mad}, and \code{yearly}, respectively, their circular counterparts. +#' The probability values, e.g., \code{X1, X2}, at which quantiles are calculated, +#' are entered as "quantile_X1", and "quantile_X2". \code{yearly} will return the values +#' of each year, i.e., \code{x} without aggregation (across years). +#' The column 'id' is the identifier which connects the aggregated output to the table +#' 'aggregating_functions' of the output database. +#' +#' @return +#' A function/closure with arguments \code{x, na.rm, omit_yearly, return_ids, ...} or, +#' if \code{circular}, \code {x, int, na.rm, omit_yearly, return_ids, ...}. +#' If \code{omit_yearly}, then the output of the \code{yearly} function is not returned. +#' If \code{return_ids}, then the function returns a data.frame object +#' with two columns \code{aggfun_id} and \code{x}. The column \code{aggfun_id} contains +#' the values of the identifier 'id' and the column \code{x} contains the returned +#' value(s) of the aggregating functions applied to the input argument \code{x}. +#' If \code{return_ids} is \code{FALSE}, then the function returns what would be +#' otherwise be the column \code{x} as numeric vector. +#' +#' @examples +#' d <- data.frame(id = 1:3, agg_fun = c("mean", "quantile_0.5", "median")) +#' f <- create_aggregation_function(d) +#' x <- c(1:10, 1, NA) +#' f(x, na.rm = TRUE) + +create_aggregation_function <- function(agg_fun_defs, circular = FALSE) { + envf <- new.env() + + #--- Create list of functions to be applied to data + listf <- list() + + # Aggregation: mean + itemp <- grepl("mean", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) + listf <- c(listf, + list(mean = list( + fun = if (circular) { + function(x, int, na.rm = FALSE, ...) circ_mean(x, int = int, na.rm = na.rm) + } else { + function(x, na.rm = FALSE, ...) mean(x, na.rm = na.rm, ...) + }, + aggfun_id = agg_fun_defs[itemp, "id"]))) + + # Aggregation: sd + itemp <- grepl("SD", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) + listf <- c(listf, + list(SD = list( + fun = if (circular) { + function(x, int, na.rm = FALSE, ...) circ_sd(x, int = int, na.rm = na.rm) + } else { + function(x, na.rm = FALSE, ...) stats::sd(x, na.rm = na.rm) + }, + aggfun_id = agg_fun_defs[itemp, "id"]))) + + # Aggregation: quantiles + itemp <- grepl("quantile", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) { + probs <- grep("quantile", agg_fun_defs[, "agg_fun"], ignore.case = TRUE, value = TRUE) + probs <- as.numeric(gsub("quantile_", "", probs, fixed = TRUE)) + assign("probs", probs, envir = envf) + + if (circular) { + tempf <- function(x, int, na.rm = FALSE, ...) {} + body(tempf) <- substitute({ + fargs <- list(x = x, int = int, na.rm = na.rm, probs = probs) + dots <- list(...) + if (!any("type" == names(dots))) + dots[["type"]] <- 8 + fargs <- c(fargs, dots) + do.call("circ_quantile", args = fargs) + }, envf) + } else { + tempf <- function(x, na.rm = FALSE, ...) {} + body(tempf) <- substitute({ + fargs <- list(x = x, na.rm = na.rm, probs = probs) + dots <- list(...) + if (!any("type" == names(dots))) + dots[["type"]] <- 8 + fargs <- c(fargs, dots) + do.call(stats::quantile, args = fargs) + }, envf) + } + + listf <- c(listf, + list(quantile = list( + fun = tempf, + aggfun_id = agg_fun_defs[itemp, "id"]))) + } + + # Aggregation: median + itemp <- grepl("median", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) + listf <- c(listf, + list(median = list( + fun = if (circular) { + function(x, int, na.rm = FALSE, ...) circ_median(x, int = int, na.rm = na.rm) + } else { + function(x, na.rm = FALSE, ...) stats::median(x, na.rm = na.rm) + }, + aggfun_id = agg_fun_defs[itemp, "id"]))) + + # Aggregation: mad + itemp <- grepl("mad", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) + listf <- c(listf, + list(mad = list( + fun = if (circular) { + function(x, int, na.rm = FALSE, ...) circ_mad(x, int = int, na.rm = na.rm) + } else { + function(x, na.rm = FALSE, ...) stats::mad(x, na.rm = na.rm) + }, + aggfun_id = agg_fun_defs[itemp, "id"]))) + + # Aggregation: yearly + yearly_id <- -1L + itemp <- grepl("yearly", agg_fun_defs[, "agg_fun"], ignore.case = TRUE) + if (any(itemp)) { + yearly_id <- agg_fun_defs[itemp, "id"] + + listf <- c(listf, + list(yearly = list( + fun = function(x, na.rm = FALSE, ...) x, + aggfun_id = yearly_id))) + } + assign("yearly_id", yearly_id, envir = envf) + + # Copy list of aggregation functions to environment used in substitute call to create closure + assign("listf", listf, envir = envf) + + + #---Create the function/closure + # create list of values quoted for input into enviornment and set up the skelaton for the function f in order to allow for function manipulation + # 1) part: formals, i.e. input arguments + if (circular) { + f <- function(x, int, na.rm = FALSE, omit_yearly = FALSE, return_ids = FALSE, ...) {} + fargs <- quote(list(x = x, int = int, na.rm = na.rm, ...)) + } else { + f <- function(x, na.rm = FALSE, omit_yearly = FALSE, return_ids = FALSE, ...) {} + fargs <- quote(list(x = x, na.rm = na.rm, ...)) + } + assign("fargs", fargs, envir = envf) + # 2) part: environment; make it empty to have as little baggage as possible + environment(f) <- new.env() + # 3) part: body + # change the function f's body + body(f) <- substitute({ + # apply a function to every element in listf and save the resulting list as res + res <- lapply(listf, function(f) { + agg <- do.call(f$fun, args = fargs) + id <- if (length(f$aggfun_id) == 1) { + rep(f$aggfun_id, length(agg)) + } else { + f$aggfun_id + } + list(aggfun_id = id, x = agg) + }) + + out <- unlist(lapply(res, function(x) x$x), use.names = FALSE) + if (omit_yearly || return_ids) { + aggfun_ids <- unlist(lapply(res, function(x) x$aggfun_id)) # apply aggfunction to all elements in list then flatten list + } + + if (omit_yearly && yearly_id > 0) { + temp <- !(yearly_id == aggfun_ids) + out <- out[temp] + aggfun_ids <- aggfun_ids[temp] + } + + if (return_ids) { + cbind(aggfun_id = aggfun_ids, x = out) + } else { + out + } + + }, envf) + + compiler::cmpfun(f) +} + + +setup_aggregations <- function(SFSW2_prj_meta) { + agg_funs <- SFSW2_prj_meta[["req_out"]][["agg_funs"]] + agg_fun_options <- SFSW2_prj_meta[["req_out"]][["agg_fun_options"]] + agg_years <- SFSW2_prj_meta[["sim_time"]][["agg_years"]] + + aggs <- list() + + # Aggregation functions + agg_fun_names1 <- names(agg_funs)[as.logical(agg_funs[sapply(agg_funs, is.logical)])] + if (length(agg_fun_names1) == 0) + stop("There must be at least one aggregating function included in 'agg_funs'") + + it <- which("quantile" == agg_fun_names1) + if (length(it) > 0) { + probs <- agg_fun_options[["quantile"]][["probs"]] + if (length(probs) == 0 || any(probs < 0) || any(probs > 1) || !is.finite(probs)) + stop("If the aggregating function 'quantile' is selected, then the 'probs' entry ", + "of the 'quantile' options in 'agg_fun_options' must be set correctly.") + + agg_fun_names <- c( + if (it > 1) agg_fun_names1[1:(it - 1)], + paste("quantile", format(probs), sep = "_"), + if (it < length(agg_fun_names1)) agg_fun_names1[(it + 1):length(agg_fun_names1)] + ) + } else { + agg_fun_names <- agg_fun_names1 + } + + agg_fun_types <- rep(NA, length(agg_fun_names)) + agg_fun_types[grepl("yearly", agg_fun_names, ignore.case = TRUE)] <- "yearly" + agg_fun_types[grepl("(mean)|(median)", agg_fun_names, ignore.case = TRUE)] <- "central" + agg_fun_types[grepl("(sd)|(mad)|(quantile)", agg_fun_names, ignore.case = TRUE)] <- "variation" + itemp <- grep("quantile", agg_fun_names, ignore.case = TRUE) + if (length(itemp) > 0) { + probs <- as.numeric(gsub("quantile_", "", agg_fun_names[itemp], fixed = TRUE)) + i50 <- which(abs(probs - 0.5) < tol) + if (length(i50) > 0) { + agg_fun_types[itemp[i50]] <- "central" + } + } + + aggs[["agg_fun_defs"]] <- data.frame(id = seq_len(agg_fun_names), + agg_fun = agg_fun_names, type = agg_fun_types) + + # Prepare aggregation functions + aggs[["agg_fun"]] <- create_aggregation_function(aggs[["agg_fun_defs"]], + circular = FALSE) + aggs[["agg_fun_circular"]] <- create_aggregation_function(aggs[["agg_fun_defs"]], + circular = TRUE) + + # Aggregation time windows + agg_years_bad <- sapply(agg_years, function(x) any(!(diff(x) == 1))) + if (any(agg_years_bad)) + stop("Aggregation time windows must be continuous sequences of years; ", + "check: ", paste0(names(agg_years)[agg_years_bad], collapse = ", ")) + agg_years_bad <- sapply(agg_years, function(x) + all(sapply(SFSW2_prj_meta[["sim_time"]][["sim_windows"]], function(sw) + length(setdiff(x, sw)) > 0))) + if (any(agg_years_bad)) + stop("Aggregation time windows are set outside simulation time windows; ", + "check: ", paste0(names(agg_years)[agg_years_bad], collapse = ", ")) + + # column names of 'agg_windows' are used in part 2 to set up table + # 'aggregation_timewindows' of outputDB + aggs[["agg_windows"]] <- as.data.frame(matrix(NA, nrow = length(agg_years), ncol = 4, + dimnames = list(NULL, c("id", "label", "agg_start", "agg_end")))) + aggs[["agg_windows"]][, "id"] <- seq_len(agg_years) + aggs[["agg_windows"]][, "label"] <- names(agg_years) + aggs[["agg_windows"]][, c("agg_start", "agg_end")] <- t(sapply(agg_years, function(x) + range(x))) + + aggs +} + + diff --git a/R/OutputDatabase.R b/R/OutputDatabase.R index f178a0e3..0132e498 100644 --- a/R/OutputDatabase.R +++ b/R/OutputDatabase.R @@ -1,3 +1,4 @@ +print('Ran OutputDatabase file') #---------------------------------------------------------------------------------------# #------CODE developed and written by @@ -52,7 +53,7 @@ getIDs_from_db_Pids <- function(dbname, Pids) { #' @export dbOutput_ListDesignTables <- function() c("runs", "sqlite_sequence", "header", "run_labels", "scenario_labels", "sites", "experimental_labels", "treatments", "simulation_years", - "weatherfolders") + "weatherfolders", "aggregating_functions", "aggregating_timewindows", "Meta") #' List the available output tables of dbOutput @@ -1011,6 +1012,20 @@ check_outputDB_completeness <- function(SFSW2_prj_meta, opt_parallel, opt_behave dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) { + stopifnot(DBI::dbIsValid(con_dbOut)) + + #############meta-data table######################### + # Meta information + DBI::dbExecute(con_dbOut, "CREATE TABLE Meta (Desc TEXT PRIMARY KEY, Value TEXT)") + rs <- DBI::dbSendStatement(con_dbOut, "INSERT INTO Meta VALUES(:Desc, :Value)") + DBI::dbBind(rs, param = list( + Desc = c("Version", "DateTime_Creation"), + Value = c(SFSW2_glovars[["v_dbOutput"]], format(Sys.time(), usetz = TRUE)))) + res <- DBI::dbFetch(rs) + DBI::dbClearResult(rs) + + + #############weatherfolders table######################### DBI::dbExecute(con_dbOut, paste("CREATE TABLE", "weatherfolders(id INTEGER PRIMARY KEY AUTOINCREMENT, folder TEXT UNIQUE NOT NULL)")) @@ -1109,7 +1124,7 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) LWF_index$id <- getSiteIds(con_dbOut, LWF_index$folder) #if there are any NA's we need to add those to the weatherfolder db table and # update its id in our lookuptable for weatherfolder - if (any(is.na(LWF_index$id))) { + if (anyNA(LWF_index$id)) { #get max id from weatherfolders table temp <- is.na(LWF_index$id) weatherfolders_index <- as.numeric(DBI::dbGetQuery(con_dbOut, @@ -1432,6 +1447,41 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) ################################################## + ##############agg_fun table############### + stopifnot(c("agg_fun", "type") %in% names(SFSW2_prj_meta[["aggs"]][["agg_fun_defs"]])) + + sql <- paste("CREATE TABLE aggregating_functions(id INTEGER PRIMARY KEY AUTOINCREMENT,", + "agg_fun TEXT UNIQUE NOT NULL, type TEXT)") + RSQLite::dbExecute(con_dbOut, sql) + + sql <- "INSERT INTO aggregating_functions VALUES(NULL, :agg_fun, :type)" + rs <- DBI::dbSendStatement(con_dbOut, sql) + DBI::dbBind(rs, param = list( + agg_fun = SFSW2_prj_meta[["aggs"]][["agg_fun_defs"]][, "agg_fun"], + type = SFSW2_prj_meta[["aggs"]][["agg_fun_defs"]][, "type"])) + res <- DBI::dbFetch(rs) + DBI::dbClearResult(rs) + ################################################## + + ##############aggregating time windows table############### + stopifnot(c("label", "agg_start", "agg_end") %in% names(SFSW2_prj_meta[["aggs"]][["agg_windows"]])) + + sql <- paste("CREATE TABLE aggregating_timewindows(id INTEGER", + "PRIMARY KEY AUTOINCREMENT, label TEXT UNIQUE NOT NULL, agg_start INTEGER,", + "agg_end INTEGER)") + RSQLite::dbExecute(con_dbOut, sql) + + sql <- "INSERT INTO aggregating_timewindows VALUES(NULL, :label, :agg_start, :agg_end)" + rs <- DBI::dbSendStatement(con_dbOut, sql) + DBI::dbBind(rs, param = list( + label = SFSW2_prj_meta[["aggs"]][["agg_windows"]][, "label"], + agg_start = SFSW2_prj_meta[["aggs"]][["agg_windows"]][, "agg_start"], + agg_end = SFSW2_prj_meta[["aggs"]][["agg_windows"]][, "agg_end"])) + res <- DBI::dbFetch(rs) + DBI::dbClearResult(rs) + ################################################## + + #####################runs table################### # Note: invariant to 'include_YN', i.e., do not subset 'SFSW2_prj_inputs[["SWRunInformation"]]' DBI::dbExecute(con_dbOut, paste("CREATE TABLE", @@ -1536,19 +1586,31 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) ifelse(opt_agg[["Tmax_crit_C"]] > 0, "Pos", "")), abs(opt_agg[["Tmax_crit_C"]]), "C") fieldtag_Tmean_crit_C <- paste0(ifelse(opt_agg[["Tmean_crit_C"]] < 0, "Neg", ifelse(opt_agg[["Tmean_crit_C"]] > 0, "Pos", "")), abs(opt_agg[["Tmean_crit_C"]]), "C") + fieldtag_drysoils <- paste0("AtLeast", opt_agg[["define_period_min_cont_days"]], "Days") #0. if (aon$input_SoilProfile) { - temp <- paste0("SWinput.Soil.", c("maxDepth_cm", "soilLayers_N", "topLayers.Sand_fraction", "bottomLayers.Sand_fraction", "topLayers.Clay_fraction", "bottomLayers.Clay_fraction", "topLayers.Gravel_fraction", "bottomLayers.Gravel_fraction", "deltaX")) + temp <- paste0("SWinput.Soil.", + c("maxDepth_cm", "soilLayers_N", + "topLayers.Sand_fraction", "bottomLayers.Sand_fraction", + "topLayers.Clay_fraction", "bottomLayers.Clay_fraction", + "topLayers.Gravel_fraction", "bottomLayers.Gravel_fraction", + "deltaX")) } #1. if (aon$input_FractionVegetationComposition) { - temp <- c(temp, paste0("SWinput.Composition.", c("Grasses", "Shrubs", "Trees", "Forbs", "BareGround", "C3ofGrasses", "C4ofGrasses", "AnnualsofGrasses"), "_fraction_const")) + temp <- c(temp, paste0("SWinput.Composition.", + c("Grasses", "Shrubs", "Trees", "Forbs", "BareGround", + "C3ofGrasses", "C4ofGrasses", "AnnualsofGrasses"), + "_fraction_const")) } #2. if (aon$input_VegetationBiomassMonthly) { - temp <- c(temp, paste0(c(rep("Grass", 36), rep("Shrub", 36), rep("Tree", 36), rep("Forb", 36)), "_", c(rep("Litter", 12), rep("TotalBiomass", 12), rep("LiveBiomass", 12)), "_m", SFSW2_glovars[["st_mo"]], "_gPERm2")) + temp <- c(temp, paste0(c(rep("Grass", 36), rep("Shrub", 36), rep("Tree", 36), rep("Forb", 36)), + "_", + c(rep("Litter", 12), rep("TotalBiomass", 12), rep("LiveBiomass", 12)), + "_m", st_mo, "_gPERm2")) } #2b if (aon$input_VegetationBiomassTrends) { @@ -1557,12 +1619,15 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) } #3. if (aon$input_VegetationPeak) { - temp <- c(temp, paste0("SWinput.PeakLiveBiomass_", c("month_mean", "months_duration"))) + temp <- c(temp, paste0("SWinput.PeakLiveBiomass_", + c("month_mean","months_duration"))) } #4. if (aon$input_Phenology) { - temp <- c(temp, paste0("SWinput.GrowingSeason.", c("Start", "End"), "_month_const")) + temp <- c(temp, paste0("SWinput.GrowingSeason.", + c("Start", "End"), + "_month_const")) } #5. if (aon$input_TranspirationCoeff) { @@ -1590,13 +1655,27 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) ltemp <- paste0("L", formatC(SFSW2_glovars[["slyrs_ids"]], width = 2, format = "d", flag = "0")) } - temp <- c(temp, c(paste0("SWinput.", rep(vtemp <- c("Grass", "Shrub", "Tree", "Forb"), each = SFSW2_glovars[["slyrs_maxN"]]), ".TranspirationCoefficients.", rep(ltemp, times = 4), "_fraction"), paste0("SWinput.", rep(vtemp, each = 2), ".TranspirationCoefficients.", rep(c("topLayer", "bottomLayer"), times = 4), "_fraction"))) + vtemp <- c("Grass", "Shrub", "Tree","Forb") + temp <- c(temp, c(paste0("SWinput.", + rep(vtemp, each = SFSW2_glovars[["slyrs_maxN"]]), + ".TranspirationCoefficients.", + rep(ltemp, times = length(vtemp)), + "_fraction"), + paste0("SWinput.", rep(vtemp, each = 2), + ".TranspirationCoefficients.", + rep(c("topLayer", "bottomLayer"), times = length(vtemp)), + "_fraction"))) } #6. if (aon$input_ClimatePerturbations) { - temp <- c(temp, paste0(rep(paste0("SWinput.ClimatePerturbations.", c("PrcpMultiplier.m", "TmaxAddand.m", "TminAddand.m")), each = 12), SFSW2_glovars[["st_mo"]], rep(c("_none", "_C", "_C"), each = 12), "_const")) + temp <- c(temp, paste0(rep(paste0("SWinput.ClimatePerturbations.", + c("PrcpMultiplier.m", "TmaxAddand.m", "TminAddand.m")), + each = 12), + SFSW2_glovars[["st_mo"]], + rep(c("_none", "_C", "_C"), each = 12), + "_const")) } #6b if (aon$input_CO2Effects) { @@ -1608,22 +1687,25 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #7. if (aon$yearlyTemp) { - temp <- c(temp, "MAT_C_mean") + temp <- c(temp, "MAT_C") } #8. if (aon$yearlyPPT) { - temp <- c(temp, c("MAP_mm_mean", "SnowOfPPT_fraction_mean")) + temp <- c(temp, c("MAP_mm", "SnowOfPPT_fraction")) } #9. if (aon$dailySnowpack) { - temp <- c(temp, "RainOnSnowOfMAP_fraction_mean") + temp <- c(temp, "RainOnSnowOfMAP_fraction") } #10. if (aon$dailySnowpack) { - temp <- c(temp, paste0("Snowcover.NSadj.", c("Peak_doy", "LongestContinuous.FirstDay_doy", "LongestContinuous.LastDay_doy", "LongestContinuous.Duration_days", "Total_days", "Peak_mmSWE", "SnowCover.FirstDay_doy", "SnowCover.LastDay_doy"), "_mean")) + temp <- c(temp, paste0("Snowcover.NSadj.", + c("Peak_doy", "LongestContinuous.FirstDay_doy", "LongestContinuous.LastDay_doy", + "LongestContinuous.Duration_days", "Total_days", + "Peak_mmSWE", "SnowCover.FirstDay_doy", "SnowCover.LastDay_doy"))) } #11 if (aon$dailyFrostInSnowfreePeriod) { @@ -1642,11 +1724,11 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) } #12 if (aon$dailyHotDays) { - temp <- c(temp, paste0("TmaxAbove", fieldtag_Tmax_crit_C, "_days_mean")) + temp <- c(temp, paste0("TmaxAbove", fieldtag_Tmax_crit_C, "_days")) } #12b if (aon$dailyWarmDays) { - temp <- c(temp, paste0("TmeanAbove", fieldtag_Tmean_crit_C, "_days_mean")) + temp <- c(temp, paste0("TmeanAbove", fieldtag_Tmean_crit_C, "_days")) } #12c if (aon$dailyColdDays) { @@ -1659,67 +1741,88 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #13 if (aon$dailyPrecipitationEventSizeDistribution) { bins.summary <- (0:6) * opt_agg[["bin_prcp_mm"]] - temp <- c(temp, paste0("PrcpEvents.Annual", c("_count", paste0(".SizeClass", bins.summary, "to", c(bins.summary[-1], "Inf"), "mm_fraction")), "_mean", sep = "")) + temp <- c(temp, paste0("PrcpEvents.Annual", + c("_count", + paste0(".SizeClass", bins.summary, "to", + c(bins.summary[-1], "Inf"), + "mm_fraction")))) } #15 if (aon$yearlyPET) { - temp <- c(temp, "PET_mm_mean") + temp <- c(temp, "PET_mm") } #16 if (aon$monthlySeasonalityIndices) { - temp <- c(temp, paste0("Seasonality.monthly", c("PETandSWPtopLayers", "PETandSWPbottomLayers", "TandPPT"), "_PearsonCor_mean")) + temp <- c(temp, paste0("Seasonality.monthly", + c("PETandSWPtopLayers", "PETandSWPbottomLayers", "TandPPT"), + "_PearsonCor_mean")) } #---Aggregation: Climatic dryness #17 if (aon$yearlymonthlyTemperateDrylandIndices) { - temp <- c(temp, paste0(c(paste0(temp <- c("UNAridityIndex", "TrewarthaD", "TemperateDryland12"), ".Normals"), paste0(temp, ".Annual")), rep(c("_none", "_TF", "_TF"), times = 2), "_mean")) + temp2 <- c("UNAridityIndex", "TrewarthaD", "TemperateDryland12") + temp <- c(temp, paste0(c(paste0(temp2, ".Normals"), + paste0(temp2, ".Annual")), + "_", + rep(c("none", "TF", "TF"), times = 2))) } #18 if (aon$yearlyDryWetPeriods) { - temp <- c(temp, paste0(c("Dry", "Wet"), "SpellDuration.90PercentEvents.ShorterThan_years_quantile0.9")) + temp <- c(temp, paste0("SpellsOfYears_", + c("Below", "Above"), + "MeanAnnualPrecip_Duration_years")) } #19 if (aon$dailyWeatherGeneratorCharacteristics) { - temp <- c(temp, paste0(rep(c("WetSpellDuration", "DrySpellDuration", "TempAir.StDevOfDailyValues"), each = 12), ".m", SFSW2_glovars[["st_mo"]], rep(c("_days", "_days", "_C"), each = 12), "_mean")) + temp2 <- c("WetSpellDuration", "DrySpellDuration", "TempAir.StDevOfDailyValues") + temp <- c(temp, paste0(rep(temp2, each = 12), + ".m", SFSW2_glovars[["st_mo"]], "_", + rep(c("days", "days", "C"), each = 12))) } #20 if (aon$dailyPrecipitationFreeEventDistribution) { bins.summary <- (0:3) * opt_agg[["bin_prcpfree_days"]] - temp <- c(temp, paste0("DrySpells.Annual", c("_count", paste0(".SizeClass", bins.summary+1, "to", c(bins.summary[-1], "365"), "days_fraction")), "_mean")) + temp <- c(temp, paste0("DrySpells.Annual", + c("_count", + paste0(".SizeClass", bins.summary + 1, "to", + c(bins.summary[-1], "365"), + "days_fraction")))) } #21 if (aon$monthlySPEIEvents) { - binSPEI_m <- c(1, 12, 24, 48) #months - probs <- c(0.025, 0.5, 0.975) - for (iscale in seq_along(binSPEI_m)) { - rvec <- rep(NA, times = 4 * length(probs)) - temp <- c(temp, paste0(rep(paste0("SPEI.", binSPEI_m[iscale], "monthsScale."), length(rvec)), "Spell", rep(c("Pos.", "Neg."), each = 2*length(probs)), rep(rep(c("Duration_months", "Value_none"), each = length(probs)), times = 2), "_quantile", rep(probs, times = 4))) - - } + temp <- c(temp, paste0(paste0("SPEI.", + rep(opt_agg[["SPEI_tscales_months"]], each = 4), "monthsScale.", + "Spell", rep(c("Pos.", "Neg."), each = 2)), + c("Duration_months", "IntensityValue_none"))) } #---Aggregation: Climatic control #22 if (aon$monthlyPlantGrowthControls) { - temp <- c(temp, paste0("NemaniEtAl2003.NPPControl.", c("Temperature", "Water", "Radiation"), "_none_mean")) + temp <- c(temp, paste0("NemaniEtAl2003.NPPControl.", + c("Temperature", "Water", "Radiation"), + "_fraction")) } #23 if (aon$dailyC4_TempVar) { - temp <- c(temp, paste0("TeeriEtAl1976.NSadj.", c("TempAirMin.7thMonth_C", "FreezeFreeGrowingPeriod_days", "AccumDegreeDaysAbove65F_daysC"), "_mean")) + temp <- c(temp, paste0("TeeriEtAl1976.NSadj.", + c("TempAirMin.7thMonth_C", + "FreezeFreeGrowingPeriod_days", + "AccumDegreeDaysAbove65F_daysC"))) } #24 if (aon$dailyDegreeDays) { - temp <- c(temp, paste0("DegreeDays.Base", opt_agg[["Tbase_DD_C"]], "C.dailyTmean_Cdays_mean")) + temp <- c(temp, paste0("DegreeDays.Base", opt_agg[["Tbase_DD_C"]], "C.dailyTmean_Cdays")) } #25 @@ -1733,12 +1836,12 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #27.0 if (aon$yearlyAET) { - temp <- c(temp, "AET_mm_mean") + temp <- c(temp, "AET_mm") } #27 if (aon$yearlyWaterBalanceFluxes) { - temp <- c(temp, paste0(c(paste0(c("Rain", "Rain.ReachingSoil", "Snowfall", + temp <- c(temp, c(paste0(c("Rain", "Rain.ReachingSoil", "Snowfall", "Snowmelt", "Snowloss", "Interception.Total", "Interception.Vegetation", "Interception.Litter", "Infiltration", "Runoff", "Runon", "Evaporation.Total", "Evaporation.SurfaceWater", "Evaporation.InterceptedByVegetation", @@ -1748,49 +1851,61 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) "HydraulicRedistribution.TopToBottom", "Percolation.TopToBottom", "DeepDrainage", "SWC.StorageChange"), "_mm"), "TranspirationBottomToTranspirationTotal_fraction", "TtoAET", "EStoAET", - "AETtoPET", "TtoPET", "EStoPET"), "_mean")) + "AETtoPET", "TtoPET", "EStoPET")) } #27.2 if (aon$dailySoilWaterPulseVsStorage) { - temp <- c(temp, paste0("WaterExtractionSpell_MeanContinuousDuration_L", SFSW2_glovars[["slyrs_ids"]], "_days_mean"), - paste0("WaterExtractionSpell_AnnualSummedExtraction_L", SFSW2_glovars[["slyrs_ids"]], "_mm_mean")) + temp <- c(temp, + paste0("WaterExtractionSpell_MeanContinuousDuration_L", lmax, "_days"), + paste0("WaterExtractionSpell_AnnualSummedExtraction_L", lmax, "_mm")) } ##############################################################---Aggregation: Daily extreme values---############################################################## #28 if (aon$dailyTranspirationExtremes) { - temp <- c(temp, paste0("Transpiration.", c("DailyMax", "DailyMin"), "_mm_mean"), paste0("Transpiration.", c("DailyMax", "DailyMin"), "_doy_mean")) + temp <- c(temp, paste0("Transpiration.", c("DailyMax", "DailyMin"), "_mm"), + paste0("Transpiration.", c("DailyMax", "DailyMin"), "_doy")) } #29 if (aon$dailyTotalEvaporationExtremes) { - temp <- c(temp, paste0("Evaporation.Total.", c("DailyMax", "DailyMin"), "_mm_mean"), paste0("Evaporation.Total.", c("DailyMax", "DailyMin"), "_doy_mean")) + temp <- c(temp, paste0("Evaporation.Total.", c("DailyMax", "DailyMin"), "_mm"), + paste0("Evaporation.Total.", c("DailyMax", "DailyMin"), "_doy")) } #30 if (aon$dailyDrainageExtremes) { - temp <- c(temp, paste0("DeepDrainage.", c("DailyMax", "DailyMin"), "_mm_mean"), paste0("DeepDrainage.", c("DailyMax", "DailyMin"), "_doy_mean")) + temp <- c(temp, paste0("DeepDrainage.", c("DailyMax", "DailyMin"), "_mm"), + paste0("DeepDrainage.", c("DailyMax", "DailyMin"), "_doy")) } #31 if (aon$dailyInfiltrationExtremes) { - temp <- c(temp, paste0("Infiltration.", c("DailyMax", "DailyMin"), "_mm_mean"), paste0("Infiltration.", c("DailyMax", "DailyMin"), "_doy_mean")) + temp <- c(temp, paste0("Infiltration.", c("DailyMax", "DailyMin"), "_mm"), + paste0("Infiltration.", c("DailyMax", "DailyMin"), "_doy")) } #32 if (aon$dailyAETExtremes) { - temp <- c(temp, paste0("AET.", c("DailyMax", "DailyMin"), "_mm_mean"), paste0("AET.", c("DailyMax", "DailyMin"), "_doy_mean")) + temp <- c(temp, paste0("AET.", c("DailyMax", "DailyMin"), "_mm"), + paste0("AET.", c("DailyMax", "DailyMin"), "_doy")) } #33 if (aon$dailySWPextremes) { - temp <- c(temp, paste0(paste0("SWP.", rep(c("topLayers.", "bottomLayers."), each = 2), rep(c("DailyMax", "DailyMin"), times = 2)), rep(c("_MPa_mean", "_doy_mean"), each = 4))) + temp <- c(temp, paste0("SWP.", + rep(c("topLayers.", "bottomLayers."), each = 2), + rep(c("DailyMax", "DailyMin"), times = 2), + rep(c("_MPa", "_doy"), each = 4))) } #34 if (aon$dailyRechargeExtremes) { - temp <- c(temp, paste0(paste0("RelRecharge.", rep(c("topLayers.", "bottomLayers."), each = 2), rep(c("DailyMax", "DailyMin"), times = 2)), rep(c("_Fraction_mean", "_doy_mean"), each = 4))) + temp <- c(temp, paste0("RelRecharge.", + rep(c("topLayers.", "bottomLayers."), each = 2), + rep(c("DailyMax", "DailyMin"), times = 2), + rep(c("_Fraction", "_doy"), each = 4))) } @@ -1852,8 +1967,8 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) "Days_at50cm_GT5C_prob", "Days_at50cm_GT8C_prob", "Days_MCS_AllWet_prob", "COND1_MCS_AllDry_and_at50cm_GT5C_prob", # COND1_Test - "COND2_MCS_AnyWet_and_at50cm_GT8C_prob"), # COND2_Test - "_mean")))) + "COND2_MCS_AnyWet_and_at50cm_GT8C_prob") # COND2_Test + )))) } if (aon$dailyNRCS_SoilMoistureTemperatureRegimes) { # abbreviations: @@ -1880,17 +1995,21 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #35.2 if (aon$dailyWetDegreeDays) { - temp <- c(temp, paste0("WetDegreeDays.SWPcrit", rep(fieldtag_SWPcrit_MPa, each = 3), rep(c(".topLayers", ".bottomLayers", ".anyLayer"), times = opt_agg[["SWPcrit_N"]]), "_Cdays_mean")) + temp <- c(temp, paste0("WetDegreeDays.SWPcrit", + rep(fieldtag_SWPcrit_MPa, times = 3), + rep(c(".topLayers", ".bottomLayers", ".anyLayer"), + each = opt_agg[["SWPcrit_N"]]), "_Cdays")) } #35.3 if (aon$dailyThermalDrynessStartEnd) { temp <- c(temp, paste0("ThermalDrySoilPeriods_SWPcrit", - rep(fieldtag_SWPcrit_MPa, each = 4), - "_NSadj_", - rep(c("topLayers", "bottomLayers"), each = 2), "_", - rep(c("Start", "End"), times = 2), - "_LongestContinuous_days_mean")) + rep(fieldtag_SWPcrit_MPa, each = 2), + "_NSadj_", + rep(c("topLayers", "bottomLayers"), + each = opt_agg[["SWPcrit_N"]] * 2), "_", + c("Start", "End"), + "_LongestContinuous_days")) } #35.4 @@ -1901,21 +2020,43 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) each = length(opt_agg[["Tmean_crit_C"]]) * opt_agg[["SWPcrit_N"]]), "_Tcrit", rep(fieldtag_Tmean_crit_C, times = opt_agg[["SWPcrit_N"]]), "_SWPcrit", rep(fieldtag_SWPcrit_MPa, each = length(opt_agg[["Tmean_crit_C"]])), - "_Count_days_mean")) + "_Count_days")) } #36 if (aon$monthlySWPdryness) { - temp <- c(temp, paste0("DrySoilPeriods.SWPcrit", rep(fieldtag_SWPcrit_MPa, times = 2), ".NSadj.", rep(c("topLayers", "bottomLayers"), each = opt_agg[["SWPcrit_N"]]), ".Duration.Total_months_mean"), - paste0("DrySoilPeriods.SWPcrit", rep(fieldtag_SWPcrit_MPa, times = 2), ".NSadj.", rep(c("topLayers", "bottomLayers"), each = opt_agg[["SWPcrit_N"]]), ".Start_month_mean")) + temp <- c(temp, paste0("DrySoilPeriods.SWPcrit", + rep(fieldtag_SWPcrit_MPa, times = 2), ".NSadj.", + rep(c("topLayers", "bottomLayers"), each = opt_agg[["SWPcrit_N"]]), + ".Duration.Total_months"), + paste0("DrySoilPeriods.SWPcrit", + rep(fieldtag_SWPcrit_MPa, times = 2), ".NSadj.", + rep(c("topLayers", "bottomLayers"), each = opt_agg[["SWPcrit_N"]]), + ".Start_month")) } #37 if (aon$dailySWPdrynessANDwetness) { - temp <- c(temp, paste0(rep(c("WetSoilPeriods", "DrySoilPeriods"), each = 8), ".SWPcrit", rep(fieldtag_SWPcrit_MPa, each = 16), ".NSadj.", c(rep(c("topLayers", "bottomLayers"), times = 4), rep(rep(c("topLayers", "bottomLayers"), each = 2), times = 2)), - rep(c(".AnyLayerWet.", ".AllLayersWet.", ".AllLayersDry.", ""), each = 4), c(rep(rep(c("Duration.Total_days", "Duration.LongestContinuous_days"), each = 2), times = 2), rep(c("Duration.Total_days", "Duration.LongestContinuous_days"), times = 2), rep(c(".PeriodsForAtLeast10Days.Start_doy", ".PeriodsForAtLeast10Days.End_doy"), times = 2)), "_mean")) - } - + temp <- c(temp, paste0(rep(c("WetSoilPeriods", "DrySoilPeriods"), each = 8), + ".SWPcrit", + rep(fieldtag_SWPcrit_MPa, each = 16), + ".NSadj.", + c(rep(c("topLayers", "bottomLayers"), times = 4), + rep(rep(c("topLayers", "bottomLayers"), each = 2), times = 2)), + rep(c(".AnyLayerWet", ".AllLayersWet", ".AllLayersDry", ""), + each = 4), + ".", + c(rep(rep(c("Duration.Total_days", + "Duration.LongestContinuous_days"), each = 2), + times = 2), + rep(c("Duration.Total_days", + "Duration.LongestContinuous_days"), times = 2), + paste0("PeriodsFor", fieldtag_drysoils, ".", + rep(c("Start_doy", "End_doy"), times = 2))) + )) + } + +#TODO(drs): progress state #38 if (aon$dailySuitablePeriodsDuration) { quantiles <- c(0.05, 0.5, 0.95) @@ -1927,7 +2068,16 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) } #40 if (aon$dailySuitablePeriodsDrySpells) { - temp <- c(temp, paste0("ThermalSnowfreeDryPeriods.SWPcrit", rep(paste0(rep(fieldtag_SWPcrit_MPa, each = 2), rep(c(".topLayers", ".bottomLayers"), times = opt_agg[["SWPcrit_N"]])), each = 4), c("_DrySpellsAllLayers_meanDuration_days_mean", "_DrySpellsAllLayers_maxDuration_days_mean", "_DrySpellsAllLayers_Total_days_mean", "_DrySpellsAtLeast10DaysAllLayers_Start_doy_mean"))) + temp <- c(temp, paste0("ThermalSnowfreeDryPeriods.SWPcrit", + rep(paste0(rep(fieldtag_SWPcrit_MPa, each = 2), + rep(c(".topLayers", ".bottomLayers"), + times=opt_agg[["SWPcrit_N"]])), + each=4), + "_DrySpells", + c(rep("", 3), fieldtag_drysoils), + "AllLayers_", + c("meanDuration_days", "maxDuration_days", "Total_days", + "Start_doy"))) } #41 if (aon$dailySWPdrynessDurationDistribution) { @@ -1993,27 +2143,29 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #44 if (aon$monthlyTemp) { - temp <- c(temp, paste0("TempAir.m", SFSW2_glovars[["st_mo"]], "_C_mean")) + temp <- c(temp, paste0("TempAir.m", SFSW2_glovars[["st_mo"]], "_C")) } #45 if (aon$monthlyPPT) { - temp <- c(temp, paste0("Precip.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("Precip.m", SFSW2_glovars[["st_mo"]], "_mm")) } #46 if (aon$monthlySnowpack) { - temp <- c(temp, paste0("Snowpack.m", SFSW2_glovars[["st_mo"]], "_mmSWE_mean")) + temp <- c(temp, paste0("Snowpack.m", SFSW2_glovars[["st_mo"]], "_mmSWE")) } #47 if (aon$monthlySoilTemp) { - temp <- c(temp, paste0("TempSoil.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_C_mean")) + temp <- c(temp, paste0("TempSoil.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_C")) } #48 if (aon$monthlyRunoff) { - temp <- c(temp, paste0("Runoff.Total.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("Runoff.Total.m", SFSW2_glovars[["st_mo"]], "_mm")) } if (aon$monthlyRunon) { temp <- c(temp, paste0("Runon.Total.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) @@ -2021,86 +2173,100 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) #49 if (aon$monthlyHydraulicRedistribution) { - temp <- c(temp, paste0("HydraulicRedistribution.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_mm_mean")) + temp <- c(temp, paste0("HydraulicRedistribution.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mm")) } #50 if (aon$monthlyInfiltration) { - temp <- c(temp, paste0("Infiltration.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("Infiltration.m", SFSW2_glovars[["st_mo"]], "_mm")) } #51 if (aon$monthlyDeepDrainage) { - temp <- c(temp, paste0("DeepDrainage.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("DeepDrainage.m", SFSW2_glovars[["st_mo"]], "_mm")) } #52 if (aon$monthlySWPmatric) { - temp <- c(temp, paste0("SWPmatric.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_MPa_FromVWCmean")) + temp <- c(temp, paste0("SWPmatric.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_MPa_FromVWCmean")) } #53 a.) if (aon$monthlyVWCbulk) { - temp <- c(temp, paste0("VWCbulk.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_mPERm_mean")) + temp <- c(temp, paste0("VWCbulk.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mPERm")) } #53 b.) if (aon$monthlyVWCmatric) { - temp <- c(temp, paste0("VWCmatric.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_mPERm_mean")) + temp <- c(temp, paste0("VWCmatric.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mPERm")) } #54 if (aon$monthlySWCbulk) { - temp <- c(temp, paste0("SWCbulk.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_mm_mean")) + temp <- c(temp, paste0("SWCbulk.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mm")) } #55 if (aon$monthlySWAbulk) { temp <- c(temp, paste0("SWAbulk_", - "SWPcrit", rep(fieldtag_SWPcrit_MPa, each = 24), "_", - c(paste0("topLayers_m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers_m", SFSW2_glovars[["st_mo"]])), - "_mm_mean")) + "SWPcrit", rep(fieldtag_SWPcrit_MPa, each = 24), "_", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mm")) } #56 if (aon$monthlyTranspiration) { - temp <- c(temp, paste0("Transpiration.", c(paste0("topLayers.m", SFSW2_glovars[["st_mo"]]), paste0("bottomLayers.m", SFSW2_glovars[["st_mo"]])), "_mm_mean")) + temp <- c(temp, paste0("Transpiration.", + paste0(rep(c("top", "bottom"), each = 12), "Layers.m", SFSW2_glovars[["st_mo"]]), + "_mm")) } #57 if (aon$monthlySoilEvaporation) { - temp <- c(temp, paste0("Evaporation.Soil.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("Evaporation.Soil.m", SFSW2_glovars[["st_mo"]], "_mm")) } #58 if (aon$monthlyAET) { - temp <- c(temp, paste0("AET.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("AET.m", SFSW2_glovars[["st_mo"]], "_mm")) } #59 if (aon$monthlyPET) { - temp <- c(temp, paste0("PET.m", SFSW2_glovars[["st_mo"]], "_mm_mean")) + temp <- c(temp, paste0("PET.m", SFSW2_glovars[["st_mo"]], "_mm")) } #59.2 if (aon$monthlyVPD) { - temp <- c(temp, paste0("VPD_m", SFSW2_glovars[["st_mo"]], "_kPa_mean")) + temp <- c(temp, paste0("VPD_m", SFSW2_glovars[["st_mo"]], "_kPa")) } #60 if (aon$monthlyAETratios) { - temp <- c(temp, paste0(rep(c("TranspToAET.m", "EvapSoilToAET.m"), each = 12), SFSW2_glovars[["st_mo"]], "_fraction_mean")) + temp <- c(temp, paste0(rep(c("TranspToAET.m", "EvapSoilToAET.m"), each = 12), + SFSW2_glovars[["st_mo"]], "_fraction")) } #61 if (aon$monthlyPETratios) { - temp <- c(temp, paste0(rep(c("TranspToPET.m", "EvapSoilToPET.m"), each = 12), SFSW2_glovars[["st_mo"]], "_fraction_mean")) + temp <- c(temp, paste0(rep(c("TranspToPET.m", "EvapSoilToPET.m"), each = 12), + SFSW2_glovars[["st_mo"]], "_fraction")) } ##############################################################---Aggregation: Potential regeneration---############################################################## #62 if (aon$dailyRegeneration_bySWPSnow) { - temp <- c(temp, "Regeneration.Potential.SuitableYears.NSadj_fraction_mean") + temp <- c(temp, "Regeneration.Potential.SuitableYears.NSadj_fraction") } #63 @@ -2133,23 +2299,19 @@ dbOutput_create_Design <- function(con_dbOut, SFSW2_prj_meta, SFSW2_prj_inputs) if (ncol_dbOut_overall > 0) temp <- paste0(paste0("\"", temp, "\""), " REAL", collapse = ", ") - meanString <- paste(c("\"P_id\" INTEGER PRIMARY KEY", temp), collapse = ", ") - sdString <- paste(c("\"P_id\" INTEGER PRIMARY KEY", gsub("_mean", "_sd", temp)), - collapse = ", ") + overallSQL <- paste0("CREATE TABLE \"aggregation_overall\" (", + paste(c("\"P_id\" INTEGER", "\"aggfun_id\" INTEGER", "\"aggwindow_id\" INTEGER", + temp, "PRIMARY KEY (\"P_id\", \"aggfun_id\", \"aggwindow_id\")"), collapse = ", "), + ")") - SQL_Table_Definitions1 <- paste0("CREATE TABLE \"aggregation_overall_mean\" (", - meanString, ");") - SQL_Table_Definitions2 <- paste0("CREATE TABLE \"aggregation_overall_sd\" (", - sdString, ");") + DBI::dbExecute(con_dbOut, overallSQL) - DBI::dbExecute(con_dbOut, paste0(SQL_Table_Definitions1, collapse = "\n")) - DBI::dbExecute(con_dbOut, paste0(SQL_Table_Definitions2, collapse = "\n")) - - list(ncol_dbOut_overall = ncol_dbOut_overall, meanString = meanString, - sdString = sdString) + list(ncol_dbOut_overall = ncol_dbOut_overall, overallSQL = overallSQL) } + dbOutput_create_DailyAggregationTable <- function(con_dbOut, req_aggs) { + dailySQL <- dailyLayersSQL <- NULL if (req_aggs[["N"]] > 0) { @@ -2157,9 +2319,14 @@ dbOutput_create_DailyAggregationTable <- function(con_dbOut, req_aggs) { flag = "0")) doy_colnames <- paste0(paste0("\"", doy_colnames, "\""), " REAL", collapse = ", ") - dailySQL <- paste(c("\"P_id\" INTEGER PRIMARY KEY", doy_colnames), collapse = ", ") - dailyLayersSQL <- paste(c("\"P_id\" INTEGER", "\"Soil_Layer\" INTEGER", - doy_colnames, "PRIMARY KEY (\"P_id\", \"Soil_Layer\")"), collapse = ", ") + dailySQL <- paste(c("\"P_id\" INTEGER", "\"aggfun_id\" INTEGER", + "\"aggwindow_id\" INTEGER", doy_colnames, "PRIMARY KEY (\"P_id\", \"aggfun_id\",", + "\"aggwindow_id\")"), collapse = ", ") + dailyLayersSQL <- paste(c("\"P_id\" INTEGER", "\"aggfun_id\" INTEGER", + "\"aggwindow_id\" INTEGER", "\"Soil_Layer\" INTEGER", doy_colnames, + "PRIMARY KEY (\"P_id\", \"aggfun_id\", \"aggwindow_id\", \"Soil_Layer\")"), + collapse = ", ") + for (doi in seq_len(req_aggs[["N"]])) { if (regexpr("SWAbulk", req_aggs[["tag"]][doi]) > 0) { @@ -2168,31 +2335,19 @@ dbOutput_create_DailyAggregationTable <- function(con_dbOut, req_aggs) { } else { agg.resp <- req_aggs[["tag"]][doi] } - #"VWCbulk", "VWCmatric", "SWCbulk", "SWPmatric", "SWAbulk" - agg.analysis <- switch(EXPR = agg.resp, - AET = 1, Transpiration = 2, EvaporationSoil = 1, EvaporationSurface = 1, - EvaporationTotal = 1, VWCbulk = 2, VWCmatric = 2, SWCbulk = 2, SWPmatric = 2, - SWAbulk = 2, Snowpack = 1, Rain = 1, Snowfall = 1, Snowmelt = 1, SnowLoss = 1, - Infiltration = 1, DeepDrainage = 1, PET = 1, TotalPrecipitation = 1, - TemperatureMin = 1, TemperatureMax = 1, SoilTemperature = 2, Runoff = 1, - Runon = 1) - tableName <- paste0("aggregation_doy_", req_aggs[["tag"]][doi]) - - if (agg.analysis == 1) { - SQL_Table_Definitions1 <- paste0("CREATE TABLE \"", tableName, "_Mean\" (", - dailySQL, ");") - SQL_Table_Definitions2 <- paste0("CREATE TABLE \"", tableName, "_SD\" (", - dailySQL, ");") - } else { - SQL_Table_Definitions1 <- paste0("CREATE TABLE \"", tableName, "_Mean\" (", - dailyLayersSQL, ");") - SQL_Table_Definitions2 <- paste0("CREATE TABLE \"", tableName, "_SD\" (", - dailyLayersSQL, ");") - } - - DBI::dbExecute(con_dbOut, paste(SQL_Table_Definitions1, collapse = "\n")) - DBI::dbExecute(con_dbOut, paste(SQL_Table_Definitions2, collapse = "\n")) + def_dailySQL <- paste0("CREATE TABLE \"", + paste0("aggregation_doy_", req_aggs[["tag"]][doi]), + " (", + if (agg.resp %in% c("Transpiration", "SoilTemperature", "VWCbulk", + "VWCmatric", "SWCbulk", "SWPmatric", "SWAbulk")) { + # previously, agg.analysis == 2 + dailyLayersSQL + } else { + dailySQL + }, + ");") + rs <- RSQLite::dbExecute(con, def_dailySQL) } } @@ -2201,14 +2356,12 @@ dbOutput_create_DailyAggregationTable <- function(con_dbOut, req_aggs) { dbOutput_create_EnsembleTables <- function(con_dbOut, dbOutput, prj_todos, sim_scens, - meanString, sdString, dailySQL, dailyLayersSQL) { + overallSQL, dailySQL, dailyLayersSQL) { if (!prj_todos[["do_ensembles"]]) return(invisible(NULL)) Tables <- dbOutput_ListOutputTables(con = con_dbOut) - Tables <- grep("_sd", Tables, ignore.case = TRUE, invert = TRUE, value = TRUE) - Tables <- sub("_Mean", "", Tables, ignore.case = TRUE) respName <- sub("aggregation_", "", Tables, ignore.case = TRUE) respName <- sub("doy_", "", respName, ignore.case = TRUE) @@ -2234,12 +2387,10 @@ dbOutput_create_EnsembleTables <- function(con_dbOut, dbOutput, prj_todos, sim_s if (grepl("overall", respName[i], ignore.case = TRUE)) { sql1 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[1], "\" (", - meanString, ");") - sql2 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[2], "\" (", - sdString, ");") + overallSQL, ");") sql3 <- if (sim_scens[["save.scenario.ranks"]]) { paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[3], "\" (", - gsub("REAL", "INTEGER", meanString), ");") + gsub("REAL", "INTEGER", overallSQL), ");") } else NULL } else { @@ -2254,8 +2405,6 @@ dbOutput_create_EnsembleTables <- function(con_dbOut, dbOutput, prj_todos, sim_s if (agg.analysis == 1) { sql1 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[1], "\" (", dailySQL, ");") - sql2 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[2], "\" (", - dailySQL, ");") sql3 <- if (sim_scens[["save.scenario.ranks"]]) { paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[3], "\" (", gsub("REAL", "INTEGER", dailySQL), ");") @@ -2264,8 +2413,6 @@ dbOutput_create_EnsembleTables <- function(con_dbOut, dbOutput, prj_todos, sim_s } else { sql1 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[1], "\" (", dailyLayersSQL, ");") - sql2 <- paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[2], "\" (", - dailyLayersSQL, ");") sql3 <- if (sim_scens[["save.scenario.ranks"]]) { paste0("CREATE TABLE \"", EnsembleFamilyLevelTables[3], "\" (", gsub("REAL", "INTEGER", dailyLayersSQL), ");") @@ -2274,7 +2421,6 @@ dbOutput_create_EnsembleTables <- function(con_dbOut, dbOutput, prj_todos, sim_s } DBI::dbExecute(con, sql1) - DBI::dbExecute(con, sql2) if (sim_scens[["save.scenario.ranks"]]) DBI::dbExecute(con, sql3) } @@ -2323,11 +2469,18 @@ make_dbOutput <- function(SFSW2_prj_meta, SFSW2_prj_inputs, verbose = FALSE) { tables <- RSQLite::dbListTables(con_dbOut) # dbOutput exists and has a suitable design #TODO(drs): test for matching dbOutput could be improved vastly! - if (length(tables) > 0 && all(dbOutput_ListDesignTables() %in% tables) && - "aggregation_overall_mean" %in% tables) { + if (length(tables) > 0) { + v_dbOut <- numeric_version(as.character(RSQLite::dbGetQuery(con_dbOut, + "SELECT Value FROM Meta WHERE Desc=\'Version\'")[1, 1])) - temp <- RSQLite::dbListFields(con_dbOut, "aggregation_overall_mean") - return(length(temp) - 1L) + is_suitable_dbOut <- all(dbOutput_ListDesignTables() %in% tables) && + "aggregation_overall_mean" %in% tables && + "Meta" %in% tables && v_dbOut >= SFSW2_glovars[["minVersion_dbOutput"]] + + if (is_suitable_dbOut) { + temp <- RSQLite::dbListFields(con_dbOut, "aggregation_overall_mean") + return(length(temp) - 1L) + } } # Add design and output tables @@ -2342,8 +2495,8 @@ make_dbOutput <- function(SFSW2_prj_meta, SFSW2_prj_inputs, verbose = FALSE) { dbOutput_create_EnsembleTables(con_dbOut, dbOutput = SFSW2_prj_meta[["fnames_out"]][["dbOutput"]], prj_todos = SFSW2_prj_meta[["prj_todos"]], sim_scens = SFSW2_prj_meta[["sim_scens"]], - meanString = res_oa[["meanString"]], sdString = res_oa[["sdString"]], - dailySQL = res_da[["dailySQL"]], dailyLayersSQL = res_da[["dailyLayersSQL"]]) + overallSQL = res_oa[["overallSQL"]], dailySQL = res_da[["dailySQL"]], + dailyLayersSQL = res_da[["dailyLayersSQL"]]) } res_oa[["ncol_dbOut_overall"]] diff --git a/R/PriorCalculations.R b/R/PriorCalculations.R index 74286683..11a6d5fc 100644 --- a/R/PriorCalculations.R +++ b/R/PriorCalculations.R @@ -383,7 +383,7 @@ do_prior_TableLookups <- function(SFSW2_prj_meta, SFSW2_prj_inputs, resume = TRU SFSW2_prj_inputs[["sw_input_treatments"]][, pc$flag] } - if (any(is.na(trtype))) + if (anyNA(trtype)) stop("ERROR: ", pc$flag, " column cannot have any NAs.") if (!all(unique(trtype) %in% rownames(pc$tr_input))) stop("ERROR: ", pc$flag, " column values do not match up with trfile. ", diff --git a/R/Simulation_Project.R b/R/Simulation_Project.R index cc5df1f7..448d84e5 100644 --- a/R/Simulation_Project.R +++ b/R/Simulation_Project.R @@ -1,18 +1,22 @@ +print('Start Simulation_project file\n') #' Setup infrastructure (skeleton) for a new rSFSW2 simulation experiment #' #' @param dir_prj A character string. The path to the new simulation project. Folders are #' recursively created if not already existing. #' @param verbose A logical value. +#' @param print.debug A logical value. #' @return Invisibly \code{dir_prj} on success #' #' @export -setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { +setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE, + print.debug = FALSE) { + print('Called setup_rSFSW2_project_infrastructure function in Simulation_project file') masterinput_pattern <- "_InputMaster_" masterinput_pattern_demo <- "_InputMaster_YOURPROJECT_" - if (verbose) { + if (verbose || print.debug) { t1 <- Sys.time() temp_call <- shQuote(match.call()[1]) print(paste0("rSFSW2's ", temp_call, ": started at ", t1)) @@ -22,10 +26,10 @@ setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { round(difftime(Sys.time(), t1, units = "secs"), 2), " s")); cat("\n")}, add = TRUE) } - dir_safe_create(dir_prj) + dir_safe_create(dir_prj, showWarnings = print.debug) # 'definf' object stored in R/sysdata.rda and generated by - # data-raw/prepare_default_project_infrastructure.R + # data-raw/prepare_default_project_infrastructure.R if (exists("definf") && length(definf) == 0) stop("No default project infrastructure object located; the installation of the ", "package 'rSFSW2' may be faulty.") @@ -36,7 +40,7 @@ setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { dtemp <- file.path(dir_prj, di[["path"]]) if (!dir.exists(dtemp)) - dir_safe_create(dtemp) + dir_safe_create(dtemp, showWarnings = print.debug) ftemp <- file.path(dtemp, di[["fname"]]) @@ -57,9 +61,12 @@ setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { } if (fim_ok) { - print(paste("'setup_rSFSW2_project_infrastructure' does not replace the", - "existing input master file", paste(shQuote(fim), collapse = "/"), - "with default version of file.")) + if (verbose || print.debug) { + print(paste("'setup_rSFSW2_project_infrastructure' does not replace the", + "existing input master file", paste(shQuote(fim), collapse = "/"), + "with default version of file.")) + } + next } } @@ -69,15 +76,15 @@ setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { } } - if (!is.null(fes)) { + if (!is.null(fes) && (verbose || print.debug)) { fes <- gsub(paste0(dir_prj, "/"), "", fes, fixed = TRUE) print(paste("File(s)", paste(shQuote(fes), collapse = ", "), "already existed in", "project", shQuote(basename(dir_prj)), "; they were not replaced by default files.")) } - if (verbose) + if (verbose || print.debug) { print(paste("The new rSFSW2 project was successfully prepared at:", sQuote(dir_prj))) - + } # Copy demo scripts temp <- system.file("demo", package = "rSFSW2") @@ -93,15 +100,76 @@ setup_rSFSW2_project_infrastructure <- function(dir_prj, verbose = TRUE) { invisible(dir_prj) } +load_project_description <- function(fmetar) { + meta <- new.env(parent = baseenv()) + sys.source(fmetar, envir = meta, keep.source = FALSE) + + meta +} + +update_project_paths <- function(SFSW2_prj_meta, fmetar) { + print('Called update_project_paths function in Simulation_project file') + SFSW2_prj_meta2 <- load_project_description(fmetar) + + #--- Update paths of 'project_paths' + xnames <- names(SFSW2_prj_meta[["project_paths"]]) + names_shared <- intersect(xnames, names(SFSW2_prj_meta2[["project_paths"]])) + + for (k in names_shared) { + SFSW2_prj_meta[["project_paths"]][[k]] <- SFSW2_prj_meta2[["project_paths"]][[k]] + } + + #TODO: don't ignore added elements + # names_added <- xnames[!(xnames %in% names_shared)] + + #--- Update paths of 'fnames_in' + xnames <- names(SFSW2_prj_meta[["fnames_in"]]) + names_shared <- intersect(xnames, names(SFSW2_prj_meta2[["fnames_in"]])) + + for (k in names_shared) { + SFSW2_prj_meta[["fnames_in"]][[k]] <- SFSW2_prj_meta2[["fnames_in"]][[k]] + } + + #--- Update paths of 'fnames_out' + xnames <- names(SFSW2_prj_meta[["fnames_out"]]) + names_shared <- intersect(xnames, names(SFSW2_prj_meta2[["fnames_out"]])) + + for (k in names_shared) { + SFSW2_prj_meta[["fnames_out"]][[k]] <- SFSW2_prj_meta2[["fnames_out"]][[k]] + } + + + #--- Update platform + xnames <- names(SFSW2_prj_meta[["opt_platform"]]) + names_shared <- intersect(xnames, names(SFSW2_prj_meta2[["opt_platform"]])) + + for (k in names_shared) { + SFSW2_prj_meta[["opt_platform"]][[k]] <- SFSW2_prj_meta2[["opt_platform"]][[k]] + } + SFSW2_prj_meta[["aggs"]] <- setup_aggregations(SFSW2_prj_meta) + + SFSW2_prj_meta +} + #' Initialize a rSFSW2 project (setup description file) #' -#' @param SFSW2_prj_meta A list or environment as generated from a file comparable to -#' \code{file.path(system.file("demo", package = "rSFSW2"), "SFSW2_project_descriptions.R")} -#' @return An updated version of \code{SFSW2_prj_meta} +#' This function creates/loads an object \code{SFSW2_prj_meta} based on the file \code{fmetar} +#' containing the descriptions/metadata for this simulation project. The file should be +#' comparable to \code{file.path(system.file("demo", package = "rSFSW2"), "SFSW2_project_descriptions.R")} +#' +#' @param fmetar A character string. The path name to the project description file. +#' @param update A logical value. If \code{TRUE}, the path names are re-scanned from +#' \code{fmetar} and updated values are stored in \code{SFSW2_prj_meta}. +#' @param verbose A logical value. +#' @param print.debug A logical value. +#' +#' @return The object \code{SFSW2_prj_meta} of type environment. #' #' @export -init_rSFSW2_project <- function(SFSW2_prj_meta, fmeta, verbose = TRUE) { +init_rSFSW2_project <- function(fmetar, update = FALSE, verbose = TRUE, + print.debug = FALSE) { + print('Called init_rSFSW2 function in Simulation_project file') if (verbose) { t1 <- Sys.time() temp_call <- shQuote(match.call()[1]) @@ -111,72 +179,108 @@ init_rSFSW2_project <- function(SFSW2_prj_meta, fmeta, verbose = TRUE) { round(difftime(Sys.time(), t1, units = "secs"), 2), " s")); cat("\n")}, add = TRUE) } - #--- Delete objects from 'SFSW2_prj_meta' which were used to create initial input - suppressWarnings(rm(list = c("d", "dir_big", "dir_ex", "dir_in", "dir_out", "dir_prj", - "endyr", "scorp", "startyr", "temp"), envir = SFSW2_prj_meta)) + if (is.character(fmetar) && endsWith(toupper(fmetar), ".R")) { + fmeta <- paste0(substr(fmetar, 1, nchar(fmetar) - 1), "rds") - #--- Update project paths and file names - dir_safe_create(SFSW2_prj_meta[["project_paths"]]) + } else { + stop("Argument 'fmetar' must represent the path to a file of type/extension 'R'") + } + + if (file.exists(fmeta)) { + #--- Load (and possible update) existing 'SFSW2_prj_meta' + + # Load pre-prepared project description if it was setup previously + SFSW2_prj_meta <- readRDS(fmeta) - SFSW2_prj_meta[["fnames_in"]][["fmeta"]] <- fmeta - SFSW2_prj_meta[["fnames_in"]] <- complete_with_defaultpaths(SFSW2_prj_meta[["project_paths"]], - SFSW2_prj_meta[["fnames_in"]]) + # Update + if (update) { + SFSW2_prj_meta <- update_project_paths(SFSW2_prj_meta, fmetar) + SFSW2_prj_meta[["fnames_in"]][["fmeta"]] <- fmeta + SFSW2_prj_meta[["fnames_in"]] <- complete_with_defaultpaths( + SFSW2_prj_meta[["project_paths"]], SFSW2_prj_meta[["fnames_in"]]) + } + + # Ensure that all necessary paths do exists + dir_safe_create(SFSW2_prj_meta[["project_paths"]], showWarnings = print.debug) - init_timer(SFSW2_prj_meta[["fnames_out"]][["timerfile"]]) - #--- Update simulation time - SFSW2_prj_meta[["sim_time"]] <- setup_simulation_time(SFSW2_prj_meta[["sim_time"]], - add_st2 = TRUE, adjust_NS = SFSW2_prj_meta[["opt_agg"]][["adjust_NorthSouth"]], - use_doy_range = SFSW2_prj_meta[["opt_agg"]][["use_doy_range"]], - doy_ranges = SFSW2_prj_meta[["opt_agg"]][["doy_ranges"]] - ) + } else { + #--- Create 'SFSW2_prj_meta' + + # 1a) Setup default project infrastructure + setup_rSFSW2_project_infrastructure(dir_prj, verbose = verbose, + print.debug = print.debug) - #--- Determine scenario names - SFSW2_prj_meta[["sim_scens"]] <- setup_scenarios(SFSW2_prj_meta[["req_scens"]], - SFSW2_prj_meta[["sim_time"]][["future_yrs"]]) + # 1b) In text editor: specify project description/metadata ("SFSW2_project_description.R") + if (verbose || print.debug) { + warning("Check/adjust project description/metadata in file ", + shQuote(basename(fmetar)), " before further steps are executed.", call. = FALSE, + immediate. = TRUE) + } - #--- Determine requested ensembles across climate scenarios - SFSW2_prj_meta <- update_scenarios_with_ensembles(SFSW2_prj_meta) + # 1c) Load and prepare project description + SFSW2_prj_meta <- load_project_description(fmetar) - #--- Prior calculations - SFSW2_prj_meta[["pcalcs"]] <- convert_to_todo_list(SFSW2_prj_meta[["opt_input"]][["prior_calculations"]]) - #--- External data extraction - SFSW2_prj_meta[["exinfo"]] <- convert_to_todo_list(SFSW2_prj_meta[["opt_input"]][["req_data"]]) + #--- Delete objects from 'SFSW2_prj_meta' which were used to create initial input + suppressWarnings(rm(list = c("d", "dir_big", "dir_ex", "dir_in", "dir_out", "dir_prj", + "endyr", "scorp", "startyr", "temp"), envir = SFSW2_prj_meta)) - #--- Matrix to track progress with input preparations - SFSW2_prj_meta[["input_status"]] <- init_intracker() + #--- Functionality to aggregate simulation output + SFSW2_prj_meta[["aggs"]] <- setup_aggregations(SFSW2_prj_meta) SFSW2_prj_meta } + #--- Update project paths and file names + dir_safe_create(SFSW2_prj_meta[["project_paths"]], showWarnings = print.debug) + SFSW2_prj_meta[["fnames_in"]][["fmeta"]] <- fmeta + SFSW2_prj_meta[["fnames_in"]] <- complete_with_defaultpaths( + SFSW2_prj_meta[["project_paths"]], SFSW2_prj_meta[["fnames_in"]]) -#' Populate rSFSW2 project with input data -#' @export -populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_parallel, - opt_chunks, opt_out_run, opt_verbosity) { + init_timer(SFSW2_prj_meta[["fnames_out"]][["timerfile"]]) - if (opt_verbosity[["verbose"]]) { - t1 <- Sys.time() - temp_call <- shQuote(match.call()[1]) - print(paste0("rSFSW2's ", temp_call, ": started at ", t1)) + #--- Update simulation time + SFSW2_prj_meta[["sim_time"]] <- setup_simulation_time(SFSW2_prj_meta[["sim_time"]], + add_st2 = TRUE, adjust_NS = SFSW2_prj_meta[["opt_agg"]][["adjust_NorthSouth"]], + use_doy_range = SFSW2_prj_meta[["opt_agg"]][["use_doy_range"]], + doy_ranges = SFSW2_prj_meta[["opt_agg"]][["doy_ranges"]] + ) - on.exit({ - print(paste0("rSFSW2's ", temp_call, ": ended after ", - round(difftime(Sys.time(), t1, units = "secs"), 2), " s with input tracker ", - "status:")) - print(SFSW2_prj_meta[["input_status"]])}, add = TRUE) + #--- Determine scenario names + SFSW2_prj_meta[["sim_scens"]] <- setup_scenarios(SFSW2_prj_meta[["req_scens"]], + SFSW2_prj_meta[["sim_time"]][["future_yrs"]]) + + #--- Determine requested ensembles across climate scenarios + SFSW2_prj_meta <- update_scenarios_with_ensembles(SFSW2_prj_meta) + + #--- Prior calculations + SFSW2_prj_meta[["pcalcs"]] <- convert_to_todo_list(SFSW2_prj_meta[["opt_input"]][["prior_calculations"]]) + + #--- External data extraction + SFSW2_prj_meta[["exinfo"]] <- convert_to_todo_list(SFSW2_prj_meta[["opt_input"]][["req_data"]]) + + #--- Matrix to track progress with input preparations + SFSW2_prj_meta[["input_status"]] <- init_intracker() } - #------ PROJECT INPUTS + save_to_rds_with_backup(SFSW2_prj_meta, file = SFSW2_prj_meta[["fnames_in"]][["fmeta"]]) + + SFSW2_prj_meta + + + + + +gather_project_inputs <- function(SFSW2_prj_meta, use_preprocin = TRUE, verbose = FALSE) { + print('Called gather_project_inputs function in Simulation_project file') #--- Import data if (!exists("SFSW2_prj_inputs") || is.null(SFSW2_prj_inputs) || todo_intracker(SFSW2_prj_meta, "load_inputs", "prepared")) { SFSW2_prj_inputs <- process_inputs(SFSW2_prj_meta[["project_paths"]], - SFSW2_prj_meta[["fnames_in"]], use_preprocin = opt_behave[["use_preprocin"]], - verbose = opt_verbosity[["verbose"]]) + SFSW2_prj_meta[["fnames_in"]], use_preprocin, verbose) #--- Update output aggregation options SFSW2_prj_meta[["opt_agg"]] <- setup_aggregation_options(SFSW2_prj_meta[["opt_agg"]], @@ -186,10 +290,17 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], tracker = "load_inputs", prepared = TRUE, checked = !SFSW2_prj_inputs[["do_check_include"]]) + + save_to_rds_with_backup(SFSW2_prj_meta, file = SFSW2_prj_meta[["fnames_in"]][["fmeta"]]) } - save_to_rds_with_backup(SFSW2_prj_meta, SFSW2_prj_meta[["fnames_in"]][["fmeta"]], - tag_backup = paste0("backup-", format(Sys.time(), "%Y%m%d-%H%M"))) + # Make sure that input-tracker is updated correctly if inputs were re-processed + if (!todo_intracker(SFSW2_prj_meta, "table_lookup", "prepared") && + is.null(SFSW2_prj_inputs[["done_prior"]])) { + + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "table_lookup", prepared = FALSE) + } if (all(stats::na.exclude(SFSW2_prj_meta[["input_status"]][, "prepared"])) && @@ -200,14 +311,6 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa return(list(SFSW2_prj_meta = SFSW2_prj_meta, SFSW2_prj_inputs = SFSW2_prj_inputs)) } - # From here on: objects 'SFSW2_prj_meta' and 'SFSW2_prj_inputs' will be manipulated, i.e., - # save them to disk upon exiting function (by error to save intermediate state) or - # by final 'return' - on.exit(save_to_rds_with_backup(SFSW2_prj_meta, - file = SFSW2_prj_meta[["fnames_in"]][["fmeta"]]), add = TRUE) - on.exit(save_to_rds_with_backup(SFSW2_prj_inputs, - file = SFSW2_prj_meta[["fnames_in"]][["fpreprocin"]]), add = TRUE) - #--- Determine size of simulation runs if (todo_intracker(SFSW2_prj_meta, "calc_size", "prepared")) { @@ -238,7 +341,7 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa SFSW2_prj_meta[["exinfo"]][["ExtractSkyDataFromNCEPCFSR_Global"]])) SFSW2_prj_meta <- setup_spatial_simulation(SFSW2_prj_meta, SFSW2_prj_inputs, - use_sim_spatial = SFSW2_prj_meta[["use_sim_spatial"]]) + use_sim_spatial = SFSW2_prj_meta[["use_sim_spatial"]], verbose = verbose) SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], tracker = "spatial_setup", prepared = TRUE, clean_subsequent = TRUE) @@ -247,21 +350,23 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa #--- Determine todos for simulation project if (todo_intracker(SFSW2_prj_meta, "prj_todos", "prepared")) { + if (is.null(SFSW2_prj_meta[["prj_todos"]])) { + SFSW2_prj_meta[["prj_todos"]] <- list() + } - SFSW2_prj_meta[["prj_todos"]] <- list( - EstimateConstantSoilTemperatureAtUpperAndLowerBoundaryAsMeanAnnualAirTemperature = - SFSW2_prj_meta[["pcalcs"]][["EstimateConstantSoilTemperatureAtUpperAndLowerBoundaryAsMeanAnnualAirTemperature"]], - EstimateInitialSoilTemperatureForEachSoilLayer = - SFSW2_prj_meta[["pcalcs"]][["EstimateInitialSoilTemperatureForEachSoilLayer"]], - - # output aggregate overall - aon = convert_to_todo_list(SFSW2_prj_meta[["req_out"]][["overall_out"]]), - # output aggregate daily - adaily = setup_mean_daily_output_requests(SFSW2_prj_meta[["req_out"]][["mean_daily"]], - SFSW2_prj_meta[["opt_agg"]]), - # output daily traces - otrace = SFSW2_prj_meta[["req_out"]][["traces"]] - ) + SFSW2_prj_meta[["prj_todos"]][["EstimateConstantSoilTemperatureAtUpperAndLowerBoundaryAsMeanAnnualAirTemperature"]] <- + SFSW2_prj_meta[["pcalcs"]][["EstimateConstantSoilTemperatureAtUpperAndLowerBoundaryAsMeanAnnualAirTemperature"]] + SFSW2_prj_meta[["prj_todos"]][["EstimateInitialSoilTemperatureForEachSoilLayer"]] <- + SFSW2_prj_meta[["pcalcs"]][["EstimateInitialSoilTemperatureForEachSoilLayer"]] + + # output aggregate overall + SFSW2_prj_meta[["prj_todos"]][["aon"]] <- convert_to_todo_list( + SFSW2_prj_meta[["req_out"]][["overall_out"]]) + # output aggregate daily + SFSW2_prj_meta[["prj_todos"]][["adaily"]] <- setup_mean_daily_output_requests( + SFSW2_prj_meta[["req_out"]][["mean_daily"]], SFSW2_prj_meta[["opt_agg"]]) + # output daily traces + SFSW2_prj_meta[["prj_todos"]][["otrace"]] <- SFSW2_prj_meta[["req_out"]][["traces"]] #--- Update todo list SFSW2_prj_meta[["prj_todos"]][["need_cli_means"]] <- @@ -275,6 +380,9 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa any(SFSW2_prj_inputs[["create_treatments"]] == "AdjMonthlyBioMass_Precipitation") || any(SFSW2_prj_inputs[["create_treatments"]] == "Vegetation_Biomass_ScalingSeason_AllGrowingORNongrowing") + # Update todos for simulation project + SFSW2_prj_meta <- update_todos(SFSW2_prj_meta) + # Check that all 'prj_todos' are TRUE or FALSE except exceptions 'adaily' and 'otrace' itemp <- names(SFSW2_prj_meta[["prj_todos"]]) itemp <- itemp[!(itemp %in% c("adaily", "otrace"))] @@ -289,6 +397,64 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa tracker = "prj_todos", prepared = TRUE) } + list(SFSW2_prj_meta = SFSW2_prj_meta, SFSW2_prj_inputs = SFSW2_prj_inputs) +} + + +#' Populate rSFSW2 project with input data +#' @export +populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_parallel, + opt_chunks, opt_out_run, opt_verbosity) { + print('Called populate_rSFSW2 function in Simulation_project file') + if (opt_verbosity[["verbose"]]) { + t1 <- Sys.time() + temp_call <- shQuote(match.call()[1]) + print(paste0("rSFSW2's ", temp_call, ": started at ", t1)) + + on.exit({ + print(paste0("rSFSW2's ", temp_call, ": ended after ", + round(difftime(Sys.time(), t1, units = "secs"), 2), " s with input tracker ", + "status:")) + print(SFSW2_prj_meta[["input_status"]])}, add = TRUE) + } + + + #------ PROJECT INPUTS + temp <- gather_project_inputs(SFSW2_prj_meta, + use_preprocin = opt_behave[["use_preprocin"]], verbose = opt_verbosity[["verbose"]]) + SFSW2_prj_meta <- temp[["SFSW2_prj_meta"]] + SFSW2_prj_inputs <- temp[["SFSW2_prj_inputs"]] + + # Check that dbWork is available and has up-to-date structure of tables/fields + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "dbWork", + prepared = dbWork_check_design(SFSW2_prj_meta[["project_paths"]][["dir_out"]])) + + # Check that dbOut is available + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "dbOut", + prepared = file.exists(SFSW2_prj_meta[["fnames_out"]][["dbOutput"]])) + + + #------ Return if all is prepared (from a previous run), input tracker design is + # up-to-date, and input object exists and haven't been changed since last time + if (all(stats::na.exclude(SFSW2_prj_meta[["input_status"]][, "prepared"])) && + check_intracker_design(SFSW2_prj_meta[["input_status"]]) && + exists("SFSW2_prj_inputs")) { + + return(list(SFSW2_prj_meta = SFSW2_prj_meta, SFSW2_prj_inputs = SFSW2_prj_inputs)) + } + + + #------ Data preparation steps required + # From here on: objects 'SFSW2_prj_meta' and 'SFSW2_prj_inputs' will be manipulated, + # i.e., save them to disk upon exiting function (by error to save intermediate state) + # or by final 'return' + on.exit(save_to_rds_with_backup(SFSW2_prj_meta, + file = SFSW2_prj_meta[["fnames_in"]][["fmeta"]]), add = TRUE) + on.exit(save_to_rds_with_backup(SFSW2_prj_inputs, + file = SFSW2_prj_meta[["fnames_in"]][["fpreprocin"]]), add = TRUE) + #--- Setup random number generator streams for each runsN_master # Note: runsN_master: each site = row of master and not for runsN_total because @@ -309,22 +475,6 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa - #--- Setup/connect to dbWork - if (todo_intracker(SFSW2_prj_meta, "dbWork", "prepared")) { - temp <- setup_dbWork(path = SFSW2_prj_meta[["project_paths"]][["dir_out"]], - sim_size = SFSW2_prj_meta[["sim_size"]], include_YN = SFSW2_prj_inputs[["include_YN"]], - resume = opt_behave[["resume"]]) - - if (!temp) - stop("Work database failed to setup or an existing one is from a different", - "simulation design") - - SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], - tracker = "dbWork", prepared = TRUE) - } - - - #------ EXTERNAL INPUTS #------ DAILY WEATHER if (todo_intracker(SFSW2_prj_meta, "dbW_paths", "prepared")) { @@ -574,10 +724,45 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], tracker = "table_lookup", prepared = TRUE) - #save_to_rds_with_backup(SFSW2_prj_meta, SFSW2_prj_meta[["fnames_in"]][["fmeta"]]) + save_to_rds_with_backup(SFSW2_prj_meta, SFSW2_prj_meta[["fnames_in"]][["fmeta"]]) } + #------ CREATE OUTPUT DATABASE (IF NOT ALREADY EXISTING) + if (todo_intracker(SFSW2_prj_meta, "dbOut", "prepared")) { + + temp <- try(make_dbOutput(SFSW2_prj_meta, SFSW2_prj_inputs, + verbose = opt_verbosity[["verbose"]]), silent = !opt_verbosity[["print.debug"]]) + + if (inherits(temp, "try-error")) { + stop("Output database failed to setup") + } + + SFSW2_prj_meta[["sim_size"]][["ncol_dbOut_overall"]] <- temp[["ncol_dbOut_overall"]] + SFSW2_prj_meta[["prj_todos"]][["aon_fields"]] <- temp[["fields"]] + + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "dbOut", prepared = TRUE) + } + + + #------ CREATE WORK DATABASE (IF NOT ALREADY EXISTING) + if (todo_intracker(SFSW2_prj_meta, "dbWork", "prepared")) { + + # This requires the presence of dbOutput + temp <- recreate_dbWork(SFSW2_prj_meta = SFSW2_prj_meta, + verbose = opt_verbosity[["print.debug"]]) + + if (!temp) { + stop("Work database failed to setup") + } + + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "dbWork", prepared = TRUE) + } + + + list(SFSW2_prj_meta = SFSW2_prj_meta, SFSW2_prj_inputs = SFSW2_prj_inputs) } @@ -587,7 +772,7 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa #' @export check_rSFSW2_project_input_data <- function(SFSW2_prj_meta, SFSW2_prj_inputs, opt_chunks, opt_verbosity) { - + print('Called check_rSFSW2 function in Simulation_project file') if (opt_verbosity[["verbose"]]) { t1 <- Sys.time() temp_call <- shQuote(match.call()[1]) @@ -679,7 +864,8 @@ check_rSFSW2_project_input_data <- function(SFSW2_prj_meta, SFSW2_prj_inputs, op if (any(map_soils, map_elevs, map_climnorms) && !SFSW2_prj_meta[["use_sim_spatial"]]) { SFSW2_prj_meta[["use_sim_spatial"]] <- TRUE SFSW2_prj_meta <- setup_spatial_simulation(SFSW2_prj_meta, SFSW2_prj_inputs, - use_sim_spatial = SFSW2_prj_meta[["use_sim_spatial"]]) + use_sim_spatial = SFSW2_prj_meta[["use_sim_spatial"]], + verbose = opt_verbosity[["verbose"]]) SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], tracker = "spatial_setup", prepared = TRUE) @@ -726,7 +912,11 @@ check_rSFSW2_project_input_data <- function(SFSW2_prj_meta, SFSW2_prj_inputs, op #--- Check that todos/treatments are coherent if (todo_intracker(SFSW2_prj_meta, "prj_todos", "checked")) { - # Check that overall 'pnv' is turned on if any of the specific ones are + # Check that overall 'pnv0_temp' is turned on if any of the specific ones 'pnv_temp' + # are active or alternatively that none of the `PotentialNaturalVegetation_*` columns + # are turned on + pnv0_temp <- "PotentialNaturalVegetation_CompositionShrubsC3C4_Paruelo1996" + pnv_temp <- c("PotentialNaturalVegetation_CompositionShrubs_Fraction", "PotentialNaturalVegetation_CompositionC3_Fraction", "PotentialNaturalVegetation_CompositionC4_Fraction", @@ -743,9 +933,9 @@ check_rSFSW2_project_input_data <- function(SFSW2_prj_meta, SFSW2_prj_inputs, op "RootProfile_Shrubs", "RootProfile_Forb") - icheck <- "PotentialNaturalVegetation_CompositionShrubsC3C4_Paruelo1996" %in% - SFSW2_prj_inputs[["create_treatments"]] && - any(pnv_temp %in% SFSW2_prj_inputs[["create_treatments"]]) + temp1 <- pnv0_temp %in% SFSW2_prj_inputs[["create_treatments"]] + temp2 <- pnv_temp %in% SFSW2_prj_inputs[["create_treatments"]] + icheck <- (!temp1 && all(!temp2)) || (temp1 && any(temp2)) if (any(!icheck)) { stop("Calculation and/or adjustement of 'potential natural vegetation' is ", @@ -759,29 +949,174 @@ check_rSFSW2_project_input_data <- function(SFSW2_prj_meta, SFSW2_prj_inputs, op tracker = "prj_todos", checked = icheck) } + #--- Check table lookups prior to simulation runs + if (todo_intracker(SFSW2_prj_meta, "table_lookup", "checked")) { + + icheck <- length(SFSW2_prj_inputs[["done_prior"]]) == 0 + + if (any(icheck)) { + stop("Table lookups prior to simulation runs was not carried out: reset tracker with:\n", + "\t`SFSW2_prj_meta[['input_status']] <- update_intracker(SFSW2_prj_meta[['input_status']], ", + "tracker = 'table_lookup', prepared = FALSE, checked = FALSE)`\n", + "and repeat call to function `populate_rSFSW2_project_with_data`") + } + + SFSW2_prj_meta[["input_status"]] <- update_intracker(SFSW2_prj_meta[["input_status"]], + tracker = "table_lookup", checked = all(!icheck)) + } + + list(SFSW2_prj_meta = SFSW2_prj_meta, SFSW2_prj_inputs = SFSW2_prj_inputs) } +#' Update actions for simulation project +#' +#' @param SFSW2_prj_meta An environment. +#' @param actions A named list of logical elements. See \code{SFSW2_project_code.R}. +#' @param wipe_dbOutput A logical value +#' @return A version of \code{SFSW2_prj_meta} with updated values for element +#' \code{prj_todos}. +#' @export +update_actions <- function(SFSW2_prj_meta, actions = NULL, wipe_dbOutput = FALSE) { + print('Called update_actions function in Simulation_project file') + if (is.null(SFSW2_prj_meta[["prj_todos"]])) { + SFSW2_prj_meta[["prj_todos"]] <- list() + } + if (!is.null(actions)) { + SFSW2_prj_meta[["prj_todos"]][["actions"]] <- actions + SFSW2_prj_meta[["prj_todos"]][["use_SOILWAT2"]] <- any(unlist(actions[c("sim_create", + "sim_execute", "sim_aggregate")])) + SFSW2_prj_meta[["prj_todos"]][["wipe_dbOut"]] <- wipe_dbOutput && + !(sum(actions) == 1 && actions[["ensemble"]]) + } -#' Carry out a rSFSW2 simulation experiment + SFSW2_prj_meta +} + + +#' Update todos for simulation project +#' +#' @param SFSW2_prj_meta An environment. +#' @return A version of \code{SFSW2_prj_meta} with updated values for element +#' \code{prj_todos}. +update_todos <- function(SFSW2_prj_meta) { + print('Called update_todos function in Simulation_project file') + SFSW2_prj_meta[["prj_todos"]][["need_cli_means"]] <- + SFSW2_prj_meta[["prj_todos"]][["need_cli_means"]] && + SFSW2_prj_meta[["prj_todos"]][["use_SOILWAT2"]] + SFSW2_prj_meta[["prj_todos"]][["do_ensembles"]] <- + SFSW2_prj_meta[["sim_scens"]][["has_ensembles"]] && + SFSW2_prj_meta[["prj_todos"]][["actions"]][["ensemble"]] + + SFSW2_prj_meta +} + + + +#' Prepare output database without running proper steps of `SFSW2_project_code.R` +#' +#' The need may arise if all/some of input data of your simulation project is located +#' on a remote server and you want to create the output database and work database locally. +#' This function can be called before executing step 3 (\code{populate_rSFSW2_project_with_data}) +#' in the demo code "SFSW2_project_code.R". +#' +#' @param path A character string. The path at which the databases will be created -- +#' ignoring the path information from \code{SFSW2_prj_meta} used otherwise. +#' +#' @return Invisibly the number of output fields in the overall aggregation table. Side +#' effect: creation of \code{dbOutput} and \code{dbWork}. #' @export -simulate_SOILWAT2_experiment <- function(actions, SFSW2_prj_meta, SFSW2_prj_inputs, - t_job_start, opt_behave, opt_parallel, opt_chunks, opt_out_run, opt_verbosity) { +quickprepare_dbOutput_dbWork <- function(actions, path, SFSW2_prj_meta, verbose = FALSE) { + print('Called quickprepare function in Simulation_project file') + # Prepare arguments + temp <- gather_project_inputs(SFSW2_prj_meta, use_preprocin = TRUE, verbose = verbose) + SFSW2_prj_meta <- temp[["SFSW2_prj_meta"]] + SFSW2_prj_inputs <- temp[["SFSW2_prj_inputs"]] + + SFSW2_prj_meta <- update_actions(SFSW2_prj_meta, actions, wipe_dbOutput = FALSE) + SFSW2_prj_meta <- update_todos(SFSW2_prj_meta) + + # Create dbOutput + SFSW2_prj_meta[["fnames_out"]][["dbOutput"]] <- file.path(path, "dbTables.sqlite3") + temp <- make_dbOutput(SFSW2_prj_meta, SFSW2_prj_inputs, + verbose = verbose) + + # Create/connect dbWork + stopifnot(setup_dbWork(path = path, include_YN = SFSW2_prj_inputs[["include_YN"]], + SFSW2_prj_meta = SFSW2_prj_meta, resume = FALSE)) + + invisible(temp[["ncol_dbOut_overall"]]) +} + + +#' Carry out a rSFSW2 simulation experiment +#' @export +simulate_SOILWAT2_experiment <- function(SFSW2_prj_meta, SFSW2_prj_inputs, + opt_behave, opt_parallel, opt_chunks, opt_out_run, opt_verbosity) { + print('Called simulate_SOILWAT2_experiment function in Simulation_project file') t1 <- Sys.time() + si <- utils::sessionInfo() if (opt_verbosity[["verbose"]]) { temp_call <- shQuote(match.call()[1]) print(paste0("rSFSW2's ", temp_call, ": started at ", t1, " for project ", sQuote(basename(SFSW2_prj_meta[["project_paths"]][["dir_prj"]])))) + print(si) # print system information + on.exit({print(paste0("rSFSW2's ", temp_call, ": ended after ", round(difftime(Sys.time(), t1, units = "secs"), 2), " s")); cat("\n")}, add = TRUE) } + if (opt_behave[["check_blas"]]) { + benchmark_BLAS(si$platform) + } + + rm(si) + + + #--------------------------------------------------------------------------------------# + #------------------------CHECK ON DATABASES FOR SIMULATION OUTPUT (FROM PREVIOUS RUN) + + #--- Check whether dbWork is up-to-date: + # recreate if (i) it is not being kept updated and (ii) status suggest being out of sync, + # or (iii) design structure is bad, or (iv) move_dbTempOut_to_dbOut() is called + # and processed at least one dbTempOut + do_dbWork <- (!opt_behave[["keep_dbWork_updated"]] && + dbWork_check_status(SFSW2_prj_meta[["project_paths"]][["dir_out"]], SFSW2_prj_meta)) || + !dbWork_check_design(SFSW2_prj_meta[["project_paths"]][["dir_out"]]) + + #--- Consolidate (partial) output data + if (!opt_out_run[["wipe_dbOutput"]]) { + dir_out_temp <- SFSW2_prj_meta[["project_paths"]][["dir_out_temp"]] + + if (length(get_fnames_dbTempOut(dir_out_temp)) > 0L) { + temp <- move_dbTempOut_to_dbOut(SFSW2_prj_meta, t_job_start = t1, opt_parallel, + opt_behave, opt_out_run, opt_verbosity, chunk_size = -1L, + dir_out_temp = dir_out_temp, check_if_Pid_present = FALSE) + + do_dbWork <- do_dbWork || temp > 0 + } + } + + #--- Make sure that dbWork is up-to-date + stopifnot(dbWork_clean(SFSW2_prj_meta[["project_paths"]][["dir_out"]])) + + if (do_dbWork) { + recreate_dbWork(SFSW2_prj_meta = SFSW2_prj_meta, verbose = opt_verbosity[["verbose"]]) + } + + + #--- Determine which runs (still) need to be done for this round + SFSW2_prj_meta[["sim_size"]][["runIDs_todo"]] <- + dbWork_todos(SFSW2_prj_meta[["project_paths"]][["dir_out"]]) + SFSW2_prj_meta[["sim_size"]][["runsN_todo"]] <- + length(SFSW2_prj_meta[["sim_size"]][["runIDs_todo"]]) + #--------------------------------------------------------------------------------------# #------------------------PREPARE SOILWAT2 SIMULATIONS @@ -801,63 +1136,25 @@ simulate_SOILWAT2_experiment <- function(actions, SFSW2_prj_meta, SFSW2_prj_inpu normal.kind = SFSW2_prj_meta[["rng_specs"]][["RNGkind_prev"]][2]), add = TRUE) - -# # Assigning objects from 'SFSW2_prj_meta' to function environment for the time being; -# # a hack for convience -# for (k in ls(SFSW2_prj_meta)) -# assign(k, SFSW2_prj_meta[[k]], envir = environment()) - ow_prev <- set_options_warn_error(opt_verbosity[["debug.warn.level"]], opt_verbosity[["debug.dump.objects"]], project_paths[["dir_prj"]], verbose = opt_verbosity[["verbose"]]) on.exit(options(ow_prev), add = TRUE) - #--- Update todos for simulation project - SFSW2_prj_meta[["prj_todos"]][["actions"]] <- actions - SFSW2_prj_meta[["prj_todos"]][["use_SOILWAT2"]] <- any(unlist(actions[c("sim_create", - "sim_execute", "sim_aggregate")])) - SFSW2_prj_meta[["prj_todos"]][["need_cli_means"]] <- SFSW2_prj_meta[["prj_todos"]][["need_cli_means"]] && - SFSW2_prj_meta[["prj_todos"]][["use_SOILWAT2"]] - SFSW2_prj_meta[["prj_todos"]][["wipe_dbOut"]] <- opt_out_run[["wipe_dbOutput"]] && - !(sum(actions) == 1 && actions[["ensemble"]]) - SFSW2_prj_meta[["prj_todos"]][["do_ensembles"]] <- SFSW2_prj_meta[["sim_scens"]][["has_ensembles"]] && - SFSW2_prj_meta[["prj_todos"]][["actions"]][["ensemble"]] - - #--- Determine which runs (still) need to be done for this round - stopifnot(dbWork_clean(SFSW2_prj_meta[["project_paths"]][["dir_out"]])) - SFSW2_prj_meta[["sim_size"]][["runIDs_todo"]] <- dbWork_todos(SFSW2_prj_meta[["project_paths"]][["dir_out"]]) # elements of runIDs_total - SFSW2_prj_meta[["sim_size"]][["runsN_todo"]] <- length(SFSW2_prj_meta[["sim_size"]][["runIDs_todo"]]) - - - #--------------------------------------------------------------------------------------# - #------------ORGANIZE DATABASES FOR SIMULATION OUTPUT - - SFSW2_prj_meta[["sim_size"]][["ncol_dbOut_overall"]] <- make_dbOutput(SFSW2_prj_meta, - SFSW2_prj_inputs, verbose = opt_verbosity[["verbose"]]) - - #--------------------------------------------------------------------------------------# #------------------------RUN RSOILWAT - - # print system information - temp <- utils::sessionInfo() - if (opt_verbosity[["verbose"]]) - print(temp) - - if (opt_behave[["check_blas"]]) - benchmark_BLAS(temp$platform) - - - # run the simulation experiment if (SFSW2_prj_meta[["prj_todos"]][["use_SOILWAT2"]] && SFSW2_prj_meta[["sim_size"]][["runsN_todo"]] > 0) { + on.exit(dbWork_clean(SFSW2_prj_meta[["project_paths"]][["dir_out"]]), add = TRUE) + swof <- rSOILWAT2::sw_out_flags() - swDataFromFiles <- read_SOILWAT2_FileDefaults(SFSW2_prj_meta[["project_paths"]][["dir_in_sw"]]) + swDataFromFiles <- read_SOILWAT2_FileDefaults(dir_in_sw = + SFSW2_prj_meta[["project_paths"]][["dir_in_sw"]]) args_do_OneSite <- gather_args_do_OneSite(SFSW2_prj_meta, SFSW2_prj_inputs) - runs.completed <- run_simulation_experiment(SFSW2_prj_meta[["sim_size"]], + runs.completed <- run_simulation_experiment(sim_size = SFSW2_prj_meta[["sim_size"]], SFSW2_prj_inputs, MoreArgs = args_do_OneSite) } else { @@ -865,76 +1162,142 @@ simulate_SOILWAT2_experiment <- function(actions, SFSW2_prj_meta, SFSW2_prj_inpu } + oe <- sys.on.exit() + oe <- remove_from_onexit_expression(oe, "exit_SFSW2_cluster") + on.exit(eval(oe), add = FALSE) + + #--------------------------------------------------------------------------------------# - # NOTE(drs): 'concatenation' may be much faster if temporary text files are not constructed - # around SQL insert statements, but instead as data.frames. Text files containing - # data.frames may be much faster with checks for duplicate P_id entries and could be - # inserted at once (instead of line by line) with the command - # RSQLite::dbWriteTable(con, name = table, value = "path/to/db-file", append = TRUE) + #------------------------OVERALL TIMING + delta.overall <- difftime(Sys.time(), t1, units = "secs") - # NOTE: The variables 'pids_inserted' and 'pids2_inserted' become quickly very large and - # may then be too large for available memory + compile_overall_timer(SFSW2_prj_meta[["fnames_out"]][["timerfile"]], + SFSW2_prj_meta[["project_paths"]][["dir_out"]], SFSW2_glovars[["p_workersN"]], + runs.completed, SFSW2_prj_meta[["sim_scens"]][["N"]], 0, delta.overall, NA, + 0, 0) - t.outputDB <- Sys.time() + if (opt_verbosity[["verbose"]]) { + print(utils::sessionInfo()) + } - if (actions[["concat_dbOut"]]) { + SFSW2_prj_meta +} - has_time_to_concat <- {difftime(t.outputDB, t_job_start, units = "secs") + - opt_parallel[["opt_job_time"]][["one_concat_s"]]} < - opt_parallel[["opt_job_time"]][["wall_time_s"]] - if (has_time_to_concat) { - move_temporary_to_outputDB(SFSW2_prj_meta, t_job_start, opt_parallel, opt_behave, - opt_verbosity) +#--------------------------------------------------------------------------------------# +#' Move temporary output data to output databases +#' +#' @param dir_out_temp A character string. The path to temporary output files. +#' If \code{NULL}, then temporary output files are assumed to be located at +#' \code{SFSW2_prj_meta[["project_paths"]][["dir_out_temp"]]}. This cannot be \code{NULL} +#' unless all simulation runs have finished (to prevent overwriting of temporary output +#' files of a potential concurrent run). This can however only be checked if +#' \code{opt_behave[["keep_dbWork_updated"]]}. +#' +#' @section Details: Expectations on how the function locates files on disk: \itemize{ +#' \item \code{SFSW2_prj_meta[["project_paths"]][["dir_out"]]} is the path to +#' \code{dbWork} +#' \item \code{SFSW2_prj_meta[["project_paths"]][["dir_out_temp"]]} is the path to +#' \code{concatFile} and \code{SQL_tmptxt_failed.txt} +#' \item \code{dir_out_temp} is the path to temporary output files +#' \item SFSW2_prj_meta[["fnames_out"]][["dbOutput"]] is the full file name of +#' \code{dbOutput} +#' \item SFSW2_prj_meta[["fnames_out"]][["dbOutput_current"]] is the full file name of +#' \code{dbOutput_current} +#' } +#' +#' @section Details: The code executes \code{opt_out} option +#' \code{dbOutCurrent_from_dbOut} only, once all simulation runs are completed. +#' +#' @export +move_output_to_dbOutput <- function(SFSW2_prj_meta, t_job_start, opt_parallel, + opt_behave, opt_out_run, opt_verbosity, check_if_Pid_present = FALSE, + dir_out_temp = NULL) { + print('Called move_output_to_dbOutput function in Simulation_project file') + - } else { - print(paste("Need at least", opt_parallel[["opt_job_time"]][["one_concat_s"]], - "seconds to put SQL in output DB.")) + t.outputDB <- Sys.time() + + if (opt_behave[["keep_dbWork_updated"]]) { + runsN_todo <- dbWork_Ntodo(SFSW2_prj_meta[["project_paths"]][["dir_out"]]) + + if (runsN_todo > 0 && is.null(dir_out_temp)) { + stop("'move_output_to_dbOutput': if 'dir_out_temp' is NULL, then all runs must", + " have completed; but runsN_todo = ", runsN_todo) } + } + has_time_to_concat <- {difftime(t.outputDB, t_job_start, units = "secs") + + opt_parallel[["opt_job_time"]][["one_concat_s"]]} < + opt_parallel[["opt_job_time"]][["wall_time_s"]] - if (SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_dbOut"]] && - !SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_tempTXT"]]) { + if (has_time_to_concat) { + if (is.null(dir_out_temp)) { + # Use default project location for temporary text files + dir_out_temp <- SFSW2_prj_meta[["project_paths"]][["dir_out_temp"]] + } - has_time_to_concat <- {difftime(Sys.time(), t_job_start, units = "secs") + - opt_parallel[["opt_job_time"]][["one_concat_s"]]} < - opt_parallel[["opt_job_time"]][["wall_time_s"]] + # check: old behavior used temporary text files; new code uses temporary database files + has_tempTXT <- length(get_fnames_temporaryOutput(dir_out_temp)) > 0L + has_tempDB <- length(get_fnames_dbTempOut(dir_out_temp)) > 0L - if (has_time_to_concat) { - do_copyCurrentConditionsFromDatabase(SFSW2_prj_meta[["fnames_out"]][["dbOutput"]], - SFSW2_prj_meta[["fnames_out"]][["dbOutput_current"]], - verbose = opt_verbosity[["verbose"]]) + if (has_tempTXT) { + # old behavior used temporary text files; maintain calls as long as functions are + # deprecated and not yet defunct + if (check_if_Pid_present) { + move_temporary_to_outputDB_withChecks(SFSW2_prj_meta, t_job_start, opt_parallel, + opt_behave, opt_out_run, opt_verbosity, chunk_size = 1000L, + check_if_Pid_present = TRUE, dir_out_temp = dir_out_temp) } else { - print(paste("Need at least", opt_parallel[["opt_job_time"]][["one_concat_s"]], - "seconds to put SQL in output DB.")) + move_temporary_to_outputDB(SFSW2_prj_meta, t_job_start, opt_parallel, opt_behave, + opt_out_run, opt_verbosity, chunk_size = 1000L, dir_out_temp = dir_out_temp) } } - } - #timing of outputDB - delta.outputDB <- as.double(difftime(Sys.time(), t.outputDB, units = "secs")) + if (has_tempDB) { + # new behavior + if (!SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_dbOut"]] && + SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_tempTXT"]]) { + warning("move_output_to_dbOutput: option 'dbOutCurrent_from_tempTXT' is ", + "currently not supported") + } + move_dbTempOut_to_dbOut(SFSW2_prj_meta, t_job_start, opt_parallel, opt_behave, + opt_out_run, opt_verbosity, chunk_size = -1L, dir_out_temp = dir_out_temp, + check_if_Pid_present = check_if_Pid_present) + } - oe <- sys.on.exit() - oe <- remove_from_onexit_expression(oe, "exit_SFSW2_cluster") - on.exit(eval(oe), add = FALSE) + } else { + print(paste("Need at least", opt_parallel[["opt_job_time"]][["one_concat_s"]], + "seconds to put SQL in output DB.")) + } - #---------------------------------------------------------------------------------------# - #------------------------OVERALL TIMING - delta.overall <- difftime(Sys.time(), t1, units = "secs") + if (SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_dbOut"]] && + !SFSW2_prj_meta[["opt_out_fix"]][["dbOutCurrent_from_tempTXT"]] && runsN_todo == 0) { - compile_overall_timer(SFSW2_prj_meta[["fnames_out"]][["timerfile"]], - SFSW2_prj_meta[["project_paths"]][["dir_out"]], SFSW2_glovars[["p_workersN"]], - runs.completed, SFSW2_prj_meta[["sim_scens"]][["N"]], 0, delta.overall, delta.outputDB, - 0, 0) + has_time_to_concat <- {difftime(Sys.time(), t_job_start, units = "secs") + + opt_parallel[["opt_job_time"]][["one_concat_s"]]} < + opt_parallel[["opt_job_time"]][["wall_time_s"]] + if (has_time_to_concat) { + do_copyCurrentConditionsFromDatabase(SFSW2_prj_meta[["fnames_out"]][["dbOutput"]], + SFSW2_prj_meta[["fnames_out"]][["dbOutput_current"]], + verbose = opt_verbosity[["verbose"]]) - #---------------------------------------------------------------------------------------# - if (opt_verbosity[["verbose"]]) - print(utils::sessionInfo()) + } else { + print(paste("Need at least", opt_parallel[["opt_job_time"]][["one_concat_s"]], + "seconds to put SQL in output DB.")) + } + } + #timing of outputDB + delta.outputDB <- as.double(difftime(Sys.time(), t.outputDB, units = "secs")) - SFSW2_prj_meta + write_timer(SFSW2_prj_meta[["fnames_out"]][["timerfile"]], "Time_OutputDB", + time_sec = delta.outputDB) + + invisible(TRUE) } +print('End Simulation_project file\n') diff --git a/R/Simulation_Run.R b/R/Simulation_Run.R index 23670d87..e844067a 100644 --- a/R/Simulation_Run.R +++ b/R/Simulation_Run.R @@ -1,6 +1,6 @@ #---------------------------------------------------------------------------------------# #------------------------FUNCTIONS FOR SOILWAT2 SIMULATIONS - +print('Start running Simulation_Run') #' List of objects to export which are required by do_OneSite and are not in rSFSW2 #' (sorted alphabetically) #' @export @@ -369,7 +369,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, for (pc in do_lookup) { if (sw_input_experimentals_use[pc$flag] && !done_prior[pc$flag]) { - if (any(is.na(i_sw_input_treatments[[pc$flag]])) || + if (anyNA(i_sw_input_treatments[[pc$flag]]) || !all(unique(i_sw_input_treatments[[pc$flag]]) %in% rownames(pc$tr_input))) { print(paste0(tag_simfid, ": ERROR: ", shQuote(pc$flag), " column in ", @@ -434,7 +434,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, layers_depth = layers_depth, adjustType = do_vegs[["adjustType"]][k]) - if (!any(is.na(trco)) || sum(trco, na.rm = TRUE) > 0) {#trco does not have NA and sum is greater than 0. + if (!anyNA(trco) || sum(trco, na.rm = TRUE) > 0) {#trco does not have NA and sum is greater than 0. #set the use flags i.temp <- grep(paste0(do_vegs[["veg"]][k], "_TranspCoeff"), names(sw_input_soils_use)) sw_input_soils_use[i.temp[seq_along(trco)]] <- TRUE @@ -1829,7 +1829,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, #ncol_dbOut_overall comes from database creation temp <- paste(c(P_id, if (sim_size[["ncol_dbOut_overall"]] > 0) paste0(rep("NULL", sim_size[["ncol_dbOut_overall"]]), collapse = ",")), - collapse = ", ") + collapse = ",") SQL1 <- paste0("INSERT INTO \"aggregation_overall_mean\" VALUES (", temp, ");") SQL2 <- paste0("INSERT INTO \"aggregation_overall_sd\" VALUES (", temp, ");") if (length(SQL) == 0) { @@ -1870,32 +1870,48 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, "intercept.yr", "intercept.mo", "intercept.dy", "deepDrain.yr", "deepDrain.mo", "deepDrain.dy", "veg.yr", "veg.mo", "veg.dy", - "co2effects.yr", "co2effects.mo", "co2effects.dy") + "co2effects.yr", "co2effects.mo", "co2effects.dy", + "degday_dy", + "dry_soil_dy", "dry_soil_mo", + "wet_soil_dy", + "adj_NS_months", "adj_NS_days") to_del <- to_del[to_del %in% ls()] if (length(to_del) > 0) try(rm(list = to_del), silent = TRUE) #result vector column index indicating variable within set of n_variables per scenario +#TODO(feature_OverhaulAggregationCode): remove next line (resMeans and resSDs are replaces by resAgg) resMeans <- resSDs <- rep(NA, length = sim_size[["ncol_dbOut_overall"]]) + + # aggregated results per scenario + if (!exists("temp.yr")) temp.yr <- get_Temp_yr(runDataSC, isim_time) + temp <- aggs[["agg_fun"]](temp.yr$mean, return_ids = TRUE) + resAgg <- matrix(NA, nrow = sim_size[["ncol_dbOut_overall"]], ncol = nrow(temp)) nv <- 1 + is_central <- temp[, "aggfun_id"] %in% + aggs[["agg_fun_defs"]][aggs[["agg_fun_defs"]][, "type"] == "central", "id"] + is_var <- temp[, "aggfun_id"] %in% + aggs[["agg_fun_defs"]][aggs[["agg_fun_defs"]][, "type"] == "variation", "id"] + is_yearly <- temp[, "aggfun_id"] %in% + aggs[["agg_fun_defs"]][aggs[["agg_fun_defs"]][, "type"] == "yearly", "id"] + #---Aggregation: SOILWAT2 inputs #0 if (prj_todos[["aon"]]$input_SoilProfile) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "input_SoilProfile") - resMeans[nv:(nv+7)] <- c(soilDepth_cm, soilLayers_N, unlist(texture)) - nv <- nv+8 - resMeans[nv] <- swRunScenariosData[[1]]@site@SoilTemperatureConstants[9] - nv <- nv+1 + resAgg[nv:(nv+8), is_central] <- c(soilDepth_cm, soilLayers_N, unlist(texture), + swRunScenariosData[[sc]]@site@SoilTemperatureConstants[9]) + nv <- nv + 9 } #1 if (prj_todos[["aon"]]$input_FractionVegetationComposition) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "input_FractionVegetationComposition") - resMeans[nv:(nv+7)] <- c(rSOILWAT2::swProd_Composition(swRunScenariosData[[sc]]), + resAgg[nv:(nv+7), is_central] <- c(rSOILWAT2::swProd_Composition(swRunScenariosData[[sc]]), grasses.c3c4ann.fractions[[sc]]) - nv <- nv+8 + nv <- nv + 8 } #2 if (prj_todos[["aon"]]$input_VegetationBiomassMonthly) { @@ -1906,11 +1922,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, function(x) utils::getFromNamespace(x, "rSOILWAT2")(swRunScenariosData[[sc]])) for (k in seq_along(temp)) { - resMeans[nv:(nv + 11)] <- temp[[k]][, 1] + resAgg[nv:(nv+11), is_central] <- temp[[k]][ ,1] nv <- nv + 12 - resMeans[nv:(nv + 11)] <- temp[[k]][, 2] + resAgg[nv:(nv+11), is_central] <- temp[[k]][ ,2] nv <- nv + 12 - resMeans[nv:(nv + 11)] <- temp[[k]][, 2] * temp[[k]][, 3] + resAgg[nv:(nv+11), is_central] <- temp[[k]][ ,2] * temp[[k]][ ,3] nv <- nv + 12 } } @@ -1942,9 +1958,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, sumWeightedLiveBiomassByMonth <- apply(sweep(tempdat, MARGIN = 2, fracs, FUN = "*"), MARGIN = 1, sum) #sweep out fractionals, and sum over rows maxMonth <- which(sumWeightedLiveBiomassByMonth == max(sumWeightedLiveBiomassByMonth)) #returns index, which is the month, of max bio meanPeakMonth <- circ_mean(maxMonth, 12) - duration <- circ_range(maxMonth, 12)+1 + #just in case we get more then one month + duration <- circ_range(maxMonth, 12) + 1 - resMeans[nv:(nv+1)] <- c(meanPeakMonth, duration) #just in case we get more then one month + resAgg[nv:(nv+1), is_central] <- c(meanPeakMonth, duration) nv <- nv+2 } #4 @@ -1952,8 +1969,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "input_Phenology") if (!exists("temp.mo")) temp.mo <- get_Temp_mo(runDataSC, isim_time) + monthly.temp <- tapply(temp.mo$mean, simTime2$month_ForEachUsedMonth, mean) #get mean monthly temp Months_Above_Threshold <- which(monthly.temp > opt_sim[["growseason_Tlimit_C"]]) #get months above threshold + if (i_SWRunInformation$Y_WGS84 < 0) { #check for Southern Hemi monthly.temp <- c(monthly.temp[7:12], monthly.temp[1:6]) #rearrange temp Months_Above_Threshold <- c(7:12, 1:6)[Months_Above_Threshold] #get months above threshold, then map back to real months. @@ -1961,7 +1980,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, Input_PhenologyStart_Month <- Months_Above_Threshold[1] #get the first month Input_PhenologyEnd_Month <- Months_Above_Threshold[length(Months_Above_Threshold)] #get the last month - resMeans[nv:(nv+1)] <- c(Input_PhenologyStart_Month, Input_PhenologyEnd_Month) + resAgg[nv:(nv+1), is_central] <- c(Input_PhenologyStart_Month, + Input_PhenologyEnd_Month) nv <- nv+2 } #5 @@ -1979,14 +1999,15 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, } iinv <- inv <- nv - for (iv in 1:4) { + for (iv in 1:4) { # c(Grass, Shrub, Tree, Forb) nv <- nv+SFSW2_glovars[["slyrs_maxN"]] #We don't know the max number of soil layers (aggLs_no) among all simulations, i.e., set to the maximum - resMeans[(inv+(iv-1)*SFSW2_glovars[["slyrs_maxN"]]):(nv-1)] <- c(TaggLs[iv, ], rep(NA, times = SFSW2_glovars[["slyrs_maxN"]]-aggLs_no)) + resAgg[(inv+(iv-1)*SFSW2_glovars[["slyrs_maxN"]]):(nv-1), is_central] <- c( + TaggLs[iv, ], rep(NA, times = SFSW2_glovars[["slyrs_maxN"]] - aggLs_no)) } inv <- nv for (iv in 1:4) { nv <- nv+2 - resMeans[(inv+(iv-1)*2):(nv-1)] <- Ttb[iv, ] + resAgg[(inv+(iv-1)*2):(nv-1), is_central] <- Ttb[iv, ] } rm(Tcoeff, TaggLs, Ttb) @@ -1994,8 +2015,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, #6 if (prj_todos[["aon"]]$input_ClimatePerturbations) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "input_ClimatePerturbations") - - resMeans[nv:(nv+35)] <- as.vector(as.numeric(ClimatePerturbationsVals[sc, ])) + resAgg[nv:(nv+35), is_central] <- as.vector(as.numeric(ClimatePerturbationsVals[sc,])) nv <- nv+36 } @@ -2017,8 +2037,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "yearlyTemp") if (!exists("temp.yr")) temp.yr <- get_Temp_yr(runDataSC, isim_time) - resMeans[nv] <- mean(temp.yr$mean) - resSDs[nv] <- stats::sd(temp.yr$mean) + resAgg[nv, ] <- agg_fun(temp.yr$mean) nv <- nv+1 } #8 @@ -2026,13 +2045,9 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "yearlyPPT") if (!exists("prcp.yr")) prcp.yr <- get_PPT_yr(runDataSC, isim_time) - resMeans[nv] <- mean(prcp.yr$ppt) - resSDs[nv] <- stats::sd(prcp.yr$ppt) - resMeans[nv+1] <- mean(snowofppt <- prcp.yr$snowfall/prcp.yr$ppt, na.rm = TRUE) - resSDs[nv+1] <- stats::sd(snowofppt, na.rm = TRUE) + resAgg[nv, ] <- agg_fun(prcp.yr$ppt) + resAgg[nv+1, ] <- agg_fun(prcp.yr$snowfall / prcp.yr$ppt, na.rm = TRUE) nv <- nv+2 - - rm(snowofppt) } #9 if (prj_todos[["aon"]]$dailySnowpack) { @@ -2046,8 +2061,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, rainOnSnow <- as.matrix(tapply(rainOnSnow, simTime2$year_ForEachUsedDay, sum)) rainOnSnow <- rainOnSnow / prcp.yr$ppt - resMeans[nv] <- mean(rainOnSnow, na.rm = TRUE) - resSDs[nv] <- stats::sd(rainOnSnow, na.rm = TRUE) + resAgg[nv, ] <- agg_fun(rainOnSnow, na.rm = TRUE) nv <- nv+1 rm(rainOnSnow) @@ -2058,17 +2072,25 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("SWE.dy")) SWE.dy <- get_SWE_dy(runDataSC, isim_time) if (sum(SWE.dy$val) > 0) { - snowyears <- simTime2$year_ForEachUsedDay_NSadj + ifelse(simTime2$doy_ForEachUsedDay_NSadj > 273, 1, 0) # 1. snow-year: N-hemisphere: October 1st = 1 day of snow year; S-hemisphere: April 1st = 1 day of snow year - adjDays <- ifelse(simTime2$doy_ForEachUsedDay[1] == simTime2$doy_ForEachUsedDay_NSadj[1], 365 - 272, -90) - - if (length(unique(snowyears))-2 > 0) { - res.snow <- matrix(data = 0, nrow = length(unique(snowyears))-2, ncol = 9, byrow = TRUE) - res.snow[, 1] <- unique(snowyears)[2:(length(unique(snowyears))-1)] # 1. snowyear - snowyear.trim <- !is.na(pmatch(snowyears, res.snow[, 1], duplicates.ok = TRUE)) - res.snow[, 2] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], which.max) - adjDays # 2. doy of peak snowpack water-equivalent (mm) - res.snow[, 6] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], function(s) sum(s > 0)) # 6. total number of days of snow cover - res.snow[, 7] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], max) # 7. peak snowpack water-equivalent (mm) - + snowyears <- simTime2$year_ForEachUsedDay_NSadj + if (simTime2$doy_ForEachUsedDay_NSadj > 273) 1 else 0 # 1. snow-year: N-hemisphere: October 1st = 1 day of snow year; S-hemisphere: April 1st = 1 day of snow year + yrs_snow <- unique(snowyears) + n_yrs_snow <- length(yrs_snow) + adjDays_snowyear <- if (simTime2$doy_ForEachUsedDay[1] == simTime2$doy_ForEachUsedDay_NSadj[1]) 365 - 272 else -90 + + if (n_yrs_snow > 2) { + res.snow <- matrix(0, nrow = n_yrs_snow - 1, ncol = 9) + res.snow[, 1] <- yrs_snow[1:(n_yrs_snow - 1)] # 1. snowyears + res.snow[1, -1] <- NA + snowyear.trim <- !is.na(pmatch(snowyears, res.snow[-1, 1], duplicates.ok = TRUE)) # snowyears with full data + res.snow[-1, 2] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], which.max) - adjDays_snowyear # 2. doy of peak snowpack water-equivalent (mm) + res.snow[-1, 6] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], function(s) sum(s > 0)) # 5. total number of days of snow cover + res.snow[-1, 7] <- tapply(SWE.dy$val[snowyear.trim], snowyears[snowyear.trim], max) # 6. peak snowpack water-equivalent (mm) + + snowy <- SWE.dy$val > 0 + for (syi in 1 + seq_len(nrow(res.snow) - 1)) { + dat_snowy <- snowy[which(snowyears == res.snow[syi, 1])] + if (any(dat_snowy)) { +# resolve against master syi <- 1 for (sy in res.snow[, 1]) { r <- rle(ifelse(SWE.dy$val[which(snowyears == sy)]>0, 1, 0)) @@ -2081,7 +2103,17 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, syi <- syi + 1 } +#TODO(feature_OverhaulAggregationCode): + r <- rle(dat_snowy) + snowy_runs <- r$lengths[r$values] + res.snow[syi, 4] <- sort(snowy_runs, decreasing = TRUE)[1] # 4. number of continous days of snow cover + i_snowy <- max(which(snowy_runs == res.snow[syi, 4])) # last run in case of > 1 of same length + res.snow[syi, 3] <- cumsum(r$lengths)[r$values][i_snowy] - adjDays_snowyear # 3. last day of continous snow cover + } + } + if (nrow(res.snow) > 1) { +# resolve against master resMeans[nv:(nv+7)] <- c(apply(res.snow[, 2:4], 2, circ_mean, int = 365, na.rm = TRUE), apply(res.snow[, 5:7], 2, mean, na.rm = TRUE), apply(res.snow[, 8:9], 2, circ_mean, int = 365, na.rm = TRUE)) @@ -2089,17 +2121,22 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, apply(res.snow[, 5:7], 2, stats::sd, na.rm = TRUE), apply(res.snow[, 8:9], 2, circ_sd, int = 365, na.rm = TRUE)) +#TODO(feature_OverhaulAggregationCode): + resAgg[nv:(nv+1), ] <- t(apply(res.snow[, 2:3], 2, agg_fun_circular, int = 365, na.rm = TRUE)) + resAgg[(nv+2):(nv+4), ] <- t(apply(res.snow[, 4:6], 2, agg_fun, na.rm = TRUE), + apply(res.snow[, 5:7], 2, stats::sd, na.rm = TRUE), + apply(res.snow[, 8:9], 2, circ_sd, int = 365, na.rm = TRUE)) + } else { - resMeans[nv:(nv+7)] <- res.snow[1, -1] - resSDs[nv:(nv+7)] <- 0 + resAgg[nv:(nv+7), is_central] <- res.snow[2,-1] } - rm(snowyears, snowyear.trim, res.snow, adjDays) + rm(snowyears, snowyear.trim, res.snow, adjDays_snowyear, snowy) } else { - resMeans[nv:(nv+7)] <- resSDs[nv:(nv+7)] <- 0 + resAgg[nv:(nv+7), ] <- 0 } } else { - resMeans[nv:(nv+7)] <- resSDs[nv:(nv+7)] <- 0 + resAgg[nv:(nv+7), ] <- 0 } nv <- nv+8 } @@ -2116,8 +2153,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, frostWithoutSnow <- SWE.dy$val[wateryear.trim] == 0 & temp.dy$min[wateryear.trim] < iTmin frostWithoutSnow <- tapply(frostWithoutSnow, wateryears[wateryear.trim], sum) #Numbers of days with min.temp < 0 and snow == 0 for each wateryear - resMeans[nv] <- mean(frostWithoutSnow, na.rm = TRUE) - resSDs[nv] <- stats::sd(frostWithoutSnow, na.rm = TRUE) + resAgg[nv, ] <- agg_fun(frostWithoutSnow, na.rm = TRUE) nv <- nv+1 } @@ -2125,7 +2161,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (opt_agg[["use_doy_range"]]) { - dailyrange <- if(length(simTime2$doy_NSadj_dailyFrostinSnowPeriod_doyRange) > 1) { + dailyrange <- if (length(simTime2$doy_NSadj_dailyFrostinSnowPeriod_doyRange) > 1) { simTime2$doy_NSadj_dailyFrostinSnowPeriod_doyRange } else { simTime2[pmatch("doy_NSadj_defaultWateryear", names(simTime2))] @@ -2163,8 +2199,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, FUN = sum) nv_new <- nv + nv_add - resMeans[nv:(nv_new - 1)] <- .colMeans(HotDays, isim_time$no.useyr, nv_add) - resSDs[nv:(nv_new - 1)] <- apply(HotDays, 2, stats::sd) + resAgg[nv:(nv_new - 1), ] <- t(apply(HotDays, 2, agg_fun, na.rm = TRUE)) nv <- nv_new rm(HotDays, dailyExcess) @@ -2187,8 +2222,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, FUN = sum) nv_new <- nv + nv_add - resMeans[nv:(nv_new - 1)] <- .colMeans(WarmDays, isim_time$no.useyr, nv_add) - resSDs[nv:(nv_new - 1)] <- apply(WarmDays, 2, stats::sd) + resAgg[nv:(nv_new - 1), ] <- t(apply(WarmDays, 2, agg_fun, na.rm = TRUE)) nv <- nv_new rm(WarmDays, dailyExcess) @@ -2253,10 +2287,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, bins = opt_agg[["bin_prcp_mm"]], nbins = 7, simTime = isim_time, simTime2 = simTime2) - resMeans[nv] <- mean(ppt_sizes$eventsPerYear) - resSDs[nv] <- stats::sd(ppt_sizes$eventsPerYear) - resMeans[(nv+1):(nv+7)] <- apply(ppt_sizes$freq.summary, 1, mean) - resSDs[(nv+1):(nv+7)] <- apply(ppt_sizes$freq.summary, 1, stats::sd) + resAgg[nv, ] <- agg_fun(ppt_sizes$eventsPerYear) + resAgg[(nv+1):(nv+7), ] <- t(apply(ppt_sizes$freq.summary, 1, agg_fun)) nv <- nv+8 rm(ppt_sizes) @@ -2266,8 +2298,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "yearlyPET") if (!exists("PET.yr")) PET.yr <- get_PET_yr(runDataSC, isim_time) - resMeans[nv] <- mean(PET.yr$val) - resSDs[nv] <- stats::sd(PET.yr$val) + resAgg[nv, ] <- agg_fun(PET.yr$val) nv <- nv+1 } #16 @@ -2282,18 +2313,15 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, #in case var(ppt or swp) == 0 => cor is undefined: exclude those years temp <- by(data.frame(PET.mo$val, swpmatric.mo$top), simTime2$yearno_ForEachUsedMonth, cor2) - resMeans[nv] <- mean(temp, na.rm = TRUE) - resSDs[nv] <- stats::sd(temp, na.rm = TRUE) + resAgg[nv, ] <- agg_fun(temp, na.rm = TRUE) if (length(bottomL) > 0 && !identical(bottomL, 0)) { temp <- by(data.frame(PET.mo$val, swpmatric.mo$bottom), simTime2$yearno_ForEachUsedMonth, cor2) - resMeans[nv+1] <- mean(temp, na.rm = TRUE) - resSDs[nv+1] <- stats::sd(temp, na.rm = TRUE) + resAgg[nv+1, ] <- agg_fun(temp, na.rm = TRUE) } temp <- by(data.frame(temp.mo$mean, prcp.mo$ppt), simTime2$yearno_ForEachUsedMonth, cor2) - resMeans[nv+2] <- mean(temp, na.rm = TRUE) - resSDs[nv+2] <- stats::sd(temp, na.rm = TRUE) + resAgg[nv+2, ] <- agg_fun(temp, na.rm = TRUE) nv <- nv+3 } @@ -2315,9 +2343,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, annualPET = mean(PET.yr$val), monthlyTemp = meanmonthlyTemp) - resMeans[nv:(nv+2)] <- unlist(di.normals) - resMeans[(nv+3):(nv+5)] <- sapply(di.ts, mean, na.rm = TRUE) - resSDs[(nv+3):(nv+5)] <- sapply(di.ts, stats::sd, na.rm = TRUE) + resAgg[nv:(nv+2), is_central] <- unlist(di.normals) + resAgg[(nv+3):(nv+5), ] <- t(sapply(di.ts, agg_fun, na.rm = TRUE)) nv <- nv+6 rm(di.ts, di.normals) @@ -2326,9 +2353,15 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (prj_todos[["aon"]]$yearlyDryWetPeriods) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "yearlyDryWetPeriods") if (!exists("prcp.yr")) prcp.yr <- get_PPT_yr(runDataSC, isim_time) - temp.rle <- rle(as.vector(sign(prcp.yr$ppt - mean(prcp.yr$ppt)))) - resMeans[nv:(nv+1)] <- c(stats::quantile(temp.rle$lengths[temp.rle$values == -1], probs = 0.9, type = 7), stats::quantile(temp.rle$lengths[temp.rle$values == 1], probs = 0.9, type = 7)) + temp <- rle(as.vector(sign(prcp.yr$ppt - mean(prcp.yr$ppt)))) + + # Runs of years with below average annual precipitation + resAgg[nv, !is_yearly] <- agg_fun(temp$lengths[temp$values == -1], + omit_yearly = TRUE) + # Runs of years with above average annual precipitation + resAgg[nv+1, !is_yearly] <- agg_fun(temp$lengths[temp$values == 1], + omit_yearly = TRUE) nv <- nv+2 rm(temp.rle) @@ -2350,12 +2383,9 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, stats::sd) tv <- matrix(temp, nrow = 12) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- apply(dws, 1, mean, na.rm = TRUE) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- apply(dws, 1, stats::sd, na.rm = TRUE) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- apply(dds, 1, mean, na.rm = TRUE) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- apply(dds, 1, stats::sd, na.rm = TRUE) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+24] <- apply(tv, 1, mean, na.rm = TRUE) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+24] <- apply(tv, 1, stats::sd, na.rm = TRUE) + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(dws, 1, agg_fun, na.rm = TRUE)) + resAgg[nv+SFSW2_glovars[["st_mo"]]-1+12, ] <- t(apply(dds, 1, agg_fun, na.rm = TRUE)) + resAgg[nv+SFSW2_glovars[["st_mo"]]-1+24, ] <- t(apply(tv, 1, agg_fun, na.rm = TRUE)) nv <- nv+36 rm(dws, dds, tv) @@ -2371,10 +2401,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, bins = opt_agg[["bin_prcpfree_days"]], nbins = 4, simTime = isim_time, simTime2 = simTime2) - resMeans[nv] <- mean(ppt_free$eventsPerYear) - resSDs[nv] <- stats::sd(ppt_free$eventsPerYear) - resMeans[(nv+1):(nv+4)] <- apply(ppt_free$freq.summary, 1, mean) - resSDs[(nv+1):(nv+4)] <- apply(ppt_free$freq.summary, 1, stats::sd) + resAgg[nv, ] <- agg_fun(ppt_free$eventsPerYear) + resAgg[(nv+1):(nv+4), ] <- apply(ppt_free$freq.summary, 1, agg_fun) nv <- nv+5 rm(ppt_free) @@ -2386,39 +2414,47 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("PET.mo")) PET.mo <- get_PET_mo(runDataSC, isim_time) if (!exists("prcp.mo")) prcp.mo <- get_PPT_mo(runDataSC, isim_time) - #n_variables is set for 4*4*3 with length(binSPEI_m) == 4 && length(probs) == 3 - binSPEI_m <- c(1, 12, 24, 48) #months - probs <- c(0.025, 0.5, 0.975) - iresp <- rep(1:4, each = length(probs)) - - for (iscale in seq_along(binSPEI_m)) { - rvec <- rep(NA, times = 4 * length(probs)) - if (binSPEI_m[iscale] < length(prcp.mo$ppt) && requireNamespace("SPEI")) { - spei_m <- as.numeric(SPEI::spei(prcp.mo$ppt - PET.mo$val, scale = binSPEI_m[iscale])$fitted) - spei_m <- spei_m[!is.na(spei_m)] - runs <- rle(spei_m >= 0) - - if (sum(runs$values) > 0) { - rvec[iresp == 1] <- stats::quantile(runs$lengths[runs$values], probs = probs, type = 7) #duration of positive spells - rvec[iresp == 2] <- stats::quantile(spei_m[spei_m >= 0], probs = probs, type = 7) #intensity of positive spells + for (iscale in seq_along(opt_agg[["SPEI_tscales_months"]])) { + if (opt_agg[["SPEI_tscales_months"]][iscale] < length(prcp.mo$ppt)) { + if (requireNamespace("SPEI")) { + spei_m <- SPEI::spei(prcp.mo$ppt - PET.mo$val, + scale = opt_agg[["SPEI_tscales_months"]][iscale]) + spei_m <- as.numeric(spei_m$fitted) + if (anyNA(spei_m)) { + print(paste(tag_simpidfid, ": 'monthlySPEIEvents' at scale of", + opt_agg[["SPEI_tscales_months"]][iscale], "month(s) produced NAs;", + "these are removed for further calculations")) + spei_m <- spei_m[!is.na(spei_m)] + } + + } else { + print(paste0(tag_simpidfid, ": package 'SPEI' missing", + "or simulation period shorter than ", binSPEI_m[iscale], " months. ", + "'monthlySPEIEvents' are not calculated.")) + + spei_m <- rep(NA, length(prcp.mo$ppt)) } - if (sum(!runs$values) > 0) { - rvec[iresp == 3] <- stats::quantile(runs$lengths[!runs$values], probs = probs, type = 7) #duration of negative spells - rvec[iresp == 4] <- stats::quantile(spei_m[spei_m < 0], probs = probs, type = 7) #intensity of positive spells + positive_spei <- spei_m >= 0 + runs <- rle(positive_spei) + + if (any(runs$values)) { + # duration of positive spells + resAgg[nv, ] <- agg_fun(runs$lengths[runs$values], omit_yearly = TRUE) + # intensity of positive spells + resAgg[nv+1, ] <- agg_fun(spei_m[positive_spei], omit_yearly = TRUE) + } + if (any(!runs$values)) { + # duration of positive spells + resAgg[nv+2, ] <- agg_fun(runs$lengths[!runs$values], omit_yearly = TRUE) + # intensity of positive spells + resAgg[nv+3, ] <- agg_fun(spei_m[!positive_spei], omit_yearly = TRUE) } - - } else { - print(paste0(tag_simpidfid, ": package 'SPEI' missing", - "or simulation period shorter than ", binSPEI_m[iscale], " months. ", - "'monthlySPEIEvents' are not calculated.")) } - resMeans[nv:(nv+length(rvec)-1)] <- rvec - nv <- nv+length(rvec) + nv <- nv + 4 } } - #---Aggregation: Climatic control #22 if (prj_todos[["aon"]]$monthlyPlantGrowthControls) { #Nemani RR, Keeling CD, Hashimoto H et al. (2003) Climate-Driven Increases in Global Terrestrial Net Primary Production from 1982 to 1999. Science, 300, 1560-1563. @@ -2449,9 +2485,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, temp <- (1 - ifelse(cloudiness < 10, 0, (cloudiness - 10) / 100 * 0.5)) * DayNumber_ForEachUsedMonth control_radiation <- tapply(temp, simTime2$yearno_ForEachUsedMonth, sum) / DayNumber_ForEachUsedYear - temp <- data.frame(control_temp, control_water, control_radiation) - resMeans[nv:(nv+2)] <- apply(temp, 2, mean, na.rm = TRUE) - resSDs[nv:(nv+2)] <- apply(temp, 2, stats::sd, na.rm = TRUE) + temp <- cbind(control_temp, control_water, control_radiation) + resAgg[nv:(nv+2), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+3 rm(DayNumber_ForEachUsedMonth, DayNumber_ForEachUsedYear, control_temp, control_water, control_radiation, aridity, temp, cloudiness) @@ -2461,8 +2496,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "dailyC4_TempVar") if (!exists("temp.dy")) temp.dy <- get_Temp_dy(runDataSC, isim_time) - resMeans[nv:(nv+2)] <- (temp <- as.numeric(sw_dailyC4_TempVar(dailyTempMin = temp.dy$min, dailyTempMean = temp.dy$mean, simTime2)))[1:3] #adjust_NorthSouth - resSDs[nv:(nv+2)] <- temp[4:6] + temp <- sw_dailyC4_TempVar(dailyTempMin = temp.dy$min, + dailyTempMean = temp.dy$mean, simTime2, return_yearly = TRUE) + + resAgg[nv:(nv+2), ] <- t(apply(temp[, -1], 2, agg_fun, na.rm = TRUE)) nv <- nv+3 } #24 @@ -2470,15 +2507,14 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "dailyDegreeDays") if (!exists("temp.dy")) temp.dy <- get_Temp_dy(runDataSC, isim_time) - degday <- ifelse(temp.dy$mean > opt_agg[["Tbase_DD_C"]], - temp.dy$mean - opt_agg[["Tbase_DD_C"]], 0) #degree days - temp <- tapply(degday, simTime2$year_ForEachUsedDay, sum) + if (!exists("degday_dy")) + degday_dy <- degree_days(temp.dy$mean, opt_agg[["Tbase_DD_C"]]) - resMeans[nv] <- mean(temp) - resSDs[nv] <- stats::sd(temp) - nv <- nv+1 + temp <- tapply(degday_dy, simTime2$year_ForEachUsedDay, sum) + + resAgg[nv, ] <- agg_fun(temp) - rm(degday) + nv <- nv+1 } #25 if (prj_todos[["aon"]]$dailyColdDegreeDays) { # Cold-degree days based on temperature @@ -2512,8 +2548,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "yearlyAET") if (!exists("AET.yr")) AET.yr <- get_AET_yr(runDataSC, isim_time) - resMeans[nv] <- mean(AET.yr$val) - resSDs[nv] <- stats::sd(AET.yr$val) + resAgg[nv, ] <- agg_fun(AET.yr$val) nv <- nv+1 } @@ -2573,27 +2608,23 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, nv1 <- nv + ncol(fluxtemp) - 1 - #mean fluxes - resMeans[nv:nv1] <- apply(fluxtemp, 2, mean) - resMeans[nv1 + 1] <- if (sum(transp.tot) > 0) mean(transp.yr$bottom/transp.tot) else 0 - resMeans[nv1 + 2] <- if (sum(AET.yr$val) > 0) mean(transp.tot/AET.yr$val) else 0 - resMeans[nv1 + 3] <- if (sum(AET.yr$val) > 0) mean(evap_soil.tot/AET.yr$val) else 0 - resMeans[nv1 + 4] <- if (sum(PET.yr$val) > 0) mean(AET.yr$val/PET.yr$val) else 0 - resMeans[nv1 + 5] <- if (sum(PET.yr$val) > 0) mean(transp.tot/PET.yr$val) else 0 - resMeans[nv1 + 6] <- if (sum(PET.yr$val) > 0) mean(evap_soil.tot/PET.yr$val) else 0 - - #stats::sd of fluxes - resSDs[nv:nv1] <- apply(fluxtemp, 2, stats::sd) - resSDs[nv1 + 1] <- if (sum(transp.tot) > 0) stats::sd(transp.yr$bottom/transp.tot) else 0 - resSDs[nv1 + 2] <- if (sum(AET.yr$val) > 0) stats::sd(transp.tot/AET.yr$val) else 0 - resSDs[nv1 + 3] <- if (sum(AET.yr$val) > 0) stats::sd(evap_soil.tot/AET.yr$val) else 0 - resSDs[nv1 + 4] <- if (sum(PET.yr$val) > 0) stats::sd(AET.yr$val/PET.yr$val) else 0 - resSDs[nv1 + 5] <- if (sum(PET.yr$val) > 0) stats::sd(transp.tot/PET.yr$val) else 0 - resSDs[nv1 + 6] <- if (sum(PET.yr$val) > 0) stats::sd(evap_soil.tot/PET.yr$val) else 0 + + resAgg[nv:nv1, ] <- t(apply(fluxtemp, 2, agg_fun, na.rm = TRUE)) + if (any(transp.tot > 0)) + resAgg[nv1+1, ] <- agg_fun(transp.yr$bottom / transp.tot, na.rm = TRUE) + if (any(AET.yr$val > 0)) { + resAgg[nv1+2, ] <- agg_fun(transp.tot / AET.yr$val, na.rm = TRUE) + resAgg[nv1+3, ] <- agg_fun(evap_soil.tot / AET.yr$val, na.rm = TRUE) + } + if (any(PET.yr$val > 0)) { + resAgg[nv1+4, ] <- agg_fun(AET.yr$val / PET.yr$val, na.rm = TRUE) + resAgg[nv1+5, ] <- agg_fun(transp.tot / PET.yr$val, na.rm = TRUE) + resAgg[nv1+6, ] <- agg_fun(evap_soil.tot / PET.yr$val, na.rm = TRUE) + } nv <- nv1 + 7 - rm(rain_toSoil, transp.tot, evap_soil.tot, drain.topTobottom, hydred.topTobottom, index.usedyPlusOne, swcdyflux, swc.flux) + rm(fluxtemp, rain_toSoil, transp.tot, evap_soil.tot, drain.topTobottom, hydred.topTobottom, index.usedyPlusOne, swcdyflux, swc.flux) } #27.2 @@ -2644,28 +2675,32 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, # balance balance <- inputs_by_layer - outputs_by_layer extraction <- balance < 0 - storage_use <- by(cbind(extraction, outputs_by_layer), INDICES = simTime2$year_ForEachUsedDay_NSadj, FUN = function(x) { - res1 <- apply(x[, ld, drop = FALSE], MARGIN = 2, FUN = rle) - res2 <- apply(x[, soilLayers_N + ld, drop = FALSE], MARGIN = 2, FUN = function(y) list(out = y)) + storage_use <- by(cbind(extraction, outputs_by_layer), + INDICES = simTime2$year_ForEachUsedDay_NSadj, FUN = function(x) { + res1 <- apply(x[, ld, drop = FALSE], 2, rle) + res2 <- apply(x[, soilLayers_N + ld, drop = FALSE], 2, function(y) + list(out = y)) utils::modifyList(res1, res2) }, simplify = FALSE) # median duration among extracting spells for each layer and each year - extraction_duration_days <- sapply(storage_use, function(x) - sapply(x, function(dat) { + extraction_duration_days <- vapply(storage_use, function(x) + vapply(x, function(dat) { if (is.null(dat$out) || is.null(dat$values)) { NA } else { temp <- as.logical(dat$values) if (any(temp)) mean(dat$lengths[as.logical(dat$values)]) else NA } - })) + }, FUN.VALUE = NA_real_), + FUN.VALUE = rep(NA_real_, soilLayers_N)) + if (!is.matrix(extraction_duration_days)) { extraction_duration_days <- matrix(extraction_duration_days, nrow = soilLayers_N, ncol = isim_time$no.useyr) } # median annual sum of all extracted water during extracting spells for each layer and each year - extraction_summed_mm <- sapply(storage_use, function(x) sapply(x, function(dat) { + extraction_summed_mm <- vapply(storage_use, function(x) vapply(x, function(dat) { if (is.null(dat$out) || is.null(dat$values)) { NA } else { @@ -2673,30 +2708,28 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, temp <- dat if (any(dat$values)) temp$values[dat$values] <- seq_len(sum(dat$values)) # give unique ID to each extraction spell - if (any(!dat$values)) { + has_zero <- any(!dat$values) + if (has_zero) temp$values[!dat$values] <- 0 # we are not interested in positive spells - has_zero <- TRUE - } else { - has_zero <- FALSE - } storage_ids <- inverse.rle(temp) - x <- tapply(dat$out, INDEX = storage_ids, sum) # sum up extracted water for each extraction spell + x <- tapply(dat$out, INDEX=storage_ids, sum) # sum up extracted water for each extraction spell if (has_zero && length(x) > 0) x <- x[-1] # remove first element because this represents the positive spells (id = 0) sum(x) } - })) + }, FUN.VALUE = NA_real_), FUN.VALUE = rep(NA_real_, soilLayers_N)) + if (!is.matrix(extraction_summed_mm)) { extraction_summed_mm <- matrix(extraction_summed_mm, nrow = soilLayers_N, ncol = isim_time$no.useyr) } # aggregate across years for each soil layer - resMeans[nv:(nv+soilLayers_N-1)] <- round(apply(extraction_duration_days, 1, mean), 1) - resSDs[nv:(nv+soilLayers_N-1)] <- round(apply(extraction_duration_days, 1, stats::sd), 1) + resAgg[nv:(nv+soilLayers_N-1), ] <- t(round(apply(extraction_duration_days, 1, + agg_fun, na.rm = TRUE), 1)) nv <- nv+SFSW2_glovars[["slyrs_maxN"]] - resMeans[nv:(nv+soilLayers_N-1)] <- round(apply(extraction_summed_mm, 1, mean), 2) - resSDs[nv:(nv+soilLayers_N-1)] <- round(apply(extraction_summed_mm, 1, stats::sd), 2) + resAgg[nv:(nv+soilLayers_N-1), ] <- t(round(apply(extraction_summed_mm, 1, + agg_fun, na.rm = TRUE), 1)) nv <- nv+SFSW2_glovars[["slyrs_maxN"]] rm(percolation, hydred, inputs_by_layer, outputs_by_layer, balance, extraction, storage_use, extraction_duration_days, extraction_summed_mm) @@ -2714,13 +2747,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes <- matrix(unlist(temp), ncol = 4, byrow = TRUE) temp <- extremes[, 1:2, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = mean) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = stats::sd) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+2 temp <- extremes[, 3:4, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_mean, int = 365) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_sd, int = 365) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+2 rm(extremes) @@ -2736,13 +2767,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes <- matrix(unlist(temp), ncol = 4, byrow = TRUE) temp <- extremes[, 1:2, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = mean) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = stats::sd) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+2 temp <- extremes[, 3:4, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_mean, int = 365) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_sd, int = 365) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+2 rm(extremes) @@ -2756,13 +2785,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes <- matrix(unlist(temp), ncol = 4, byrow = TRUE) temp <- extremes[, 1:2, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = mean) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = stats::sd) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+2 temp <- extremes[, 3:4, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_mean, int = 365) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_sd, int = 365) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+2 rm(extremes) @@ -2776,13 +2803,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes <- matrix(unlist(temp), ncol = 4, byrow = TRUE) temp <- extremes[, 1:2, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = mean) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = stats::sd) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+2 temp <- extremes[, 3:4, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_mean, int = 365) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_sd, int = 365) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+2 rm(extremes) @@ -2796,13 +2821,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes <- matrix(unlist(temp), ncol = 4, byrow = TRUE) temp <- extremes[, 1:2, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = mean) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, FUN = stats::sd) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+2 temp <- extremes[, 3:4, drop = FALSE] - resMeans[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_mean, int = 365) - resSDs[nv:(nv+1)] <- apply(temp, MARGIN = 2, circ_sd, int = 365) + resAgg[nv:(nv+1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+2 rm(extremes) @@ -2822,13 +2845,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, } temp <- extremes[, c(1:2, 5:6), drop = FALSE] - resMeans[nv:(nv+3)] <- apply(temp, MARGIN = 2, FUN = mean, na.rm = TRUE) - resSDs[nv:(nv+3)] <- apply(temp, MARGIN = 2, FUN = stats::sd, na.rm = TRUE) + resAgg[nv:(nv+3), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+4 temp <- extremes[, c(3:4, 7:8), drop = FALSE] - resMeans[nv:(nv+3)] <- apply(temp, MARGIN = 2, circ_mean, int = 365, na.rm = TRUE) - resSDs[nv:(nv+3)] <- apply(temp, MARGIN = 2, circ_sd, int = 365, na.rm = TRUE) + resAgg[nv:(nv+3), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+4 rm(extremes) @@ -2850,14 +2871,15 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, extremes[, 5:8] <- matrix(unlist(temp), ncol = 4, byrow = TRUE) } + for (k in c(1:2, 5:6)) + extremes[, k] <- pmin(1, extremes[, k]) + temp <- extremes[, c(1:2, 5:6), drop = FALSE] - resMeans[nv:(nv+3)] <- apply(temp, MARGIN = 2, FUN = function(x) mean(pmin(1, x), na.rm = TRUE)) - resSDs[nv:(nv+3)] <- apply(temp, MARGIN = 2, FUN = function(x) stats::sd(pmin(1, x), na.rm = TRUE)) + resAgg[nv:(nv+3), ] <- t(apply(temp, 2, agg_fun, na.rm = TRUE)) nv <- nv+4 temp <- extremes[, c(3:4, 7:8), drop = FALSE] - resMeans[nv:(nv+3)] <- apply(temp, MARGIN = 2, circ_mean, int = 365, na.rm = TRUE) - resSDs[nv:(nv+3)] <- apply(temp, MARGIN = 2, circ_sd, int = 365, na.rm = TRUE) + resAgg[nv:(nv+3), ] <- t(apply(temp, 2, agg_fun_circular, int = 365, na.rm = TRUE)) nv <- nv+4 rm(recharge.dy, extremes) @@ -3452,13 +3474,12 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (prj_todos[["aon"]]$dailyNRCS_SoilMoistureTemperatureRegimes_Intermediates) { nv_new <- nv + 10 - resMeans[nv:(nv_new - 1)] <- c(has_simulated_SoilTemp, has_realistic_SoilTemp, + resAgg[nv:(nv_new - 1), is_central] <- c(has_simulated_SoilTemp, has_realistic_SoilTemp, Fifty_depth, MCS_depth[1:2], Lanh_depth[1:2], permafrost_yrs, SMR_normalyears_N, as.integer(has_Ohorizon)) nv <- nv_new nv_new <- nv + dim(temp_annual)[2] - resMeans[nv:(nv_new - 1)] <- t(apply(temp_annual, 2, mean, na.rm = TRUE)) - resSDs[nv:(nv_new - 1)] <- t(apply(temp_annual, 2, stats::sd, na.rm = TRUE)) + resAgg[nv:(nv_new - 1)] <- t(apply(temp_annual, 2, agg_fun, na.rm = TRUE)) nv <- nv_new } @@ -3467,10 +3488,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (prj_todos[["aon"]]$dailyNRCS_SoilMoistureTemperatureRegimes) { nv_new <- nv + length(Tregime) - resMeans[nv:(nv_new - 1)] <- Tregime + resAgg[nv:(nv_new - 1), is_central] <- Tregime nv <- nv_new nv_new <- nv + length(Sregime) - resMeans[nv:(nv_new - 1)] <- Sregime + resAgg[nv:(nv_new - 1), is_central] <- Sregime nv <- nv_new } @@ -3534,7 +3555,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, resilience <- resistance <- rep(NA, times = length(cats)) } - resMeans[nv:(nv+2*length(cats)-1)] <- c(resilience, resistance) + resAgg[nv:(nv+2*length(cats)-1), is_central] <- c(resilience, resistance) nv <- nv + 2*length(cats) rm(cats, resilience, resistance) @@ -3585,7 +3606,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, } nv_new <- nv + 3 - resMeans[nv:(nv_new - 1)] <- RR + resAgg[nv:(nv_new - 1), is_central] <- RR nv <- nv_new rm(RR) @@ -3602,32 +3623,45 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("swpmatric.dy")) swpmatric.dy <- get_SWPmatric_aggL(vwcmatric.dy, texture, sand, clay) if (!exists("temp.dy")) temp.dy <- get_Temp_dy(runDataSC, isim_time) - degday <- ifelse(temp.dy$mean > opt_agg[["Tbase_DD_C"]], - temp.dy$mean - opt_agg[["Tbase_DD_C"]], 0) #degree days + if (!exists("degday_dy")) { + degday_dy <- degree_days(temp.dy$mean, opt_agg[["Tbase_DD_C"]]) + } + degday <- matrix(degday_dy, nrow = isim_time$no.usedy, + ncol = opt_agg[["SWPcrit_N"]]) - for (icrit in seq_along(opt_agg[["SWPcrit_MPa"]])) { + if (!exists("dry_soil_dy")) { + dry_soil_dy <- soil_status(top = swpmatric.dy$top, + bottom = swpmatric.dy$bottom, swp_crit = opt_agg[["SWPcrit_MPa"]], + time_N = isim_time$no.usedy, is_dry = TRUE) + } - wet.top <- swpmatric.dy$top >= opt_agg[["SWPcrit_MPa"]][icrit] + wetdegday <- list() + wetdegday[["top"]] <- degday + wetdegday[["top"]][dry_soil_dy[["top"]]] <- 0 - if (length(bottomL) > 0 && !identical(bottomL, 0)) { - wet.bottom <- swpmatric.dy$bottom >= opt_agg[["SWPcrit_MPa"]][icrit] - } else { - wet.bottom <- matrix(data = NA, nrow = length(swpmatric.dy$bottom), ncol = 1) - } + if (length(bottomL) > 0 && !identical(bottomL, 0)) { + wetdegday[["bottom"]] <- degday + wetdegday[["bottom"]][dry_soil_dy[["bottom"]]] <- 0 + wetdegday[["any"]] <- degday + wetdegday[["any"]][dry_soil_dy[["top"]] & dry_soil_dy[["bottom"]]] <- 0 - wetdegday.top <- ifelse(wet.top > 0, degday, 0) - wetdegday.bottom <- ifelse(wet.bottom > 0, degday, 0) - wetdegday.any <- ifelse(wet.top + wet.bottom > 0, degday, 0) + } else { + wetdegday[["bottom"]][] <- matrix(NA, nrow = isim_time$no.usedy, + ncol = opt_agg[["SWPcrit_N"]]) + wetdegday[["any"]] <- wetdegday[["top"]] + } - temp <- lapply(list(wetdegday.top, wetdegday.bottom, wetdegday.any), - function(x) tapply(x, simTime2$year_ForEachUsedDay, sum)) + temp <- lapply(wetdegday, function(x) + aggregate(x, list(simTime2$year_ForEachUsedDay), sum, na.rm = TRUE)) - resMeans[(nv+3*(icrit-1)):(nv+3*(icrit-1)+2)] <- vapply(temp, mean, 1) - resSDs[(nv+3*(icrit-1)):(nv+3*(icrit-1)+2)] <- vapply(temp, stats::sd, 1) - } - nv <- nv+3*opt_agg[["SWPcrit_N"]] + temp <- lapply(temp, function(x) t(vapply(x[, -1], agg_fun, na.rm = TRUE, + FUN.VALUE = rep(NA_real_, dim(resAgg)[2])))) - rm(degday, wet.top, wet.bottom, wetdegday.top, wetdegday.bottom, wetdegday.any) + nv_new <- nv + 3 * opt_agg[["SWPcrit_N"]] + resAgg[nv:(nv_new - 1), ] <- do.call(rbind, temp) + nv <- nv_new + + rm(degday, wetdegday) } #35.3 @@ -3636,34 +3670,39 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("temp.dy")) temp.dy <- get_Temp_dy(runDataSC, isim_time) if (!exists("vwcmatric.dy")) vwcmatric.dy <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "dy", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.dy")) swpmatric.dy <- get_SWPmatric_aggL(vwcmatric.dy, texture, sand, clay) - adjDays <- simTime2$doy_ForEachUsedDay_NSadj[1] - simTime2$doy_ForEachUsedDay[1] + + if (!exists("dry_soil_dy")) { + dry_soil_dy <- soil_status(top = swpmatric.dy$top, bottom = swpmatric.dy$bottom, + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usedy, is_dry = TRUE) + } + + if (!exists("adj_NS_days")) { + adj_NS_days <- season_diff_NS(simTime2, t_unit = "day") + } thermal <- temp.dy$mean > 0 + thermal <- matrix(thermal, nrow = isim_time$no.usedy, ncol = opt_agg[["SWPcrit_N"]]) - for (icrit in seq_along(opt_agg[["SWPcrit_MPa"]])) { - thermaldry.top <- thermal & swpmatric.dy$top < opt_agg[["SWPcrit_MPa"]][icrit] - thermaldry.bottom <- if (length(bottomL) > 0 && !identical(bottomL, 0)) { - thermal & swpmatric.dy$bottom < opt_agg[["SWPcrit_MPa"]][icrit] - } else { - rep(FALSE, length(thermaldry.top)) - } + thermaldry <- list() + thermaldry[["top"]] <- thermal & dry_soil_dy[["top"]] - temp <- stats::aggregate(cbind(thermaldry.top, thermaldry.bottom), - by = list(simTime2$year_ForEachUsedDay_NSadj), - FUN = function(x) max_duration(x, return_doys = TRUE)) - - resMeans[nv:(nv+3)] <- c( - apply(temp$thermaldry.top[, 2:3, drop = FALSE], 2, circ_mean, int = 365), - apply(temp$thermaldry.bottom[, 2:3, drop = FALSE], 2, circ_mean, int = 365)) - adjDays - resSDs[nv:(nv+3)] <- c( - apply(temp$thermaldry.top[, 2:3, drop = FALSE], 2, circ_sd, int = 365), - apply(temp$thermaldry.bottom[, 2:3, drop = FALSE], 2, circ_sd, int = 365)) - nv <- nv+4 - } + thermaldry[["bottom"]] <- if (length(bottomL) > 0 && !identical(bottomL, 0)) { + thermal & dry_soil_dy[["bottom"]] + } else { + temp <- matrix(FALSE, nrow = isim_time$no.usedy, ncol = opt_agg[["SWPcrit_N"]]) + } + + temp <- aggregate(do.call(cbind, thermaldry), + list(simTime2$year_ForEachUsedDay_NSadj), function(y) + max_duration(y, return_doys = TRUE)[-1])[, -1] + temp <- do.call(cbind, temp) - adj_NS_days + + nv_new <- nv + 4 * opt_agg[["SWPcrit_N"]] + resAgg[nv:(nv_new - 1), ] <- t(apply(temp, 2, agg_fun_circular, int = 365)) + nv <- nv_new + + rm(thermal, thermaldry) - rm(thermal, adjDays, thermaldry.top) - if (length(bottomL) > 0 && !identical(bottomL, 0)) - rm(thermaldry.bottom) } #35.4 @@ -3675,25 +3714,30 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("swpmatric.dy")) swpmatric.dy <- get_SWPmatric_aggL(vwcmatric.dy, texture, sand, clay) if (!exists("temp.dy")) temp.dy <- get_Temp_dy(runDataSC, isim_time) - Tcrit_N <- length(opt_agg[["Tmean_crit_C"]]) + if (!exists("dry_soil_dy")) { + dry_soil_dy <- soil_status(top = swpmatric.dy$top, bottom = swpmatric.dy$bottom, + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usedy, is_dry = TRUE) + } - thermal <- temp.dy$mean > - matrix(rep.int(opt_agg[["Tmean_crit_C"]], length(temp.dy$mean)), - ncol = Tcrit_N, byrow = TRUE) + Tcrit_N <- length(opt_agg[["Tmean_crit_C"]]) + thermal <- temp.dy$mean > matrix(opt_agg[["Tmean_crit_C"]], + nrow = isim_time$no.usedy, ncol = Tcrit_N, byrow = TRUE) - dryness <- matrix(rep.int(opt_agg[["SWPcrit_MPa"]], length(temp.dy$mean)), - ncol = opt_agg[["SWPcrit_N"]], byrow = TRUE) + dryness <- matrix(opt_agg[["SWPcrit_MPa"]], nrow = isim_time$no.usedy, + ncol = opt_agg[["SWPcrit_N"]], byrow = TRUE) n_conds <- 6L conds <- list() # max length(conds) == n_conds - conds[["DryAll"]] <- apply(swpmatric.dy.all$val[isim_time$index.usedy, -(1:2), drop = FALSE], 1, max) < dryness - conds[["WetAll"]] <- apply(swpmatric.dy.all$val[isim_time$index.usedy, -(1:2), drop = FALSE], 1, min) >= dryness - conds[["DryTop"]] <- swpmatric.dy$top < dryness + temp <- swpmatric.dy.all$val[isim_time$index.usedy, -(1:2), drop = FALSE] + conds[["DryAll"]] <- apply(temp, 1, max) < dryness + conds[["WetAll"]] <- apply(temp, 1, min) >= dryness + conds[["DryTop"]] <- dry_soil_dy[["top"]] conds[["WetTop"]] <- !conds[["DryTop"]] if (length(bottomL) > 0 && !identical(bottomL, 0)) { - conds[["DryBottom"]] <- swpmatric.dy$bottom < dryness + conds[["DryBottom"]] <- dry_soil_dy[["bottom"]] conds[["WetBottom"]] <- !conds[["DryBottom"]] } + day_count <- array(NA, dim = c(isim_time$no.useyr, Tcrit_N, opt_agg[["SWPcrit_N"]], n_conds)) for (d2 in seq_len(Tcrit_N)) @@ -3703,8 +3747,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, INDEX = simTime2$year_ForEachUsedDay, FUN = sum) nv_new <- nv + Tcrit_N * opt_agg[["SWPcrit_N"]] * n_conds - resMeans[nv:(nv_new - 1)] <- as.vector(colMeans(day_count)) - resSDs[nv:(nv_new - 1)] <- as.vector(apply(day_count, 2:4, stats::sd)) + temp <- as.vector(apply(day_count, 2:4, agg_fun)) + resAgg[nv:(nv_new - 1), ] <- t(matrix(temp, nrow = dim(resAgg)[2])) nv <- nv_new rm(thermal, dryness, conds, day_count) @@ -3716,54 +3760,62 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("vwcmatric.mo")) vwcmatric.mo <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.mo")) swpmatric.mo <- get_SWPmatric_aggL(vwcmatric.mo, texture, sand, clay) - adjMonths <- ifelse(simTime2$month_ForEachUsedMonth[1] == simTime2$month_ForEachUsedMonth_NSadj[1], 0, 6) - drymonths.top <- drymonths.bottom <- array(data = 0, dim = c(opt_agg[["SWPcrit_N"]], isim_time$no.useyr, 12)) - for (icrit in seq_along(opt_agg[["SWPcrit_MPa"]])) { - temp <- tapply(swpmatric.mo$top, simTime2$month_ForEachUsedMonth_NSadj, function(x) x <= opt_agg[["SWPcrit_MPa"]][icrit]) - drymonths.top[icrit, , ] <- matrix(unlist(temp), nrow = isim_time$no.useyr) - temp <- tapply(swpmatric.mo$bottom, simTime2$month_ForEachUsedMonth_NSadj, function(x) x <= opt_agg[["SWPcrit_MPa"]][icrit]) - drymonths.bottom[icrit, , ] <- matrix(unlist(temp), nrow = isim_time$no.useyr) + if (!exists("dry_soil_mo")) { + dry_soil_mo <- soil_status(top = swpmatric.mo$top, bottom = swpmatric.mo$bottom, + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usemo, is_dry = TRUE) } - years.top <- apply(drymonths.top, MARGIN = 1:2, FUN = sum) - years.bottom <- apply(drymonths.bottom, MARGIN = 1:2, FUN = sum) - - resMeans[nv:(nv+2*opt_agg[["SWPcrit_N"]]-1)] <- c(apply(years.top, MARGIN = 1, FUN = mean), apply(years.bottom, MARGIN = 1, FUN = mean)) - resSDs[nv:(nv+2*opt_agg[["SWPcrit_N"]]-1)] <- c(apply(years.top, MARGIN = 1, FUN = stats::sd), apply(years.bottom, MARGIN = 1, FUN = stats::sd)) + # Duration of dry soil periods + temp <- do.call(cbind, dry_soil_mo[c("top", "bottom")]) + temp <- vapply(seq_len(dim(temp)[2]), function(k) + agg_fun(tapply(temp[ , k], simTime2$yearno_ForEachUsedMonth_NSadj, sum)), + FUN.VALUE = rep(NA_real_, dim(resAgg)[2])) - nv <- nv+2*opt_agg[["SWPcrit_N"]] + nv_new <- nv + 2 * opt_agg[["SWPcrit_N"]] + resAgg[nv:(nv_new - 1), ] <- t(temp) + nv <- nv_new - start.top <- apply(drymonths.top, MARGIN = 1:2, FUN = match, x = 1, nomatch = 0) - start.top[start.top != 0] <- ifelse((temp <- (start.top[start.top != 0] + adjMonths) %% 12) == 0, 12, temp) - start.bottom <- apply(drymonths.bottom, MARGIN = 1:2, FUN = match, x = 1, nomatch = 0) - start.bottom[start.bottom != 0] <- ifelse((temp <- (start.bottom[start.bottom != 0] + adjMonths) %% 12) == 0, 12, temp) + # Start/end of dry soil periods + if (!exists("adj_NS_months")) { + adj_NS_months <- season_diff_NS(simTime2, t_unit = "month") + } - resMeans[nv:(nv+2*opt_agg[["SWPcrit_N"]]-1)] <- c(apply(start.top, MARGIN = 1, circ_mean, int = 12), - apply(start.bottom, MARGIN = 1, circ_mean, int = 12)) - resSDs[nv:(nv+2*opt_agg[["SWPcrit_N"]]-1)] <- c(apply(start.top, MARGIN = 1, circ_sd, int = 12), - apply(start.bottom, MARGIN = 1, circ_sd, int = 12)) + starts <- lapply(drymonths, function(x) { + temp <- apply(x, c(2, 3), match, x = 1, nomatch = 0) + temp2 <- (temp + adj_NS_months) %% 12 + if (any(temp > 12)) + temp[temp > 12] <- temp2 + temp[temp != 0 & temp2 == 0] <- 12 + temp + }) + starts <- do.call(cbind, starts) + + nv_new <- nv + 2 * opt_agg[["SWPcrit_N"]] + resAgg[nv:(nv_new-1), ] <- t(apply(starts, 2, agg_fun_circular, int = 12)) + nv <- nv_new - nv <- nv+2*opt_agg[["SWPcrit_N"]] + rm(drymonths, years, starts) - rm(drymonths.top, drymonths.bottom, years.top, start.top, years.bottom, start.bottom, adjMonths) } +#TODO(drs): progress state #37 if (prj_todos[["aon"]]$dailySWPdrynessANDwetness) {#Dry and wet periods based on daily swp: adjust_NorthSouth print_debug(opt_verbosity, tag_simpidfid, "aggregating", "dailySWPdrynessANDwetness") if (!exists("vwcmatric.dy.all")) vwcmatric.dy.all <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "dyAll", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.dy.all")) swpmatric.dy.all <- get_SWPmatric_aggL(vwcmatric.dy.all, texture, sand, clay) #swp.dy.all is required to get all layers +f1 <- function() { +nv <- 1 adjDays <- simTime2$doy_ForEachUsedDay_NSadj[1] - simTime2$doy_ForEachUsedDay[1] - durationDryPeriods.min <- 10 # days - for (icrit in seq_along(opt_agg[["SWPcrit_MPa"]])) { + for(icrit in seq_along(opt_agg[["SWPcrit_MPa"]])) { wet_crit <- swpmatric.dy.all$val >= opt_agg[["SWPcrit_MPa"]][icrit] wet <- list() wet$top <- apply(wet_crit[isim_time$index.usedy, 2+topL, drop = FALSE], 1, sum) if (length(bottomL) > 0 && !identical(bottomL, 0)) { - wet$bottom <- apply(wet_crit[isim_time$index.usedy, 2+bottomL, drop = FALSE], 1, sum) + wet$bottom <- apply(wet_crit[isim_time$index.usedy,2+bottomL, drop = FALSE], 1, sum) } else { wet$bottom <- rep(NA, isim_time$no.usedy) } @@ -3809,6 +3861,68 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, nv <- nv+16*opt_agg[["SWPcrit_N"]] rm(res.dry, wet, wet_crit, AtLeastOneWet, AllWet, AllDry) +resMeans[1:(nv - 1)] +} + +f2 <- function() { +nv <- 1 + if (!exists("dry_soil_all_dy")) { + dry_soil_all_dy <- soil_status( + top = swpmatric.dy.all$val[isim_time$index.usedy, 2 + topL, drop = FALSE], + bottom = swpmatric.dy.all$val[isim_time$index.usedy, 2 + bottomL, drop = FALSE], + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usedy, is_dry = TRUE) + } + + if (!exists("adj_NS_days")) { + adj_NS_days <- season_diff_NS(simTime2, t_unit = "day") + } + + tx <- list() + tx[["AtLeastOneDry"]] <- vapply(dry_soil_dy, function(x) apply(x, 1, any), + FUN.VALUE = rep(NA, isim_time$no.usedy)) + tx[["AllWet"]] <- !tx[["AtLeastOneDry"]] + tx[["AllDry"]] <- vapply(dry_soil_dy, function(x) apply(x, 1, all), + FUN.VALUE = rep(NA, isim_time$no.usedy)) + tx[["AtLeastOneWet"]] <- !tx[["AllDry"]] + + for(icrit in seq_along(SWPcrit_MPa)) { + #wet periods + res.wet <- matrix(0, nrow = isim_time$no.useyr, ncol = 8) + res.wet[, 1] <- tapply(AtLeastOneWet$top, simTime2$year_ForEachUsedDay_NSadj, sum) # total number of days per year when at least one top layer is wet + res.wet[, 2] <- tapply(AtLeastOneWet$bottom, simTime2$year_ForEachUsedDay_NSadj, sum) # total number of days per year when at least one top layer is wet + res.wet[, 3] <- tapply(AtLeastOneWet$top, simTime2$year_ForEachUsedDay_NSadj, max_duration) # maximum number of continous days when at least one top layers is wet + res.wet[, 4] <- tapply(AtLeastOneWet$bottom, simTime2$year_ForEachUsedDay_NSadj, max_duration) # maximum number of continous days when at least one top layers is wet + res.wet[, 5] <- tapply(AllWet$top, simTime2$year_ForEachUsedDay_NSadj, sum) # total number of days per year when all top layer are wet + res.wet[, 6] <- tapply(AllWet$bottom, simTime2$year_ForEachUsedDay_NSadj, sum) # total number of days per year when all top layer are wet + res.wet[, 7] <- tapply(AllWet$top, simTime2$year_ForEachUsedDay_NSadj, max_duration) # maximum number of continous days when all top layers are wet + res.wet[, 8] <- tapply(AllWet$bottom, simTime2$year_ForEachUsedDay_NSadj, max_duration) # maximum number of continous days when all top layers are wet + + #dry periods + res.dry <- matrix(0, nrow = isim_time$no.useyr, ncol = 8) + res.dry[,3] <- tapply(AllDry$top, simTime2$year_ForEachUsedDay_NSadj, sum) #total number of days/year when all top layers are dry + res.dry[,7] <- tapply(AllDry$bottom, simTime2$year_ForEachUsedDay_NSadj, sum) #total number of days/year when all bottom layers are dry + res.dry[,4] <- tapply(AllDry$top, simTime2$year_ForEachUsedDay_NSadj, max_duration) #maximum number of continous days when all top layers are dry + res.dry[,8] <- tapply(AllDry$bottom, simTime2$year_ForEachUsedDay_NSadj, max_duration) #maximum number of continous days when all bottom layers are dry + res.dry[,1] <- tapply(AtLeastOneDry$top, simTime2$year_ForEachUsedDay_NSadj, startDoyOfDuration, duration = opt_agg[["define_period_min_cont_days"]]) # start days/year when at least one of top layers are dry for at least ten days + res.dry[,5] <- tapply(AtLeastOneDry$bottom, simTime2$year_ForEachUsedDay_NSadj, startDoyOfDuration, duration = opt_agg[["define_period_min_cont_days"]]) # start days/year when at least one of bottom layers are dry for at least ten days + res.dry[,2] <- tapply(AtLeastOneDry$top, simTime2$year_ForEachUsedDay_NSadj, endDoyAfterDuration, duration = opt_agg[["define_period_min_cont_days"]]) # end days/year when at least one of top layers have been dry for at least ten days + res.dry[,6] <- tapply(AtLeastOneDry$bottom, simTime2$year_ForEachUsedDay_NSadj, endDoyAfterDuration, duration = opt_agg[["define_period_min_cont_days"]]) # end days/year when at least one of bottom layers have been dry for at least ten days + res.dry[, c(1:2, 5:5)] <- res.dry[, c(1:2, 5:5)] - adj_NS_days + res.dry[res.dry[, 1] > res.dry[, 2], 3] <- 0 #correct [,c(3,7)] for years when start res.dry[, 6], 7] <- 0 #correct [,c(3,7)] for years when start= opt_agg[["Tbase_DD_C"]]) - adjDays <- simTime2$doy_ForEachUsedDay_NSadj[1] - simTime2$doy_ForEachUsedDay[1] - durationDryPeriods.min <- 10 # days + if (!exists("adj_NS_days")) { + adj_NS_days <- season_diff_NS(simTime2, t_unit = "day") + } for (icrit in seq(along = opt_agg[["SWPcrit_MPa"]])) { dry_crit <- swpmatric.dy.all$val < opt_agg[["SWPcrit_MPa"]][icrit] @@ -3902,13 +4022,20 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, dry.bottom <- rep(FALSE, length(dry.top)) } - temp <- stats::aggregate(cbind(dry.top, dry.bottom), by = list(simTime2$year_ForEachUsedDay_NSadj), FUN = function(x) c(if (any((temp <- rle(x))$values)) c(mean(temp$lengths[temp$values]), max(temp$lengths[temp$values])) else c(0, 0), sum(x), startDoyOfDuration(x, duration = durationDryPeriods.min) - adjDays)) - resMeans[nv:(nv+7)] <- c(apply(temp$dry.top[, 1:3, drop = FALSE], 2, mean), circ_mean(x = temp$dry.top[, 4], int = 365), apply(temp$dry.bottom[, 1:3, drop = FALSE], 2, mean), circ_mean(x = temp$dry.bottom[, 4], int = 365)) - resSDs[nv:(nv+7)] <- c(apply(temp$dry.top[, 1:3, drop = FALSE], 2, stats::sd), circ_sd(x = temp$dry.top[, 4], int = 365), apply(temp$dry.bottom[, 1:3, drop = FALSE], 2, stats::sd), circ_sd(x = temp$dry.bottom[, 4], int = 365)) + temp <- stats::aggregate(cbind(dry.top, dry.bottom), by=list(simTime2$year_ForEachUsedDay_NSadj), + FUN=function(x) c(if (any((temp <- rle(x))$values)) c(mean(temp$lengths[temp$values]), + max(temp$lengths[temp$values])) else c(0, 0), sum(x), + startDoyOfDuration(x, duration=opt_agg[["define_period_min_cont_days"]]) - adj_NS_days)) + resMeans[nv:(nv+7)] <- c(apply(temp$dry.top[, 1:3, drop=FALSE], 2, mean), + circ_mean(x=temp$dry.top[, 4], int=365), apply(temp$dry.bottom[, 1:3, drop=FALSE], 2, mean), + circ_mean(x=temp$dry.bottom[, 4], int=365)) + resSDs[nv:(nv+7)] <- c(apply(temp$dry.top[, 1:3, drop=FALSE], 2, stats::sd), + circ_sd(x=temp$dry.top[, 4], int=365), apply(temp$dry.bottom[, 1:3, drop=FALSE], 2, stats::sd), + circ_sd(x=temp$dry.bottom[, 4], int=365)) nv <- nv+8 } - rm(dry.top, dry.bottom, suitable, dry_crit, adjDays, durationDryPeriods.min) + rm(dry.top, dry.bottom, suitable, dry_crit, adjDays) } #41 if (prj_todos[["aon"]]$dailySWPdrynessDurationDistribution) {#cummulative frequency distribution of durations of dry soils in each of the four seasons and for each of the SWP.crit @@ -3916,6 +4043,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("vwcmatric.dy")) vwcmatric.dy <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "dy", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.dy")) swpmatric.dy <- get_SWPmatric_aggL(vwcmatric.dy, texture, sand, clay) + if (!exists("dry_soil_dy")) { + dry_soil_dy <- soil_status(top = swpmatric.dy$top, bottom = swpmatric.dy$bottom, + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usedy, is_dry = TRUE) + } + deciles <- (0:10)*10/100 quantiles <- (0:4)/4 mo_seasons <- matrix(data = c(12, 1:11), ncol = 3, nrow = 4, byrow = TRUE) @@ -3947,6 +4079,12 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "dailySWPdrynessEventSizeDistribution") if (!exists("vwcmatric.dy")) vwcmatric.dy <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "dy", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.dy")) swpmatric.dy <- get_SWPmatric_aggL(vwcmatric.dy, texture, sand, clay) + + if (!exists("dry_soil_dy")) { + dry_soil_dy <- soil_status(top = swpmatric.dy$top, bottom = swpmatric.dy$bottom, + swp_crit = opt_agg[["SWPcrit_MPa"]], time_N = isim_time$no.usedy, is_dry = TRUE) + } + binSize <- c(1, 8, 15, 29, 57, 183, 367) #closed interval lengths in [days] within a year; NOTE: n_variables is set for binsN == 6 binsN <- length(binSize) - 1 @@ -4124,8 +4262,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyTemp") if (!exists("temp.mo")) temp.mo <- get_Temp_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp.mo$mean, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp.mo$mean, simTime2$month_ForEachUsedMonth, stats::sd) + temp <- tapply(temp.mo$mean, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(temp, 2, agg_fun)) nv <- nv+12 } #45 @@ -4133,8 +4273,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyPPT") if (!exists("prcp.mo")) prcp.mo <- get_PPT_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(prcp.mo$ppt, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(prcp.mo$ppt, simTime2$month_ForEachUsedMonth, stats::sd) + temp <- tapply(prcp.mo$ppt, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(temp, 2, agg_fun)) nv <- nv+12 } #46 @@ -4142,8 +4284,10 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlySnowpack") if (!exists("SWE.mo")) SWE.mo <- get_SWE_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(SWE.mo$val, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(SWE.mo$val, simTime2$month_ForEachUsedMonth, stats::sd) + temp <- tapply(SWE.mo$val, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(temp, 2, agg_fun)) nv <- nv+12 } #47 @@ -4151,31 +4295,32 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlySoilTemp") if (!exists("soiltemp.mo")) soiltemp.mo <- get_Response_aggL(swof["sw_soiltemp"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(soiltemp.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(soiltemp.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(soiltemp.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(soiltemp.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(soiltemp.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #48 if (prj_todos[["aon"]]$monthlyRunoff) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyRunoff") if (!exists("runonoff.mo")) runonoff.mo <- get_RunOnOff_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(runonoff.mo$total_runoff, - simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(runonoff.mo$total_runoff, - simTime2$month_ForEachUsedMonth, stats::sd) + temp <- tapply(runonoff.mo$total_runoff, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(temp, 2, agg_fun)) nv <- nv+12 } if (prj_todos[["aon"]]$monthlyRunon) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyRunon") if (!exists("runonoff.mo")) runonoff.mo <- get_RunOnOff_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(runonoff.mo$total_runon, - simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(runonoff.mo$total_runon, - simTime2$month_ForEachUsedMonth, stats::sd) + temp <- tapply(runonoff.mo$total_runon, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+SFSW2_glovars[["st_mo"]]-1, ] <- t(apply(temp, 2, agg_fun)) nv <- nv+12 } #49 @@ -4183,29 +4328,34 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyHydraulicRedistribution") if (!exists("hydred.mo")) hydred.mo <- get_Response_aggL(swof["sw_hd"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(hydred.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(hydred.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(hydred.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(hydred.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(hydred.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #50 if (prj_todos[["aon"]]$monthlyInfiltration) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyInfiltration") if (!exists("inf.mo")) inf.mo <- get_Inf_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(inf.mo$inf, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(inf.mo$inf, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+12 + temp <- tapply(inf.mo$inf, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #51 if (prj_todos[["aon"]]$monthlyDeepDrainage) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyDeepDrainage") if (!exists("deepDrain.mo")) deepDrain.mo <- get_DeepDrain_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(deepDrain.mo$val, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(deepDrain.mo$val, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+12 + temp <- tapply(deepDrain.mo$val, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #52 if (prj_todos[["aon"]]$monthlySWPmatric) { @@ -4213,6 +4363,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("vwcmatric.mo")) vwcmatric.mo <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("swpmatric.mo")) swpmatric.mo <- get_SWPmatric_aggL(vwcmatric.mo, texture, sand, clay) +#TODO(drs): how to handle SWP with agg_fun??? resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- swpmatric.mo$aggMean.top resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- swpmatric.mo$aggMean.bottom nv <- nv+24 @@ -4222,39 +4373,43 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyVWCbulk") if (!exists("vwcbulk.mo")) vwcbulk.mo <- get_Response_aggL(swof["sw_vwcbulk"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(vwcbulk.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(vwcbulk.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(vwcbulk.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(vwcbulk.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(vwcbulk.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #53 b.) if (prj_todos[["aon"]]$monthlyVWCmatric) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyVWCmatric") if (!exists("vwcmatric.mo")) vwcmatric.mo <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(vwcmatric.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(vwcmatric.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(vwcmatric.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(vwcmatric.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(vwcmatric.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #54 if (prj_todos[["aon"]]$monthlySWCbulk) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlySWCbulk") if (!exists("swcbulk.mo")) swcbulk.mo <- get_Response_aggL(swof["sw_swcbulk"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(swcbulk.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(swcbulk.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(swcbulk.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(swcbulk.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(swcbulk.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #55 if (prj_todos[["aon"]]$monthlySWAbulk) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlySWAbulk") if (!exists("vwcmatric.mo")) vwcmatric.mo <- get_Response_aggL(swof["sw_vwcmatric"], tscale = "mo", scaler = 1, FUN = stats::weighted.mean, weights = layers_width, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) +#TODO(drs): how to handle SWP with agg_fun??? VWCcritsT <- SWPtoVWC(opt_agg[["SWPcrit_MPa"]], texture$sand.top, texture$clay.top) VWCcritsB <- if (length(bottomL) > 0 && !identical(bottomL, 0)) { SWPtoVWC(opt_agg[["SWPcrit_MPa"]], texture$sand.bottom, texture$clay.bottom) @@ -4289,11 +4444,12 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyTranspiration") if (!exists("transp.mo")) transp.mo <- get_Response_aggL(swof["sw_transp"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(transp.mo$top, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(transp.mo$top, simTime2$month_ForEachUsedMonth, stats::sd) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(transp.mo$bottom, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(transp.mo$bottom, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("top", "bottom"), function(x) tapply(transp.mo[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #57 if (prj_todos[["aon"]]$monthlySoilEvaporation) { @@ -4301,27 +4457,33 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("Esoil.mo")) Esoil.mo <- get_Response_aggL(swof["sw_evsoil"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) temp <- Esoil.mo$top + Esoil.mo$bottom - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+12 + temp <- tapply(temp, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #58 if (prj_todos[["aon"]]$monthlyAET) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyAET") if (!exists("AET.mo")) AET.mo <- get_AET_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(AET.mo$val, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(AET.mo$val, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+12 + temp <- tapply(AET.mo$val, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #59 if (prj_todos[["aon"]]$monthlyPET) { print_debug(opt_verbosity, tag_simpidfid, "aggregating", "monthlyPET") if (!exists("PET.mo")) PET.mo <- get_PET_mo(runDataSC, isim_time) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(PET.mo$val, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(PET.mo$val, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+12 + temp <- tapply(PET.mo$val, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #59.2 if (prj_todos[["aon"]]$monthlyVPD) { @@ -4329,10 +4491,11 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("temp.mo")) temp.mo <- get_Temp_mo(runDataSC, isim_time) if (!exists("vpd.mo")) vpd.mo <- get_VPD_mo(sc, temp.mo, xin = swRunScenariosData, st2 = simTime2) - nv_new <- nv + 12 - resMeans[nv:(nv_new - 1)] <- tapply(vpd.mo$mean, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv:(nv_new - 1)] <- tapply(vpd.mo$mean, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv_new + temp <- tapply(vpd.mo$mean, + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean) + + resAgg[nv+st_mo-1, ] <- t(apply(temp, 2, agg_fun)) + nv <- nv + 12 } #60 if (prj_todos[["aon"]]$monthlyAETratios) { @@ -4341,14 +4504,18 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("Esoil.mo")) Esoil.mo <- get_Response_aggL(swof["sw_evsoil"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("transp.mo")) transp.mo <- get_Response_aggL(swof["sw_transp"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - temp <- ifelse(AET.mo$val < SFSW2_glovars[["tol"]], 0, (transp.mo$top + transp.mo$bottom) / AET.mo$val) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, stats::sd) + temp <- list() + temp[["TtoAET"]] <- (transp.mo$top + transp.mo$bottom) / AET.mo$val + temp[["TtoAET"]][AET.mo$val < SFSW2_glovars[["tol"]]] <- 0 + temp[["EtoAET"]] <- (Esoil.mo$top + Esoil.mo$bottom) / AET.mo$val + temp[["EtoAET"]][AET.mo$val < SFSW2_glovars[["tol"]]] <- 0 - temp <- ifelse(AET.mo$val < SFSW2_glovars[["tol"]], 0, (Esoil.mo$top + Esoil.mo$bottom) / AET.mo$val) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(temp, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(temp, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("TtoAET", "EtoAET"), function(x) tapply(temp[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #61 if (prj_todos[["aon"]]$monthlyPETratios) { @@ -4357,14 +4524,18 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, if (!exists("Esoil.mo")) Esoil.mo <- get_Response_aggL(swof["sw_evsoil"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) if (!exists("transp.mo")) transp.mo <- get_Response_aggL(swof["sw_transp"], tscale = "mo", scaler = 10, FUN = sum, x = runDataSC, st = isim_time, st2 = simTime2, topL = topL, bottomL = bottomL) - temp <- ifelse(PET.mo$val < SFSW2_glovars[["tol"]], 0, (transp.mo$top + transp.mo$bottom) / PET.mo$val) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1] <- tapply(temp, simTime2$month_ForEachUsedMonth, stats::sd) + temp <- list() + temp[["TtoPET"]] <- (transp.mo$top + transp.mo$bottom) / PET.mo$val + temp[["TtoPET"]][AET.mo$val < SFSW2_glovars[["tol"]]] <- 0 + temp[["EtoPET"]] <- (Esoil.mo$top + Esoil.mo$bottom) / PET.mo$val + temp[["EtoPET"]][AET.mo$val < SFSW2_glovars[["tol"]]] <- 0 - temp <- ifelse(PET.mo$val < SFSW2_glovars[["tol"]], 0, (Esoil.mo$top + Esoil.mo$bottom) / PET.mo$val) - resMeans[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(temp, simTime2$month_ForEachUsedMonth, mean) - resSDs[nv+SFSW2_glovars[["st_mo"]]-1+12] <- tapply(temp, simTime2$month_ForEachUsedMonth, stats::sd) - nv <- nv+24 + temp <- lapply(c("TtoPET", "EtoPET"), function(x) tapply(temp[[x]], + list(simTime2$yearno_ForEachUsedMonth, simTime2$month_ForEachUsedMonth), mean)) + + nv_new <- nv + 24 + resAgg[nv:(nv_new - 1), ] <- t(apply(do.call(cbind, temp), 2, agg_fun)) + nv <- nv_new } #---Aggregation: Potential regeneration @@ -4376,64 +4547,13 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, swp.surface <- swpmatric.dy.all$val[isim_time$index.usedy, 3] if (!exists("SWE.dy")) SWE.dy <- get_SWE_dy(runDataSC, isim_time) - regenerationThisYear_YN <- function(x) { - # calculate season doys - snowcover <- ifelse(x[, 2]>0, 1, 0) - r <- rle(snowcover) - rseries <- ifelse(r$values == 0, 1:length(r$values), 0) - then <- which(rseries == rseries[rseries>0][which.max(r$lengths[rseries>0])]) - if (typeof(opt_agg[["dailyRegeneration_bySWPSnow"]][["season.start"]]) == "character") { #calculate last day of the longest snowpack - if (then == 1) { - opt_agg[["dailyRegeneration_bySWPSnow"]][["season.start"]] <- 1 - } else { - opt_agg[["dailyRegeneration_bySWPSnow"]][["season.start"]] <- cumsum(r$lengths)[then-1] - } - } - if (typeof(opt_agg[["dailyRegeneration_bySWPSnow"]][["season.end"]]) == "character") { #calculate first day of the longest snowpack - opt_agg[["dailyRegeneration_bySWPSnow"]][["season.end"]] <- min(c(cumsum(r$lengths)[then]+1, length(snowcover))) - } - if (length(opt_agg[["dailyRegeneration_bySWPSnow"]][["season.start"]]:opt_agg[["dailyRegeneration_bySWPSnow"]][["season.end"]]) > 0) { - swp.season <- x[opt_agg[["dailyRegeneration_bySWPSnow"]][["season.start"]]:opt_agg[["dailyRegeneration_bySWPSnow"]][["season.end"]], 1] - gs <- rle(ifelse(swp.season >= opt_agg[["dailyRegeneration_bySWPSnow"]][["germination.swp.surface"]], 1, 0)) - es <- rle(ifelse(swp.season >= opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.swp.surface"]], 1, 0)) - - reg <- 0 - # get vector of establishment starts and ends - establishment.start.dos <- establishment.end.dos <- NULL - for (esi in 1:length(es$lengths)) { - if (es$lengths[esi] >= opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.duration"]] & es$values[esi] > 0) { - establishment.start.dos <- c(establishment.start.dos, ifelse(esi == 1, 1, cumsum(es$lengths)[esi-1]+1)) - establishment.end.dos <- c(establishment.end.dos, cumsum(es$lengths)[esi]) - } - } - - # check if any germination period matches up with an establishment period - if (length(establishment.end.dos) > 0) { - for (gsi in 1:length(gs$lengths)) { - if (gs$lengths[gsi] >= opt_agg[["dailyRegeneration_bySWPSnow"]][["germination.duration"]] & gs$values[gsi] > 0) { - germination.start.dos <- ifelse(gsi == 1, 1, cumsum(gs$lengths)[gsi-1]+1) - germination.end.dos <- cumsum(gs$lengths)[gsi] - if (any(((germination.start.dos + opt_agg[["dailyRegeneration_bySWPSnow"]][["germination.duration"]] >= establishment.start.dos) & - (germination.start.dos + opt_agg[["dailyRegeneration_bySWPSnow"]][["germination.duration"]] + opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.duration"]] <= establishment.end.dos)) | - ((germination.end.dos + opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.delay"]] >= establishment.start.dos) & - (germination.end.dos + opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.delay"]] + opt_agg[["dailyRegeneration_bySWPSnow"]][["establishment.duration"]] <= establishment.end.dos))) ) { - reg <- reg + 1 - } - } - } - } + temp <- c(by(cbind(swpmatric.dy.all$val[isim_time$index.usedy, 3], SWE.dy$val), + INDICES = simTime2$year_ForEachUsedDay_NSadj, + FUN = dailyRegeneration_bySWPSnow_ThisYear_YN, + opts = opt_agg[["dailyRegeneration_bySWPSnow"]])) - } else { - reg <- 0 - } - return(ifelse(reg>0, 1, 0)) - } - - resMeans[nv] <- mean(temp <- c(by(data = data.frame(swp.surface, SWE.dy$val), INDICES = simTime2$year_ForEachUsedDay_NSadj, FUN = regenerationThisYear_YN))) - resSDs[nv] <- stats::sd(temp) + resAgg[nv, ] <- agg_fun(temp) nv <- nv+1 - - rm(swp.surface) } #Artemisia tridentata regeneration according to factor model (2012-02-15, drs), call for every regeneration species @@ -4625,7 +4745,7 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, stopped_byCauses_onRYdoy <- rep(NA, times = 3) #book-keeping of causes why growth stopped names(stopped_byCauses_onRYdoy) <- colnames(SeedlingMortality_CausesByYear)[7:9] - #Establish days of growth ( = TRUE) and surviving, but no growth ( = FALSE) + #Establish days of growth (=TRUE) and surviving, but no growth ( = FALSE) thisSeedlingGrowing <- rep(TRUE, no.days) if (sg_RYdoy > 1) thisSeedlingGrowing[seq_len(sg_RYdoy - 1)] <- FALSE #seedling germinated on sg_RYdoy, hence it cannot grow before germination day @@ -5033,8 +5153,8 @@ do_OneSite <- function(i_sim, i_SWRunInformation, i_sw_input_soillayers, }), ")") } else { #no layers - SQL1 <- paste0("(", P_id, ", ", paste(res.dailyMean, collapse = ","), ")") - SQL2 <- paste0("(", P_id, ", ", paste(res.dailySD, collapse = ","), ")") + SQL1 <- paste0("(", P_id, ",", paste(res.dailyMean, collapse = ","), ")") + SQL2 <- paste0("(", P_id, ",", paste(res.dailySD, collapse = ","), ")") } SQL1 <- paste0("INSERT INTO \"aggregation_doy_", prj_todos[["adaily"]][["tag"]][doi], diff --git a/R/WeatherDB.R b/R/WeatherDB.R index d0099845..798616dc 100644 --- a/R/WeatherDB.R +++ b/R/WeatherDB.R @@ -1,4 +1,5 @@ #------------------------DAILY WEATHER +print('Start WeatherDB') #' Lookup IDs of sites as found in a weather database #' diff --git a/R/zzz.R b/R/zzz.R index 4179da98..fa393656 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -22,6 +22,8 @@ #--- Define package level variables that should be hidden from package user and should # not be changed assign("minVersion_dbWeather", numeric_version("3.1.0"), envir = SFSW2_glovars) + assign("v_dbOutput", numeric_version("2.0.0"), envir = SFSW2_glovars) + assign("minVersion_dbOutput", numeric_version("2.0.0"), envir = SFSW2_glovars) assign("slyrs_maxN", 20L, envir = SFSW2_glovars) # number of implemented soil layers assign("slyrs_ids", seq_len(SFSW2_glovars[["slyrs_maxN"]]), envir = SFSW2_glovars) diff --git a/SFSW2_project_code.R b/SFSW2_project_code.R new file mode 100644 index 00000000..c6850778 --- /dev/null +++ b/SFSW2_project_code.R @@ -0,0 +1,182 @@ +#!/usr/bin/env Rscript + +#----------------------------------------------------------------------------------------# +# rSFSW2: FRAMEWORK FOR SOILWAT2 SIMULATIONS: CREATING SIMULATION RUNS, EXECUTING +# SIMULATIONS, AND AGGREGATING OUTPUTS + +#----- LICENSE +# Copyright (C) 2017 by `r packageDescription("rSFSW2")[["Author"]]` +# Contact information `r packageDescription("rSFSW2")[["Maintainer"]]` + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. + +#------ DISCLAIMER: +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +#------ NOTES: +# - You get an overview by: `r package?rSFSW2` +# - An index of functionality is displayed by: `r help(package = "rSFSW2")` +#----------------------------------------------------------------------------------------# + + +############################################################################## +t_job_start <- Sys.time() + +library("rSFSW2") + +#------ Turn on/off actions to be carried out by simulation framework +actions <- list( + # Input checking + check_inputs = TRUE, + + # Simulation runs + # "sim_create", "sim_execute", and "sim_aggregate" can be used individually if + # "saveRsoilwatInput" and/or "saveRsoilwatOutput" are true + # - Prepare/collect inputs for a rSOILWAT2 run (formerly, 'create') + sim_create = TRUE, + # - Execute SOILWAT2 simulations (formerly 'execute') + sim_execute = TRUE, + # - Calculate aggregated response variables from SOILWAT2 output and store results + # in temporary text files on disk (formerly, "aggregate') + sim_aggregate = TRUE, + + # Output handling + # - Copy simulation results from temporary text files to a output SQL-database + # (formerly, 'concatenate') + concat_dbOut = TRUE, + # - Calculate 'ensembles' across climate scenarios and stores the results + # in additional SQL-databases as specified by 'ensemble.families' and 'ensemble.levels' + ensemble = FALSE, + # - Check completeness of output database + check_dbOut = TRUE +) + + + +############################################################################## +#------ 1) CREATE A NEW / LOAD AN EXISTING SIMULATION PROJECT ------------------------- + +# If code is run non-interactively or if this is a test project: +# then current working directory must be folder of projects, +# e.g., rSFSW2_tools/Test_projects/Test4_AllOverallAggregations_snow +dir_prj <- getwd() + + +writeLines(c("", "", + "##############################################################################", + paste("#------ rSFSW2-PROJECT:", shQuote(basename(dir_prj)), "run started at", + t_job_start), + "##############################################################################", "")) + +SFSW2_prj_meta <- init_rSFSW2_project( + fmetar = file.path(dir_prj, "SFSW2_project_descriptions.R"), update = FALSE, + verbose = TRUE, print.debug = FALSE) + + + +############################################################################## +#------ 2) LOAD THE SETTINGS FOR THIS RUN ---------------------------------------- +# Setting objects: +# opt_behave, opt_parallel, opt_verbosity, opt_out_run, opt_chunks +source(file.path(dir_prj, "SFSW2_project_settings.R"), verbose = FALSE, + keep.source = FALSE) + +SFSW2_prj_meta <- update_actions(SFSW2_prj_meta, actions, + wipe_dbOutput = opt_out_run[["wipe_dbOutput"]]) + + +############################################################################## +#------ 3) POPULATE PROJECT WITH INPUT DATA (REPEAT UNTIL COMPLETE) ---------- + +temp <- populate_rSFSW2_project_with_data(SFSW2_prj_meta, opt_behave, opt_parallel, + opt_chunks, opt_out_run, opt_verbosity) + +if (isTRUE(opt_verbosity[["verbose"]]) && + !identical(SFSW2_prj_meta, temp[["SFSW2_prj_meta"]])) { + warning("'SFSW2_prj_meta' has changed: modify/reset input tracker status ", + "'SFSW2_prj_meta[['input_status']]', if needed (see help `?update_intracker`) ", + "and re-run project.", call. = FALSE, immediate. = TRUE) +} + +SFSW2_prj_meta <- temp[["SFSW2_prj_meta"]] +SFSW2_prj_inputs <- temp[["SFSW2_prj_inputs"]] + + + +############################################################################## +#------ 4) ATTEMPT TO CHECK INPUT DATA --------------------------------------- + +if (isTRUE(actions[["check_inputs"]])) { + + temp <- check_rSFSW2_project_input_data(SFSW2_prj_meta, SFSW2_prj_inputs, opt_chunks, + opt_verbosity) + + SFSW2_prj_meta <- temp[["SFSW2_prj_meta"]] + SFSW2_prj_inputs <- temp[["SFSW2_prj_inputs"]] + + if (isTRUE(opt_verbosity[["verbose"]]) && + !all(stats::na.exclude(SFSW2_prj_meta[["input_status"]][, "checked"]))) { + warning("'SFSW2_prj_meta[['input_status']]': some input tracker checks failed; ", + "fix inputs, if needed, and re-run project.", call. = FALSE, immediate. = TRUE) + } +} + + + +############################################################################## +#------ 5) RUN SIMULATION EXPERIMENT (REPEAT UNTIL COMPLETE) ----------------- + +if (any(unlist(actions[c("sim_create", "sim_execute", "sim_aggregate")]))) { + + SFSW2_prj_meta <- simulate_SOILWAT2_experiment(SFSW2_prj_meta, SFSW2_prj_inputs, + opt_behave, opt_parallel, opt_chunks, opt_out_run, opt_verbosity) +} + +if (isTRUE(actions[["concat_dbOut"]])) { + + stopifnot(move_output_to_dbOutput(SFSW2_prj_meta, t_job_start, opt_parallel, + opt_behave, opt_out_run, opt_verbosity, + check_if_Pid_present = opt_verbosity[["print.debug"]])) +} + + + +############################################################################## +#------ 6) ENSEMBLE GENERATION ----------------------------------------------- + +if (isTRUE(actions[["ensemble"]])) { + + rSFSW2:::generate_ensembles(SFSW2_prj_meta, t_job_start, opt_parallel, opt_chunks, + verbose = opt_verbosity[["verbose"]]) +} + + + +############################################################################## +#------ 7) CHECK COMPLETENESS OF OUTPUT DATABASE AND SIMULATION -------------- + +if (isTRUE(actions[["check_dbOut"]])) { + + check_outputDB_completeness(SFSW2_prj_meta, opt_parallel, opt_behave, + opt_out_run, opt_verbosity) +} + + + +############################################################################## +#------ 8) FINISH RUN CLEANLY + +#--- Terminate infrastructure for parallel framework runs +exit_SFSW2_cluster(verbose = opt_verbosity[["verbose"]]) + +#--- Goodbye message +writeLines(c("", + "##############################################################################", + paste("#------ rSFSW2-PROJECT:", shQuote(basename(dir_prj)), "run on", + SFSW2_prj_meta[["opt_platform"]][["host"]], "platform ended at", Sys.time()), + "##############################################################################", "")) diff --git a/SFSW2_project_descriptions.R b/SFSW2_project_descriptions.R new file mode 100644 index 00000000..7bd5a89c --- /dev/null +++ b/SFSW2_project_descriptions.R @@ -0,0 +1,710 @@ +#----------------------------------------------------------------------------------------# +# rSFSW2: FRAMEWORK FOR SOILWAT2 SIMULATIONS: CREATING SIMULATION RUNS, EXECUTING +# SIMULATIONS, AND AGGREGATING OUTPUTS +# +# See demo/SFSW2_project_code.R for details +#----------------------------------------------------------------------------------------# + + +############################################################################## +#----------------------- DESCRIPTION OF SIMULATION PROJECT --------------------- + +# NOTE: The values cannot be changed once a rSFSW2 simulation project is set up. The +# values of settings (file demo/SFSW2_project_settings.R) may be changed from run to run. + +#----- Metainformation about computing platform +opt_platform <- list( + host = c("local", "hpc")[1], + no_parallel = any( + identical(tolower(Sys.getenv("NOT_CRAN")), "false"), + identical(tolower(Sys.getenv("TRAVIS")), "true"), + identical(tolower(Sys.getenv("APPVEYOR")), "true")) +) + + +#------ Paths to simulation framework project folders +project_paths <- list( + dir_prj = dir_prj <- {# path to simulation project + temp <- if (identical(opt_platform[["host"]], "local")) { + "SFSW2_default_project" # "~/YOURPROJECT" + } else if (identical(opt_platform[["host"]], "hpc")) { + getwd() + } + + if (dir.exists(temp)) { + if (interactive()) setwd(temp) + } else { + print(paste("'project_paths[['dir_prj']]' =", shQuote(temp), "does not exist. Code", + "uses", shQuote(getwd()), "instead.")) + } + getwd() + }, + + # Path to inputs + dir_in = dir_in <- file.path(dir_prj, "1_Data_SWInput"), + # Folder with default standalone SOILWAT2 input files + dir_in_sw = file.path(dir_in, "SoilWat2_defaults"), + # Folder with data input files + dir_in_dat = file.path(dir_in, "datafiles"), + # Folder with treatment input files according to treatment instructions + dir_in_treat = file.path(dir_in, "treatments"), + # Folder with GISSM regeneration parameters (will contain one file per species) + dir_in_gissm = file.path(dir_in, "regeneration"), + + # Path to where large outputs are saved to disk + dir_big = dir_big <- if (identical(opt_platform[["host"]], "local")) { + dir_prj + } else if (identical(opt_platform[["host"]], "hpc")) { + dir_prj + }, + # Path to where rSOILWAT2 objects are saved to disk + # if saveRsoilwatInput and/or saveRsoilwatOutput + dir_out_sw = file.path(dir_big, "3_Runs"), + # Path to outputs produced by rSFSW2 + dir_out = dir_out <- file.path(dir_big, "4_Data_SWOutputAggregated"), + # Path to where rSFSW2 will store temporary files + dir_out_temp = file.path(dir_out, "temp"), + # Path to various other output + dir_out_expDesign = file.path(dir_out, "Experimentals_Input_Data"), + dir_out_traces = file.path(dir_out, "Time_Traces"), + + # Path from where external data are extraced + dir_external = dir_ex <- if (identical(opt_platform[["host"]], "local")) { + file.path("/Volumes", "YOURDRIVE", "BigData", "GIS", "Data") + } else if (identical(opt_platform[["host"]], "hpc")) { + file.path("/home", "YOURDRIVE", "BigData", "GIS", "Data") + }, + # Path to historic weather and climate data including + # Livneh, Maurer, ClimateAtlas, and NCEPCFSR data + dir_ex_weather = file.path(dir_ex, "Weather_Past"), + # Path to future scenario data + dir_ex_fut = file.path(dir_ex, "Weather_Future"), + # Path to soil data + dir_ex_soil = file.path(dir_ex, "Soils"), + # Path to topographic data + dir_ex_dem = file.path(dir_ex, "Topography") +) + + +#------ Base names or full names of input files +fnames_in <- list( + fmaster = "SWRuns_InputMaster_YOURPROJECT_v11.csv", + + fslayers = "SWRuns_InputData_SoilLayers_v9.csv", + ftreatDesign = "SWRuns_InputData_TreatmentDesign_v15.csv", + fexpDesign = "SWRuns_InputData_ExperimentalDesign_v07.csv", + + fclimnorm = "SWRuns_InputData_cloud_v10.csv", + fvegetation = "SWRuns_InputData_prod_v11.csv", + fsite = "SWRuns_InputData_siteparam_v14.csv", + fsoils = "SWRuns_InputData_soils_v12.csv", + fweathersetup = "SWRuns_InputData_weathersetup_v10.csv", + fclimscen_delta = "SWRuns_InputData_ClimateScenarios_Change_v11.csv", + fclimscen_values = "SWRuns_InputData_ClimateScenarios_Values_v11.csv", + + LookupClimatePPTScenarios = "climate.ppt.csv", + LookupClimateTempScenarios = "climate.temp.csv", + LookupShiftedPPTScenarios = "shifted.ppt.csv", + LookupEvapCoeffFromTable = "BareSoilEvaporationCoefficientsPerSoilLayer.csv", + LookupTranspCoeffFromTable = "TranspirationCoefficients_v2.csv", + LookupTranspRegionsFromTable = "TranspirationRegionsPerSoilLayer.csv", + LookupSnowDensityFromTable = "MeanMonthlySnowDensities_v2.csv", + LookupVegetationComposition = "VegetationComposition_MeanMonthly_v5.csv", + LookupCarbonScenarios = "LookupCarbonScenarios.csv", + + # Pre-processed input: storage file of input data for repeated access (faster) instead + # of re-reading from (slower) csv files if flag 'use_preprocin' is TRUE + fpreprocin = "SWRuns_InputAll_PreProcessed.rds", + + # Database with daily weather data + fdbWeather = if (identical(opt_platform[["host"]], "local")) { + file.path(project_paths[["dir_in"]], "dbWeatherData.sqlite3") + } else if (identical(opt_platform[["host"]], "hpc")) { + file.path(project_paths[["dir_prj"]], "..", "dbWeatherData.sqlite3") + }, + + # Raster describing spatial interpretation of simulation experiment if scorp == "cell" + fsimraster = file.path(project_paths[["dir_in"]], "sim_raster.grd") +) + + +#------ Full names of output files +fnames_out <- list( + dbOutput = file.path(project_paths[["dir_out"]], "dbTables.sqlite3"), + dbOutput_current = file.path(project_paths[["dir_out"]], "dbTables_current.sqlite3"), + timerfile = file.path(project_paths[["dir_out"]], "Timing_Simulation.csv") +) + + + +#------ Input data sources and options for data preparation +opt_input <- list( + prior_calculations = c( + "AddRequestedSoilLayers", 0, + "EstimateConstantSoilTemperatureAtUpperAndLowerBoundaryAsMeanAnnualAirTemperature", 1, + "EstimateInitialSoilTemperatureForEachSoilLayer", 1, + "CalculateBareSoilEvaporationCoefficientsFromSoilTexture", 1 + ), + + # Interpolate and add soil layers if not available if 'AddRequestedSoilLayers' + requested_soil_layers = c(5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150), + + # Request data from datasets ('external' to a rSFSW2-project) + req_data = c( + # Daily weather data for current conditions + # - Maurer et al. 2002: 1/8-degree res. for 1949-2010; data expected at file.path( + # project_paths[["dir_ex_weather"]], "Maurer+_2002updated", "DAILY_FORCINGS") + "GriddedDailyWeatherFromMaurer2002_NorthAmerica", 0, + # - Thornton et al. 1997: 1-km res. for 1980-2016; data expected at file.path( + # project_paths[["dir_ex_weather"]], "DayMet_NorthAmerica", + # "DownloadedSingleCells_FromDayMetv3_NorthAmerica") + "GriddedDailyWeatherFromDayMet_NorthAmerica", 0, + # - McKenney et al. 2011: 10-km res. for 1950-2013; use with dbW; data expected at + # file.path(project_paths[["dir_ex_weather"]], "NRCan_10km_Canada", "DAILY_GRIDS") + "GriddedDailyWeatherFromNRCan_10km_Canada", 0, + # - Saha et al. 2010: 0.3125-deg res. for 1979-2010; use with dbW; data expected at file.path( + # project_paths[["dir_ex_weather"]], "NCEPCFSR_Global", "CFSR_weather_prog08032012") + "GriddedDailyWeatherFromNCEPCFSR_Global", 0, + # - Livneh et al. 2013: 1/16 degree res. for 1915-2011; data expected at file.path( + # project_paths[["dir_ex_weather"]], "Livneh_NA_2013", "MONTHLY_GRIDS") + "GriddedDailyWeatherFromLivneh2013_NorthAmerica", 0, + + # Monthly PPT, Tmin, Tmax conditions: if using NEX or GDO-DCP-UC-LLNL, + # climate condition names must be of the form SCENARIO.GCM with SCENARIO being + # used for ensembles; if using climatewizard, climate condition names must be + # equal to what is in the respective directories + # - data expected at file.path(project_paths[["dir_ex_fut"]], "ClimateScenarios") + "ExtractClimateChangeScenarios", 0, + + # Mean monthly wind, relative humidity, and 100% - sunshine + # - NCDC 2005: data expected at file.path(project_paths[["dir_ex_weather"]], + # "ClimateAtlasUS") + "ExtractSkyDataFromNOAAClimateAtlas_USA", 0, + # - Saha et al. 2010: project_paths[["dir_ex_weather"]], "NCEPCFSR_Global", + # "CFSR_weather_prog08032012") + "ExtractSkyDataFromNCEPCFSR_Global", 0, + + # Topography + # - NED, National Elevation Dataset (ned.usgs.gov): 1-arcsec res; data expected + # at project_paths[["dir_ex_dem"]], "NED_USA", "NED_1arcsec") + "ExtractElevation_NED_USA", 0, + # - Harmonized World Soil Database: 30-arcsec res; data expected + # at project_paths[["dir_ex_dem"]], "HWSD") + "ExtractElevation_HWSD_Global", 0, + + # Soil texture + # - Harmonized World Soil Database: 1-km re-gridded; data expected + # at project_paths[["dir_ex_soil"]], "CONUSSoil", "output", "albers") + "ExtractSoilDataFromCONUSSOILFromSTATSGO_USA", 0, + # - ISRIC-WISE 5-arcmin v1.2 (2012): 5-arcmin re-gridded; data expected + # at project_paths[["dir_ex_soil"]], "WISE", "wise5by5min_v1b", "Grid", "smw5by5min") + "ExtractSoilDataFromISRICWISEv12_Global", 0, + # - ISRIC-WISE 30-arsec v1.0 (2016): 30-arcsec re-gridded; data expected + # at project_paths[["dir_ex_soil"]], "WISE", "WISE30sec_v1a") + "ExtractSoilDataFromISRICWISE30secV1a_Global", 0 + ), + + # Approach to determine prioprities of external data source extractions + # - If how_determine_sources == "order", then + # - Elevation: 'ExtractElevation_NED_USA' has priority over + # 'ExtractElevation_HWSD_Global' on a per site basis if both are requested and data + # is available for both + # - Soil texture: 'ExtractSoilDataFromCONUSSOILFromSTATSGO_USA' has first priority, + # then 'ExtractSoilDataFromISRICWISE30secV1a_Global' has second priority, and + # 'ExtractSoilDataFromISRICWISEv12_Global' has third priority on a per site basis + # if more than one are requested and data are available for multiple sources + # - Climate normals: 'ExtractSkyDataFromNOAAClimateAtlas_USA' has priority over + # 'ExtractSkyDataFromNCEPCFSR_Global' on a per site basis if both are requested and + # data is available for both + # - If how_determine_sources == "SWRunInformation", then use information in suitable + # columns of spreadsheet 'SWRunInformation' if available; if not available, then fall + # back to option 'order' + how_determine_sources = "SWRunInformation", + + # If a run has multiple sources for daily weather, then take the one in the first + # position of 'dw_source_priority' if available, if not then second etc. + # Do not change/remove/add entries; only re-order to set different priorities + dw_source_priority = c("DayMet_NorthAmerica", "LookupWeatherFolder", + "Maurer2002_NorthAmerica", "Livneh2013_NorthAmerica", "NRCan_10km_Canada", + "NCEPCFSR_Global"), + + # Creation of dbWeather + # Compression type of dbWeather; one value of eval(formals(memCompress)[[2]]) + set_dbW_compresstype = "gzip" +) + + + +#------ Options for simulation and meta-information of input data +opt_sim <- list( + # Set the random number generator for each task so that repeating runs with the same + # inputs results in the same outputs even under load-balanced parallel computations and + # under re-starts of partially finished runs + reproducible = TRUE, + global_seed = 1235L, + + # Daily weather either from database 'dbWeather' or specified via 'WeatherFolder' in + # MasterInput.csv, treatmentDesign.csv, or experimentalDesign.csv + # Use daily weather from dbWeather for current condition + use_dbW_current = TRUE, + # Use daily weather from dbWeather for future scenario conditions + use_dbW_future = TRUE, + # Number of decimal places to which weather data is rounded + dbW_digits = 2, + # Identifying tag of folder names for site weather data if 'LookupWeatherFolder' + tag_WeatherFolder = "weath", + + # Approach if there is no soil texture information for the deepest layer(s) + # - [TRUE] adjust soil depth + # - [FALSE] fill soil layer structure from shallower layer(s) + fix_depth_to_layers = FALSE, + + # SOILWAT2 requires windspeed input data observed at a height of 2 m above ground + # - NCEP/CRSF data are at 10 m + windspeed_obs_height_m = 2, + + # SOILWAT2 simulations are repeated with incrementally increased soil temperature + # profile layer width until a stable soil temperature solution is found or total + # failure is determined + increment_soiltemperature_deltaX_cm = 5, + + # Maximal soil depth for which bare-soil evaporation coefficients are calculated + # if 'CalculateBareSoilEvaporationCoefficientsFromSoilTexture' is TRUE + depth_max_bs_evap_cm = 15, + + # Shift monthly vegetation/production values in prod.in file by six months + # if TRUE and latitude < 0 (i.e., southern hemisphere) + adjust_veg_input_NS = TRUE, + + # Potential natural vegetation based on climate data (Jose Paruelo et al. 1996, 1998) + # - default value: shrub_limit = 0.2 on page 1213 in Paruelo JM, + # Lauenroth WK (1996) Relative abundance of plant functional types in grasslands + # and shrublands of North America. Ecological Applications, 6, 1212-1224. + shrub_limit = 0.2, + # Growing season threshold + # - 10 C based on Trewartha's D temperateness definition: + # temperate climate := has >=4 & < 8 months with > 10C + # - 4 C based standard input of mean monthly biomass values described in + # Bradford et al. 2014 Journal of Ecology + growseason_Tlimit_C = 4 +) + + +#------ Output options +opt_out_fix <- list( + # Control granularity of tracking the output generation + # - use_granular_control = FALSE (default); dbWork tracks completion of each runID, + # i.e., an entire call to `do_OneSite` + # - use_granular_control = TRUE; dbWork adds a second table `need_outputs` that tracks + # the completion of each Pid (= runID x scenario) x output table combination + use_granular_control = FALSE, + + # Column numbers of master input file 'SWRunInformation', e.g, c(3, 7:9), or NULL: + # Selected columns will be part of 'header' table in dbOutput in addition to those of + # create_treatments, experimental_treatments, and climate scenario + Index_RunInformation = NULL, + + # Text separator if 'makeInputForExperimentalDesign' + ExpInput_Seperator = "X!X", + + # Current subset of dbOutput + # - Create from a subset of temporary text files (fast) + dbOutCurrent_from_tempTXT = FALSE, + # - Subset scenarios to climate.ambient (slow) + dbOutCurrent_from_dbOut = FALSE +) + + + +#----- Spatial setup of simulations +# scorp := one of c("point", "cell"), whether to interpret the simulation locations +# provided in 'SWRunInformation' as point locations (1D-sites) or as means of 2D-cells +# If scorp == "cell" then provide either valid path to 'fsimraster' (takes precedence) or +# (grid resolution and grid crs) +# Currently, implemented for +# - actions[["map_inputs"]] +# - external extractions: +# - soils: "ExtractSoilDataFromISRICWISEv12_Global", +# "ExtractSoilDataFromISRICWISE30secV1a_Global", +# "ExtractSoilDataFromCONUSSOILFromSTATSGO_USA", +# - elevation: "ExtractElevation_NED_USA", "ExtractElevation_HWSD_Global", +# - climate normals: "ExtractSkyDataFromNOAAClimateAtlas_USA" +# NOTE: not implemented for 'ExtractSkyDataFromNCEPCFSR_Global' +in_space <- list( + scorp = scorp <- "point", + + # Resolution of raster cells + sim_res = if (scorp == "cell") c(1e4, 1e4) else NA, + # Coordinate reference system (CRS) + sim_crs = if (scorp == "cell") { + "+init=epsg:5072" # NAD83(HARN) / Conus Albers + } else { + "+init=epsg:4326" # WGS84 + } +) + + +#------ Time frames of simulation (may be modified by treatments) +sim_time <- list( + # current simulation years = simstartyr:endyr + # spinup_N = startyr - simstartyr + # years used for results = startyr:endyr + simstartyr = 1979, + startyr = startyr <- 1980, + endyr = endyr <- 2010, + + #Future time period(s): + # Each list element of 'future_yrs' will be applied to every climate.conditions + # Each list element of 'future_yrs' is a vector with three elements + # c(delta, DSfut_startyr, DSfut_endyr) + # future simulation years = delta + simstartyr:endyr + # future simulation years downscaled based on + # - current conditions = DScur_startyr:DScur_endyr + # - future conditions = DSfut_startyr:DSfut_endyr + # NOTE: Multiple time periods doesn't work with external type 'ClimateWizardEnsembles' + DScur_startyr = startyr, + DScur_endyr = endyr, + + future_yrs = list( + c(d <- 40, startyr + d, endyr + d), + c(d <- 90, startyr + d, endyr + d - 1) # most GCMs don't have data for 2100 + ) +) + + +#------ Requested climate conditions +req_scens <- list( + # Name of climatic conditions of the daily weather input when monthly climate + # perturbations are all off + ambient = "Current", + + # Names of climate scenarios + # - If a simulation project does not include future climate conditions, then set + # models = NULL + # - If climate datafiles used, then in the order of data in the those datafiles + # - This is a list of all GCMs for CMIP5 provided by GDO-DCP-UC-LLNL: 37 RCP4.5, 35 RCP8.5 + # Excluded: 'HadCM3' and 'MIROC4h' because data only available until 2035 + models = c("RCP45.ACCESS1-0", "RCP45.ACCESS1-3", "RCP45.bcc-csm1-1", + "RCP45.bcc-csm1-1-m", "RCP45.BNU-ESM", "RCP45.CanESM2", "RCP45.CCSM4", + "RCP45.CESM1-BGC", "RCP45.CESM1-CAM5", "RCP45.CMCC-CM", "RCP45.CNRM-CM5", + "RCP45.CSIRO-Mk3-6-0", "RCP45.EC-EARTH", "RCP45.FGOALS-g2", "RCP45.FGOALS-s2", + "RCP45.FIO-ESM", "RCP45.GFDL-CM3", "RCP45.GFDL-ESM2G", "RCP45.GFDL-ESM2M", + "RCP45.GISS-E2-H-CC", "RCP45.GISS-E2-R", "RCP45.GISS-E2-R-CC", "RCP45.HadGEM2-AO", + "RCP45.HadGEM2-CC", "RCP45.HadGEM2-ES", "RCP45.inmcm4", "RCP45.IPSL-CM5A-LR", + "RCP45.IPSL-CM5A-MR", "RCP45.IPSL-CM5B-LR", "RCP45.MIROC-ESM", "RCP45.MIROC-ESM-CHEM", + "RCP45.MIROC5", "RCP45.MPI-ESM-LR", "RCP45.MPI-ESM-MR", "RCP45.MRI-CGCM3", + "RCP45.NorESM1-M", "RCP45.NorESM1-ME", + + "RCP85.ACCESS1-0", "RCP85.ACCESS1-3", "RCP85.bcc-csm1-1", + "RCP85.bcc-csm1-1-m", "RCP85.BNU-ESM", "RCP85.CanESM2", "RCP85.CCSM4", + "RCP85.CESM1-BGC", "RCP85.CESM1-CAM5", "RCP85.CMCC-CM", "RCP85.CNRM-CM5", + "RCP85.CSIRO-Mk3-6-0", "RCP85.EC-EARTH", "RCP85.FGOALS-g2", "RCP85.FGOALS-s2", + "RCP85.FIO-ESM", "RCP85.GFDL-CM3", "RCP85.GFDL-ESM2G", "RCP85.GFDL-ESM2M", + "RCP85.GISS-E2-R", "RCP85.HadGEM2-AO", + "RCP85.HadGEM2-CC", "RCP85.HadGEM2-ES", "RCP85.inmcm4", "RCP85.IPSL-CM5A-LR", + "RCP85.IPSL-CM5A-MR", "RCP85.IPSL-CM5B-LR", "RCP85.MIROC-ESM", "RCP85.MIROC-ESM-CHEM", + "RCP85.MIROC5", "RCP85.MPI-ESM-LR", "RCP85.MPI-ESM-MR", "RCP85.MRI-CGCM3", + "RCP85.NorESM1-M", "RCP85.NorESM1-ME" + ), + + sources = c( + # For each climate data set from which to extract, add an element like 'dataset1' + # Priority of extraction: dataset1, dataset2, ... if multiple sources provide data + # for a location + # Dataset = 'project_source' with + # - project = one string out of c("CMIP3", "CMIP5") + # - source = one string out of: + # - "ClimateWizardEnsembles_Global": mean monthly values at 50-km resolution for 2070-2099 + # - "ClimateWizardEnsembles_USA": mean monthly change at 12-km resolution between 2070-2099 and 1971-2000 + # - "BCSD_GDODCPUCLLNL_USA": monthly time series at 1/8-degree resolution + # - "BCSD_GDODCPUCLLNL_Global": monthly time series at 1/2-degree resolution + # - "BCSD_NEX_USA": monthly time series at 30-arcsec resolution; requires live internet access + # - "BCSD_SageSeer_USA": monthly time-series at 1-km resolution for the western US prepared by Katie Renwick + # - "ESGF_Global": monthly time-series at varying resolution + dataset1 = "CMIP5_BCSD_GDODCPUCLLNL_USA" + ), + + # Downscaling method (applied to each each climate.conditions) + # Monthly scenario -> daily forcing variables + # One or multiple elements of + # - "raw" + # - "delta" (Hay et al. 2002) + # - "hybrid-delta" (Hamlet et al. 2010), "hybrid-delta-3mod" + # - "wgen-package" (Steinschneider & Brown 2013 WRR, doi:10.1002/wrcr.20528 + method_DS = c("hybrid-delta-3mod"), + + # Downscaling parameters + opt_DS = list( + daily_ppt_limit = 1.5, + monthly_limit = 1.5, + + # Method to apply precipitation changes: either "detailed" or "simple" + ppt_type = "detailed", + + # Method to fix spline predictions: one of "fail", "none" or "attempt"; + # only used if extrapol_type is using splines + # - "fail": downscaling fails if spline extrapolations fall outside estimated + # monthly extremes + # - "none": no correction for extrapolated monthly extreme values, but this will + # likely fail during correction of extreme daily PPT events + # - "attempt": repeated attempts with jittering data to fit spline extrapolations + # within estimated monthly extreme values + fix_spline = "attempt", + + # Method to extrapolate beyond observed data + # Options: one of "linear_Boe", "linear_Thermessl2012CC.QMv1b", "linear_none", + # "tricub_fmm", "tricub_monoH.FC", "tricub_natural", "normal_anomalies" + # - "linear": Gudmundsson et al. 2012: "If new model values (e.g. from climate + # projections) are larger than the training values used to estimate the empirical + # CDF, the correction found for the highest quantile of the training period is + # used (Boe ?? et al., 2007; Theme??l et al., 2012)." + # - "tricub": I got really large output values, e.g., obs.hist = 54 cm, + # scen.fut = 64 cm, sbc.fut = 88 cm, hd.fut = 89 cm + # - "linear" (i.e., using Boe et al.'s correction) resulted for the same site to: + # obs.hist = 54 cm, scen.fut = 64 cm, sbc.fut = 75 cm, hd.fut = 75 cm + # - "normal", but no implemented in qmap: Tohver et al. 2014, Appendix A, p. 6: + # "... values that are outside the observed quantile map (e.g. in the early parts + # of the 20th century) are interpolated using standard anomalies (i.e. number of + # standard deviations from the mean) calculated for observed data and GCM data. + # Although this approach ostensibly assumes a normal distribution, it was found + # during testing to be much more stable than attempts to use more sophisticated + # approaches. In particular, the use of Extreme Value Type I or Generalized + # Extreme Value distributions for extending the tail of the probability + # distributions were both found to be highly unstable in practice and introduced + # unacceptable daily extremes in isolated grid cells. These errors occur because + # of irregularities in the shapes of the CDFs for observed and GCM data, which + # relates in part to the relatively small sample size used to construct the + # monthly CDFs (i.e. n = 30)." + extrapol_type = "linear_Thermessl2012CC.QMv1b", + + # Test whether data distributions are within sigmaN * stats::sd of mean + sigmaN = 6, + + # Additive instead of multiplicative adjustments for precipitation if precipitation + # is above or below 'PPTratioCutoff'; 3 was too small -> resulting in too many + # medium-sized ppt-event + PPTratioCutoff = 10 + ), + + # Climate ensembles created across scenarios + # Ensemble families: NULL or from c("SRESA2", "SRESA1B", "SRESB1") + # This defines the groups for which ensembles of climate scenarios are calculated; + # corresponds to first part of scenario name + ensemble.families = NULL, + # If(!is.null(ensemble.families)) then this needs to have at least one value; this + # variable defines which ranked climate.conditions the ensembles are representing + # for each ensemble.families + ensemble.levels = c(2, 8, 15), + # If TRUE then for each ensemble.levels a file is saved with the scenario numbers + # corresponding to the ensemble.levels + save.scenario.ranks = TRUE +) + + +#------ Requested output +# Turn aggregation for variable groups on (1) or off (0), don't delete any names +req_out <- list( + # Overall aggregated output table + overall_out = c( + #---Aggregation: SOILWAT2 inputs + "input_SoilProfile", 1, + "input_FractionVegetationComposition", 1, + "input_VegetationBiomassMonthly", 1, + "input_VegetationBiomassTrends", 1, + "input_VegetationPeak", 1, + "input_Phenology", 1, + "input_TranspirationCoeff", 1, + "input_ClimatePerturbations", 1, + "input_CO2Effects", 1, + #---Aggregation: Climate and weather + "yearlyTemp", 1, + "yearlyPPT", 1, + "dailySnowpack", 1, + "dailyFrostInSnowfreePeriod", 1, + "dailyHotDays", 1, + "dailyWarmDays", 1, + "dailyColdDays", 1, + "dailyCoolDays", 1, + "dailyPrecipitationEventSizeDistribution", 1, + "yearlyPET", 1, + "monthlySeasonalityIndices", 1, + #---Aggregation: Climatic dryness + "yearlymonthlyTemperateDrylandIndices", 1, + "yearlyDryWetPeriods", 1, + "dailyWeatherGeneratorCharacteristics", 1, + "dailyPrecipitationFreeEventDistribution", 1, + "monthlySPEIEvents", 1, + #---Aggregation: Climatic control + "monthlyPlantGrowthControls", 1, + "dailyC4_TempVar", 1, + "dailyDegreeDays", 1, + "dailyColdDegreeDays", 1, + #---Aggregation: Yearly water balance + "yearlyAET", 1, + "yearlyWaterBalanceFluxes", 1, + "yearlyTranspirationBySoilLayer", 1, + "dailySoilWaterPulseVsStorage", 1, + #---Aggregation: Daily extreme values + "dailyTranspirationExtremes", 1, + "dailyTotalEvaporationExtremes", 1, + "dailyDrainageExtremes", 1, + "dailyInfiltrationExtremes", 1, + "dailyAETExtremes", 1, + "dailySWPextremes", 1, + "dailyRechargeExtremes", 1, + #---Aggregation: Ecological dryness + # Note: 'dailyNRCS_SoilMoistureTemperatureRegimes*' require at least soil layers at + # 10, 20, 30, 50, 60, 90 cm + "dailyNRCS_SoilMoistureTemperatureRegimes_Intermediates", 1, + "dailyNRCS_SoilMoistureTemperatureRegimes", 1, + "dailyNRCS_Chambers2014_ResilienceResistance", 1, + "dailyNRCS_Maestas2016_ResilienceResistance", 1, + "dailyWetDegreeDays", 1, + "dailyThermalDrynessStartEnd", 1, + "dailyThermalSWPConditionCount", 1, + "monthlySWPdryness", 1, + "dailySWPdrynessANDwetness", 1, + "dailySuitablePeriodsDuration", 1, + "dailySuitablePeriodsAvailableWater", 1, + "dailySuitablePeriodsDrySpells", 1, + "dailySWPdrynessDurationDistribution", 1, + "dailySWPdrynessEventSizeDistribution", 1, + "dailySWPdrynessIntensity", 1, + "dailyThermalDrynessStress", 1, + "periodicVWCmatricFirstLayer", 1, + #---Aggregation: Mean monthly values + "monthlyTemp", 1, + "monthlyPPT", 1, + "monthlySnowpack", 1, + "monthlySoilTemp", 1, + "monthlyRunoff", 1, + "monthlyRunon", 1, + "monthlyHydraulicRedistribution", 1, + "monthlyInfiltration", 1, + "monthlyDeepDrainage", 1, + "monthlySWPmatric", 1, + "monthlyVWCbulk", 1, + "monthlyVWCmatric", 1, + "monthlySWCbulk", 1, + "monthlySWAbulk", 1, + "monthlyTranspiration", 1, + "monthlySoilEvaporation", 1, + "monthlyAET", 1, + "monthlyPET", 1, + "monthlyVPD", 1, + "monthlyAETratios", 1, + "monthlyPETratios", 1, + #---Aggregation: Potential regeneration + "dailyRegeneration_bySWPSnow", 1, + "dailyRegeneration_GISSM", 1 + ), + + # Select variables to aggregate daily means and stats::sd (one per day of year, DOY) + # options: NULL or a selection of c("AET", "Transpiration", "EvaporationSoil", + # "EvaporationSurface", "EvaporationTotal", "VWCbulk", "VWCmatric", "SWCbulk", + # "SWPmatric", "Snowpack", "SWAbulk", "Rain", "Snowfall", "Snowmelt", "SnowLoss", + # "Runoff", "Runon", "Infiltration", "DeepDrainage", "PET", "TotalPrecipitation", + # "TemperatureMin", "TemperatureMax", "SoilTemperature") + mean_daily = NULL, + # Select variables to output as aggregated yearly time series + # options: NULL or a selection of c("dailyRegeneration_GISSM") + traces = NULL +) + +#------ Parameters for output aggregations +opt_agg <- list( + # Aggregate overall simulation output across soil layers with separate values for + # shallow/top (soil layers < aon_toplayer_cm) and deep/bottom soil layers + aon_toplayer_cm = 20, + + # Aggregate mean daily simulation output across soil layers + doy_slyrs = list( + # Do [no] aggregate soil layers + # - TRUE, aggregate into 1-4 layers for mean/stats::sd + # - FALSE, output values for every simulated soil layer + do = FALSE, + # Depth of aggregated soil layers + # Options: depth in centimeters or + # - NULL is interpreted as deepest soil layer (not available for first) + # - NA indicates that no third/fourth aggregated layer is calculated + # (not available for first and second) + # Depth of first aggregated soil layer + first_cm = 10, + # Depth of second aggregated soil layer + second_cm = 20, + # Depth of third aggregated soil layer + third_cm = 60, + # Depth of fourth aggregated soil layer + fourth_cm = NULL + ), + + # The ccounting of timing variables is shifted by 6 months (e.g., July becomes 1st + # month, etc.) if TRUE and latitude < 0 (i.e., southern hemisphere) + adjust_NorthSouth = TRUE, + + # Critical soil water potential(s) [MPa] to calculate 'dry' and 'wet' soils + # (cf. wilting point) and available soil water + SWPcrit_MPa = c(-1.5, -3.0, -3.5, -3.9), + + # Critical temperatures [Celsius degrees] + Tmin_crit_C = c(-15, -9, 0), + Tmax_crit_C = c(34, 40), + Tmean_crit_C = c(5, 15, 25, 35), + + # Base temperature (degree C) above which degree-days are accumulated + Tbase_DD_C = 0, + + # Base temperature (degree C) below which cold-degree-days are accumulated + Tbase_coldDD_C = 0, + + # Options for calculating daily aggregation options over a specific range of days + ## Defaults (i.e. default, defaultWaterYear_N, defaultWaterYear_S), will be used if no values are specified for the other specific value (i.e. NULL) + ## Variables that are calculated within water-years (Begin Oct 1st in N, DOY 275, April 1st in S, DOY 92), + ### as opposed to typical years (Begin Jan 1st, DOY 1), the doy specific values need to be set within the bounds + ### of a water-year. For example, in the N., c(300, 30), is an acceptable input, but c(200, 30) is not. + use_doy_range = FALSE, + doy_ranges = list( + yearlyPPT = NULL, + periodicVWCmatric = NULL, + default = c(1, 250), #default doy_range aggregation period + #water-years calcs - N & S option for each + dailySnowpack_N = NULL, + dailySnowpack_S = NULL, + dailyFrostinSnowPeriod_N = NULL, + dailyFrostinSnowPeriod_S = NULL, + defaultWateryear_N = c(274, 60), # default doy_range water-year aggregation in the N. Hemisphere + defaultWateryear_S = c(92, 213) # default doy_range water-year aggregation in the S. Hemisphere + ), + + # Daily weather frequency distributions + # Bins of x mm precipitation event sizes + bin_prcp_mm = 5, + # Bins of x consecutive days without precipitation + bin_prcpfree_days = 10, + + # Parameters for 'dailyRegeneration_bySWPSnow' + dailyRegeneration_bySWPSnow = list( + season.start = "LastSnow", # either doy or "LastSnow" + season.end = "FirstSnow", # either doy or "FirstSnow" + germination.duration = 7, # in days + germination.swp.surface = -0.2, # in MPa, duration must have at least x MPa + establishment.duration = 14, # in days + establishment.swp.surface = -0.4, # in MPa, duration must have at least x MPa + establishment.delay = 1 # establishment starts latest x days after end of germination + ), + + # NRCS soil moisture regimes (SMR) and soil temperature regimes (STR) settings + NRCS_SMTRs = list( + # Approach for regime determination ('data' -> 'conditions' -> 'regime') + aggregate_at = "conditions", + # Aggregation agreement level (e.g., 0.5 = majority; 1 = all) + crit_agree_frac = 0.9, + # Restrict data to normal years (as defined by SSS 2014) if TRUE; if FALSE, all years + use_normal = TRUE, + SWP_dry = -1.5, #dry means SWP below -1.5 MPa (Soil Survey Staff 2014: p.29) + SWP_sat = -0.033, #saturated means SWP above -0.033 MPa + impermeability = 0.9 #impermeable layer + ) +) + +############################################################################## diff --git a/SFSW2_project_settings.R b/SFSW2_project_settings.R new file mode 100644 index 00000000..373931bb --- /dev/null +++ b/SFSW2_project_settings.R @@ -0,0 +1,121 @@ +#----------------------------------------------------------------------------------------# +# rSFSW2: FRAMEWORK FOR SOILWAT2 SIMULATIONS: CREATING SIMULATION RUNS, EXECUTING +# SIMULATIONS, AND AGGREGATING OUTPUTS +# +# See demo/SFSW2_project_code.R for details +#----------------------------------------------------------------------------------------# + + +############################################################################## +#----------------------- SETTINGS FOR A RUN OF A SIMULATION PROJECT ---------- + +# NOTE: The values may be changed/adjusted from run to run a rSFSW2 simulation project. The +# values of the description of a project (file demo/SFSW2_project_description.R) cannot +# be changed once a rSFSW2 simulation project is set up. +stopifnot(exists("SFSW2_prj_meta"), !is.null(SFSW2_prj_meta[["opt_platform"]])) + + +opt_behave <- list( + # Resumes/continues with unfinished part of simulation after abort if TRUE, i.e., + # - It doesn't delete an existing weather database, if a new one is requested + # - It doesn't re-extract external information (soils, elevation, climate normals, + # climate scenarios) if already extracted + # - It doesn't lookup values from tables if already available in input datafiles, i.e., + # 'LookupEvapCoeffFromTable', 'LookupTranspRegionsFromTable', and + # 'LookupSnowDensityFromTable' + # - It doesn't repeat calls to 'do_OneSite' that are listed in 'runIDs_done' + resume = TRUE, + # Use preprocessed input data if available + use_preprocin = TRUE, + # Update dbWork for each output element if TRUE (can cause traffic jams in highly + # parallel runs); if FALSE, dbWork is not updated continuously + keep_dbWork_updated = TRUE, + # If action == "check_dbOut" detects missing Pids, then workDB is updated (so that a new run + # of the script can be started to add missing runs) + check_updates_dbWork = TRUE, + # Check linked BLAS library before simulation runs + check_blas = FALSE +) + + + +#------ Options for parallel framework +opt_parallel <- list( + # Should job be run in parallel + parallel_runs = !interactive() && !SFSW2_prj_meta[["opt_platform"]][["no_parallel"]], + # Number of cores/workers/slaves if job is run in parallel + num_cores = if (identical(SFSW2_prj_meta[["opt_platform"]][["host"]], "local")) { + 2 + } else if (identical(SFSW2_prj_meta[["opt_platform"]][["host"]], "hpc")) { + 39 + }, + # Parallel_backend: "socket" = "cluster" (via package 'parallel') or "mpi" (via 'Rmpi') + parallel_backend = if (identical(SFSW2_prj_meta[["opt_platform"]][["host"]], "local")) { + "socket" + } else if (identical(SFSW2_prj_meta[["opt_platform"]][["host"]], "hpc")) { + "mpi" + }, + + # Computation time requests: time limits are only enforced if parallel_backend == "mpi" + opt_job_time = list( + wall_time_s = 12 * 3600, # requested wall time + one_sim_s = 60, # time needed to complete one call to do_OneSite() + one_concat_s = 60 # time needed to process one temporary SQL file + ) +) + + + +#------ Options for printing progress and debugging information +opt_verbosity <- list( + # Prints status of progress to standard output + verbose = TRUE, + # Prints details of progress to standard output + print.debug = interactive(), + # Calculates and prints estimated time of job completion at end of each call of + # 'do_OneSite' (a somewhat expensive operation) + print.eta = interactive(), + + # Sets global option 'warn' for the duration of a simulation project + # Possible values: -1, 0, 1, 2; for details: ?options -> Value: warn + debug.warn.level = max(1, 2 * interactive()), + # Should R objects be dumped to disk on error (including for each call to 'do_OneSite') + debug.dump.objects = interactive() +) + + +#------ Output options +opt_out_run <- list( + # Write rSOILWAT2 input and output objects to disk for each SOILWAT2 simulation + saveRsoilwatInput = FALSE, + saveRsoilwatOutput = FALSE, + + # Write data to big input files for experimental design x treatment design + makeInputForExperimentalDesign = FALSE, + + # Delete any previous dbOutput; be careful to not wipe your data! + wipe_dbOutput = FALSE, + # Delete temporary text files produced by workers (temporary storage of simulation + # output which is copied to dbOutput byu action 'concatenate') + deleteTmpSQLFiles = TRUE +) + + +#----- Define chunk size for operations on massive data +opt_chunks <- list( + # chunk_size == 1e4 && n_extract 6e4 will use about 30 GB of memory + ExtractSkyDataFromNOAAClimateAtlas_USA = 10000, + # Extracting data from NCEP/CFSR is also OS-limited by the number of concurrently open + # files (on 'unix' platforms, check with 'ulimit -a') + ExtractSkyDataFromNCEPCFSR_Global = 100, + DailyWeatherFromNCEPCFSR_Global = 100, + # This value is the chunk size for reads of 'runID' from the database, i.e., + # chunk size = ensembleCollectSize * scenario_No. + # Find a balance between available memory, cores, read/write times, etc. For instance, + # on Yellowstone, 500 seems to work well. + ensembleCollectSize = 500 +) + + + +############################################################################## diff --git a/SFSW2_project_xMaintenance_dbOutputTemp.R b/SFSW2_project_xMaintenance_dbOutputTemp.R new file mode 100644 index 00000000..bd26e71e --- /dev/null +++ b/SFSW2_project_xMaintenance_dbOutputTemp.R @@ -0,0 +1,102 @@ +#!/usr/bin/env Rscript + +#----------------------------------------------------------------------------------------# +# rSFSW2: FRAMEWORK FOR SOILWAT2 SIMULATIONS: CREATING SIMULATION RUNS, EXECUTING +# SIMULATIONS, AND AGGREGATING OUTPUTS + +#----- LICENSE +# Copyright (C) 2017 by `r packageDescription("rSFSW2")[["Author"]]` +# Contact information `r packageDescription("rSFSW2")[["Maintainer"]]` + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. + +#------ DISCLAIMER: +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +#------ NOTES: +# - You get an overview by: `r package?rSFSW2` +# - An index of functionality is displayed by: `r help(package = "rSFSW2")` +#----------------------------------------------------------------------------------------# + +print('Start SFSW2_project_xMainence') +############################################################################## + +#--- USER INPUTS +update <- FALSE ## Initialize simulation project folder? + +do_adjust_dir_out <- FALSE ## Adjust `dir_out` element of `project_paths` in local copy of metadata +dir_temp <- "temp" ## Relative location of temporary output files + +do_use_dbOutput_concat <- FALSE ## If TRUE, use `fname_dbOutput_concat` instead of metadata information +fname_dbOutput_concat <- "dbTables_concating.sqlite3" ## Name of copy of dbOutput used for moving output data into + +check_if_Pid_present <- FALSE ## Check data for possible duplicates or deviation in values? + + + +#--- LOAD SIMULATION PROJECT META-DATA / DESCRIPTION FILE +t_job_start <- Sys.time() +library("rSFSW2") +dir_prj <- getwd() +fmeta <- file.path(dir_prj, "SFSW2_project_descriptions.rds") + + +SFSW2_prj_meta <- if (update || !file.exists(fmeta)) { + init_rSFSW2_project(fmetar = file.path(dir_prj, "SFSW2_project_descriptions.R"), + update = TRUE) + } else { + readRDS(fmeta) + } + +source(file.path(dir_prj, "SFSW2_project_settings.R"), verbose = FALSE, + keep.source = FALSE) + + +## Set `project_paths` on local copy of `SFSW2_prj_meta` +if (do_adjust_dir_out) { + # Location of dbWork + SFSW2_prj_meta[["project_paths"]][["dir_out"]] <- file.path( + SFSW2_prj_meta[["project_paths"]][["dir_prj"]], "4_Data_SWOutputAggregated") + + # Location of concatFile and failedFile + SFSW2_prj_meta[["project_paths"]][["dir_out_temp"]] <- file.path( + SFSW2_prj_meta[["project_paths"]][["dir_out"]], "temp") + + # Location of dbOutput + SFSW2_prj_meta[["fnames_out"]][["dbOutput"]] <- file.path( + SFSW2_prj_meta[["project_paths"]][["dir_out"]], + basename(SFSW2_prj_meta[["fnames_out"]][["dbOutput"]])) + + # Location of dbOutput_current + SFSW2_prj_meta[["fnames_out"]][["dbOutput_current"]] <- file.path( + SFSW2_prj_meta[["project_paths"]][["dir_out"]], + basename(SFSW2_prj_meta[["fnames_out"]][["dbOutput_current"]])) +} + +if (do_use_dbOutput_concat) { + # Name of dbOutput used for moving data into + SFSW2_prj_meta[["fnames_out"]][["dbOutput"]] <- file.path( + SFSW2_prj_meta[["project_paths"]][["dir_out"]], fname_dbOutput_concat) +} + +# Location of temporary output files +dir_out_temp <- file.path(SFSW2_prj_meta[["project_paths"]][["dir_out"]], dir_temp) +stopifnot(dir.exists(dir_out_temp)) + + +## Turn off debug print statements +opt_verbosity[["print.debug"]] <- FALSE + +## Unlimited wall-time +opt_parallel[["opt_job_time"]][["wall_time_s"]] <- Inf + + +#--- MOVE THE DATA TO `dbOutput` +move_output_to_dbOutput(SFSW2_prj_meta, t_job_start, opt_parallel, opt_behave, + opt_out_run, opt_verbosity, dir_out_temp = dir_out_temp, + check_if_Pid_present = check_if_Pid_present) diff --git a/demo/SFSW2_project_code.R b/demo/SFSW2_project_code.R index 13a8fcc6..7290b149 100644 --- a/demo/SFSW2_project_code.R +++ b/demo/SFSW2_project_code.R @@ -72,7 +72,6 @@ writeLines(c("", "", paste("#------ rSFSW2-PROJECT:", shQuote(basename(dir_prj)), "run started at", t_job_start), "##############################################################################", "")) - fmeta <- file.path(dir_prj, "SFSW2_project_descriptions.rds") fmetar <- file.path(dir_prj, "SFSW2_project_descriptions.R") diff --git a/demo/SFSW2_project_descriptions.R b/demo/SFSW2_project_descriptions.R index bc24ff42..6f7da69e 100644 --- a/demo/SFSW2_project_descriptions.R +++ b/demo/SFSW2_project_descriptions.R @@ -11,6 +11,7 @@ # NOTE: The values cannot be changed once a rSFSW2 simulation project is set up. The # values of settings (file demo/SFSW2_project_settings.R) may be changed from run to run. +print('Start SFSW2_project_description') #----- Metainformation about computing platform opt_platform <- list( @@ -364,6 +365,20 @@ sim_time <- list( ) ) +sim_time <- c( + sim_time, + + # Named list of current time windows to aggregate over + # Note: add multiple current time windows by adding named elements 'currentX' with + # X a whole positive number + # Note: future time windows are defined by elements of the list 'future_yrs' and added + # to 'agg_years' by the code via function 'setup_simulation_time' + agg_years = c( + current1 = list(sim_time[["startyr"]]:sim_time[["endyr"]]) +# current2 = list((sim_time[["endyr"]] - 10):(sim_time[["endyr"]] + 10)) + ) +) + #------ Requested climate conditions req_scens <- list( @@ -495,8 +510,22 @@ req_scens <- list( #------ Requested output -# Turn aggregation for variable groups on (1) or off (0), don't delete any names req_out <- list( + # Functions which aggregate output across years + # don't delete names, only set \code{TRUE}/\code{FALSE} + agg_funs = list( + mean = TRUE, + SD = TRUE, + quantile = TRUE, + median = TRUE, + mad = TRUE, + yearly = TRUE + ), + agg_fun_options = list( + quantile = list(probs = c(0, 0.025, 0.5, 0.975, 1)) + ), + + # Turn aggregation for variable groups on (1) or off (0), don't delete any names # Overall aggregated output table overall_out = c( #---Aggregation: SOILWAT2 inputs @@ -629,7 +658,7 @@ opt_agg <- list( fourth_cm = NULL ), - # The ccounting of timing variables is shifted by 6 months (e.g., July becomes 1st + # The counting of timing variables is shifted by 6 months (e.g., July becomes 1st # month, etc.) if TRUE and latitude < 0 (i.e., southern hemisphere) adjust_NorthSouth = TRUE, @@ -637,6 +666,10 @@ opt_agg <- list( # (cf. wilting point) and available soil water SWPcrit_MPa = c(-1.5, -3.0, -3.5, -3.9), + # Number of days a certain conditions must be continuously met before such a period + # is identified as of that conditions, e.g., 'dry' and 'wet' soils + define_period_min_cont_days = 10, + # Critical temperatures [Celsius degrees] Tmin_crit_C = c(-15, -9, 0), Tmax_crit_C = c(34, 40), @@ -647,6 +680,9 @@ opt_agg <- list( # Base temperature (degree C) below which cold-degree-days are accumulated Tbase_coldDD_C = 0, + + # Calculation of the Standardized Precipitation-Evapotranspiration Index (SPEI) + SPEI_tscales_months = c(1, 12, 24, 48), # time scales for SPEI::spei in units of months # Options for calculating daily aggregation options over a specific range of days use_doy_range = FALSE,