HydPy-WHMod (base model)¶
whmod is a base model for developing SVAT-like models.  “WHMod” stands for
“Wasserhaushaltsmodell”, which is the German term for “water balance model”.  In
contrast to most other land models implemented in HydPy, the
primary purpose of its application models is not to calculate the runoff of river
basins but to calculate details of the water balance, like groundwater recharge, at
specific locations.
Method Features¶
- class hydpy.models.whmod.whmod_model.Model[source]¶
- Bases: - AdHocModel- HydPy-WHMod (base model). - The following “run methods” are called in the given sequence during each simulation step:
- Calc_Throughfall_InterceptedWater_V1Calculate the interception storage’s throughfall and change in water content due to precipitation.
- Calc_InterceptionEvaporation_InterceptedWater_V1Let a submodel that follows the- AETModel_V1submodel interface calculate interception evaporation and adjust the amount of intercepted water.
- Calc_LakeEvaporation_V1Let a submodel that follows the- AETModel_V1submodel interface calculate lake evaporation.
- Calc_PotentialSnowmelt_V1Calculcate the potential snowmelt with the degree day method.
- Calc_Snowmelt_Snowpack_V1Calculatethe actual snowmelt and update the snow’s water content.
- Calc_Ponding_V1Calculate the (potential) ponding of throughfall and snowmelt of land surfaces.
- Calc_SurfaceRunoff_V1Calculate the surface runoff from sealed areas.
- Calc_RelativeSoilMoisture_V1Calculate the relative soil water content.
- Calc_Percolation_V1Calculate the percolation out of the soil storage.
- Calc_CisternInflow_V1Calculate the inflow into the cistern.
- Calc_CisternOverflow_CisternWater_V1Take the inflow into the cistern to update its content and calculate eventual overflow.
- Calc_SoilEvapotranspiration_V1Let a submodel that follows the- AETModel_V1submodel interface calculate soil evapotranspiration.
- Calc_TotalEvapotranspiration_V1Calculate the sum of interception evaporation, lake evaporation, and soil evapotranspiration.
- Calc_CapillaryRise_V1Calculate the actual capillary rise if requested.
- Calc_CapillaryRise_V2Calculate the actual capillary rise if requested.
- Calc_SoilMoisture_V1Update the actual soil storage’s water content.
- Calc_RelativeSoilMoisture_V1Calculate the relative soil water content.
- Calc_RequiredIrrigation_V1Calculate the individual zones’ irrigation demand.
- Calc_CisternDemand_V1Calculate the total irrigation water demand from the cistern.
- Calc_CisternExtraction_CisternWater_V1Calculate the actual irrigation extraction from the cistern and update the amount of still available water.
- Calc_InternalIrrigation_SoilMoisture_V1Internal irrigation with water taken from the cistern.
- Calc_ExternalIrrigation_SoilMoisture_V1Irrigate from external sources, if required and requested.
- Calc_ExternalIrrigation_SoilMoisture_V2Irrigate from external sources, if still required after internal irrigation and requested.
- Calc_RelativeSoilMoisture_V1Calculate the relative soil water content.
- Calc_PotentialRecharge_V1Calculate the potential recharge.
- Calc_PotentialRecharge_V2Calculate the potential recharge.
- Calc_Baseflow_V1Calculate the base flow.
- Calc_ActualRecharge_V1Calculate the actual recharge.
- Calc_DelayedRecharge_DeepWater_V1Calculate the delayed recharge and update the amount of water that is (still) percolating through the vadose zone.
 
- The following interface methods are available to main models using the defined model as a submodel:
- Get_Temperature_V1Get the basin’s current air temperature.
- Get_MeanTemperature_V1Get the basin’s current air temperature.
- Get_Precipitation_V1Get the basin’s current precipitation.
- Get_InterceptedWater_V1Get the selected zone’s current amount of intercepted water.
- Get_SoilWater_V1Get the selected zone’s current soil water content.
- Get_SnowCover_V1Get the selected zones’s current snow cover degree.
 
- The following “additional methods” might be called by one or more of the other methods or are meant to be directly called by the user:
- Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1Let a submodel that follows the- AETModel_V1submodel interface calculate interception evaporation and adjust the amount of intercepted water.
- Calc_LakeEvaporation_AETModel_V1Let a submodel that follows the- AETModel_V1submodel interface calculate lake evaporation.
- Calc_SoilEvapotranspiration_AETModel_V1Let a submodel that follows the- AETModel_V1submodel interface calculate soil evapotranspiration.
 
- Users can hook submodels into the defined main model if they satisfy one of the following interfaces:
- AETModel_V1Interface for calculating interception evaporation, evapotranspiration from soils, evaporation from water areas in separate steps.
 
 - aetmodel¶
- Required submodel that complies with the following interface: AETModel_V1. 
 - aetmodel_is_mainmodel¶
 - aetmodel_typeid¶
 - REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Calc_Throughfall_InterceptedWater_V1[source]¶
