HydPy-Meteo-Temp-IO (external temperature data)¶
Use meteo_temp_io
as a submodel tp supply (relative) main models like
evap_pet_hbv96
with externally available temperature time series.
Integration tests¶
Note
When new to HydPy, consider reading section Integration Tests first.
The only functionality of meteo_temp_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_temp_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)
>>> temperatureaddend(-0.6, -1.2)
>>> parameters.update()
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.temperature.series = 2.0, 4.0
>>> test()
Click to see the table
- class hydpy.models.meteo_temp_io.Model[source]¶
Bases:
Sub_BaseModel
,TempModel_V2
HydPy-Meteo-Temp-IO (external temperature data).
- The following “run methods” are called in the given sequence during each simulation step:
Calc_Temperature_V1
Take the input temperature for each hydrological response unit.Adjust_Temperature_V1
Adjust the previously determined temperature values.Calc_MeanTemperature_V1
Calculate the average temperature.
- The following interface methods are available to main models using the defined model as a submodel:
Determine_Temperature_V1
Interface method that applies the complete application model by executing all “run methods”.Get_Temperature_V1
Get the current temperature from the selected hydrological response unit.Get_MeanTemperature_V1
Get the mean temperature.
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- cymodel: CyModelProtocol | None¶
- parameters: parametertools.Parameters¶
- sequences: sequencetools.Sequences¶
- masks: masktools.Masks¶
- class hydpy.models.meteo_temp_io.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model meteo_temp_io.
- The following classes are selected:
NmbHRU()
The number of hydrological response units [-].HRUArea()
The area of each hydrological response unit [km²].TemperatureAddend()
Temperature shift constant [°C].
- class hydpy.models.meteo_temp_io.DerivedParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Derived parameters of model meteo_temp_io.
- The following classes are selected:
HRUAreaFraction()
The area fraction of each hydrological response unit [-].
- class hydpy.models.meteo_temp_io.FactorSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FactorSequences
Factor sequences of model meteo_temp_io.
- The following classes are selected:
Temperature()
Temperature [°C].MeanTemperature()
Mean temperature [°C].
- class hydpy.models.meteo_temp_io.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model meteo_temp_io.
- The following classes are selected:
Temperature()
Temperature [°C].