Skip to main content

A Python library for common hydrological functions

Project description

ECMWF Software EnginE Maturity Level Licence Latest Release

InstallationDocumentation

[!IMPORTANT] This software is Graduated and subject to ECMWF's guidelines on Software Maturity.

earthkit-hydro is a Python library for common hydrological functions. It is the hydrological component of earthkit.

Main Features

Adapted from: doc_figure Array backends with xr
  • Catchment delineation
  • Catchment-based statistics
  • Directional flow-based accumulations
  • River network distance calculations
  • Upstream/downstream field propagation
  • Bifurcation handling
  • Custom weighting and decay support
  • Support for PCRaster, CaMa-Flood, HydroSHEDS, MERIT-Hydro and GRIT river network formats
  • Compatible with major array-backends: xarray, numpy, cupy, torch, jax, mlx and tensorflow
  • GPU support
  • Differentiable operations suitable for machine learning

Installation

For a default installation, run

pip install earthkit-hydro

Developer instructions:

For a developer setup (includes linting and test libraries), run

conda create -n hydro python=3.12
conda activate hydro
conda install -c conda-forge rust
git clone https://github.com/ecmwf/earthkit-hydro.git
cd earthkit-hydro
pip install -e .[dev]
pre-commit install

Note: this project is a mixed Rust-Python project with a pure Python fallback. To handle this, the behaviour of the install is based on an environmental variable USE_RUST, with the following behaviour

  • Not set or any other value (default behaviour): Attempts to build with Rust and if failure, skips and falls back to pure Python implementation.
  • USE_RUST=0: Builds pure Python implementation.
  • USE_RUST=1: Builds with Rust and fails if something goes wrong.

Licence

Copyright 2024, European Centre for Medium Range Weather Forecasts.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

In applying this licence, ECMWF does not waive the privileges and immunities
granted to it by virtue of its status as an intergovernmental organisation
nor does it submit to any jurisdiction.

Citing

If you use earthkit-hydro in your work, please consider citing

Morrison, O. M. and Carton de Wiart, C.: Introducing earthkit-hydro: an efficient graph-based library for scalable hydrological modelling and analysis, EGU General Assembly 2026, Vienna, Austria, 3–8 May 2026, EGU26-11233, https://doi.org/10.5194/egusphere-egu26-11233, 2026.

