HydPy-Dummy-SoilWater (dummy model supplying main models with soil water states)¶
dummy_soilwater
merely serves testing purposes. We use it, for example, to perform
the integration tests for submodels like evap_aet_hbv96
without the need to couple
them to complex main models like hland_96
for providing soil water data.
Integration test¶
The only functionality of dummy_soilwater
is reading input time series. Hence,
configuring and testing it does not require additional explanations:
>>> from hydpy.models.dummy_soilwater import *
>>> parameterstep()
>>> from hydpy import Element
>>> element = Element("element")
>>> element.model = model
>>> from hydpy import IntegrationTest, pub, round_
>>> pub.timegrids = "2000-01-01", "2000-01-03", "1d"
>>> nmbzones(2)
>>> test = IntegrationTest(element)
>>> test.dateformat = "%Y-%d-%m"
>>> inputs.soilwater.series = [[1.0, 2.0], [3.0, 4.0]]
>>> test()
Click to see the table
>>> round_(model.get_soilwater_v1(1))
4.0
- class hydpy.models.dummy_soilwater.Model[source]¶
Bases:
AdHocModel
,SoilWaterModel_V1
HydPy-Dummy-SoilWater (dummy model supplying main models with soil water states).
- The following interface methods are available to main models using the defined model as a submodel:
Get_SoilWater_V1
Get the selected zone’s current soil water amount.
- prepare_nmbzones¶
Set the number of zones.
>>> from hydpy.models.dummy_soilwater import * >>> parameterstep() >>> model.prepare_nmbzones(2) >>> nmbzones nmbzones(2)
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- class hydpy.models.dummy_soilwater.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model dummy_soilwater.
- The following classes are selected:
NmbZones()
The number of separately modelled zones [-].
- class hydpy.models.dummy_soilwater.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model dummy_soilwater.
- The following classes are selected:
SoilWater()
Soil water content [mm].