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 phenology geoscience bmi csdms
Last synced: about 21 hours 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 (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T11:47:02.000Z (2 months ago)
- Last Synced: 2025-04-20T09:44:33.776Z (27 days ago)
- Language: Python
- Homepage: https://ewatercycle.readthedocs.io/en/latest/
- Size: 10 MB
- Stars: 36
- Watchers: 6
- Forks: 5
- Open Issues: 55
- 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: "[email protected]" - 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: "[email protected]" 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: 7
- Release event: 1
- Issues event: 13
- Watch event: 3
- Delete event: 7
- Issue comment event: 45
- Push event: 39
- Pull request review event: 12
- Pull request review comment event: 7
- Pull request event: 14
Last Year
- Create event: 7
- Release event: 1
- Issues event: 13
- Watch event: 3
- Delete event: 7
- Issue comment event: 45
- Push event: 39
- Pull request review event: 12
- Pull request review comment event: 7
- Pull request event: 14
Committers metadata
Last synced: 9 days ago
Total Commits: 245
Total Committers: 13
Avg Commits per committer: 18.846
Development Distribution Score (DDS): 0.469
Commits in past year: 40
Committers in past year: 5
Avg Commits per committer in past year: 8.0
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 | 19 |
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 |
David Haasnoot | 5****p | 3 |
Mark Melotto | 7****o | 2 |
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: 2 days ago
Total issues: 271
Total pull requests: 224
Average time to close issues: 8 months
Average time to close pull requests: 28 days
Total issue authors: 16
Total pull request authors: 13
Average comments per issue: 2.01
Average comments per pull request: 2.79
Merged pull request: 192
Bot issues: 0
Bot pull requests: 0
Past year issues: 32
Past year pull requests: 41
Past year average time to close issues: 22 days
Past year average time to close pull requests: 5 days
Past year issue authors: 7
Past year pull request authors: 5
Past year average comments per issue: 2.09
Past year average comments per pull request: 2.73
Past year merged pull request: 37
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sverhoeven (106)
- Peter9192 (63)
- SarahAlidoost (35)
- BSchilperoort (29)
- RolfHut (10)
- Daafip (7)
- jeromaerts (6)
- stefsmeets (3)
- pauwiersma (3)
- forestbat (2)
- geek-yang (2)
- vhoogelander (1)
- samharrison7 (1)
- Maartenvm (1)
- bvreede (1)
Top Pull Request Authors
- sverhoeven (106)
- Peter9192 (40)
- BSchilperoort (25)
- SarahAlidoost (25)
- stefsmeets (10)
- RolfHut (4)
- Daafip (4)
- nielsdrost (4)
- MarkMelotto (2)
- bpmweel (1)
- jeromaerts (1)
- bvreede (1)
- fdiblen (1)
Top Issue Labels
- enhancement (28)
- forcing (23)
- bug (17)
- documentation (14)
- models (9)
- observations (4)
- good first issue (3)
- question (2)
- V2.2 (2)
- V2.1 (1)
- parameters (1)
- help wanted (1)
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 577 last-month
- Total dependent packages: 8
- Total dependent repositories: 0
- Total versions: 18
- Total maintainers: 5
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 5 months ago)
- Last Synced: 2025-05-15T22:08:59.088Z (2 days ago)
- Versions: 18
- Dependent Packages: 8
- Dependent Repositories: 0
- Downloads: 577 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: 13.455931400878152