eWaterCycle
Makes it easier to use hydrological models without having intimate knowledge about how to install and run the models.
https://github.com/eWaterCycle/ewatercycle
Category: Hydrosphere
Sub Category: Freshwater and Hydrology
Keywords from Contributors
hydrology ansible ewatercycle bmi csdms phenology
Last synced: about 1 hour ago
JSON representation
Repository metadata
Python package for running hydrological models
- Host: GitHub
- URL: https://github.com/eWaterCycle/ewatercycle
- Owner: eWaterCycle
- License: apache-2.0
- Created: 2018-08-29T15:47:07.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-10-10T13:34:51.000Z (24 days ago)
- Last Synced: 2025-10-27T10:41:31.036Z (7 days ago)
- Language: Python
- Homepage: https://ewatercycle.readthedocs.io/en/latest/
- Size: 10.1 MB
- Stars: 38
- Watchers: 5
- Forks: 5
- Open Issues: 62
- Releases: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
README.md
ewatercycle

A Python package for running hydrological models.
The eWaterCycle package makes it easier to use hydrological models
without having intimate knowledge about how to install and run the
models.
- Uses container for running models in an isolated and portable way
with grpc4bmi or remotebmi - Generates rain and sunshine required for the model using
ESMValTool - Supports observation data from GRDC or
USGS - Exposes simple
interface
to quickly get up and running
Install
The ewatercycle package needs some geospatial non-python packages to
generate forcing data. It is preferred to create a Conda environment to
install those dependencies:
curl -o conda-lock.yml https://raw.githubusercontent.com/eWaterCycle/ewatercycle/main/conda-lock.yml
conda install mamba conda-lock -n base -c conda-forge -y
conda-lock install --no-dev -n ewatercycle
conda activate ewatercycle
The ewatercycle package is installed with
pip install ewatercycle
The ewatercycle package ships without any models. Models are packaged in plugins. To install all endorsed plugins use
pip install ewatercycle-hype ewatercycle-lisflood ewatercycle-marrmot ewatercycle-pcrglobwb ewatercycle-wflow ewatercycle-leakybucket
Besides installing software you will need to create a configuration
file, download several data sets and get container images. See the
system setup
chapter
for instructions.
Usage
Example using the Marrmot M14
(TOPMODEL)
hydrological model on Rhine catchment to generate forcing, run it
and produce a hydrograph.
forcing = ewatercycle.forcing.sources['MarrmotForcing'].generate(...)
model = ewatercycle.models.sources['MarrmotM14'](forcing)
model.setup(...)
model.initialize()
while (model.time < model.end_time):
model.update()
value = model.get_value_as_xarray('flux_out_Q')
model.finalize()
ewatercycle.analysis.hydrograph(...)
(Click to see real code)
import ewatercycle.analysis
import ewatercycle.forcing
import ewatercycle.models
import ewatercycle.observation.grdc
from ewatercycle.testing.fixtures import rhine_shape
import shapefile
import xarray as xr
forcing = ewatercycle.forcing.sources['MarrmotForcing'].generate(
dataset='ERA5',
start_time='2010-01-01T00:00:00Z',
end_time='2010-12-31T00:00:00Z',
shape=rhine_shape()
)
model = ewatercycle.models.sources['MarrmotM14'](version='2020.11', forcing=forcing)
cfg_file, cfg_dir = model.setup(
threshold_flow_generation_evap_change=0.1,
)
model.initialize(cfg_file)
# flux_out_Q unit conversion factor from mm/day to m3/s
sf = shapefile.Reader(rhine_shape())
area = sf.record(0)['SUB_AREA'] * 1e6 # from shapefile in m2
conversion_mmday2m3s = 1 / (1000 * 24 * 60 * 60)
conversion = conversion_mmday2m3s * area
simulated_discharge = []
while (model.time < model.end_time):
model.update()
simulated_discharge.append(
model.get_value_as_xarray('flux_out_Q')
)
observations_ds = ewatercycle.observation.grdc.get_grdc_data(
station_id=6335020, # Rees, Germany
start_time=model.start_time_as_isostr,
end_time=model.end_time_as_isostr,
column='observation',
)
# Combine the simulated discharge with the observations
sim_da = xr.concat(simulated_discharge, dim='time') * conversion
sim_da.name = 'simulated'
discharge = xr.merge([sim_da, observations_ds["observation"]]).to_dataframe()
discharge = discharge[["observation", "simulated"]].dropna()
ewatercycle.analysis.hydrograph(discharge, reference='observation')
model.finalize()
More examples can be found in the plugins listed in the
documentation.
Contributing
If you want to contribute to the development of ewatercycle package,
have a look at the contribution guidelines.
License
Copyright (c) 2018 - 2024, Netherlands eScience Center & Delft University of
Technology
Apache Software License 2.0
Citation (CITATION.cff)
# YAML 1.2
---
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Verhoeven
given-names: Stefan
orcid: "https://orcid.org/0000-0002-5821-2060"
-
affiliation: "Netherlands eScience Center"
family-names: Drost
given-names: Niels
orcid: "https://orcid.org/0000-0001-9795-7981"
-
affiliation: "Netherlands eScience Center"
family-names: Weel
given-names: Berend
-
affiliation: "Netherlands eScience Center"
family-names: Smeets
given-names: Stef
orcid: "https://orcid.org/0000-0002-5413-9038"
-
affiliation: "Netherlands eScience Center"
family-names: Kalverla
given-names: Peter
orcid: "https://orcid.org/0000-0002-5025-7862"
-
affiliation: "Netherlands eScience Center"
family-names: Alidoost
given-names: Fakhereh
orcid: "https://orcid.org/0000-0001-8407-6472"
-
affiliation: "Netherlands eScience Center"
family-names: Vreede
given-names: Barbara
orcid: "https://orcid.org/0000-0002-5023-4601"
-
affiliation: "Netherlands eScience Center"
family-names: Schilperoort
given-names: Bart
orcid: "https://orcid.org/0000-0003-4487-9822"
-
affiliation: "Delft University of Technology"
family-names: Hut
given-names: Rolf
orcid: "https://orcid.org/0000-0002-5697-5697"
-
affiliation: "Delft University of Technology"
family-names: Aerts
given-names: Jerom
orcid: "https://orcid.org/0000-0003-0157-4818"
-
affiliation: "Delft University of Technology"
family-names: Haasnoot
given-names: David
orcid: "https://orcid.org/0009-0002-4838-8350"
-
affiliation: "Netherlands eScience Center"
family-names: van Werkhoven
given-names: Ben
orcid: "https://orcid.org/0000-0002-7508-3272"
email: "b.vanwerkhoven@esciencecenter.nl"
-
affiliation: "Delft University of Technology"
family-names: van de Giesen
given-names: Nick
orcid: "https://orcid.org/0000-0002-7200-3353"
-
affiliation: "Delft University of Technology"
family-names: Melotto
given-names: Mark
orcid: "https://orcid.org/0009-0005-2727-660X"
email: "markmelotto@tudelft.nl"
cff-version: "1.2.0"
keywords:
- hydrology
- bmi
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/eWaterCycle/ewatercycle"
title: eWaterCycle Python package
identifiers:
- description: Latest version of software
type: doi
value: "10.5281/zenodo.5119389"
...
Owner metadata
- Name: eWaterCycle
- Login: eWaterCycle
- Email:
- Kind: organization
- Description:
- Website: http://www.ewatercycle.org
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/12843269?v=4
- Repositories: 74
- Last ynced at: 2024-03-26T20:41:32.902Z
- Profile URL: https://github.com/eWaterCycle
GitHub Events
Total
- Create event: 9
- Release event: 1
- Issues event: 17
- Watch event: 4
- Delete event: 8
- Issue comment event: 71
- Push event: 59
- Pull request review event: 16
- Pull request review comment event: 11
- Pull request event: 17
Last Year
- Create event: 9
- Release event: 1
- Issues event: 16
- Watch event: 3
- Delete event: 8
- Issue comment event: 70
- Push event: 59
- Pull request review event: 16
- Pull request review comment event: 11
- Pull request event: 17
Committers metadata
Last synced: 2 days ago
Total Commits: 247
Total Committers: 13
Avg Commits per committer: 19.0
Development Distribution Score (DDS): 0.474
Commits in past year: 10
Committers in past year: 4
Avg Commits per committer in past year: 2.5
Development Distribution Score (DDS) in past year: 0.5
| Name | Commits | |
|---|---|---|
| Stefan Verhoeven | s****n@e****l | 130 |
| Peter Kalverla | p****a@g****m | 38 |
| SarahAlidoost | 5****t | 30 |
| Bart Schilperoort | b****t@e****l | 20 |
| Stef Smeets | s****s | 9 |
| Berend Weel | b****l@e****l | 5 |
| Rolf Hut | r****t@t****l | 3 |
| Niels Drost | n****t@e****l | 3 |
| Mark Melotto | 7****o | 3 |
| David Haasnoot | 5****p | 3 |
| Jerom Aerts | 4****s | 1 |
| Faruk D | 1****n | 1 |
| Barbara Vreede | b****e@e****l | 1 |
Committer domains:
- esciencecenter.nl: 5
- tudelft.nl: 1
- gmx.com: 1
Issue and Pull Request metadata
Last synced: 4 days ago
Total issues: 266
Total pull requests: 257
Average time to close issues: 8 months
Average time to close pull requests: about 1 month
Total issue authors: 17
Total pull request authors: 13
Average comments per issue: 1.74
Average comments per pull request: 2.74
Merged pull request: 216
Bot issues: 0
Bot pull requests: 0
Past year issues: 15
Past year pull requests: 21
Past year average time to close issues: 9 days
Past year average time to close pull requests: 9 days
Past year issue authors: 4
Past year pull request authors: 4
Past year average comments per issue: 1.07
Past year average comments per pull request: 3.1
Past year merged pull request: 15
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sverhoeven (103)
- Peter9192 (60)
- SarahAlidoost (35)
- BSchilperoort (29)
- RolfHut (11)
- jeromaerts (6)
- Daafip (5)
- MarkMelotto (3)
- stefsmeets (3)
- pauwiersma (3)
- forestbat (2)
- geek-yang (1)
- bvreede (1)
- Maartenvm (1)
- andrevdv (1)
Top Pull Request Authors
- sverhoeven (116)
- Peter9192 (41)
- BSchilperoort (38)
- SarahAlidoost (25)
- stefsmeets (10)
- RolfHut (8)
- Daafip (6)
- MarkMelotto (5)
- nielsdrost (4)
- jeromaerts (1)
- bpmweel (1)
- bvreede (1)
- fdiblen (1)
Top Issue Labels
- enhancement (21)
- bug (17)
- forcing (17)
- documentation (13)
- models (9)
- good first issue (3)
- question (2)
- V2.2 (2)
- observations (2)
- parameters (1)
- help wanted (1)
Top Pull Request Labels
- bug (2)
- enhancement (2)
Package metadata
- Total packages: 3
-
Total downloads:
- pypi: 243 last-month
- Total dependent packages: 8 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 20
- Total maintainers: 5
proxy.golang.org: github.com/eWaterCycle/ewatercycle
- Homepage:
- Documentation: https://pkg.go.dev/github.com/eWaterCycle/ewatercycle#section-documentation
- Licenses: apache-2.0
- Latest release: v2.3.1+incompatible (published about 1 year ago)
- Last Synced: 2025-11-01T13:00:42.237Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
proxy.golang.org: github.com/ewatercycle/ewatercycle
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ewatercycle/ewatercycle#section-documentation
- Licenses: apache-2.0
- Latest release: v2.3.1+incompatible (published about 1 year ago)
- Last Synced: 2025-11-01T13:00:42.243Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
pypi.org: ewatercycle
A Python package for running and validating a hydrology model
- Homepage: https://www.ewatercycle.org/
- Documentation: https://ewatercycle.readthedocs.io/
- Licenses: Apache-2.0
- Latest release: 2.4.0 (published 11 months ago)
- Last Synced: 2025-11-01T13:00:41.993Z (2 days ago)
- Versions: 18
- Dependent Packages: 8
- Dependent Repositories: 0
- Downloads: 243 Last month
-
Rankings:
- Dependent packages count: 7.303%
- Downloads: 11.521%
- Stargazers count: 12.055%
- Forks count: 15.414%
- Average: 22.947%
- Dependent repos count: 68.439%
- Maintainers (5)
Dependencies
- ipython *
- jinja2 <3.1.0
- nbsphinx *
- ruamel.yaml *
- sphinx-copybutton *
- actions/checkout v2 composite
- citation-file-format/cffconvert-github-action 2.0.0 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- pre-commit/action v2.0.3 composite
- sonarsource/sonarcloud-github-action master composite
Score: 12.715296987929191