Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

logo

HydroModPy is a Python toolbox for deploying catchment-scale shallow groundwater models. One TOML config drives MODFLOW 6, MODFLOW-NWT, Boussinesq and GR4J on the same hydrology, with reproducible inputs and ML-friendly outputs.

PyPI Python License: EPL-2.0 CI Documentation Codecov Paper DOI

What you get

  • One config, four solvers. A single HydroModPyConfig (Pydantic v2) drives MODFLOW 6, MODFLOW-NWT, Boussinesq and GR4J on the same catchment.
  • Disk is the truth. Every run is one plain directory under runs/, named after the run. The DuckDB file in .hmp/ is only an index over those directories: delete it and hmp catalog reindex rebuilds it.
  • Standard formats, no container. Field arrays in Zarr, tables in Parquet, the frozen config in TOML, the seal and the provenance in JSON. pandas, xarray and zarr read a run without HydroModPy installed.
  • Reproducibility. A frozen hydromodpy.lock pins the input data, and each run stores its own provenance.json: Python version, package versions, git commit, host, solver binary and its SHA-256.

Install

pip install --pre hydromodpy

The current main documentation targets the v2 alpha line. Use pip install hydromodpy only when you want the latest stable release.

2.0.0a1 misses whitebox-workflows in its dependencies, and build_geographic fails without it. On that release, add it by hand:

pip install whitebox-workflows==1.3.5

Optional extras: [ide], [test], [viewer3d], [docs]. Solver binaries (MODFLOW 6, MODFLOW-NWT, MODPATH, MT3D-USGS) are downloaded on demand into ~/.cache/hydromodpy/bin/ on first solver run, or eagerly with hmp install-binaries.

For developer install, conda recipes, Windows + WSL setup and the PETSc backend, see the installation guide.

Quickstart

Scaffold a workspace, create a project, run it. hmp project new writes both a project.toml with the shared settings and a ready-to-run run_demo.toml on a small synthetic catchment.

hmp workspace init .
hmp project new getting_started --workspace .
hmp run projects/getting_started/run_demo.toml

The run lands in its own directory inside the project:

projects/getting_started/
├── project.toml                  shared settings, and the marker of the project root
├── run_demo.toml                 the run you launched
├── hydromodpy.lock               frozen input data
├── runs/
│   └── demo/                     one directory per run, named after the run
│       ├── config.toml           frozen resolved configuration
│       ├── fields.zarr/          field arrays (head, mesh, forcings, ...)
│       ├── tables.parquet/       metrics, parameters, budgets, timeseries
│       ├── figures/              figures rendered for this run
│       ├── manifest.json         seal, written last
│       └── provenance.json       versions, git commit, solver binary
└── .hmp/                         internals: index.duckdb, logs, checkpoints

figures/ appears once a figure is rendered, and a tagged run also carries an annotations.json. On-demand exports and reports go to share/, calibration sessions to sessions/.

Browse it from the command line:

hmp catalog ls                    # every run of the project
hmp catalog show demo --detail    # metadata, metrics, parameters, store layout
hmp viz show demo piezometric_map # render one figure into runs/demo/figures/

Or read it from Python:

import hydromodpy as hmp

catalog = hmp.open("projects/getting_started")
run = catalog.latest()

head = hmp.read(run, "head")  # lazy xarray.DataArray
water_table = hmp.read(run, "watertable_elevation", time=-1)  # numpy array

The tables are plain Parquet, so pandas.read_parquet on runs/demo/tables.parquet/metrics.parquet works too. See Reading the results and the Python API for the full reading and export path.

Documentation

Full documentation lives at docs.hydromodpy.fr.

Section What it covers
Understand What the model computes and how to read its maps, in plain words.
Get started Install, then example 04 file by file.
Reference Every TOML parameter, every hmp command and the Python API, generated from the code.
Theory The equations, their assumptions and limits, and the validation against references.
Contribute Contributor handbook, layer matrix, storage layout, package maps.

Contributing

Bug reports, feature requests and pull requests are welcome. See CONTRIBUTING.md for the short version and the contributor guide for the full reference. Released versions are listed in CHANGELOG.md.

Security issues: please follow SECURITY.md and use a private advisory rather than a public issue.

How to cite

If HydroModPy supports your work, please cite the technical note below. If you also cite the software, give the version you ran and its Zenodo DOI. The concept DOI 10.5281/zenodo.22141925 names every version and resolves to the latest archive; each archived version has its own DOI on that page. Full BibTeX, RIS and plain-text entries are on the citation page; GitHub renders the "Cite this repository" button from CITATION.cff.

Gauvain, A., Abhervé, R., Boivin, B., Coche, A., Le Mesnil, M., Babey, T., Maugan, E., Touzeau, T., Issolah, I., Roques, C., Bouchez, C., Marçais, J., Leray, S., Marti, E., Bresciani, E., Figueroa, R., Pélissier, M., Carlier, S., Guillaumot, L., Bagagnan, R. S., Vautier, C., Longuevergne, L., Sallou, J., Bourcier, J., Combemale, B., Brunner, P., Aquilina, L., & de Dreuzy, J.-R. (2026). Technical note: HydroModPy (v1.0) – a Python toolbox for deploying catchment-scale shallow groundwater models. Hydrology and Earth System Sciences, 30(17), 5571–5592. https://doi.org/10.5194/hess-30-5571-2026

Authors and contact

HydroModPy is developed by Geosciences Rennes (Université de Rennes, CNRS) together with collaborators at CHYN Neuchâtel, INRAE, Pontificia Universidad Católica de Chile, Universidad de O'Higgins, BRGM, WUR, Université de Pau et des Pays de l'Adour, Inria/IRISA and CNRS-LMD. The complete author list is maintained in CITATION.cff; the affiliations are on the citation page.

For questions or collaboration: alexandre.gauvain.ag@gmail.com or ronan.abherve@inrae.fr.

License

HydroModPy is released under the Eclipse Public License 2.0. See LICENSE.

Metadata

Release files for hydromodpy 2.0.0a5

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

Source distribution (sdist)

Source distribution for hydromodpy 2.0.0a5
File Size Uploaded
hydromodpy-2.0.0a5.tar.gz 4.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hydromodpy 2.0.0a5
File Interpreter ABI Platform
hydromodpy-2.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 MB

Release files / hydromodpy-2.0.0a5.tar.gz

Download URL hydromodpy-2.0.0a5.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
af90d12bffc8639b4703191df4b63af9ab17412428e5c13dd929aff090ca780a
BLAKE2b-256 checksum
How to use checksums
595d27cb95826e653a119f3357d1fe35b94d655051cb4e3d74da2444cab4cf66
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 12, 2026.

Transparency log

Release files / hydromodpy-2.0.0a5-py3-none-any.whl

Download URL hydromodpy-2.0.0a5-py3-none-any.whl
Size 5.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f22c5266693cab41cb04b804ce5b120594b777b4461fda5e608e00ad98e17e0d
BLAKE2b-256 checksum
How to use checksums
ec84ab769bf3ff5d116712af11dc4b4deaabd2b6d1d8025efdc86d6dcbfb7c97
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 12, 2026.

Transparency log
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