Figure Catalog#
Figures live in hydromodpy.display and consume the persisted
hydromodpy.results.run.Run interface. They are solver-agnostic: the
same figure name can render MODFLOW-NWT, MODFLOW 6, or Boussinesq outputs when
the required result fields exist.
Basic usage#
import hydromodpy as hmp
hmp.figure(run, "piezometric_map", save="figures/")
hmp.figure(run, "cross_section", orientation="sn")
The lower-level registry stays available when you need the figure object itself:
from hydromodpy.display import get, list_figures
list_figures()
get("piezometric_map").plot(run, save_path="head.png")
From the CLI:
hmp viz list
hmp viz show <sim_id> <figure>
hmp viz gallery project.toml
hmp run project.toml --no-display
Registered figure names#
The catalog below is auto-generated from the
hydromodpy.display.list_figures() registry. Each entry shows the figure
name, the title rendered in plots, and the result fields or tables the
figure reads at render time. Run python -m tools.doc_figures to refresh
the partial without rebuilding the rest of the documentation; the Sphinx
build also regenerates it on every run.
Spatial maps#
Mesh- or raster-backed scalar maps of one persisted field.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Accumulated drainage flux |
fields |
|
Boundary packages |
(no fixed input) |
|
Concentration |
fields |
|
Closed depressions of the routing surface |
(no fixed input) |
|
Downslope distance |
fields |
|
Flow direction |
(no fixed input) |
|
Solver mesh |
fields |
|
Water-table elevation |
fields |
|
Recharge |
fields |
|
Seepage areas |
fields |
|
SFR reach network |
tables |
|
Simulated active network |
fields |
|
Water-table depth |
fields |
Cross-sections#
Vertical or transverse cuts through a persisted field.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Cross-section |
fields |
Time series#
Chronicles read from the catalog timeseries table.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Bisection bracket trace |
tables |
|
Calibration convergence |
tables |
|
Calibration parameter trace |
tables |
|
Downslope distance crossing |
tables |
|
Flow-duration curve |
tables |
|
Discharge hydrograph |
tables |
|
Parameter cost profile |
tables |
|
Recession analysis |
tables |
|
Seasonal box-plot |
tables |
|
SFR longitudinal profile |
tables |
|
SFR reach time series |
tables |
Budgets and balances#
Integrated budget or mass-balance summaries.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Water-balance components |
tables |
|
Water budget |
tables |
Particle tracking#
Pathline or particle-track outputs.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Particle pathlines |
fields |
Comparisons and overlays#
Multi-panel views combining one or several runs, observed data, or calibration traces.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Calibration objective landscape |
tables |
|
Calibration objective surface |
tables |
|
Calibration parameter pairs |
tables |
|
Calibration parameter posteriors |
tables |
|
Conditioning impact on the DEM |
(no fixed input) |
|
Difference map |
(no fixed input) |
|
Ensemble envelope |
tables |
|
Hydrograph on a log axis with NSElog |
tables |
|
Discharge hydrograph (sim vs obs) |
tables |
|
Hydrographic network comparison |
(no fixed input) |
|
Generated hydrographic network |
(no fixed input) |
|
Generated extra-only view |
(no fixed input) |
|
BD Topage hydrographic network |
(no fixed input) |
|
Reference missing-only view |
(no fixed input) |
|
Lake abacus comparison |
(no fixed input) |
|
Lake stage (sim vs obs) |
tables |
|
Lake storage (sim vs obs) |
tables |
|
Matching the hydrographic network: two-stage card |
tables |
|
Piezometric head (sim vs obs) |
tables |
|
Residuals (sim - obs) |
tables |
|
Optimal agreement and validity bound |
(no fixed input) |
|
Sim vs obs scatter (1:1) |
tables |
|
Seepage network confusion |
fields |
|
Simulated network over reference |
fields |
|
Side-by-side map |
(no fixed input) |
|
Simulated active network vs reference |
fields |
|
Watershed identity card |
(no fixed input) |
Hydrochemistry diagrams#
Tabular hydrochemistry diagrams built from water-quality samples.
Figure name |
Title |
Required inputs |
|---|---|---|
|
Piper diagram |
(no fixed input) |
|
Schoeller diagram |
(no fixed input) |
|
Stiff diagram |
(no fixed input) |
Choosing figures in TOML#
A run renders exactly the figures listed under [display].figures. Every
name is validated against the registry when the configuration loads, so a
typo fails hmp config check instead of silently producing one figure
less.
[display]
figures = ["piezometric_map", "water_budget", "simulated_active_network"]
# "warn" (default) logs a figure that fails to render and continues;
# "raise" propagates, which is what example and CI configs want.
on_error = "warn"
Per-figure options go under [display.overrides], keyed by figure name.
They are the same keywords hydromodpy.figure() accepts:
[display.overrides.cross_section]
orientation = "sn"
through = [152687.5, 6857800.0]
[display.overrides.flux_timeseries]
units = "mm/period"
Use hmp viz gallery project.toml to rerender all figures after a run,
hmp viz show <sim_id> <figure> to rerender one figure, and
--no-display during hmp run when the workflow should persist results
without rendering report figures.
Overlays#
Spatial figures accept an overlays list, so a composite map is a
configuration choice rather than a bespoke script:
[display.overrides.watertable_depth_map]
overlays = ["watershed", "seepage", "particles", "wells", "outlet"]
Available overlays: watershed (catchment outline), seepage
(outcropping cells), particles (pathlines), network (reference
hydrographic network), wells (pumping and injection cells read from the
well budget) and outlet. An overlay whose data the run does not carry is
logged and skipped, so the same declaration works across projects.
Applicability rule#
Figure names are stable entry points, but every figure depends on what the
run persisted. Each figure declares its requirements in its FigureSpec
(required_fields, required_tables, required_solvers); the
display layer checks them before rendering and skips the figure with an
explicit reason when the run does not satisfy them. A configuration can
therefore list every figure it may want: a run without particle tracking
simply does not produce particle_tracks.
List the names and their requirements with:
hmp viz list
To inspect what a given run actually holds:
hmp catalog show <sim_id> --detail
For low-level display objects, see API Reference.