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 templates/bal_telemac.py --config templates/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.

Download files

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

Source Distribution

hydrobayescal-1.3.0.tar.gz (218.0 kB view details)

Uploaded Source

Built Distribution

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

hydrobayescal-1.3.0-py3-none-any.whl (219.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hydrobayescal-1.3.0.tar.gz
  • Upload date:
  • Size: 218.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hydrobayescal-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7379ac06605993de3d4bc31c43c635c6a5d0d5ea5563efba7e88690b9de5694e
MD5 468ee31b84e01bdf8a69d25850ee0f48
BLAKE2b-256 2cf82e49dd52f5bddf83ee28a40116f00280a064f27e1a2dfe886dec90c8e1e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hydrobayescal-1.3.0.tar.gz:

Publisher: publish.yml on Ecohydraulics/hydrobayescal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: hydrobayescal-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 219.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hydrobayescal-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d113dff74a1e6977f98357ff74dc71fcba0c5d1de9f1afe20ebb3aaeabdedd5
MD5 e67afa260be6de44d0e2e79f3aef8642
BLAKE2b-256 a2d6a0603b527dafd84761813bacc4419e82bcb9e757ff8fd6bc342e57e7e765

See more details on using hashes here.

Provenance

The following attestation bundles were made for hydrobayescal-1.3.0-py3-none-any.whl:

Publisher: publish.yml on Ecohydraulics/hydrobayescal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

This release

1.3.0 This release

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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