- Bases: - Method- Calculate the interception storage’s throughfall and change in water content due to precipitation. - Requires the control parameters:
- Requires the derived parameter:
- Requires the input sequence:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}T = \begin{cases} P &|\ I = C \\ 0 &|\ I \leq C \end{cases} \\ I_{new} = I_{old} + P - I \\ \\ T = Throughfall \\ P = Precipitation \\ I = InterceptedWater \\ C = InterceptionCapacity\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(CORN, CORN, CORN, CORN, WATER) >>> interceptioncapacity.corn_jun = 2.0 >>> interceptioncapacity.corn_jul = 2.5 - >>> from hydpy import pub >>> pub.timegrids = "2001-06-29", "2001-07-03", "1d" >>> derived.moy.update() - >>> inputs.precipitation = 1.0 >>> states.interceptedwater = 0.0, 1.0, 2.0, 3.0, nan >>> model.idx_sim = 1 >>> model.calc_throughfall_interceptedwater_v1() >>> states.interceptedwater interceptedwater(1.0, 2.0, 2.0, 2.0, 0.0) >>> fluxes.throughfall throughfall(0.0, 0.0, 1.0, 2.0, 0.0) - >>> inputs.precipitation = 0.0 >>> states.interceptedwater = 0.0, 1.0, 2.0, 3.0, nan >>> model.idx_sim = 2 >>> model.calc_throughfall_interceptedwater_v1() >>> states.interceptedwater interceptedwater(0.0, 1.0, 2.0, 2.5, 0.0) >>> fluxes.throughfall throughfall(0.0, 0.0, 0.0, 0.5, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate interception evaporation and adjust the amount of intercepted water.- Required by the method:
- Requires the control parameters:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}E = get\_interceptionevaporation() \\ I_{new} = I_{old} - E \\ \\ I = InterceptedWater \\ E = InterceptionEvaporation\end{split}\]
 - Examples: - We build an example based on - evap_aet_minhasfor calculating interception evaporation, which uses- evap_ret_iofor querying potential evapotranspiration:- >>> from hydpy.models.whmod_rural import * >>> parameterstep("1h") >>> area(1.0) >>> nmbzones(5) >>> landtype(GRASS, DECIDUOUS, CORN, SEALED, WATER) >>> zonearea(0.05, 0.1, 0.2, 0.3, 0.35) >>> interceptioncapacity.jun = 3.0 >>> derived.moy.shape = 1 >>> derived.moy(5) >>> availablefieldcapacity(100.0) >>> rootingdepth(0.1) >>> groundwaterdepth(0.1) >>> with model.add_aetmodel_v1("evap_aet_minhas"): ... with model.add_petmodel_v1("evap_ret_io"): ... evapotranspirationfactor(0.6, 0.8, 1.0, 1.2, 1.4) ... inputs.referenceevapotranspiration = 1.0 - Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1uses the flux returned by the submodel to adjust- InterceptedWater:- >>> states.interceptedwater = 2.0 >>> model.calc_interceptionevaporation_interceptedwater_v1() >>> fluxes.interceptionevaporation interceptionevaporation(0.6, 0.8, 1.0, 1.2, 0.0) >>> states.interceptedwater interceptedwater(1.4, 1.2, 1.0, 0.8, 0.0) - Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1eventually reduces- InterceptionEvaporationso that- InterceptedWaterdoes not become negative:- >>> model.aetmodel.petmodel.sequences.inputs.referenceevapotranspiration = 5.0 >>> states.interceptedwater = 2.0 >>> model.calc_interceptionevaporation_interceptedwater_v1() >>> fluxes.interceptionevaporation interceptionevaporation(2.0, 2.0, 2.0, 2.0, 0.0) >>> states.interceptedwater interceptedwater(0.0, 0.0, 0.0, 0.0, 0.0) - In contrast, - Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1does not reduce negative- InterceptionEvaporationvalues (condensation) that cause an overshoot of the interception storage capacity:- >>> model.aetmodel.petmodel.sequences.inputs.referenceevapotranspiration = -3.0 >>> states.interceptedwater = 2.0 >>> model.calc_interceptionevaporation_interceptedwater_v1() >>> fluxes.interceptionevaporation interceptionevaporation(-1.8, -2.4, -3.0, -3.6, 0.0) >>> states.interceptedwater interceptedwater(3.8, 4.4, 5.0, 5.6, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_InterceptionEvaporation_InterceptedWater_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate interception evaporation and adjust the amount of intercepted water.- Required submethod:
- Requires the control parameters:
- Updates the state sequence:
- Calculates the flux sequence:
 
- class hydpy.models.whmod.whmod_model.Calc_LakeEvaporation_AETModel_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate lake evaporation.- Required by the method:
- Requires the control parameters:
- Calculates the flux sequence:
 - Basic equation:
- \[LakeEvaporation = get\_waterevaporation()\]
 - Example: - We build an example based on - evap_aet_minhasfor calculating water evaporation, which uses- evap_ret_iofor querying potential evapotranspiration:- >>> from hydpy.models.whmod_rural import * >>> parameterstep("1h") >>> area(1.0) >>> nmbzones(5) >>> landtype(GRASS, DECIDUOUS, CORN, SEALED, WATER) >>> zonearea(0.05, 0.1, 0.2, 0.3, 0.35) >>> interceptioncapacity.jun = 3.0 >>> derived.moy.shape = 1 >>> derived.moy(5) >>> availablefieldcapacity(100.0) >>> rootingdepth(0.1) >>> groundwaterdepth(0.1) >>> with model.add_aetmodel_v1("evap_aet_minhas"): ... with model.add_petmodel_v1("evap_ret_io"): ... evapotranspirationfactor(0.6, 0.8, 1.0, 1.2, 1.4) ... inputs.referenceevapotranspiration = 1.0 - Calc_LakeEvaporation_AETModel_V1stores the flux returned by the submodel without any modifications:- >>> model.aetmodel.determine_interceptionevaporation() >>> model.calc_lakeevaporation_v1() >>> fluxes.lakeevaporation lakeevaporation(0.0, 0.0, 0.0, 0.0, 1.4) 
- class hydpy.models.whmod.whmod_model.Calc_LakeEvaporation_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate lake evaporation.- Required submethod:
- Requires the control parameters:
- Calculates the flux sequence:
 
- class hydpy.models.whmod.whmod_model.Calc_PotentialSnowmelt_V1[source]¶
- Bases: - Method- Calculcate the potential snowmelt with the degree day method. - Requires the control parameters:
- Requires the input sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}P = \begin{cases} 0 &|\ T \leq 0 \\ D \cdot T &|\ T > 0 \end{cases} \\ \\ P = PotentialSnowmelt \\ D = DegreeDayFactor \\ T = Temperature\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> simulationstep("1d") >>> nmbzones(3) >>> landtype(GRASS, SEALED, WATER) >>> degreedayfactor(grass=3.0, sealed=4.0) - >>> inputs.temperature = -2.0 >>> model.calc_potentialsnowmelt_v1() >>> fluxes.potentialsnowmelt potentialsnowmelt(0.0, 0.0, 0.0) - >>> inputs.temperature = 0.0 >>> model.calc_potentialsnowmelt_v1() >>> fluxes.potentialsnowmelt potentialsnowmelt(0.0, 0.0, 0.0) - >>> inputs.temperature = 2.0 >>> model.calc_potentialsnowmelt_v1() >>> fluxes.potentialsnowmelt potentialsnowmelt(6.0, 8.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_Snowmelt_Snowpack_V1[source]¶
- Bases: - Method- Calculatethe actual snowmelt and update the snow’s water content. - Requires the control parameters:
- Requires the input sequence:
- Requires the flux sequences:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}M = \begin{cases} 0 &|\ T \leq 0 \\ min(P, \, S_{old}) &|\ T > 0 \end{cases} \\ S_{new} = \begin{cases} S_{old} + F &|\ T \leq 0 \\ S_{old} - M &|\ T > 0 \end{cases} \\ \\ M = Snowmelt \\ P = PotentialSnowmelt \\ S = SnowPack \\ T = Temperature \\ F = Throughfall\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> simulationstep("1d") >>> nmbzones(3) >>> landtype(GRASS, SEALED, WATER) >>> fluxes.throughfall = 1.0 - >>> inputs.temperature = 0.0 >>> states.snowpack = 0.0, 2.0, 0.0 >>> model.calc_snowmelt_snowpack_v1() >>> fluxes.snowmelt snowmelt(0.0, 0.0, 0.0) >>> states.snowpack snowpack(1.0, 3.0, 0.0) - >>> inputs.temperature = 1.0 >>> states.snowpack = 0.0, 3.0, 0.0 >>> fluxes.potentialsnowmelt = 2.0 >>> model.calc_snowmelt_snowpack_v1() >>> fluxes.snowmelt snowmelt(0.0, 2.0, 0.0) >>> states.snowpack snowpack(0.0, 1.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_Ponding_V1[source]¶
- Bases: - Method- Calculate the (potential) ponding of throughfall and snowmelt of land surfaces. - Requires the control parameters:
- Requires the input sequence:
- Requires the flux sequences:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}P = \begin{cases} 0 &|\ T \leq 0 \\ F + M &|\ T > 0 \end{cases} \\ \\ P = Ponding \\ F = Throughfall \\ M = Snowmelt \\ T = Temperature\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(3) >>> landtype(GRASS, SEALED, WATER) - >>> inputs.temperature = 0.0 >>> model.calc_ponding_v1() >>> fluxes.ponding ponding(0.0, 0.0, 0.0) - >>> inputs.temperature = 1.0 >>> fluxes.throughfall = 2.0 >>> fluxes.snowmelt = 3.0 >>> model.calc_ponding_v1() >>> fluxes.ponding ponding(5.0, 5.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_SurfaceRunoff_V1[source]¶
- Bases: - Method- Calculate the surface runoff from sealed areas. - Requires the control parameters:
- Requires the flux sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[SurfaceRunoff = Ponding\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(3) >>> landtype(SEALED, WATER, GRASS) >>> fluxes.ponding = 3.0 >>> model.calc_surfacerunoff_v1() >>> fluxes.surfacerunoff surfacerunoff(3.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_RelativeSoilMoisture_V1[source]¶
- Bases: - Method- Calculate the relative soil water content. - Requires the control parameters:
- Requires the derived parameter:
- Requires the state sequence:
- Calculates the factor sequence:
 - Basic equation:
- \[\begin{split}R = S / M \\ \\ R = RelativeSoilMoisture \\ S = SoilMoisture \\ M = MaxSoilWater\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE) >>> derived.maxsoilwater(200.0, 200.0, 200.0, 200.0, 200.0, 0.0, nan) >>> states.soilmoisture = 0.0, 50.0, 100.0, 150.0, 200.0, 0.0, nan >>> model.calc_relativesoilmoisture_v1() >>> factors.relativesoilmoisture relativesoilmoisture(0.0, 0.25, 0.5, 0.75, 1.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_CisternInflow_V1[source]¶
- Bases: - Method- Calculate the inflow into the cistern. - Requires the control parameters:
- Requires the flux sequences:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}I = \sum_{k=1}^N \frac{A_k}{1000} \cdot \begin{cases} S_k &|\ L_k = SEALED \, \land \, C_k \\ P_k &|\ L_k \neq SEALED \, \land \, C_k \end{cases} \\ \\ I = CisternInflow\\ N = NmbZones \\ T = LandType \\ C = CisternSource \\ A = ZoneArea \\ S = SurfaceRunoff \\ P = Percolation\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, SEALED, SEALED, WATER) >>> cisternsource(False, True, False, True, False) >>> area(15.0) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0) >>> fluxes.percolation = nan, 6.0, nan, nan, nan >>> fluxes.surfacerunoff = nan, nan, nan, 7.0, nan >>> model.calc_cisterninflow_v1() >>> fluxes.cisterninflow cisterninflow(0.04) 
- class hydpy.models.whmod.whmod_model.Calc_CisternOverflow_CisternWater_V1[source]¶
- Bases: - Method- Take the inflow into the cistern to update its content and calculate eventual overflow. - Requires the control parameter:
- Requires the flux sequence:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}O(t) = \begin{cases} 0 &|\ W(t) \leq C \\ I(t) &|\ W(t) = C \end{cases} \\ \frac{d W(t)}{d t} = I(t) - O(t) \\ \\ O = CisternOverflow \\ I = CisternInflow \\ W = CisternWater \\ C = CisternCapacity\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> cisterncapacity(5.0) >>> states.cisternwater = 1.0 >>> fluxes.cisterninflow = 3.0 - >>> model.calc_cisternoverflow_cisternwater_v1() >>> states.cisternwater cisternwater(4.0) >>> fluxes.cisternoverflow cisternoverflow(0.0) - >>> model.calc_cisternoverflow_cisternwater_v1() >>> states.cisternwater cisternwater(5.0) >>> fluxes.cisternoverflow cisternoverflow(2.0) - >>> model.calc_cisternoverflow_cisternwater_v1() >>> states.cisternwater cisternwater(5.0) >>> fluxes.cisternoverflow cisternoverflow(3.0) 
- class hydpy.models.whmod.whmod_model.Calc_Percolation_V1[source]¶
- Bases: - Method- Calculate the percolation out of the soil storage. - Requires the control parameters:
- Requires the derived parameter:
- Requires the factor sequence:
- Requires the flux sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}Percolation = P \cdot R ^ {\beta} \\ \\ P = Ponding \\ R = RelativeSoilMoisture \\ \beta = BETA\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE) >>> derived.beta(2.0) >>> fluxes.ponding(10.0) >>> factors.relativesoilmoisture = 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, nan >>> model.calc_percolation_v1() >>> fluxes.percolation percolation(0.0, 0.4, 1.6, 3.6, 6.4, 10.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_SoilEvapotranspiration_AETModel_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate soil evapotranspiration.- Required by the method:
- Requires the control parameters:
- Calculates the flux sequence:
 - Basic equation:
- \[SoilEvapotranspiration = get\_soilevapotranspiration()\]
 - Example: - We build an example based on - evap_aet_minhas:- >>> from hydpy.models.whmod_rural import * >>> parameterstep("1h") >>> area(1.0) >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, WATER) >>> soiltype(SAND, SAND, SAND, SAND, NONE) >>> zonearea(0.05, 0.1, 0.2, 0.3, 0.35) >>> availablefieldcapacity(100.0) >>> rootingdepth(1.0) >>> groundwaterdepth(1.0) >>> with model.add_aetmodel_v1("evap_aet_minhas"): ... dissefactor(5.0) - Calc_SoilEvapotranspiration_AETModel_V1stores the flux returned by the submodel without any modifications:- >>> states.soilmoisture = 0.0, 0.0, 50.0, 100.0, 0.0 >>> model.aetmodel.sequences.fluxes.potentialinterceptionevaporation = 5.0 >>> model.aetmodel.sequences.fluxes.potentialsoilevapotranspiration = 5.0 >>> model.aetmodel.sequences.fluxes.interceptionevaporation = 3.0 >>> model.calc_soilevapotranspiration_v1() >>> fluxes.soilevapotranspiration soilevapotranspiration(0.0, 0.0, 1.717962, 2.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_SoilEvapotranspiration_V1[source]¶
- Bases: - Method- Let a submodel that follows the - AETModel_V1submodel interface calculate soil evapotranspiration.- Required submethod:
- Requires the control parameters:
- Calculates the flux sequence:
 
- class hydpy.models.whmod.whmod_model.Calc_TotalEvapotranspiration_V1[source]¶
- Bases: - Method- Calculate the sum of interception evaporation, lake evaporation, and soil evapotranspiration. - Requires the control parameters:
- Requires the flux sequences:
- InterceptionEvaporation- SoilEvapotranspiration- LakeEvaporation
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}T = I + S + L \\ \\ T = TotalEvapotranspiration \\ I = InterceptionEvaporation \\ S = SoilEvapotranspiration \\ L = LakeEvaporation\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(3) >>> landtype(GRASS, SEALED, WATER) >>> soiltype(SAND, NONE, NONE) >>> fluxes.interceptionevaporation = 1.0, 2.0, nan >>> fluxes.soilevapotranspiration = 3.0, nan, nan >>> fluxes.lakeevaporation = nan, nan, 5.0 >>> model.calc_totalevapotranspiration_v1() >>> fluxes.totalevapotranspiration totalevapotranspiration(4.0, 2.0, 5.0) 
- class hydpy.models.whmod.whmod_model.Calc_CapillaryRise_V1[source]¶
- Bases: - Method- Calculate the actual capillary rise if requested. - Requires the control parameters:
- Requires the derived parameter:
- Requires the factor sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}C = P \cdot (1 - R) ^ 3 \\ \\ C = CapillaryRise \\ P = PotentialCapillaryRise \\ R = RelativeSoilMoisture\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> simulationstep("1d") >>> parameterstep("1d") >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, SEALED, WATER) >>> soiltype(SAND, SAND, SAND, SAND, SAND, NONE, NONE) >>> derived.potentialcapillaryrise(2.0) >>> factors.relativesoilmoisture = 0.0, 0.25, 0.5, 0.75, 1.0, nan, nan - >>> withcapillaryrise(True) >>> model.calc_capillaryrise_v1() >>> fluxes.capillaryrise capillaryrise(2.0, 0.84375, 0.25, 0.03125, 0.0, 0.0, 0.0) - >>> withcapillaryrise(False) >>> model.calc_capillaryrise_v1() >>> fluxes.capillaryrise capillaryrise(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_CapillaryRise_V2[source]¶
- Bases: - Method- Calculate the actual capillary rise if requested. - Requires the control parameters:
- Requires the derived parameter:
- Requires the factor sequence:
- Calculates the flux sequence:
 - Method - Calc_CapillaryRise_V2works like method- Calc_CapillaryRise_V1except that it does not calculate any capillary rise for zones connected to the cistern.- Examples: - >>> from hydpy.models.whmod import * >>> simulationstep("1d") >>> parameterstep("1d") >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, SEALED, WATER) >>> soiltype(SAND, SAND, SAND, SAND, SAND, NONE, NONE) >>> cisternsource(False, True, True, False, False, False, False) >>> derived.potentialcapillaryrise(2.0) >>> factors.relativesoilmoisture = 0.0, 0.25, 0.5, 0.75, 1.0, nan, nan - >>> withcapillaryrise(True) >>> model.calc_capillaryrise_v2() >>> fluxes.capillaryrise capillaryrise(2.0, 0.0, 0.0, 0.03125, 0.0, 0.0, 0.0) - >>> withcapillaryrise(False) >>> model.calc_capillaryrise_v2() >>> fluxes.capillaryrise capillaryrise(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_SoilMoisture_V1[source]¶
- Bases: - Method- Update the actual soil storage’s water content. - Requires the control parameters:
- Requires the derived parameter:
- Requires the flux sequences:
- Updates the state sequence:
 - Basic equation:
- \[\begin{split}M = I - E - P + C \\ \\ M = SoilMoisture \\ I = Ponding \\ E = SoilEvapotranspiration \\ P = Percolation \\ C = CapillaryRise\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND, SAND, SAND, NONE) >>> derived.maxsoilwater(10.0) - Cases where the given basic equation does not need further adjustment: - >>> states.soilmoisture(5.0) >>> fluxes.ponding = 2.0 >>> fluxes.soilevapotranspiration = 2.5, -2.5, 5.0, -5.0, nan >>> fluxes.percolation = 5.0 >>> fluxes.capillaryrise = 3.0 >>> model.calc_soilmoisture_v1() >>> states.soilmoisture soilmoisture(2.5, 7.5, 0.0, 10.0, 0.0) >>> fluxes.soilevapotranspiration soilevapotranspiration(2.5, -2.5, 5.0, -5.0, 0.0) >>> fluxes.percolation percolation(5.0, 5.0, 5.0, 5.0, 0.0) >>> fluxes.capillaryrise capillaryrise(3.0, 3.0, 3.0, 3.0, 0.0) - Cases where the soil moisture would become negative (we prevent this by reducing percolation and, if positive, evapotranspiration by the same factor): - >>> states.soilmoisture(2.0) >>> fluxes.ponding = 1.0 >>> fluxes.soilevapotranspiration = 5.0, 0.0, -1.0, 7.0, nan >>> fluxes.percolation = 0.0, 5.0, 6.0, 1.0, nan >>> fluxes.capillaryrise = 1.0 >>> model.calc_soilmoisture_v1() >>> states.soilmoisture soilmoisture(0.0, 0.0, 0.0, 0.0, 0.0) >>> fluxes.soilevapotranspiration soilevapotranspiration(4.0, 0.0, -1.0, 3.5, 0.0) >>> fluxes.percolation percolation(0.0, 4.0, 5.0, 0.5, 0.0) >>> fluxes.capillaryrise capillaryrise(1.0, 1.0, 1.0, 1.0, 0.0) - Cases where the soil moisture would exceed the available storage volume (we prevent this by first reducing capillary rise and, if necessary, also increasing percolation): - >>> states.soilmoisture(8.0) >>> fluxes.ponding = 1.0 >>> fluxes.soilevapotranspiration = 1.0, -1.0, -3.0, -4.0, nan >>> fluxes.percolation = 1.0 >>> fluxes.capillaryrise = 5.0, 2.0, 1.0, 0.0, nan >>> model.calc_soilmoisture_v1() >>> states.soilmoisture soilmoisture(10.0, 10.0, 10.0, 10.0, 0.0) >>> fluxes.soilevapotranspiration soilevapotranspiration(1.0, -1.0, -3.0, -4.0, 0.0) >>> fluxes.percolation percolation(1.0, 1.0, 2.0, 3.0, 0.0) >>> fluxes.capillaryrise capillaryrise(3.0, 1.0, 0.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_RequiredIrrigation_V1[source]¶
- Bases: - Method- Calculate the individual zones’ irrigation demand. - Requires the control parameters:
- NmbZones- LandType- SoilType- IrrigationTrigger- IrrigationTarget
- Requires the derived parameters:
- Requires the factor sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}I = \begin{cases} (T_1 - R) \cdot M &|\ R < T_0 \\ 0 &|\ R \geq T_0 \end{cases} \\ \\ I = RequiredIrrigation \\ T_0 = IrrigationTrigger \\ T_1 = IrrigationTarget \\ R = RelativeSoilMoisture \\ M = MaxSoilWater\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(8) >>> landtype(GRASS, GRASS, CORN, CORN, CORN, CORN, CORN, SEALED) >>> soiltype(SAND, SAND, SAND, SAND, SAND, SAND, SAND, NONE) >>> trigger = irrigationtrigger >>> target = irrigationtarget >>> trigger.grass, target.grass = 0.0, 0.0 >>> trigger.corn_jun, target.corn_jun = 0.7, 0.7 >>> trigger.corn_jul, target.corn_jul = 0.6, 0.8 >>> derived.maxsoilwater(100.0) >>> factors.relativesoilmoisture = 0.0, 0.1, 0.5, 0.6, 0.7, 0.8, 0.9, nan - >>> from hydpy import pub >>> pub.timegrids = "2001-06-29", "2001-07-03", "1d" >>> derived.moy.update() - >>> model.idx_sim = 1 >>> model.calc_requiredirrigation_v1() >>> fluxes.requiredirrigation requiredirrigation(0.0, 0.0, 20.0, 10.0, 0.0, 0.0, 0.0, 0.0) - >>> model.idx_sim = 2 >>> model.calc_requiredirrigation_v1() >>> fluxes.requiredirrigation requiredirrigation(0.0, 0.0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_CisternDemand_V1[source]¶
- Bases: - Method- Calculate the total irrigation water demand from the cistern. - Requires the control parameters:
- Requires the flux sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}D = \sum_{k=1}^N \frac{A_k}{1000} \cdot R_k \\ \\ D = CisternDemand \\ N = NmbZones \\ A = ZoneArea \\ R = RequiredIrrigation\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND, SAND, SAND, NONE) >>> area(15.0) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0) >>> fluxes.requiredirrigation = 0.0, 6.0, 0.0, 7.0, nan >>> model.calc_cisterndemand_v1() >>> fluxes.cisterndemand cisterndemand(0.04) 
- class hydpy.models.whmod.whmod_model.Calc_CisternExtraction_CisternWater_V1[source]¶
- Bases: - Method- Calculate the actual irrigation extraction from the cistern and update the amount of still available water. - Requires the flux sequence:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}E(t) = \begin{cases} D(t) &|\ W(t) > 0 \\ 0 &|\ W(t) = 0 \end{cases} \\ \frac{d W(t)}{d t} = E(t) \\ \\ E = CisternExtraction \\ D = CisternDemand \\ W = CisternWater\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> states.cisternwater = 5.0 >>> fluxes.cisterndemand = 3.0 - >>> model.calc_cisternextraction_cisternwater_v1() >>> states.cisternwater cisternwater(2.0) >>> fluxes.cisternextraction cisternextraction(3.0) - >>> model.calc_cisternextraction_cisternwater_v1() >>> states.cisternwater cisternwater(0.0) >>> fluxes.cisternextraction cisternextraction(2.0) - >>> model.calc_cisternextraction_cisternwater_v1() >>> states.cisternwater cisternwater(0.0) >>> fluxes.cisternextraction cisternextraction(0.0) 
- class hydpy.models.whmod.whmod_model.Calc_InternalIrrigation_SoilMoisture_V1[source]¶
- Bases: - Method- Internal irrigation with water taken from the cistern. - Requires the control parameters:
- Requires the flux sequences:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}I = R \cdot E / D \\ \\ I = InternalIrrigation \\ R = RequiredIrrigation \\ E = CisternExtraction \\ D = CisternDemand\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND, SAND, SAND, NONE) >>> area(15.0) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0) >>> states.soilmoisture = 100.0 - >>> fluxes.requiredirrigation = 0.0, 6.0, 0.0, 7.0, nan >>> fluxes.cisterndemand = 0.04 >>> fluxes.cisternextraction = 0.03 >>> model.calc_internalirrigation_soilmoisture_v1() >>> fluxes.internalirrigation internalirrigation(0.0, 4.5, 0.0, 5.25, 0.0) >>> states.soilmoisture soilmoisture(100.0, 104.5, 100.0, 105.25, 0.0) - >>> fluxes.requiredirrigation = 0.0, 0.0, 0.0, 0.0, nan >>> fluxes.cisterndemand = 0.0 >>> fluxes.cisternextraction = 0.0 >>> model.calc_internalirrigation_soilmoisture_v1() >>> fluxes.internalirrigation internalirrigation(0.0, 0.0, 0.0, 0.0, 0.0) >>> states.soilmoisture soilmoisture(100.0, 104.5, 100.0, 105.25, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_ExternalIrrigation_SoilMoisture_V1[source]¶
- Bases: - Method- Irrigate from external sources, if required and requested. - Requires the control parameters:
- Requires the flux sequence:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}E = \begin{cases} R &|\ W \\ 0 &|\ \overline{W} \end{cases} \\ S_{new} = S_{old} + E \\ \\ E = ExternalIrrigation \\ R = RequiredIrrigation \\ W = WithExternalIrrigation \\ S = SoilMoisture\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(2) >>> landtype(CORN, SEALED) >>> soiltype(SAND, NONE) >>> fluxes.requiredirrigation(2.0, nan) >>> states.soilmoisture = 50.0, nan - >>> withexternalirrigation(False) >>> model.calc_externalirrigation_soilmoisture_v1() >>> fluxes.externalirrigation externalirrigation(0.0, 0.0) >>> states.soilmoisture soilmoisture(50.0, 0.0) - >>> withexternalirrigation(True) >>> model.calc_externalirrigation_soilmoisture_v1() >>> fluxes.externalirrigation externalirrigation(2.0, 0.0) >>> states.soilmoisture soilmoisture(52.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_ExternalIrrigation_SoilMoisture_V2[source]¶
- Bases: - Method- Irrigate from external sources, if still required after internal irrigation and requested. - Requires the control parameters:
- Requires the flux sequences:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}E = \begin{cases} R - I &|\ W \\ 0 &|\ \overline{W} \end{cases} \\ S_{new} = S_{old} + E \\ \\ E = ExternalIrrigation \\ R = RequiredIrrigation \\ I = InternalIrrigation \\ W = WithExternalIrrigation \\ S = SoilMoisture\end{split}\]
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(2) >>> landtype(CORN, SEALED) >>> soiltype(SAND, NONE) >>> fluxes.requiredirrigation(5.0, nan) >>> fluxes.internalirrigation(3.0, nan) >>> states.soilmoisture = 50.0, nan - >>> withexternalirrigation(False) >>> model.calc_externalirrigation_soilmoisture_v2() >>> fluxes.externalirrigation externalirrigation(0.0, 0.0) >>> states.soilmoisture soilmoisture(50.0, 0.0) - >>> withexternalirrigation(True) >>> model.calc_externalirrigation_soilmoisture_v2() >>> fluxes.externalirrigation externalirrigation(2.0, 0.0) >>> states.soilmoisture soilmoisture(52.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_PotentialRecharge_V1[source]¶
- Bases: - Method- Calculate the potential recharge. - Requires the control parameters:
- Requires the input sequence:
- Requires the flux sequences:
- Calculates the flux sequence:
 - Basic equation for water areas:
- \[\begin{split}PotentialRecharge = P - E \\ \\ P = Precipitation \\ E = LakeEvaporation\end{split}\]
- Basic equation for non-sealed land areas:
- \[\begin{split}PotentialRecharge = P - C \\ \\ P = Percolation \\ C = CapillaryRise\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(3) >>> landtype(GRASS, SEALED, WATER) >>> inputs.precipitation = 7.0 >>> fluxes.lakeevaporation = 4.0 >>> fluxes.percolation = 3.0 >>> fluxes.capillaryrise = 1.0 >>> model.calc_potentialrecharge_v1() >>> fluxes.potentialrecharge potentialrecharge(2.0, 0.0, 3.0) 
- class hydpy.models.whmod.whmod_model.Calc_PotentialRecharge_V2[source]¶
- Bases: - Method- Calculate the potential recharge. - Requires the control parameters:
- Requires the input sequence:
- Requires the flux sequences:
- Calculates the flux sequence:
 - Method - Calc_PotentialRecharge_V2works like method- Calc_PotentialRecharge_V1except that it does not calculate any potential recharge for zones connected to the cistern.- Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, SEALED, SEALED, WATER) >>> cisternsource(False, True, False, True, False) >>> inputs.precipitation = 7.0 >>> fluxes.lakeevaporation = 4.0 >>> fluxes.percolation = 3.0 >>> fluxes.capillaryrise = 1.0 >>> model.calc_potentialrecharge_v2() >>> fluxes.potentialrecharge potentialrecharge(2.0, 0.0, 0.0, 0.0, 3.0) 
- class hydpy.models.whmod.whmod_model.Calc_Baseflow_V1[source]¶
- Bases: - Method- Calculate the base flow. - Requires the control parameters:
- Requires the flux sequence:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}B = (1 - I) \cdot max(P, \, 0) \\ \\ B = Baseflow \\ I = BaseflowIndex \\ P = PotentialRecharge\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, SEALED) >>> baseflowindex(1.0, 0.5, 0.0, 0.0, nan) >>> fluxes.potentialrecharge = 2.0, 2.0, 2.0, -2.0, nan >>> model.calc_baseflow_v1() >>> fluxes.baseflow baseflow(0.0, 1.0, 2.0, 0.0, 0.0) 
- class hydpy.models.whmod.whmod_model.Calc_ActualRecharge_V1[source]¶
- Bases: - Method- Calculate the actual recharge. - Requires the control parameters:
- Requires the derived parameter:
- Requires the flux sequences:
- Calculates the flux sequence:
 - Basic equation:
