ewatercycle.forcing

Forcing module of eWaterCycle. Contains the forcing sources.

Module Contents

class ewatercycle.forcing.ForcingSources(*args, **kw)

Bases: ewatercycle.shared.Sources

Dictionary filled with available forcing sources.

Examples

List all available forcing sources:

>>> from ewatercycle.forcing import sources
>>> sources.keys()
['DefaultForcing', 'MarrmotForcing', ...]

Forcing can be generated for a specifc source by doing

>>> from ewatercycle.forcing import sources
>>> forcing = sources['MarrmotForcing'].generate(...)

A forcing can be generated from files on disk with something like

>>> from ewatercycle.forcing import sources
>>> forcing = sources.DefauitForcing(
    directory="path/to/forcing/directory",
    start_time="2000-01-01",
    end_time="2001-12-31",
)

A previously saved forcing can be loaded with

>>> from ewatercycle.forcing import sources
>>> forcing = sources.DefaultForcing.load("path/to/forcing/directory")

To get your own forcing source to be listed here it needs to be registered in the ewatercycle.forcings entry point group .

ewatercycle.forcing.sources