ewatercycle

Python package for running hydrological models

https://github.com/ewatercycle/ewatercycle

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

ansible ewatercycle hydrology bmi phenology
Last synced: 4 months ago · JSON representation ·

Repository

Python package for running hydrological models

Basic Info
Statistics
  • Stars: 37
  • Watchers: 5
  • Forks: 5
  • Open Issues: 57
  • Releases: 19
Created over 7 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

ewatercycle

image

A Python package for running hydrological models.

Test CI Lint CI Build CI codecov Documentation Status PyPI image image Research Software Directory Badge SQAaaS badge shields.io Open in Dev Containers

The eWaterCycle package makes it easier to use hydrological models without having intimate knowledge about how to install and run the models.

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

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

All Time
  • Total Commits: 245
  • Total Committers: 13
  • Avg Commits per committer: 18.846
  • Development Distribution Score (DDS): 0.469
Past Year
  • Commits: 40
  • Committers: 5
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email 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
enhancement (19) bug (16) forcing (16) documentation (12) models (8) good first issue (3) question (2) V2.2 (2) observations (2) parameters (1) help wanted (1)
Pull Request Labels
bug (2) enhancement (2)

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
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
proxy.golang.org: github.com/ewatercycle/ewatercycle
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
pypi.org: ewatercycle

A Python package for running and validating a hydrology model

  • Versions: 18
  • Dependent Packages: 8
  • Dependent Repositories: 0
  • Downloads: 94 Last month
Rankings
Dependent packages count: 7.3%
Downloads: 11.5%
Stargazers count: 12.1%
Forks count: 15.4%
Average: 22.9%
Dependent repos count: 68.4%
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • ipython *
  • jinja2 <3.1.0
  • nbsphinx *
  • ruamel.yaml *
  • sphinx-copybutton *
.github/workflows/cffconvert.yml actions
  • actions/checkout v2 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
.github/workflows/sonar.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
  • pre-commit/action v2.0.3 composite
  • sonarsource/sonarcloud-github-action master composite
environment.yml pypi
pyproject.toml pypi
setup.py pypi