- \[\begin{split}A = \sum_{i=1}^N P_i - B_i \\ \\ N = NmbZones \\ A = ActualRecharge \\ P = PotentialRecharge \\ B = Baseflow\end{split}\]
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> landtype(GRASS, GRASS, GRASS, GRASS, SEALED) >>> area(14.0) >>> zonearea(1.0, 1.5, 2.5, 2.0, 7.0) >>> derived.zoneratio.update() >>> fluxes.potentialrecharge = 2.0, 10.0, -2.0, -0.5, nan >>> fluxes.baseflow = 0.0, 5.0, 0.0, 0.0, nan >>> model.calc_actualrecharge_v1() >>> fluxes.actualrecharge actualrecharge(0.25) 
- class hydpy.models.whmod.whmod_model.Calc_DelayedRecharge_DeepWater_V1[source]¶
- Bases: - Method- Calculate the delayed recharge and update the amount of water that is (still) percolating through the vadose zone. - Requires the control parameter:
- Requires the flux sequence:
- Updates the state sequence:
- Calculates the flux sequence:
 - Basic equations:
- \[\begin{split}W_{new} = (A + W_{old}) \cdot exp(-1 / R) \\ D = A + W_{old} - W_{new} \\ \\ D = DelayedRecharge \\ A = ActualRecharge \\ W = DeepWater \\ R = RechargeDelay\end{split}\]
 - (The given equations are the analytical solution of the linear storage equation under the assumption of a stepwise constant inflow.) - Examples: - >>> from hydpy.models.whmod import * >>> simulationstep("1d") >>> parameterstep("1d") >>> fluxes.actualrecharge = 1.0 - >>> rechargedelay(1.0) >>> states.deepwater(2.0) >>> model.calc_delayedrecharge_deepwater_v1() >>> fluxes.delayedrecharge delayedrecharge(1.896362) >>> states.deepwater deepwater(1.103638) - >>> rechargedelay(0.0) >>> states.deepwater(2.0) >>> model.calc_delayedrecharge_deepwater_v1() >>> fluxes.delayedrecharge delayedrecharge(3.0) >>> states.deepwater deepwater(0.0) 
