HydPy-Meteo-Precip-IO (external precipitation data)¶
Use meteo_precip_io
as a submodel to supply (relative) main models like
evap_pet_hbv96
with externally available precipitation time series.
Integration tests¶
Note
When new to HydPy, consider reading section Integration Tests first.
The only functionality of meteo_precip_io
besides reading input time series is to
adjust the given values to multiple hydrological response units. Hence, configuring
and testing it does not require additional explanations:
>>> from hydpy.models.meteo_precip_io import *
>>> parameterstep()
>>> from hydpy import Element
>>> element = Element("element")
>>> element.model = model
>>> from hydpy import IntegrationTest, pub
>>> pub.timegrids = "2000-01-01", "2000-01-03", "1d"
>>> nmbhru(2)
>>> hruarea(0.2, 0.8)
>>> precipitationfactor(0.8, 1.2)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.precipitation.series = 1.0, 2.0
>>> test()
Click to see the table
- class hydpy.models.meteo_precip_io.Model[source]¶
Bases:
Sub_BaseModel
,PrecipModel_V2
HydPy-Meteo-Precip-IO (external precipitation data).
- The following “run methods” are called in the given sequence during each simulation step:
Calc_Precipitation_V1
Take the input precipitation for each hydrological response unit.Adjust_Precipitation_V1
Adjust the previously determined precipitation values.Calc_MeanPrecipitation_V1
Calculate the average precipitation.
- The following interface methods are available to main models using the defined model as a submodel:
Determine_Precipitation_V1
Interface method that applies the complete application model by executing all “run methods”.Get_Precipitation_V1
Get the current precipitation from the selected hydrological response unit.Get_MeanPrecipitation_V1
Get the mean precipitation.
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- cymodel: CyModelProtocol | None¶
- parameters: parametertools.Parameters¶
- sequences: sequencetools.Sequences¶
- masks: masktools.Masks¶
- class hydpy.models.meteo_precip_io.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model meteo_precip_io.
- The following classes are selected:
NmbHRU()
The number of hydrological response units [-].HRUArea()
The area of each hydrological response unit [km²].PrecipitationFactor()
Precipitation adjustment factor [-].
- class hydpy.models.meteo_precip_io.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Derived parameters of model meteo_precip_io.
- The following classes are selected:
HRUAreaFraction()
The area fraction of each hydrological response unit [-].
- class hydpy.models.meteo_precip_io.FluxSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequences
Flux sequences of model meteo_precip_io.
- The following classes are selected:
Precipitation()
Precipitation [mm/T].MeanPrecipitation()
Mean precipitation [mm/T].
- class hydpy.models.meteo_precip_io.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model meteo_precip_io.
- The following classes are selected:
Precipitation()
Precipitation [mm/T].