HydPy-Dummy-SnowAlbedo (dummy model supplying main models with snow albedo states)¶
dummy_snowalbedo
merely serves testing purposes. We use it, for example, to perform
the integration tests for submodels like evap_aet_morsim
without the need to couple
them to complex main models like lland_knauf
for providing snow albedo data.
Integration test¶
The only functionality of dummy_snowalbedo
is reading input time series. Hence,
configuring and testing it does not require additional explanations:
>>> from hydpy.models.dummy_snowalbedo 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.snowalbedo.series = [[1.0, 2.0], [3.0, 4.0]]
>>> test()
Click to see the table
>>> round_(model.get_snowalbedo_v1(1))
4.0
- class hydpy.models.dummy_snowalbedo.Model[source]¶
Bases:
AdHocModel
,SnowAlbedoModel_V1
HydPy-Dummy-SnowAlbedo (dummy model supplying main models with snow albedo states).
- The following interface methods are available to main models using the defined model as a submodel:
Get_SnowAlbedo_V1
Get the selected zone’s current snow albedo.
- DOCNAME: DocName = ('Dummy-SnowAlbedo', 'dummy model supplying main models with snow albedo states')¶
- 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_snowalbedo.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParameters
Control parameters of model dummy_snowalbedo.
- The following classes are selected:
NmbZones()
The number of separately modelled zones [-].
- class hydpy.models.dummy_snowalbedo.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequences
Input sequences of model dummy_snowalbedo.
- The following classes are selected:
SnowAlbedo()
Snow albedo [-].