- class hydpy.models.whmod.whmod_model.Get_Temperature_V1[source]¶
- Bases: - Method- Get the basin’s current air temperature. - Requires the input sequence:
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> inputs.temperature = 2.0 >>> from hydpy import round_ >>> round_(model.get_temperature_v1(0)) 2.0 >>> round_(model.get_temperature_v1(1)) 2.0 
- class hydpy.models.whmod.whmod_model.Get_MeanTemperature_V1[source]¶
- Bases: - Method- Get the basin’s current air temperature. - Requires the input sequence:
 - Example: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> inputs.temperature = 2.0 >>> from hydpy import round_ >>> round_(model.get_meantemperature_v1()) 2.0 
- class hydpy.models.whmod.whmod_model.Get_Precipitation_V1[source]¶
- Bases: - Method- Get the basin’s current precipitation. - Requires the input sequence:
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> inputs.precipitation = 2.0 >>> from hydpy import round_ >>> round_(model.get_precipitation_v1(0)) 2.0 >>> round_(model.get_precipitation_v1(1)) 2.0 
- class hydpy.models.whmod.whmod_model.Get_InterceptedWater_V1[source]¶
- Bases: - Method- Get the selected zone’s current amount of intercepted water. - Requires the state sequence:
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(2) >>> states.interceptedwater = 2.0, 4.0 >>> from hydpy import round_ >>> round_(model.get_interceptedwater_v1(0)) 2.0 >>> round_(model.get_interceptedwater_v1(1)) 4.0 
- class hydpy.models.whmod.whmod_model.Get_SoilWater_V1[source]¶
- Bases: - Method- Get the selected zone’s current soil water content. - Requires the state sequence:
 - Examples: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(2) >>> states.soilmoisture = 2.0, 4.0 >>> from hydpy import round_ >>> round_(model.get_soilwater_v1(0)) 2.0 >>> round_(model.get_soilwater_v1(1)) 4.0 
- class hydpy.models.whmod.whmod_model.Get_SnowCover_V1[source]¶
- Bases: - Method- Get the selected zones’s current snow cover degree. - Requires the state sequence:
 - Examples: - Each response unit with a non-zero amount of snow counts as wholly covered: - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(2) >>> states.snowpack = 0.0, 2.0 >>> model.get_snowcover_v1(0) 0.0 >>> model.get_snowcover_v1(1) 1.0 
- class hydpy.models.whmod.whmod_model.Main_AETModel_V1[source]¶
- Bases: - AdHocModel- Base class for HydPy-WHMod models that use submodels that comply with the - AETModel_V1interface.- aetmodel: SubmodelProperty¶
 - aetmodel_is_mainmodel¶
 - aetmodel_typeid¶
 - add_aetmodel_v1¶
- Initialise the given submodel that follows the - AETModel_V1interface and is responsible for calculating the different kinds of actual evapotranspiration.- >>> from hydpy.models.whmod_rural import * >>> parameterstep() >>> nmbzones(5) >>> area(10.0) >>> landtype(GRASS, DECIDUOUS, CONIFER, WATER, SEALED) >>> zonearea(4.0, 1.0, 1.0, 1.0, 3.0) >>> availablefieldcapacity(200.0) >>> rootingdepth(1.0) >>> groundwaterdepth(1.0) >>> with model.add_aetmodel_v1("evap_aet_minhas"): ... nmbhru ... area ... water ... interception ... soil ... dissefactor(grass=1.0, deciduous=2.0, default=3.0) ... for method, arguments in model.preparemethod2arguments.items(): ... print(method, arguments[0][0], sep=": ") nmbhru(5) area(10.0) water(conifer=False, deciduous=False, grass=False, sealed=False, water=True) interception(conifer=True, deciduous=True, grass=True, sealed=True, water=False) soil(conifer=True, deciduous=True, grass=True, sealed=False, water=False) prepare_nmbzones: 5 prepare_zonetypes: [1 2 4 9 8] prepare_subareas: [4. 1. 1. 1. 3.] prepare_water: [False False False True False] prepare_interception: [ True True True False True] prepare_soil: [ True True True False False] prepare_plant: [ True True True False False] prepare_conifer: [False False True False False] prepare_tree: [False True True False False] prepare_maxsoilwater: [200. 200. 200. 200. 200.] - >>> df = model.aetmodel.parameters.control.dissefactor >>> df dissefactor(conifer=3.0, deciduous=2.0, grass=1.0) >>> landtype(DECIDUOUS, GRASS, CONIFER, WATER, SEALED) >>> df dissefactor(conifer=3.0, deciduous=1.0, grass=2.0) >>> from hydpy import round_ >>> round_(df.average_values()) 1.5 
 - REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Sub_TempModel_V1[source]¶
- Bases: - AdHocModel,- TempModel_V1- Base class for HydPy-WHMod models that comply with the - TempModel_V1submodel interface.- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Sub_PrecipModel_V1[source]¶
- Bases: - AdHocModel,- PrecipModel_V1- Base class for HydPy-WHMod models that comply with the - PrecipModel_V1submodel interface.- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Sub_IntercModel_V1[source]¶
- Bases: - AdHocModel,- IntercModel_V1- Base class for HydPy-WHMod models that comply with the - IntercModel_V1submodel interface.- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Sub_SoilWaterModel_V1[source]¶
- Bases: - AdHocModel,- SoilWaterModel_V1- Base class for HydPy-WHMod models that comply with the - SoilWaterModel_V1submodel interface.- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
- class hydpy.models.whmod.whmod_model.Sub_SnowCoverModel_V1[source]¶
- Bases: - AdHocModel,- SnowCoverModel_V1- Base class for HydPy-WHMod models that comply with the - SnowCoverModel_V1submodel interface.- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
 
Parameter Features¶
Parameter tools¶
- class hydpy.models.whmod.whmod_parameters.LandTypeBaseParameter(subvars: SubParameters)[source]¶
- Bases: - ZipParameter- Base class for 1-dimensional land type-specific parameters. - constants: dict[str, int] = {'CONIFER': 4, 'CORN': 3, 'DECIDUOUS': 2, 'GRASS': 1, 'SEALED': 8, 'SPRINGWHEAT': 5, 'SUGARBEETS': 7, 'WATER': 9, 'WINTERWHEAT': 6}¶
- Mapping of the constants’ names and values. 
 
