ewatercycle
Python package for running hydrological models
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 13 committers (7.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Keywords from Contributors
Repository
Python package for running hydrological models
Basic Info
- Host: GitHub
- Owner: eWaterCycle
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://ewatercycle.readthedocs.io/en/latest/
- Size: 10.1 MB
Statistics
- Stars: 37
- Watchers: 5
- Forks: 5
- Open Issues: 57
- Releases: 19
Metadata Files
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:
shell
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
shell
pip install ewatercycle
The ewatercycle package ships without any models. Models are packaged in plugins. To install all endorsed plugins use
shell
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.
In condensed code: ```python 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)
In real code: ```python 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
Owner
- Name: eWaterCycle
- Login: eWaterCycle
- Kind: organization
- Website: http://www.ewatercycle.org
- Repositories: 74
- Profile: https://github.com/eWaterCycle
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"
...
GitHub Events
Total
- Create event: 7
- Release event: 1
- Issues event: 13
- Watch event: 3
- Delete event: 7
- Issue comment event: 50
- Push event: 44
- Pull request review event: 14
- Pull request review comment event: 8
- Pull request event: 15
Last Year
- Create event: 7
- Release event: 1
- Issues event: 13
- Watch event: 3
- Delete event: 7
- Issue comment event: 50
- Push event: 44
- Pull request review event: 14
- Pull request review comment event: 8
- Pull request event: 15
Committers
Last synced: 5 months ago
Top Committers
| 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 (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 261
- Total pull requests: 216
- Average time to close issues: 8 months
- Average time to close pull requests: 29 days
- Total issue authors: 15
- Total pull request authors: 13
- Average comments per issue: 2.0
- Average comments per pull request: 2.8
- Merged pull requests: 186
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 10
- Pull requests: 18
- Average time to close issues: 28 days
- Average time to close pull requests: 8 days
- Issue authors: 5
- Pull request authors: 4
- Average comments per issue: 1.3
- Average comments per pull request: 2.94
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- sverhoeven (103)
- Peter9192 (60)
- SarahAlidoost (35)
- BSchilperoort (26)
- RolfHut (11)
- jeromaerts (6)
- Daafip (5)
- stefsmeets (3)
- pauwiersma (3)
- forestbat (2)
- vhoogelander (1)
- samharrison7 (1)
- Maartenvm (1)
- bvreede (1)
- MarkMelotto (1)
Pull Request Authors
- sverhoeven (116)
- Peter9192 (41)
- BSchilperoort (36)
- SarahAlidoost (25)
- stefsmeets (10)
- RolfHut (8)
- Daafip (6)
- MarkMelotto (4)
- nielsdrost (4)
- bpmweel (1)
- jeromaerts (1)
- bvreede (1)
- fdiblen (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 94 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
- Documentation: https://pkg.go.dev/github.com/eWaterCycle/ewatercycle#section-documentation
- License: apache-2.0
-
Latest release: v2.3.1+incompatible
published over 1 year ago
Rankings
proxy.golang.org: github.com/ewatercycle/ewatercycle
- Documentation: https://pkg.go.dev/github.com/ewatercycle/ewatercycle#section-documentation
- License: apache-2.0
-
Latest release: v2.3.1+incompatible
published over 1 year ago
Rankings
pypi.org: ewatercycle
A Python package for running and validating a hydrology model
- Homepage: https://www.ewatercycle.org/
- Documentation: https://ewatercycle.readthedocs.io/
- License: Apache-2.0
-
Latest release: 2.4.0
published about 1 year ago
Rankings
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