Skip to main content

Distributed hydrology-guided neural network for streamflow prediction

Project description

DOI License PyPI version GitHub release Last Commit Python

Bakaano-Hydro

Description

Bakaano-Hydro is a distributed hydrology-guided neural network model for streamflow prediction. Bakaano-Hydro employs a serial hybridization approach and integrates a gridded process-based rainfall-runoff method that captures spatial heterogeneity and dynamic interactions of meteorological forcings and physiographic attributes generating spatially distributed runoff estimates; a flow routing method propagating runoff through the river network based on topographic constraints to preserve hydrological connectivity.; and a sequential neural network that uses routed flow sequences extracted at hydrological stations to predict streamflow. This approach ensures that primary hydrological responses to climate, soil, topography, and vegetation interactions and changes are captured by process-based components, enhancing interpretability while leveraging deep learning for pattern recognition.

image

Bakaano-Hydro leverages extensive data inputs—ranging from digital elevation models (DEMs) to meteorological time-series—and processes them through a robust sequence of automated steps. This includes the download, preprocessing, and alignment of source data, as well as regridding inputs to the desired spatial resolution, ensuring consistency and accuracy across all datasets. It is highly adaptable, providing users with two primary options for data input: they can either let the model automatically download and preprocess all relevant input data or supply their own datasets. If users choose the latter, Bakaano-Hydro accommodates them by accepting data in the widely-used WGS84 geographic coordinate system (EPSG:4326), without the need for time-consuming clipping or regridding. The model seamlessly adjusts input data to match the DEM's spatial resolution, ensuring that all variables are consistently aligned for optimal performance.

Installation

Bakaano-Hydro is built on TensorFlow and is designed to leverage GPU acceleration for training. This requires a system with an NVIDIA GPU installed or bundled CUDA and cuDNN runtime libraries. GPU acceleration is strongly recommended for training deep learning components and running large-scale simulations, as it significantly improves speed and scalability.

If you have a compatible NVIDIA GPU and drivers installed, install with:

pip install bakaano-hydro[gpu]

This will automatically install the correct version of TensorFlow along with CUDA and cuDNN runtime libraries

If you do not have access to a GPU, you can still install and use Bakaano-Hydro in CPU mode (e.g., for inference, testing or small-scale evaluation):

pip install bakaano-hydro

Note: Training on CPU is supported but will be significantly slower, especially on large datasets or deep learning tasks.

Usage

Bakaano-Hydro requires three primary data or inputs

  1. Shapefile of study area or river basin
  2. Observed streamflow data in NetCDF format from Global Runoff Data Center (https://portal.grdc.bafg.de/applications/public.html?publicuser=PublicUser#dataDownload/Home). Because Bakaano-Hydro aims to use only open-source data, it currently accepts observed streamflow data only from GRDC.
  3. Registration at Google Earth Engine (https://code.earthengine.google.com/register). Bakaano-Hydro retrieves, NDVI, tree cover and meteorological variables from ERA5-land or CHIRPS from Google Earth Engine Data Catalog. This platform requires prior registration for subsequent authentication during execution of the model

Model execution then involves only five steps. See the quick start notebook https://github.com/confidence-duku/bakaano-hydro/blob/main/quick_start.ipynb for guidance.

Code architecture

bakaanohydro-2025-04-16-132235

Support

For assistance, please contact Confidence Duku (confidence.duku@wur.nl)

Contributing

No contributions are currently accepted.

Authors and acknowledgment

See CITATION.cff file.

License

Apache License

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

bakaano_hydro-1.1.8.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

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

bakaano_hydro-1.1.8-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

Details for the file bakaano_hydro-1.1.8.tar.gz.

File metadata

  • Download URL: bakaano_hydro-1.1.8.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for bakaano_hydro-1.1.8.tar.gz
Algorithm Hash digest
SHA256 aba5cf673a9ea96476a9c8dca9ca62268732bcf66366fe64ec14f69bd3d11e67
MD5 cf1eacc4fc735fec70aed2ee134462e7
BLAKE2b-256 b85cfdbea7e6b3bb6f7d5e6d7a43f93c71ab52f0a54e7775d0ff1d05a15d1e4a

See more details on using hashes here.

File details

Details for the file bakaano_hydro-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: bakaano_hydro-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for bakaano_hydro-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f43e2c2d6f531b1f021ab1ae794706289ca54c1645e02f20e98916296b96bc35
MD5 4073714554743a69579d56118200a227
BLAKE2b-256 a93e249a6890f2b9e828cc5afe1fb564d01c13043f47d04ef9a59f4589c30e3f

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