- class hydpy.models.whmod.whmod_parameters.LandTypeCompleteParameter(subvars: SubParameters)[source]¶
- Bases: - LandTypeBaseParameter- Base class for 1-dimensional land type-specific parameters without restrictions. - We take parameter - ZoneAreaas an example:- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(grass=1.0, deciduous=2.0, corn=3.0, conifer=4.0, springwheat=5.0, ... winterwheat=6.0, sugarbeets=7.0, sealed=8.0, water=9.0) >>> zonearea zonearea(conifer=4.0, corn=3.0, deciduous=2.0, grass=1.0, sealed=8.0, springwheat=5.0, sugarbeets=7.0, water=9.0, winterwheat=6.0) >>> from hydpy import round_ >>> round_(zonearea.average_values()) 6.333333 - mask: masktools.IndexMask¶
 
- class hydpy.models.whmod.whmod_parameters.LandTypeNonWaterParameter(subvars: SubParameters)[source]¶
- Bases: - LandTypeBaseParameter- Base class for 1-dimensional land type-specific parameters that do not affect water areas. - We take parameter - DegreeDayFactoras an example:- >>> from hydpy.models.whmod import * >>> simulationstep("1d") >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> degreedayfactor(grass=1.0, deciduous=2.0, corn=3.0, conifer=4.0, ... springwheat=5.0, winterwheat=6.0, sugarbeets=7.0, sealed=8.0) >>> degreedayfactor degreedayfactor(conifer=4.0, corn=3.0, deciduous=2.0, grass=1.0, sealed=8.0, springwheat=5.0, sugarbeets=7.0, winterwheat=6.0) >>> zonearea(0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.9) >>> from hydpy import round_ >>> round_(degreedayfactor.average_values()) 3.333333 - mask: masktools.IndexMask¶
 
- class hydpy.models.whmod.whmod_parameters.LandTypeGroundwaterParameter(subvars: SubParameters)[source]¶
- Bases: - LandTypeBaseParameter- Base class for 1-dimensional land type-specific parameters that affect groundwater recharge. - We take parameter - BaseflowIndexas an example:- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... WATER, SEALED) >>> baseflowindex(grass=0.1, deciduous=0.2, corn=0.3, conifer=0.4, springwheat=0.5, ... winterwheat=0.6, sugarbeets=0.7, water=0.8) >>> baseflowindex baseflowindex(conifer=0.4, corn=0.3, deciduous=0.2, grass=0.1, springwheat=0.5, sugarbeets=0.7, water=0.8, winterwheat=0.6) >>> zonearea(8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 9.0) >>> from hydpy import round_ >>> round_(baseflowindex.average_values()) 0.333333 - mask: masktools.IndexMask¶
 
- class hydpy.models.whmod.whmod_parameters.LandTypeSoilParameter(subvars: SubParameters)[source]¶
- Bases: - LandTypeBaseParameter- Base class for 1-dimensional land type-specific parameters that affect soil processes. - We take parameter - RootingDepthas an example:- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... WATER, SEALED) >>> rootingdepth(grass=0.1, deciduous=0.2, corn=0.3, conifer=0.4, springwheat=0.5, ... winterwheat=0.6, sugarbeets=0.7) >>> rootingdepth rootingdepth(conifer=0.4, corn=0.3, deciduous=0.2, grass=0.1, springwheat=0.5, sugarbeets=0.7, winterwheat=0.6) >>> zonearea(7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 8.0, 9.0) >>> from hydpy import round_ >>> round_(rootingdepth.average_values()) 0.3 - mask: masktools.IndexMask¶
 
- class hydpy.models.whmod.whmod_parameters.SoilTypeParameter(subvars: SubParameters)[source]¶
- Bases: - ZipParameter- Base class for 1-dimensional soil type-specific parameters. - We take parameter - AvailableFieldCapacityas an example:- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE) >>> availablefieldcapacity( ... sand=0.1, sand_cohesive=0.2, loam=0.3, clay=0.4, silt=0.5, peat=0.6 ... ) >>> availablefieldcapacity availablefieldcapacity(clay=0.4, loam=0.3, peat=0.6, sand=0.1, sand_cohesive=0.2, silt=0.5) >>> area(30.0) >>> zonearea(6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 9.0) >>> from hydpy import round_ >>> round_(availablefieldcapacity.average_values()) 0.266667 - constants: dict[str, int] = {'CLAY': 13, 'LOAM': 12, 'NONE': 16, 'PEAT': 15, 'SAND': 10, 'SAND_COHESIVE': 11, 'SILT': 14}¶
- Mapping of the constants’ names and values. 
 - mask: masktools.IndexMask¶
 
Constants¶
HydPy-WHMod provides two types of constants: those associated with the land type and those associated with the soil type of the individual zones of a sub-catchment. They are all available via wildcard-imports:
>>> from hydpy.models.whmod import *
>>> (GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, SEALED,
...  WATER)
(1, 2, 3, 4, 5, 6, 7, 8, 9)
>>> (SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE)
(10, 11, 12, 13, 14, 15, 16)
- hydpy.models.whmod.whmod_constants.GRASS = 1¶
- Land type constant for grassland. 
- hydpy.models.whmod.whmod_constants.DECIDUOUS = 2¶
- Land type constant for deciduous forests. 
- hydpy.models.whmod.whmod_constants.CORN = 3¶
- Land type constant for corn fields. 
- hydpy.models.whmod.whmod_constants.CONIFER = 4¶
- Land type constant for coniferous forests. 
- hydpy.models.whmod.whmod_constants.SPRINGWHEAT = 5¶
- Land type constant for spring wheat fields. 
- hydpy.models.whmod.whmod_constants.WINTERWHEAT = 6¶
- Land type constant for winter wheat fields. 
- hydpy.models.whmod.whmod_constants.SUGARBEETS = 7¶
- Land type constant for sugar beet fields. 
- hydpy.models.whmod.whmod_constants.SEALED = 8¶
- Land type constant for sealed areas. 
- hydpy.models.whmod.whmod_constants.WATER = 9¶
- Land type constant for water areas. 
- hydpy.models.whmod.whmod_constants.SAND = 10¶
- Soil type constant for sand. 
- hydpy.models.whmod.whmod_constants.SAND_COHESIVE = 11¶
- Soil type constant for cohesive sand. 
- hydpy.models.whmod.whmod_constants.LOAM = 12¶
- Soil type constant for loam. 
- hydpy.models.whmod.whmod_constants.CLAY = 13¶
- Soil type constant for clay. 
- hydpy.models.whmod.whmod_constants.SILT = 14¶
- Soil type constant for silt. 
- hydpy.models.whmod.whmod_constants.PEAT = 15¶
- Soil type constant for peat. 
- hydpy.models.whmod.whmod_constants.NONE = 16¶
- Soil type constant for areas without soils. 
Control parameters¶
- class hydpy.models.whmod.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - SubParameters- Control parameters of model whmod. - The following classes are selected:
- Area()Total area [m²].
- NmbZones()Number of zones (hydrological response units) in a subbasin [-].
- ZoneArea()Zone area [m²].
- LandType()Land cover type [-].
- SoilType()Soil type [-].
- CisternSource()A flag that indicates whether a zone’s excess water (surface runoff or percolation) is channelled into the cistern [-]..
- CisternCapacity()Maximum water amount that can be collected in the cistern [m³].
- InterceptionCapacity()Maximum interception storage [mm].
- DegreeDayFactor()Degree day factor for snow melting [mm/T/K].
- AvailableFieldCapacity()Maximum relative soil moisture content [mm/m].
- RootingDepth()Maximum rooting depth [m].
- GroundwaterDepth()Average groundwater depth [m].
- WithCapillaryRise()Flag to turn on/off capillary rise [-].
- CapillaryThreshold()Relative soil moisture where the capillary rise starts [-].
- CapillaryLimit()Relative soil moisture where the capillary rise reaches its maximum [-].
- IrrigationTrigger()Relative soil moisture below which irrigation starts [-].
- IrrigationTarget()Relative soil moisture content at which irrigation ends [-].
- WithExternalIrrigation()Flag to turn on/off external irrigation [-].
- BaseflowIndex()Baseflow index [-].
- RechargeDelay()Delay between soil percolation and groundwater recharge [T].
 
 
- class hydpy.models.whmod.whmod_control.Area(subvars: SubParameters)[source]¶
- Bases: - Parameter- Total area [m²]. 
- class hydpy.models.whmod.whmod_control.NmbZones(subvars: SubParameters)[source]¶
- Bases: - Parameter- Number of zones (hydrological response units) in a subbasin [-]. - Required by the methods:
- Calc_ActualRecharge_V1- Calc_Baseflow_V1- Calc_CapillaryRise_V1- Calc_CapillaryRise_V2- Calc_CisternDemand_V1- Calc_CisternInflow_V1- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2- Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1- Calc_InterceptionEvaporation_InterceptedWater_V1- Calc_InternalIrrigation_SoilMoisture_V1- Calc_LakeEvaporation_AETModel_V1- Calc_LakeEvaporation_V1- Calc_Percolation_V1- Calc_Ponding_V1- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_PotentialSnowmelt_V1- Calc_RelativeSoilMoisture_V1- Calc_RequiredIrrigation_V1- Calc_Snowmelt_Snowpack_V1- Calc_SoilEvapotranspiration_AETModel_V1- Calc_SoilEvapotranspiration_V1- Calc_SoilMoisture_V1- Calc_SurfaceRunoff_V1- Calc_Throughfall_InterceptedWater_V1- Calc_TotalEvapotranspiration_V1
 - NmbZonesdetermines the length of most 1-dimensional parameters and sequences. Usually, you should first prepare- NmbZonesand define the values of all 1-dimensional parameters and sequences afterwards:- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> availablefieldcapacity.shape (5,) >>> states.soilmoisture.shape (5,) - Changing the value of - NmbZoneslater reshapes the affected parameters and sequences and makes it necessary to reset their values:- >>> availablefieldcapacity(2.0) >>> availablefieldcapacity availablefieldcapacity(2.0) >>> nmbzones(3) >>> availablefieldcapacity availablefieldcapacity(?) - Re-defining the same value does not delete the already available data: - >>> availablefieldcapacity(2.0) >>> nmbzones(3) >>> availablefieldcapacity availablefieldcapacity(2.0) 
- class hydpy.models.whmod.whmod_control.ZoneArea(subvars: SubParameters)[source]¶
- Bases: - LandTypeCompleteParameter- Zone area [m²]. - Required by the methods:
 
- class hydpy.models.whmod.whmod_control.LandType(subvars: SubParameters)[source]¶
- Bases: - NameParameter- Land cover type [-]. - Required by the methods:
- Calc_ActualRecharge_V1- Calc_Baseflow_V1- Calc_CisternInflow_V1- Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1- Calc_InterceptionEvaporation_InterceptedWater_V1- Calc_LakeEvaporation_AETModel_V1- Calc_LakeEvaporation_V1- Calc_Ponding_V1- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_PotentialSnowmelt_V1- Calc_RequiredIrrigation_V1- Calc_Snowmelt_Snowpack_V1- Calc_SurfaceRunoff_V1- Calc_Throughfall_InterceptedWater_V1- Calc_TotalEvapotranspiration_V1
 
