HydroModPy is a Python toolbox for deploying catchment-scale shallow groundwater models. One TOML config drives MODFLOW 6, MODFLOW-NWT and Boussinesq on the same hydrology, with reproducible inputs and ML-friendly outputs.
What you get
- One config, three solvers. A single
HydroModPyConfig(Pydantic v2) drives MODFLOW 6, MODFLOW-NWT and Boussinesq 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 andhmp catalog reindexrebuilds 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,xarrayandzarrread a run without HydroModPy installed. - Reproducibility. A frozen
hydromodpy.lockpins the input data, and each run stores its ownprovenance.json: Python version, package versions, git commit, host, solver binary and its SHA-256.
Install
pip install hydromodpy
Optional extras: [calibration] (CMA-ES), [mesh] (gmsh), [mf6api]
(the MODFLOW 6 API), [viz], [metrics], [sftp], and [all] for every
one of them. 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 go to runs/<run>/exports/, the tables and
figures of a campaign to summary/, calibration sessions to sessions/.
Browse it from the command line:
hmp ls # every run of the project
hmp show demo --detail # metadata, metrics, parameters, store layout
hmp show demo --figure watertable_elevation # draw one figure into runs/demo/figures/
Or read it from Python:
import hydromodpy as hmp
proj = hmp.open("projects/getting_started")
run = proj.store.latest()
head = run.read("head") # lazy xarray.DataArray
water_table = run.read("watertable_elevation", time=-1) # one period, a DataArray too
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 |
|---|---|
| User guide | Install, then example 04 file by file. One page per task. How to read the maps and how far to trust them. |
| 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, one page per package with its modules. |
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hydromodpy-2.0.0.tar.gz | 4.5 MB | With provenance | Details for hydromodpy-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hydromodpy-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for hydromodpy-2.0.0-py3-none-any.whl |
Total release size: 9.7 MB
Release files / hydromodpy-2.0.0.tar.gz
| Download URL | hydromodpy-2.0.0.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9dffab625f2209adae86df876d12a04ca5b1c05e5d2d0f273f721b43cb20f30
|
|
BLAKE2b-256 checksum How to use checksums |
77289b7ef369006ef5c8f59cfd0f49bbc9edbf720accaade545ca1ed7ee845d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logRelease files / hydromodpy-2.0.0-py3-none-any.whl
| Download URL | hydromodpy-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9eb2ffab416c62a57cc62528d67a36dfa40d2ff67fe3955720bcea4b6a34b2dd
|
|
BLAKE2b-256 checksum How to use checksums |
c471f0770dee42d876d827f0c40c21330f5f5b29d8c2c3d4f8980d22dc0de079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logSecurity for hydromodpy 2.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hydromodpy-2.0.0.tar.gz
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 Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.