@inproceedings{Morrison2026,
  author    = {Morrison, Ois{\'\i}n M. and Carton de Wiart, Corentin},
  title     = {Introducing earthkit-hydro: an efficient graph-based library for scalable hydrological modelling and analysis},
  booktitle = {EGU General Assembly 2026},
  year      = {2026},
  series    = {EGU General Assembly Conference Abstracts},
  volume    = {EGU26-11233},
  address   = {Vienna, Austria},
  month     = may,
  doi       = {10.5194/egusphere-egu26-11233},
  url       = {https://doi.org/10.5194/egusphere-egu26-11233}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earthkit_hydro-1.3.0.tar.gz (4.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

earthkit_hydro-1.3.0-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

earthkit_hydro-1.3.0-cp314-cp314-win_amd64.whl (322.6 kB view details)

Uploaded CPython 3.14Windows x86-64

earthkit_hydro-1.3.0-cp314-cp314-win32.whl (306.8 kB view details)

Uploaded CPython 3.14Windows x86

earthkit_hydro-1.3.0-cp314-cp314-manylinux_2_28_x86_64.whl (488.2 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

earthkit_hydro-1.3.0-cp314-cp314-macosx_11_0_arm64.whl (428.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

earthkit_hydro-1.3.0-cp313-cp313-win_amd64.whl (314.6 kB view details)

Uploaded CPython 3.13Windows x86-64

earthkit_hydro-1.3.0-cp313-cp313-win32.whl (301.1 kB view details)

Uploaded CPython 3.13Windows x86

earthkit_hydro-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (488.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

earthkit_hydro-1.3.0-cp313-cp313-macosx_11_0_arm64.whl (428.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

earthkit_hydro-1.3.0-cp312-cp312-win_amd64.whl (315.1 kB view details)

Uploaded CPython 3.12Windows x86-64

earthkit_hydro-1.3.0-cp312-cp312-win32.whl (301.3 kB view details)

Uploaded CPython 3.12Windows x86

earthkit_hydro-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (489.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

earthkit_hydro-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (428.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

earthkit_hydro-1.3.0-cp311-cp311-win_amd64.whl (318.9 kB view details)

Uploaded CPython 3.11Windows x86-64

earthkit_hydro-1.3.0-cp311-cp311-win32.whl (305.5 kB view details)

Uploaded CPython 3.11Windows x86

earthkit_hydro-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (492.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

earthkit_hydro-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (436.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

earthkit_hydro-1.3.0-cp310-cp310-win_amd64.whl (319.2 kB view details)

Uploaded CPython 3.10Windows x86-64

earthkit_hydro-1.3.0-cp310-cp310-win32.whl (305.7 kB view details)

Uploaded CPython 3.10Windows x86

earthkit_hydro-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (493.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

earthkit_hydro-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (437.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file earthkit_hydro-1.3.0.tar.gz.

File metadata

  • Download URL: earthkit_hydro-1.3.0.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0.tar.gz
Algorithm Hash digest
SHA256 53b538456d4f27595e3a30732e3bd7a0169597b16359bf37ab1b1ed4630b8465
MD5 f87ef451712c94de02b4b44291574865
BLAKE2b-256 91feda98622cdf17518f182b0e1743b7c893b1006444fe143065cea6e5c0d791

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc1751eed626b4371d98090f9c0fc96ec7d02ab5f291191c5d5393ae4830322c
MD5 0bc0b9c0901b9f0327db5114fa231a63
BLAKE2b-256 e88387cd7faccd757c51da51e7a1285dc6344c8992aabfb7fd354fe9b7e9b278

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c3af5e19fe216810efb339e1b1e5481dff758e6f3d6073d56ebe88e706deca7a
MD5 8d1a45723a10a3dfd3a1d2c9c9258fd0
BLAKE2b-256 6177941f8c39fdf5baf9dad9baa4221fe9ecc7854e3e789bd94adbf7a83aea22

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp314-cp314-win32.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-cp314-cp314-win32.whl
  • Upload date:
  • Size: 306.8 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 ff73fa968deb8b197046d729247030b2c4325eb72b9dc9daf81d8fd4237486e6
MD5 01f2bd42d543b5f3d3b7719b303ee26c
BLAKE2b-256 a4b3afb78eb5e8c1b19fc815a680707b680c8393350ad2d321564c205090fac4

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 268042e3ab65288b806a3d5d1941eddfd5baa0a78756d22a4e440a503a050d72
MD5 61a39b7b91e443e04bf01484de4c4284
BLAKE2b-256 88f0428538cc4cd284795b0e04b86b6e9600c2315816ddbb3ad3126d043440fd

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7fb44666c26db28db880aba9023832018762a0bb77583bf970255fd2e5774bec
MD5 c9f966cd2ef3e657c19142ae765d9e8d
BLAKE2b-256 1b83dc20af6ae665bd38ae1d5f522e0d80ff90f03854df5b8d7821e33c9340c5

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 554b5d7e78b709d211fa786d1c84103e4df57bfb6fa1d8c0fbfda5deda9b5eb2
MD5 2e8a31bad974aa2447a5ad04d41d1172
BLAKE2b-256 8c20b59486d9c5fb06ab722fbdc6fc949db8c97a12c5a4b25f3ea0e12acf2790

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 301.1 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 807a4665ae7fbaee121a9b159ccbb5537b3e5dc85dad4b8fe0bd3b2b88ff2dda
MD5 760ce598061763431bf75e4c05aa6b4e
BLAKE2b-256 bc6c9b8d6108cbdc2b2080e6cfd3d2ecb027e62b436e28a3f386a4a5ea28a37f

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 819b7d3c81cd87098b00afeb683b2e95c33fac25ee9fb10636966fe23a538523
MD5 fb58035a7b01dc06f63f6e54c206262d
BLAKE2b-256 8089a16c3314ecb851223b563e9049514f23d8728f3e30c8824be2c367004149

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d7d7ff067804b148356ec0aa0a416427b4f2d5edb3a1b079fb48aad1c25b3316
MD5 c5dbdc87abf10e80965ef177288f679f
BLAKE2b-256 0eec4e512c0ea25f8809076cf13bfd794b09b8c6d05862939c992804fdb59ac2

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5532de936873f4d941342de703951c613d5d09ee8b9ff516834ca69733d7bc6d
MD5 3c1ef46f04ab8e56ce66265b123ada1a
BLAKE2b-256 669515a17d94f6fedde871d2b5ba17109f651763a9e512dfd67913a9dd730fcf

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 301.3 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 c4a428b8782c800d0c19c0f4ca955e873e6cc79d45cf02646818cab00018171b
MD5 df08ad9938139c84241a110e4c73e2fa
BLAKE2b-256 e4c3b800a7553176e17aea3e7890f04902d3c9e08dbdbac83611cc95c83e0b7d

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f64f4218f2a3819f46102312a78f36dd7f92ddbe90c3e9ec20a8dd93a002e93
MD5 61ccf62561823e9a1a6898208cc4e4a6
BLAKE2b-256 4bf81bc1d72c1d956f5e433f3fa92b58aa154bb56beffd4680318c5672383594

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff1a3295cf33c9da68ddf2f4ca0453ba2bd119c1aa1aedcc5982c1d349fff986
MD5 792f2217abebab121dcb6c7aadf4071b
BLAKE2b-256 45155ca388f96ceb9744e653f6458781831814989c03deedcb81073cedeecf2c

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 abeee5a3a7b7030fde6a9ec17f3207e7be2c77bcc1dcb3a087ec2d3985c3fdb1
MD5 f741a4b4cefc9a490fcbf446d4e8a783
BLAKE2b-256 d29be18785641cd724b670bc27b7d3a2c0d3bcec8128ae9007d6b9ee62c707ea

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 305.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 631be564234e15c38434898891e7d1ff33ec52ede9c4d7a05214e01af8fd7bb2
MD5 09eb0933917dd1bfa74281f555a46356
BLAKE2b-256 9766c2396a05581d7e3dd34711722a8cd738a010d34f7317f5711d81d0390eb6

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 87c629541fcea7733e6772088757816279134cf1d6c43b4463ccd6d8b8f05fb8
MD5 3b2842bda66597a5111ce469f36c0c0f
BLAKE2b-256 ad96f75513d6d7220102afd77a88bd59317df0a8f45784661a36f8b971bb07eb

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 394a1c59aa9aec0c6be9b6e2483d6c4eaeb5ac9d5b42693db02c0747f0cf1617
MD5 14fc565f8ed7976d1537828e20f65a20
BLAKE2b-256 c8faea6ba64381e57c9a3a1578a7eecccacad1713769e9a7e5419b0704c96541

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d77cfc26e7eb015bad7f39cec5b49c4bbca56bf219e271e802c56c3eacc034e5
MD5 81db56d7aefd814fa6c92c6f1888df59
BLAKE2b-256 9c48f03adf822a227952f14b91bff70460d1ed6d729245718f5dea49e9f26e16

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: earthkit_hydro-1.3.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 305.7 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for earthkit_hydro-1.3.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 db443d87d66f8af1617fd52afe6278e959e20d63e6180fef45c3de6da3b448c5
MD5 e6b91f3e7e770005ed5e01c4def0d96a
BLAKE2b-256 c448654a4864b35c13dd2fe9694cb91ede38d0496f1a92c3ff172a8708c38d8f

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9c24b703822f8033b437669fbea5fc8774978148ce1750e46d1d256c0416ccf
MD5 ac12f32edb91daafa314666c18532145
BLAKE2b-256 55a128401fa8f86d64efb026e9c3d842b1081dbd13c2e6903dad53b703a18998

See more details on using hashes here.

File details

Details for the file earthkit_hydro-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for earthkit_hydro-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4086e0cfb0b6e6eedac936f4225ab4e172e2164a3a1f2eb20817cd111a73422
MD5 76c4db02d1a743115cd852cfa5bfb95b
BLAKE2b-256 851ec92dde1e486560d61ebf4d198d0e087958ffd06316786db1f5744b405343

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page