- class hydpy.models.whmod.whmod_control.SoilType(subvars: SubParameters)[source]¶
- Bases: - NameParameter- Soil type [-]. - Required by the methods:
- Calc_CapillaryRise_V1- Calc_CapillaryRise_V2- Calc_CisternDemand_V1- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2- Calc_InternalIrrigation_SoilMoisture_V1- Calc_Percolation_V1- Calc_RelativeSoilMoisture_V1- Calc_RequiredIrrigation_V1- Calc_SoilEvapotranspiration_AETModel_V1- Calc_SoilEvapotranspiration_V1- Calc_SoilMoisture_V1- Calc_TotalEvapotranspiration_V1
 - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, SAND, NONE, NONE) >>> soiltype soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, SAND, NONE, NONE) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE, NONE, NONE) Traceback (most recent call last): ... ValueError: While trying to set the values of parameter `soiltype` of element `?`, the following error occurred: The soil type of land type(s) SUGARBEETS must not be NONE. - >>> soiltype soiltype(?) - >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, SAND, SAND, SAND) Traceback (most recent call last): ... ValueError: While trying to set the values of parameter `soiltype` of element `?`, the following error occurred: The soil type of land type(s) SEALED and WATER must be NONE. - >>> soiltype soiltype(?) - constants: Constants = {'CLAY': 13, 'LOAM': 12, 'NONE': 16, 'PEAT': 15, 'SAND': 10, 'SAND_COHESIVE': 11, 'SILT': 14}¶
 - mask¶
 
- class hydpy.models.whmod.whmod_control.CisternSource(subvars: SubParameters)[source]¶
- Bases: - LandTypeNonWaterParameter- A flag that indicates whether a zone’s excess water (surface runoff or percolation) is channelled into the cistern [-].. - Required by the methods:
- Calc_CapillaryRise_V2- Calc_CisternInflow_V1- Calc_PotentialRecharge_V2
 
- class hydpy.models.whmod.whmod_control.CisternCapacity(subvars: SubParameters)[source]¶
- Bases: - Parameter- Maximum water amount that can be collected in the cistern [m³]. - Required by the method:
 
- class hydpy.models.whmod.whmod_control.InterceptionCapacity(subvars: SubParameters)[source]¶
- Bases: - KeywordParameter2D- Maximum interception storage [mm]. - Required by the method:
 - columnnames: tuple[str, ...] = ('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec')¶
 
- class hydpy.models.whmod.whmod_control.DegreeDayFactor(subvars: SubParameters)[source]¶
- Bases: - LandTypeNonWaterParameter- Degree day factor for snow melting [mm/T/K]. - Required by the method:
 
