ewatercycle.models

Collection of models available in eWaterCycle.

Examples

To instantiate a model:

>>> from ewatercycle.models import Wflow
>>> model = Wflow()
# Alternativly import it directly from plugin with
>>> from ewaterycecle.plugins.wlow.model import Wflow

To list all available models:

>>> from ewatercycle.models import sources
>>> sources
# Returns dictionary containing models

To get your own model to be listed here it needs to be registered in the ewatercycle.models entry point group.

Module Contents

class ewatercycle.models.ModelSources(*args, **kw)

Bases: ewatercycle.shared.Sources

Dictionary filled with available models.

Examples:

Get a nice overview of the available models:

>>> from ewatercycle.models import sources
>>> print(sources)
...

List the names of the available models:

>>> from ewatercycle.models import sources
>>> sources.keys()
['Wflow', 'LeakyBucket', ...]

Access one of the models:

>>> from ewatercycle.models import sources
>>> sources["Wflow"]
model = sources["Wflow"]()

To get your own model to be listed here it needs to be registered in the ewatercycle.models entry point group .

ewatercycle.models.sources