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.2.0.tar.gz (41.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.2.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bakaano_hydro-1.2.0.tar.gz
  • Upload date:
  • Size: 41.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.2.0.tar.gz
Algorithm Hash digest
SHA256 5632f1eecc2a11f017c1270466e06718aee6e68aa5ee8714d3f68266ef847850
MD5 ac2efb33b366b84c9d9ffbc4fce18196
BLAKE2b-256 01ca852463ba485ae9f6ca54be60565d50fe7ce17c2343d83b7020897e13df36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bakaano_hydro-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 47.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 999f57686428dc37841f7aa8b63a122bec5fa323ffffe5247f9f343fef6f4eb0
MD5 882af4ba0b6471f1144b7273ddd8f0f7
BLAKE2b-256 f4aaa6e181e5eb6b7fe0cf46e1bf0576c5ef4172dcd00e3249a41168b8cb221f

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