HydPy-Evap-PET-M (month-based adjustment of reference evapotranspiration)¶
Use evap_pet_m as a plug-in between a main model like lland_dd and another submodel
like evap_ret_tw2002 to adjust the reference evapotranspiration given by
evap_ret_tw2002 by month.
Integration tests¶
Note
When new to HydPy, consider reading section Integration Tests first.
Application model evap_pet_m requires no input from another model and does not supply
any outlet sequence. Hence, assigning a model instance to a blank Element instance
is sufficient:
>>> from hydpy.models.evap_pet_m import *
>>> parameterstep("1d")
>>> from hydpy import Element
>>> element = Element("element")
>>> element.model = model
In our simple test-setting, the submodel of type evap_ret_io supplies different
reference evapotranspiration values for two hydrological response units for the last
of January and the first of February 2000. evap_pet_m applies individual adjustment
factors for both months and “damps” the second unit’s result value:
>>> from hydpy import pub
>>> pub.timegrids = "2000-01-31", "2000-02-02", "1d"
>>> nmbhru(2)
>>> hruarea(0.2, 0.8)
>>> monthfactor.jan = 0.5
>>> monthfactor.feb = 2.0
>>> dampingfactor(1.0, 0.5)
>>> with model.add_retmodel_v1("evap_ret_io"):
... evapotranspirationfactor(0.8, 1.2)
>>>
>>> from hydpy import IntegrationTest
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> test.inits = ((model.sequences.logs.loggedpotentialevapotranspiration, 0.6),)
>>>
>>> model.retmodel.sequences.inputs.referenceevapotranspiration.series = 1.0, 2.0
>>> test()
Click to see the table
- class hydpy.models.evap_pet_m.Model[source]¶
Bases:
Main_RET_PETModel_V1,Sub_ETModel,PETModel_V1HydPy-Evap-PET-M (month-based adjustment of reference evapotranspiration).
- The following “run methods” are called in the given sequence during each simulation step:
Calc_ReferenceEvapotranspiration_V4Let a submodel that complies with thePETModel_V1interface calculate the reference evapotranspiration.Calc_PotentialEvapotranspiration_V1Calculate month-specific potential evaporation based on reference evapotranspiration.Update_PotentialEvapotranspiration_V1Damp the given potential evapotranspiration and update the corresponding log sequence.Calc_MeanPotentialEvapotranspiration_V1Calculate the average potential evapotranspiration.
- The following interface methods are available to main models using the defined model as a submodel:
Determine_PotentialEvapotranspiration_V1Interface method that applies the complete application model by executing all “run methods”.Get_PotentialEvapotranspiration_V2Get the current potential evapotranspiration from the selected hydrological response unit.Get_MeanPotentialEvapotranspiration_V2Get the averaged potential evapotranspiration.
- 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_ReferenceEvapotranspiration_PETModel_V1Let a submodel that complies with thePETModel_V1interface calculate the reference evapotranspiration.
- Users can hook submodels into the defined main model if they satisfy one of the following interfaces:
PETModel_V1Simple interface for calculating all potential evapotranspiration values in one step.
- retmodel: SubmodelProperty¶
Required submodel that complies with the following interface: PETModel_V1.
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- cymodel: CyModelProtocol | None¶
- parameters: parametertools.Parameters¶
- sequences: sequencetools.Sequences¶
- masks: masktools.Masks¶
- class hydpy.models.evap_pet_m.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersControl parameters of model evap_pet_m.
- The following classes are selected:
NmbHRU()The number of separately modelled hydrological response units [-].HRUArea()The area of each hydrological response unit [km²].MonthFactor()Factor for converting general potential evaporation or evapotranspiration (usually grass reference evapotranspiration) to month-specific potential evaporation or evapotranspiration [-].DampingFactor()Damping factor (temporal weighting factor) for potential evapotranspiration [-].
- class hydpy.models.evap_pet_m.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersDerived parameters of model evap_pet_m.
- The following classes are selected:
MOY()References the “global” month of the year index array [-].HRUAreaFraction()The area fraction of each hydrological response unit [-].
- class hydpy.models.evap_pet_m.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequencesFlux sequences of model evap_pet_m.
- The following classes are selected:
ReferenceEvapotranspiration()Reference (grass) evapotranspiration [mm/T].PotentialEvapotranspiration()Potential (land type-specific) evapotranspiration [mm/T].MeanPotentialEvapotranspiration()Mean potential evapotranspiration [mm/T].
- class hydpy.models.evap_pet_m.LogSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
LogSequencesLog sequences of model evap_pet_m.
- The following classes are selected:
LoggedPotentialEvapotranspiration()Logged (damped) potential evapotranspiration [mm/T].