HydPy-Dummy-SnowyCanopy (dummy model supplying main models with snow cover degrees in canopies)¶
dummy_snowycanopy 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 interception data.
Integration test¶
The only functionality of dummy_snowycanopy is reading input time series. Hence,
configuring and testing it does not require additional explanations:
>>> from hydpy.models.dummy_snowycanopy 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.snowycanopy.series = [[1.0, 2.0], [3.0, 4.0]]
>>> test()
Click to see the table
>>> round_(model.get_snowycanopy_v1(1))
4.0
- class hydpy.models.dummy_snowycanopy.Model[source]¶
Bases:
AdHocModel,SnowyCanopyModel_V1HydPy-Dummy-SnowyCanopy (dummy model supplying main models with snow cover degrees in canopies).
- The following interface methods are available to main models using the defined model as a submodel:
Get_SnowyCanopy_V1Get the selected zone’s current snow cover degree in the canopies of tree-like vegetation (ornanif the zone’s vegetation is not tree-like).
- DOCNAME: DocName = ('Dummy-SnowyCanopy', 'dummy model supplying main models with snow cover degrees in canopies')¶
- prepare_nmbzones¶
Set the number of zones.
>>> from hydpy.models.dummy_snowcover import * >>> parameterstep() >>> model.prepare_nmbzones(2) >>> nmbzones nmbzones(2)
- REUSABLE_METHODS: ClassVar[tuple[type[ReusableMethod], ...]] = ()¶
- class hydpy.models.dummy_snowycanopy.ControlParameters(master: Parameters, cls_fastaccess: type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersControl parameters of model dummy_snowycanopy.
- The following classes are selected:
NmbZones()The number of separately modelled zones [-].
- class hydpy.models.dummy_snowycanopy.InputSequences(master: Sequences, cls_fastaccess: type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InputSequencesInput sequences of model dummy_snowycanopy.
- The following classes are selected:
SnowyCanopy()Snow cover degree in the canopies of tree-like vegetation (isnanfor non-tree-like vegetation) [-].