Skip to main content

HydroBayesCal

Surrogate-assisted Bayesian calibration for computationally expensive hydro- and morphodynamic models.

Documentation License: BSD-3-Clause

HydroBayesCal calibrates expensive numerical models without running them thousands of times. It trains a Gaussian Process Emulator (GPE) as a fast surrogate from a small set of strategically sampled simulations, then refines it with Bayesian Active Learning (BAL), iteratively adding the training points that maximise the information gain (relative entropy) and Bayesian model evidence for the calibration. Single- and multi-output GPEs are supported.

The package couples to open-source modelling software through a common binding layer:

  • TELEMAC (2D/3D) is fully supported, including multi-discharge calibration (one shared parameter set against several steady flows at once; see the docs "Multi-discharge calibration with TELEMAC")
  • OpenFOAM (interFoam) bindings are under active development

Experimental design and parameter sampling are delegated to BayesValidRox; the GP emulators and the Bayesian active-learning logic are implemented in-tree.

Installation

HydroBayesCal requires Python ≥ 3.10 (tested on 3.10-3.12). It is developed and tested on Linux.

pip install hydroBayesCal

or, for a development/editable install from a clone:

git clone https://github.com/Ecohydraulics/hydrobayescal.git
cd hydrobayescal
pip install -e ".[dev,docs,mesh]"

A calibration additionally requires a working installation of the numerical solver (e.g. TELEMAC) on the system. See the installation guide for the full environment setup, including coupling HydroBayesCal with TELEMAC.

Quick start

Configure a calibration in a Python config file and run the TELEMAC driver:

python -m hydroBayesCal.drivers.bal_telemac --config config_Telemac.py

Simulation results can also be sampled at arbitrary points outside the calibration workflow, including depth-explicit extraction from TELEMAC-3D and OpenFOAM output:

import hydroBayesCal as hbc

df = hbc.extract_results("r3d_steady.slf", variable="velocity",
                         x=[371522.5, 371540.0], y=[5345152.0, 5345170.0],
                         z=0.05)  # height above the local bed

See the documentation for the end-to-end workflow, the configuration parameters, the code architecture, and worked examples.

Development & releases

Contributions are welcome, see CONTRIBUTING.md for the development setup, coding conventions, and the documentation build.

For maintainers, a few essentials:

  • Editable install: pip install -e ".[dev,docs,mesh]" (Python >= 3.10, tested 3.10-3.12).
  • Versioning: Semantic Versioning / PEP 440; the version lives only in pyproject.toml (keep docs/conf.py in sync). PyPI versions are immutable, so always bump for a new release.
  • Releases are automated: publishing a GitHub Release (tag vX.Y.Z) triggers .github/workflows/publish.yml, which builds the distributions and uploads them to PyPI via Trusted Publishing (OIDC, no stored token). No manual twine upload is needed. Build locally to sanity-check with python -m build && twine check dist/*.

Citing / scientific background

HydroBayesCal builds on the Bayesian active-learning framework of Oladyshkin et al. (2020) and on Gaussian-process regression (Rasmussen & Williams, 2006). Its application to reservoir sedimentation and 3D reservoir hydrodynamics is documented in Mouris et al. (2023) and Schwindt et al. (2023). Full references with DOIs are on the references page.

License

Distributed under the BSD 3-Clause License. See LICENSE.

Metadata

Release files for hydroBayesCal 1.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydroBayesCal 1.11.1
File Size Uploaded
hydrobayescal-1.11.1.tar.gz 416.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hydroBayesCal 1.11.1
File Interpreter ABI Platform
hydrobayescal-1.11.1-py3-none-any.whl Python 3 none any Details

Total release size: 797.9 kB

Release files / hydrobayescal-1.11.1.tar.gz

Download URL hydrobayescal-1.11.1.tar.gz
Size 416.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d5373b4ec915a941a6d2bc3a248b46b5ceb5fed69ae938dafbce7e73741ef7d6
BLAKE2b-256 checksum
How to use checksums
da38646b9c5b450f35b8552a3e083b4dfc92fb775c2aeb6915ea42767b6b6d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / hydrobayescal-1.11.1-py3-none-any.whl

Download URL hydrobayescal-1.11.1-py3-none-any.whl
Size 381.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b64428bbd8bbcd78ada78382503a06bfac851463412ad4b4bb256171ed5ec40
BLAKE2b-256 checksum
How to use checksums
2fff79f8f4e0af19d8bbed4e96a6d97a202272043d7e4fe5b461e3fd44af7b01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.11.1 This release

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page