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. It uniquely integrates physically based hydrological principles with the generalization capacity of machine learning in a spatially explicit and physically meaningful way. This makes it particularly valuable in data-scarce regions, where traditional hydrological models often struggle due to sparse observations and calibration limitations, and where current state-of-the-art data-driven models are constrained by lumped modeling approaches that overlook spatial heterogeneity and the inability to capture hydrological connectivity.

By learning spatially distributed, physically meaningful runoff and routing dynamics, Bakaano-Hydro is able to generalize across diverse catchments and hydro-climatic regimes. This hybrid design enables the model to simulate streamflow more accurately and reliably—even in ungauged or poorly monitored basins—while retaining interpretability grounded in hydrological processes.

image

Key Features

  • Distributed architecture: Captures spatial heterogeneity of hydrological processes using gridded runoff and flow routing.
  • Hybrid modeling: Combines physically based hydrology with deep learning for enhanced accuracy and realism.
  • Scalable and generalizable: Trains a single model across basins, regions, or continents—no need for basin-specific calibration.
  • Reliable in data-scarce regions: Designed to perform well even with sparse observational data.
  • High-performance ready: Compatible with GPU acceleration for fast training and inference on large-scale datasets.
  • Seamless integration: Modular components allow for easy adaptation with other runoff models, routing schemes, or neural network architectures.
  • Automated end-to-end pipeline: From climate data ingestion and preprocessing to runoff simulation, routing, and streamflow prediction—Bakaano-Hydro automates the entire workflow with minimal user intervention.
  • Easy deployment: Installable via pip and designed with reproducibility in mind.
  • Versatile applications: Suitable for streamflow forecasting, climate adaptation planning, flood risk assessment, and more.

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.

Getting started / Example notebooks

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 a few guided 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.

Bakaano-Hydro was developed as part of Wageningen University & Research Investment theme 'Data-driven discoveries in a changing climate' and also as part of the KB program 'Climate resilient land use'.

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.2.tar.gz (43.4 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.2-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bakaano_hydro-1.2.2.tar.gz
  • Upload date:
  • Size: 43.4 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.2.tar.gz
Algorithm Hash digest
SHA256 2bd22003c732ffa4c0b8b126b0d3fea02c70c9236731766b4050f54c02bf4742
MD5 23b096ad51bf33be231fb567333c0fea
BLAKE2b-256 88a02a2711fccd27e49a74a066483f7998af00ec8b158962e79faa8b0e251f88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bakaano_hydro-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 49.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9312616ae11f31a8115a8e80949facc93e1b3d7470f6a1a3cfe98ce2a913f81c
MD5 ffc31bd9245a59e2a2c7f429e0d54f1a
BLAKE2b-256 2b81940c59484e7c9195d2810e90eb7d3cb048c245d0bdfd56e63bcbbba3cb67

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