- class hydpy.models.whmod.whmod_control.AvailableFieldCapacity(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Maximum relative soil moisture content [mm/m]. 
- class hydpy.models.whmod.whmod_control.RootingDepth(subvars: SubParameters)[source]¶
- Bases: - LandTypeSoilParameter- Maximum rooting depth [m]. 
- class hydpy.models.whmod.whmod_control.GroundwaterDepth(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Average groundwater depth [m]. 
- class hydpy.models.whmod.whmod_control.WithCapillaryRise(subvars: SubParameters)[source]¶
- Bases: - Parameter- Flag to turn on/off capillary rise [-]. - Required by the methods:
 
- class hydpy.models.whmod.whmod_control.CapillaryThreshold(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Relative soil moisture where the capillary rise starts [-]. 
- class hydpy.models.whmod.whmod_control.CapillaryLimit(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Relative soil moisture where the capillary rise reaches its maximum [-]. 
- class hydpy.models.whmod.whmod_control.IrrigationTrigger(subvars: SubParameters)[source]¶
- Bases: - KeywordParameter2D- Relative soil moisture below which irrigation starts [-]. - Required by the method:
 - columnnames: tuple[str, ...] = ('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec')¶
 - rownames: tuple[str, ...] = ('grass', 'deciduous', 'corn', 'conifer', 'springwheat', 'winterwheat', 'sugarbeets')¶
 - trim(lower=None, upper=None) bool[source]¶
- Trim - IrrigationTriggerfollowing \(0 \leq IrrigationTrigger \leq IrrigationTarget \leq 1\).- >>> from hydpy.models.whmod import * >>> parameterstep() >>> trigger = irrigationtrigger - >>> trigger( ... grass=0.0, ... deciduous=0.0, ... corn=[0.0, 0.0, 0.0, 0.0, 0.0, 0.7, 1.0, 1.3, 0.0, 0.0, 0.0, 0.0], ... conifer=0.0, ... springwheat=0.0, ... winterwheat=0.0, ... sugarbeets=0.0, ... ) >>> trigger.corn_jun, trigger.corn_jul, trigger.corn_aug (0.7, 1.0, 1.0) - >>> irrigationtarget.corn_jun = 0.7 >>> irrigationtarget.corn_jul = 0.7 >>> trigger( ... grass=0.0, ... deciduous=0.0, ... corn=[0.0, 0.0, 0.0, 0.0, 0.0, 0.7, 1.0, 1.3, 0.0, 0.0, 0.0, 0.0], ... conifer=0.0, ... springwheat=0.0, ... winterwheat=0.0, ... sugarbeets=0.0, ... ) >>> trigger = irrigationtrigger >>> trigger.corn_jun, trigger.corn_jul, trigger.corn_aug (0.7, 0.7, 1.0) 
 
- class hydpy.models.whmod.whmod_control.IrrigationTarget(subvars: SubParameters)[source]¶
- Bases: - KeywordParameter2D- Relative soil moisture content at which irrigation ends [-]. - Required by the method:
 - columnnames: tuple[str, ...] = ('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec')¶
 - rownames: tuple[str, ...] = ('grass', 'deciduous', 'corn', 'conifer', 'springwheat', 'winterwheat', 'sugarbeets')¶
 - trim(lower=None, upper=None) bool[source]¶
- Trim - IrrigationTargetfollowing \(0 \leq IrrigationTrigger \leq IrrigationTarget \leq 1\).- >>> from hydpy.models.whmod import * >>> parameterstep() >>> target = irrigationtarget - >>> target( ... grass=0.0, ... deciduous=0.0, ... corn=[0.0, 0.0, 0.0, 0.0, 0.0, 0.7, 0.3, -0.1, 0.0, 0.0, 0.0, 0.0], ... conifer=0.0, ... springwheat=0.0, ... winterwheat=0.0, ... sugarbeets=0.0, ... ) >>> target.corn_jun, target.corn_jul, target.corn_aug (0.7, 0.3, 0.0) - >>> irrigationtrigger.corn_jun = 0.7 >>> irrigationtrigger.corn_jul = 0.7 >>> target( ... grass=0.0, ... deciduous=0.0, ... corn=[0.0, 0.0, 0.0, 0.0, 0.0, 0.7, 0.3, -0.1, 0.0, 0.0, 0.0, 0.0], ... conifer=0.0, ... springwheat=0.0, ... winterwheat=0.0, ... sugarbeets=0.0, ... ) >>> target = irrigationtarget >>> target.corn_jun, target.corn_jul, target.corn_aug (0.7, 0.7, 0.0) 
 
- class hydpy.models.whmod.whmod_control.WithExternalIrrigation(subvars: SubParameters)[source]¶
- Bases: - Parameter- Flag to turn on/off external irrigation [-]. - Required by the methods:
- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2
 
- class hydpy.models.whmod.whmod_control.BaseflowIndex(subvars: SubParameters)[source]¶
- Bases: - LandTypeGroundwaterParameter- Baseflow index [-]. - Required by the method:
 
- class hydpy.models.whmod.whmod_control.RechargeDelay(subvars: SubParameters)[source]¶
- Bases: - Parameter- Delay between soil percolation and groundwater recharge [T]. - Required by the method:
 
Derived parameters¶
- class hydpy.models.whmod.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - SubParameters- Derived parameters of model whmod. - The following classes are selected:
- MOY()References the “global” month of the year index array [-].
- ZoneRatio()Relative zone area [-].
- SoilDepth()Effective soil depth [m].
- MaxSoilWater()Maximum water content of the considered soil column [mm].
- Beta()Nonlinearity parameter for calculating percolation [-].
- PotentialCapillaryRise()Potential capillary rise [mm/T].
 
 
- class hydpy.models.whmod.whmod_derived.MOY(subvars: SubParameters)[source]¶
- Bases: - MOYParameter- References the “global” month of the year index array [-]. - Required by the methods:
- Calc_RequiredIrrigation_V1- Calc_Throughfall_InterceptedWater_V1
 
- class hydpy.models.whmod.whmod_derived.ZoneRatio(subvars: SubParameters)[source]¶
- Bases: - LandTypeCompleteParameter- Relative zone area [-]. - Required by the method:
 - update()[source]¶
- Calculate the relative zone areas based on \(ZoneRation = ZoneArea / Area\). - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(3) >>> landtype(GRASS, WATER, SEALED) >>> area(100.0) >>> zonearea(20.0, 30.0, 50.0) >>> derived.zoneratio.update() >>> derived.zoneratio zoneratio(grass=0.2, sealed=0.5, water=0.3) 
 
- class hydpy.models.whmod.whmod_derived.SoilDepth(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Effective soil depth [m]. - update()[source]¶
- Calculate the effective soil depth - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(4) >>> landtype(GRASS, DECIDUOUS, CONIFER, WATER) >>> soiltype(SAND, SILT, CLAY, NONE) >>> groundwaterdepth(1.0) >>> rootingdepth(0.5, 1.0, 1.5, 2.0) >>> derived.soildepth.update() >>> derived.soildepth soildepth(clay=1.0, sand=0.5, silt=1.0) 
 
- class hydpy.models.whmod.whmod_derived.MaxSoilWater(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Maximum water content of the considered soil column [mm]. - Required by the methods:
- Calc_RelativeSoilMoisture_V1- Calc_RequiredIrrigation_V1- Calc_SoilMoisture_V1
 - update()[source]¶
- Calculate the maximum soil water content based on \(AvailableFieldCapacity \cdot max(SoilDepth, \, 0.3)\) - >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE) >>> availablefieldcapacity(200.0) >>> derived.soildepth( ... sand=0.0, sand_cohesive=0.2, loam=0.3, clay=0.4, silt=1.0, peat=1.0 ... ) >>> derived.maxsoilwater.update() >>> derived.maxsoilwater maxsoilwater(clay=80.0, loam=60.0, peat=200.0, sand=60.0, sand_cohesive=60.0, silt=200.0) 
 
- class hydpy.models.whmod.whmod_derived.Beta(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Nonlinearity parameter for calculating percolation [-]. - Required by the method:
 - update()[source]¶
- Calculate - Betabased on \(1 + \frac{6}{1 + (MaxSoilWater / 118.25)^{-6.5}}\) (Armbruster, 2002).- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND_COHESIVE, LOAM, CLAY, SILT, PEAT, NONE) >>> derived.maxsoilwater( ... sand=0.0, sand_cohesive=50.0, loam=100.0, clay=150.0, silt=200.0, ... peat=250.0 ... ) >>> derived.beta.update() >>> derived.beta beta(clay=5.945944, loam=2.510161, peat=6.954142, sand=1.0, sand_cohesive=1.022215, silt=6.809179) - >>> nmbzones(2) >>> landtype(WATER, SEALED) >>> soiltype(NONE) >>> derived.maxsoilwater(100.0) >>> derived.beta.update() >>> derived.beta beta(nan) 
 
- class hydpy.models.whmod.whmod_derived.PotentialCapillaryRise(subvars: SubParameters)[source]¶
- Bases: - SoilTypeParameter- Potential capillary rise [mm/T]. - Required by the methods:
 - update()[source]¶
- Calculate the potential capillary rise based on \(5 \cdot Days \cdot \frac{(GroundwaterDepth - SoilDepth) - CapillaryThreshold} {CapillaryLimit - CapillaryThreshold}\). - >>> from hydpy.models.whmod import * >>> simulationstep("1h") >>> parameterstep("1d") >>> nmbzones(7) >>> landtype(GRASS, GRASS, GRASS, GRASS, GRASS, GRASS, SEALED) >>> soiltype(SAND, SAND, SAND, SAND, SAND, SAND, NONE) >>> capillarythreshold(sand=0.8) >>> capillarylimit(sand=0.4) >>> derived.soildepth(sand=1.0) >>> groundwaterdepth(1.2, 1.4, 1.6, 1.8, 2.0, nan, nan) >>> derived.potentialcapillaryrise.update() >>> derived.potentialcapillaryrise potentialcapillaryrise(5.0, 5.0, 2.5, 0.0, 0.0, nan, nan) >>> from hydpy import print_vector >>> print_vector(derived.potentialcapillaryrise.values) 0.208333, 0.208333, 0.104167, 0.0, 0.0, nan, nan - >>> capillarythreshold(sand=0.6) >>> capillarylimit(sand=0.6) >>> derived.potentialcapillaryrise.update() >>> derived.potentialcapillaryrise potentialcapillaryrise(5.0, 5.0, 0.0, 0.0, 0.0, nan, nan) 
 
Sequence Features¶
Sequence tools¶
- class hydpy.models.whmod.whmod_sequences.Mixin1DSequence(subvars: SubVariables)[source]¶
- Bases: - Sequence_- Mixin class for all 1-dimensional sequences. 
- class hydpy.models.whmod.whmod_sequences.Factor1DSoilSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FactorSequence- Base class for 1-dimensional factors sequences relevant to all soil zones. - We take class - RelativeSoilMoistureas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> factors.relativesoilmoisture = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, nan, nan >>> from hydpy import round_ >>> round_(factors.relativesoilmoisture.average_values()) 1.928571 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.Flux1DCompleteSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FluxSequence- Base class for 1-dimensional flux sequences relevant to all zones. - We take class - TotalEvapotranspirationas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> fluxes.totalevapotranspiration = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, 0.0, 5.0 >>> from hydpy import round_ >>> round_(fluxes.totalevapotranspiration.average_values()) 2.2 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.FluxSequence1DWaterSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FluxSequence- Base class for 1-dimensional flux sequences relevant to all water zones. - We take class - LakeEvaporationas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(10) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 27.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> fluxes.lakeevaporation = nan, nan, nan, nan, nan, nan, nan, nan, 2.0, 4.0 >>> from hydpy import round_ >>> round_(fluxes.lakeevaporation.average_values()) 3.5 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.Flux1DNonWaterSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FluxSequence- Base class for 1-dimensional flux sequences relevant to all land zones. - We take class - Throughfallas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> fluxes.throughfall = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, 0.0, nan >>> from hydpy import round_ >>> round_(fluxes.throughfall.average_values()) 1.5 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.Flux1DSoilSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FluxSequence- Base class for 1-dimensional flux sequences relevant to all soil zones. - We take class - Percolationas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> fluxes.percolation = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, nan, nan >>> from hydpy import round_ >>> round_(fluxes.percolation.average_values()) 1.928571 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.Flux1DGroundwaterSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- FluxSequence- Base class for 1-dimensional flux sequences relevant to all groundwater zones. - We take class - Baseflowas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> fluxes.baseflow = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, nan, 5.0 >>> from hydpy import round_ >>> round_(fluxes.baseflow.average_values()) 2.675676 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.State1DNonWaterSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- StateSequence- Base class for 1-dimensional state sequences relevant to all land zones. - We take class - InterceptedWateras an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> states.interceptedwater = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, 0.0, nan >>> from hydpy import round_ >>> round_(states.interceptedwater.average_values()) 1.5 - mask¶
 
- class hydpy.models.whmod.whmod_sequences.State1DSoilSequence(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Mixin1DSequence,- StateSequence- Base class for 1-dimensional state sequences relevant to all soil zones. - We take class - SoilMoistureas an example:- >>> from hydpy.models.whmod import * >>> parameterstep("1d") >>> nmbzones(9) >>> landtype(GRASS, DECIDUOUS, CORN, CONIFER, SPRINGWHEAT, WINTERWHEAT, SUGARBEETS, ... SEALED, WATER) >>> zonearea(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) >>> area(sum(zonearea)) >>> derived.zoneratio.update() >>> states.soilmoisture = 1.0, 3.0, 1.5, 3.5, 2.0, 2.5, 0.5, nan, nan >>> from hydpy import round_ >>> round_(states.soilmoisture.average_values()) 1.928571 - mask¶
 
Input sequences¶
- class hydpy.models.whmod.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - InputSequences- Input sequences of model whmod. - The following classes are selected:
- Precipitation()Precipitation [mm/T].
- Temperature()Air temperature [°C].
 
 
- class hydpy.models.whmod.whmod_inputs.Precipitation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - InputSequence- Precipitation [mm/T]. - Required by the methods:
- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_Throughfall_InterceptedWater_V1- Get_Precipitation_V1
 
- class hydpy.models.whmod.whmod_inputs.Temperature(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - InputSequence- Air temperature [°C]. - Required by the methods:
- Calc_Ponding_V1- Calc_PotentialSnowmelt_V1- Calc_Snowmelt_Snowpack_V1- Get_MeanTemperature_V1- Get_Temperature_V1
 
Factor sequences¶
- class hydpy.models.whmod.FactorSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - FactorSequences- Factor sequences of model whmod. - The following classes are selected:
- RelativeSoilMoisture()Crop-available relative soil water content [-].
 
 
- class hydpy.models.whmod.whmod_factors.RelativeSoilMoisture(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Factor1DSoilSequence- Crop-available relative soil water content [-]. - Calculated by the method:
- Required by the methods:
- Calc_CapillaryRise_V1- Calc_CapillaryRise_V2- Calc_Percolation_V1- Calc_RequiredIrrigation_V1
 
Flux sequences¶
- class hydpy.models.whmod.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - FluxSequences- Flux sequences of model whmod. - The following classes are selected:
- InterceptionEvaporation()Evaporation from the interception storage [mm/T].
- Throughfall()Precipitation, passing the interception storage [mm/T].
- PotentialSnowmelt()Potential snowmelt [mm/T].
- Snowmelt()Actual snowmelt [mm/T].
- Ponding()Ponding on land surfaces [mm/T].
- SurfaceRunoff()Surface runoff [mm/T].
- Percolation()Percolation out of the soil storage [mm/T].
- SoilEvapotranspiration()Evapotranspiration from the soil storage [mm/T].
- LakeEvaporation()Evaporation from water areas [mm/T].
- TotalEvapotranspiration()Total evapotranspiration [mm/T].
- CapillaryRise()Capillary rise [mm/T].
- RequiredIrrigation()Required irrigation [mm/T].
- CisternInflow()Inflow into the cistern [m³/T].
- CisternOverflow()Overflow of the cistern due to limited storage capacity [m³/T].
- CisternDemand()Irrigation water damanded from the cistern [m³/T].
- CisternExtraction()Actual irrigation extraction from the cistern [m³/T].
- InternalIrrigation()Actual internal irrigation from the cistern [mm/T].
- ExternalIrrigation()Actual irrigation from external sources [mm/T].
- PotentialRecharge()Potential recharge [mm/T].
- Baseflow()Baseflow [mm/T].
- ActualRecharge()Actual recharge [mm/T].
- DelayedRecharge()Delayed recharge [mm/T].
 
 
- class hydpy.models.whmod.whmod_fluxes.InterceptionEvaporation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Evaporation from the interception storage [mm/T]. - Calculated by the methods:
- Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1- Calc_InterceptionEvaporation_InterceptedWater_V1
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.Throughfall(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Precipitation, passing the interception storage [mm/T]. - Calculated by the method:
- Required by the methods:
 
- class hydpy.models.whmod.whmod_fluxes.PotentialSnowmelt(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Potential snowmelt [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.Snowmelt(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Actual snowmelt [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.Ponding(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Ponding on land surfaces [mm/T]. - Calculated by the method:
- Required by the methods:
- Calc_Percolation_V1- Calc_SoilMoisture_V1- Calc_SurfaceRunoff_V1
 
- class hydpy.models.whmod.whmod_fluxes.SurfaceRunoff(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DNonWaterSequence- Surface runoff [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.Percolation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Percolation out of the soil storage [mm/T]. - Calculated by the method:
- Required by the methods:
- Calc_CisternInflow_V1- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_SoilMoisture_V1
 
- class hydpy.models.whmod.whmod_fluxes.SoilEvapotranspiration(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Evapotranspiration from the soil storage [mm/T]. - Calculated by the methods:
- Calc_SoilEvapotranspiration_AETModel_V1- Calc_SoilEvapotranspiration_V1
- Required by the methods:
 
- class hydpy.models.whmod.whmod_fluxes.LakeEvaporation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence1DWaterSequence- Evaporation from water areas [mm/T]. - Calculated by the methods:
- Required by the methods:
- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_TotalEvapotranspiration_V1
 
- class hydpy.models.whmod.whmod_fluxes.TotalEvapotranspiration(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DCompleteSequence- Total evapotranspiration [mm/T]. - Calculated by the method:
 
- class hydpy.models.whmod.whmod_fluxes.CapillaryRise(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Capillary rise [mm/T]. - Calculated by the methods:
- Required by the methods:
- Calc_PotentialRecharge_V1- Calc_PotentialRecharge_V2- Calc_SoilMoisture_V1
 
- class hydpy.models.whmod.whmod_fluxes.RequiredIrrigation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Required irrigation [mm/T]. - Calculated by the method:
- Required by the methods:
- Calc_CisternDemand_V1- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2- Calc_InternalIrrigation_SoilMoisture_V1
 
- class hydpy.models.whmod.whmod_fluxes.CisternInflow(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Inflow into the cistern [m³/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.CisternOverflow(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Overflow of the cistern due to limited storage capacity [m³/T]. - Calculated by the method:
 
- class hydpy.models.whmod.whmod_fluxes.CisternDemand(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Irrigation water damanded from the cistern [m³/T]. - Calculated by the method:
- Required by the methods:
- Calc_CisternExtraction_CisternWater_V1- Calc_InternalIrrigation_SoilMoisture_V1
 
- class hydpy.models.whmod.whmod_fluxes.CisternExtraction(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Actual irrigation extraction from the cistern [m³/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.InternalIrrigation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Actual internal irrigation from the cistern [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.ExternalIrrigation(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DSoilSequence- Actual irrigation from external sources [mm/T]. - Calculated by the methods:
- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2
 
- class hydpy.models.whmod.whmod_fluxes.PotentialRecharge(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DGroundwaterSequence- Potential recharge [mm/T]. - Calculated by the methods:
- Required by the methods:
 
- class hydpy.models.whmod.whmod_fluxes.Baseflow(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - Flux1DGroundwaterSequence- Baseflow [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.ActualRecharge(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Actual recharge [mm/T]. - Calculated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_fluxes.DelayedRecharge(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - FluxSequence- Delayed recharge [mm/T]. - Calculated by the method:
 
State sequences¶
- class hydpy.models.whmod.StateSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
- Bases: - StateSequences- State sequences of model whmod. - The following classes are selected:
- InterceptedWater()Interception storage water content [mm].
- Snowpack()Snow layer’s total water content [mm].
- SoilMoisture()Crop-available soil water content [mm].
- CisternWater()Amount of water that is collected in the cistern [m³].
- DeepWater()Amount of water that is (still) percolating through the vadose zone [mm].
 
 
- class hydpy.models.whmod.whmod_states.InterceptedWater(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - State1DNonWaterSequence- Interception storage water content [mm]. - Updated by the methods:
- Calc_InterceptionEvaporation_InterceptedWater_AETModel_V1- Calc_InterceptionEvaporation_InterceptedWater_V1- Calc_Throughfall_InterceptedWater_V1
- Required by the method:
 
- class hydpy.models.whmod.whmod_states.Snowpack(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - State1DNonWaterSequence- Snow layer’s total water content [mm]. - Updated by the method:
- Required by the method:
 
- class hydpy.models.whmod.whmod_states.SoilMoisture(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - State1DSoilSequence- Crop-available soil water content [mm]. - Updated by the methods:
- Calc_ExternalIrrigation_SoilMoisture_V1- Calc_ExternalIrrigation_SoilMoisture_V2- Calc_InternalIrrigation_SoilMoisture_V1- Calc_SoilMoisture_V1
- Required by the methods:
 - trim(lower=None, upper=None) bool[source]¶
- Trim - SoilMoisturefollowing \(0 \leq SoilMoisture \leq MaxSoilWater\).- >>> from hydpy.models.whmod import * >>> parameterstep() >>> nmbzones(5) >>> derived.maxsoilwater(200.0) >>> states.soilmoisture(-100.0, 0.0, 100.0, 200.0, 300.0) >>> states.soilmoisture soilmoisture(0.0, 0.0, 100.0, 200.0, 200.0) 
 
- class hydpy.models.whmod.whmod_states.CisternWater(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - StateSequence- Amount of water that is collected in the cistern [m³]. - Updated by the methods:
- Calc_CisternExtraction_CisternWater_V1- Calc_CisternOverflow_CisternWater_V1
 - trim(lower=None, upper=None) bool[source]¶
- Trim - CisternWaterfollowing \(0 \leq CisternWater \leq CisternCapacity\).- >>> from hydpy.models.whmod import * >>> parameterstep() >>> control.cisterncapacity(5.0) >>> states.cisternwater(3.0) >>> states.cisternwater cisternwater(3.0) >>> states.cisternwater(5.0) >>> states.cisternwater cisternwater(5.0) >>> states.cisternwater(7.0) >>> states.cisternwater cisternwater(5.0) 
 
- class hydpy.models.whmod.whmod_states.DeepWater(subvars: ModelIOSequences[ModelIOSequence, FastAccessIOSequence])[source]¶
- Bases: - StateSequence- Amount of water that is (still) percolating through the vadose zone [mm]. - Updated by the method:
 
Auxiliary Features¶
Masks¶
- class hydpy.models.whmod.Masks[source]
- Bases: - Masks- Masks of HydPy-WHMod (base model). - The following classes are selected:
- LandTypeComplete()Mask that includes all land use types.
- LandTypeNonWater()Mask that excludes water areas.
- LandTypeSoil()Mask that includes areas with soils.
- LandTypeGras()Mask that includes only grassland.
- LandTypeDeciduous()Mask that includes only decidious forests.
- LandTypeCorn()Mask that includes only corn fields.
- LandTypeConifer()Mask that includes only conifer forests.
- LandTypeSpringWheat()Mask that includes only spring wheat fields.
- LandTypeWinterWheat()Mask that includes only winter wheat fields.
- LandTypeSugarbeets()Mask that includes only sugar beet fields.
- LandTypeSealed()Mask that includes only sealed areas.
- LandTypeWater()Mask that includes only water areas.
- SoilTypeComplete()Mask that includes all soil types.
- SoilTypeSand()Mask that includes only sand soils.
- SoilTypeSandCohesive()Mask that includes only cohesive sand soils.
- SoilTypeLoam()Mask that includes only loam soils.
- SoilTypeClay()Mask that includes only clay soils.
- SoilTypeSilt()Mask that includes only silt soils.
- SoilTypePeat()Mask that includes only peat soils.
 
 
- class hydpy.models.whmod.whmod_masks.LandTypeBase(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - IndexMask- Base class for all land type-specific masks. 
- class hydpy.models.whmod.whmod_masks.LandTypeComplete(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes all land use types. 
- class hydpy.models.whmod.whmod_masks.LandTypeNonWater(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that excludes water areas. 
- class hydpy.models.whmod.whmod_masks.LandTypeGroundwater(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes all areas with groundwater recharge. 
- class hydpy.models.whmod.whmod_masks.LandTypeSoil(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes areas with soils. 
- class hydpy.models.whmod.whmod_masks.LandTypeGras(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only grassland. 
- class hydpy.models.whmod.whmod_masks.LandTypeDeciduous(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only decidious forests. 
- class hydpy.models.whmod.whmod_masks.LandTypeCorn(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only corn fields. 
- class hydpy.models.whmod.whmod_masks.LandTypeConifer(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only conifer forests. 
- class hydpy.models.whmod.whmod_masks.LandTypeSpringWheat(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only spring wheat fields. 
- class hydpy.models.whmod.whmod_masks.LandTypeWinterWheat(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only winter wheat fields. 
- class hydpy.models.whmod.whmod_masks.LandTypeSugarbeets(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only sugar beet fields. 
- class hydpy.models.whmod.whmod_masks.LandTypeSealed(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only sealed areas. 
- class hydpy.models.whmod.whmod_masks.LandTypeWater(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - LandTypeBase- Mask that includes only water areas. 
- class hydpy.models.whmod.whmod_masks.SoilTypeBase(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - IndexMask- Base class for all soil type-specific masks. 
- class hydpy.models.whmod.whmod_masks.SoilTypeComplete(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes all soil types. 
- class hydpy.models.whmod.whmod_masks.SoilTypeSand(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only sand soils. 
- class hydpy.models.whmod.whmod_masks.SoilTypeSandCohesive(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only cohesive sand soils. 
- class hydpy.models.whmod.whmod_masks.SoilTypeLoam(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only loam soils. 
- class hydpy.models.whmod.whmod_masks.SoilTypeClay(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only clay soils. 
- class hydpy.models.whmod.whmod_masks.SoilTypeSilt(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only silt soils. 
- class hydpy.models.whmod.whmod_masks.SoilTypePeat(variable: variabletools.Variable | None = None, doc: str | None = None, **kwargs)[source]¶
- Bases: - SoilTypeBase- Mask that includes only peat soils. 
- class hydpy.models.whmod.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - SubParameters- Control parameters of model whmod. - The following classes are selected:
- Area()Total area [m²].
- NmbZones()Number of zones (hydrological response units) in a subbasin [-].
- ZoneArea()Zone area [m²].
- LandType()Land cover type [-].
- SoilType()Soil type [-].
- CisternSource()A flag that indicates whether a zone’s excess water (surface runoff or percolation) is channelled into the cistern [-]..
- CisternCapacity()Maximum water amount that can be collected in the cistern [m³].
- InterceptionCapacity()Maximum interception storage [mm].
- DegreeDayFactor()Degree day factor for snow melting [mm/T/K].
- AvailableFieldCapacity()Maximum relative soil moisture content [mm/m].
- RootingDepth()Maximum rooting depth [m].
- GroundwaterDepth()Average groundwater depth [m].
- WithCapillaryRise()Flag to turn on/off capillary rise [-].
- CapillaryThreshold()Relative soil moisture where the capillary rise starts [-].
- CapillaryLimit()Relative soil moisture where the capillary rise reaches its maximum [-].
- IrrigationTrigger()Relative soil moisture below which irrigation starts [-].
- IrrigationTarget()Relative soil moisture content at which irrigation ends [-].
- WithExternalIrrigation()Flag to turn on/off external irrigation [-].
- BaseflowIndex()Baseflow index [-].
- RechargeDelay()Delay between soil percolation and groundwater recharge [T].
 
 
- class hydpy.models.whmod.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - SubParameters- Derived parameters of model whmod. - The following classes are selected:
- MOY()References the “global” month of the year index array [-].
- ZoneRatio()Relative zone area [-].
- SoilDepth()Effective soil depth [m].
- MaxSoilWater()Maximum water content of the considered soil column [mm].
- Beta()Nonlinearity parameter for calculating percolation [-].
- PotentialCapillaryRise()Potential capillary rise [mm/T].
 
 
- class hydpy.models.whmod.FactorSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - FactorSequences- Factor sequences of model whmod. - The following classes are selected:
- RelativeSoilMoisture()Crop-available relative soil water content [-].
 
 
- class hydpy.models.whmod.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - FluxSequences- Flux sequences of model whmod. - The following classes are selected:
- InterceptionEvaporation()Evaporation from the interception storage [mm/T].
- Throughfall()Precipitation, passing the interception storage [mm/T].
- PotentialSnowmelt()Potential snowmelt [mm/T].
- Snowmelt()Actual snowmelt [mm/T].
- Ponding()Ponding on land surfaces [mm/T].
- SurfaceRunoff()Surface runoff [mm/T].
- Percolation()Percolation out of the soil storage [mm/T].
- SoilEvapotranspiration()Evapotranspiration from the soil storage [mm/T].
- LakeEvaporation()Evaporation from water areas [mm/T].
- TotalEvapotranspiration()Total evapotranspiration [mm/T].
- CapillaryRise()Capillary rise [mm/T].
- RequiredIrrigation()Required irrigation [mm/T].
- CisternInflow()Inflow into the cistern [m³/T].
- CisternOverflow()Overflow of the cistern due to limited storage capacity [m³/T].
- CisternDemand()Irrigation water damanded from the cistern [m³/T].
- CisternExtraction()Actual irrigation extraction from the cistern [m³/T].
- InternalIrrigation()Actual internal irrigation from the cistern [mm/T].
- ExternalIrrigation()Actual irrigation from external sources [mm/T].
- PotentialRecharge()Potential recharge [mm/T].
- Baseflow()Baseflow [mm/T].
- ActualRecharge()Actual recharge [mm/T].
- DelayedRecharge()Delayed recharge [mm/T].
 
 
- class hydpy.models.whmod.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - InputSequences- Input sequences of model whmod. - The following classes are selected:
- Precipitation()Precipitation [mm/T].
- Temperature()Air temperature [°C].
 
 
- class hydpy.models.whmod.StateSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
- Bases: - StateSequences- State sequences of model whmod. - The following classes are selected:
- InterceptedWater()Interception storage water content [mm].
- Snowpack()Snow layer’s total water content [mm].
- SoilMoisture()Crop-available soil water content [mm].
- CisternWater()Amount of water that is collected in the cistern [m³].
- DeepWater()Amount of water that is (still) percolating through the vadose zone [mm].
 
 
