[mesh_catchment] MeshCatchmentConfig#
TOML section: [mesh_catchment]
Pydantic model: MeshCatchmentConfig defined in hydromodpy.spatial.mesh.config.main.
Top-level launcher contract for one mono-catchment meshing run.
Fields#
constraints_mode
Literal[âgeology_onlyâ, ârivers_onlyâ, âgeology_riversâ] default = âgeology_riversâ user source
Meshing compliance target. âgeology_onlyâ conforms the mesh to geology interfaces only, ârivers_onlyâ conforms the mesh to river traces only, and âgeology_riversâ enforces both sets of constraints in one mesh.
output_mesh
Optional[str] default = None dev source
Optional .msh output path for the generated planar mesh. When omitted, the launcher writes the mesh to results_stable/mesh/mesh_catchment.msh inside the active catchment workspace in standard layout, or directly to workspace.project_root/mesh_catchment.msh when output_layout=âflatâ is used.
output_summary_json
Optional[str] default = None dev source
Optional JSON sidecar path for QA metrics, cleaned-input diagnostics, and summary metadata describing the generated mesh. When omitted, the launcher writes it next to the default mesh output.
output_figure
Optional[str] default = None dev source
Optional overview figure path. Use it when you want a quick visual QA artifact showing the support domain, geology zones, river constraints, and final mesh footprint.
output_figure_regional
Optional[str] default = None dev source
Optional regional overview figure path. When omitted but output_figure is set, the launcher writes a second figure next to the main one with suffix _regional to show where the catchment sits on the full DEM.
figures_enabled
bool default = True user source
If true, generate the overview figure artifacts when figure output paths are configured. Set it to false to skip figure creation entirely, even in batch mode where default filename patterns are present.
export_exchange_bundle
bool default = True user source
If true, export the solver-exchange mesh bundle next to the generated mesh. Set it to false for profiling or mesh-only runs that do not need bundle metadata. Downstream solvers that require runtime mesh support may fail without this bundle.
figure_dpi
int default = 300 user source
Pixel density used when rendering the main mesh overview figure. Increase it when you need to inspect mesh edges and constraints more closely in the saved PNG.
figure_regional_dpi
int default = 220 user source
Pixel density used when rendering the regional overview figure. Keep it lower than figure_dpi when you want detailed local mesh inspection without making the regional PNG too heavy.
output_layout
Literal[âstandardâ, âflatâ] default = âstandardâ user source
Dedicated-launcher output layout. Use âstandardâ to keep final mesh artifacts under results_stable/mesh/, or âflatâ to write final mesh artifacts directly under workspace.project_root while keeping intermediate runtime folders out of that final directory.
show_plot
bool default = False user source
If true, open the generated overview figure interactively at the end of the run. Keep it false for batch or headless execution.
geographic_outputs_mode
Literal[âkeepâ, âcleanupâ] default = âkeepâ dev source
Control what happens to intermediate geographic preprocessing artifacts after the mesh run. Use âkeepâ to preserve the canonical results_stable/geographic and results_stable/demcorrecflow folders, or âcleanupâ to delete them at the end of the dedicated mesh launcher once the mesh outputs and exchange bundle have been written.
rivers
in TOML:
[mesh_catchment.rivers]
MeshCatchmentRiversConfig factory user source
River-constraint section used when constraints_mode includes rivers. The default behavior is to reuse the in-memory river trace already built by the geographic pipeline.
geology
in TOML:
[mesh_catchment.geology.<id>]
dict[str, Any] | None default = None user source
Optional geology support used when constraints_mode includes geology. This section defines which polygon source represents lithological zones and how those polygons should be interpreted before conformal meshing. Validated through the geology data-source Protocol; stored as a normalized mapping.
watershed_boundary
in TOML:
[mesh_catchment.watershed_boundary]
MeshCatchmentWatershedBoundaryConfig factory user source
Optional watershed-boundary mesh constraint. Enable it to force a conformal mesh line along the catchment boundary while keeping the geology zonation represented on the whole support domain.
hydraulic_properties
in TOML:
[mesh_catchment.hydraulic_properties]
MeshCatchmentHydraulicPropertiesConfig | None default = None user source
Optional hydraulic-property tables keyed by geology zones. The launcher projects geology on the mesh and exports per-cell conductivity/storage values as weighted averages of geology fractions.
domain
in TOML:
[mesh_catchment.domain]
kind = âbboxâ | âpolygonâ | âvectorâ | âgeographic_box_bufferâ | âgeographic_watershedâ | âgeographic_watershed_boxâ factory user source
Effective support domain to mesh. The default geographic_box_buffer mode reuses the catchment bounding box plus geographic buffer prepared during delineation, which is usually the right support for mono-catchment meshing.
Pick a tab below: setting
kindselects the matching schema.
TOML: [mesh_catchment.domain.bbox] â model ZoneMeshingDomainBBox (set kind = "bbox").
bbox
list[float] required user source
TOML: [mesh_catchment.domain.polygon] â model ZoneMeshingDomainPolygon (set kind = "polygon").
coordinates
list[list[float]] required user source
TOML: [mesh_catchment.domain.vector] â model ZoneMeshingDomainVector (set kind = "vector").
path
str required user source
id_field
Optional[str] default = None user source
Optional vector attribute field name used to filter features.
selected_id
Optional[str] default = None user source
Optional value of id_field that selects a single feature in the vector source.
TOML: [mesh_catchment.domain.geographic_box_buffer] â model ZoneMeshingDomainGeographicBoxBuffer (set kind = "geographic_box_buffer").
TOML: [mesh_catchment.domain.geographic_watershed] â model ZoneMeshingDomainGeographicWatershed (set kind = "geographic_watershed").
TOML: [mesh_catchment.domain.geographic_watershed_box] â model ZoneMeshingDomainGeographicWatershedBox (set kind = "geographic_watershed_box").
zone_meshing
in TOML:
[mesh_catchment.zone_meshing]
ZoneMeshingSettings factory dev source
Low-level Gmsh sizing and cleanup parameters controlling cell size, simplification, and interface refinement. Defaults are valid, but project examples typically override them to target a desired number of cells.