Code Reading Guide#
Scope#
This page complements the UML diagrams with a developer-facing map of the actual code entry points.
Use it when you want:
the first file to open for one workflow family,
the package README that already explains a subsystem in prose,
a non-scientific reading path through CLI, project, simulation, process, and solver code.
Code-oriented docs already present in the repository#
Several prose documents already exist in the repository, but they were not previously surfaced from the published architecture pages:
hydromodpy/cli/README.mdfor the CLI dispatcher and the registered subcommands,hydromodpy/simulation/README.mdfor planner / runner / adapter roles,hydromodpy/calibration/README.mdfor the calibration package map,hydromodpy/solver/boussinesq/README.mdfor the in-house solver package,docs/developers/*.mdfor focused engineering notes and design documents.
Recommended reading paths#
CLI-driven simulation#
When the question is “how does one TOML turn into solver runs?”:
hydromodpy/cli/commands/run.pyandcli/workflows.pyhydromodpy/project/facade.py(Projectfacade)hydromodpy/simulation/planning/planner.pyhydromodpy/simulation/execution/runner.pyhydromodpy/solver/base/registry.pyone adapter under
hydromodpy/solver/<backend>/adapters/the concrete solver package under
hydromodpy/solver/
Catchment meshing#
When the question is “how is a runtime mesh generated and injected?”:
hydromodpy/spatial/mesh/runtime.pyhydromodpy/spatial/mesh/hydro_mesh.pyhydromodpy/spatial/mesh/batch.pyfor multi-outlet runshydromodpy/spatial/mesh/gmsh_grid/the pages under Mesh Architecture
Calibration#
When the question is “how does HydroModPy calibrate a simulation workflow?”:
hydromodpy/cli/commands/run.py([workflow].mode = “calibration” dispatch)hydromodpy/calibration/cli_runner.py(calibration entry point)hydromodpy/calibration/engine.pyand theCalibrationEngineprotocolhydromodpy/simulation/execution/trial.py(prepare-once, evaluate-many primitive)one case under
hydromodpy/calibration/cases/if available
Flow solvers#
When the question is “where does backend-specific logic start?”:
hydromodpy/solver/modflow_common/flow_adapter_helpers.pyfor the shared lifecycle,hydromodpy/solver/modflow6/adapters/flow.pyormodflownwt.pyfor backend selection,hydromodpy/solver/modflow_common/for shared MODFLOW support code,hydromodpy/solver/modflow6/orhydromodpy/solver/modflow_nwt/for the concrete backend implementation,hydromodpy/solver/boussinesq/for the in-house backend.
What would still improve the published docs#
The architecture section is now much better at guiding code reading, but a few useful additions still stand out:
one equivalent package-map page for
hydromodpy.spatial.fieldand one forhydromodpy.spatial.domain,one explicit data-loading page organized by manager family rather than only by activation and transfer flow,
one tighter bridge from architecture pages to the generated API section so developers can jump from conceptual maps to symbol-level docs more directly.