hydromodpy.solver.modflow_common.binaries#
Solver binary resolution and lazy download.
Downstream solvers (MODFLOW 6, MODFLOW-NWT, MODPATH, MT3D-USGS) ask for
an executable by its canonical name ("mf6", "mfnwt", "mp6",
"mp7", "mt3dusgs"). This module locates the file in bin_path
and, when bin_path is the HydroModPy-managed cache, downloads it via
flopy.utils.get_modflow if missing.
Layout#
Solvers are looked up under <bin_path>/<exe> (flat layout produced
by flopy.utils.get_modflow). The managed cache lives at
~/.cache/hydromodpy/bin/ (or the platform equivalent) and a custom
directory may be passed via the HMP_BIN env var or the
--bindir flag of hmp install-binaries.
Versioning policy#
Once a binary lands in the managed cache we never auto-refresh it: the
same MODFLOW version stays in place for the lifetime of the cache, for
reproducibility (a run started today must yield the same results a year
from now unless the user opts in to an upgrade). A manifest written
alongside the binaries (.manifest.json) records the download date
and USGS release tag. To pull newer USGS binaries, the user runs:
hmp install-binaries --upgrade
which forces a re-download and rewrites the manifest.
Functions
|
Return the canonical names of solvers this module can fetch. |
|
Download solver binaries via |
|
Resolve the exe for |
|
Canonical executable filename for |
|
Return True when |
|
Return the exe path under |
|
Return the managed flat |
|
Return the cache manifest dict, or |