hydromodpy.spatial.mesh.cartesian_grid.sgrid_generation#

Surface-driven structured-grid generation.

Overview#

This module builds a HydroModPy-native StructuredGridSpec from two absolute-elevation surfaces: - one topographic surface (top_surface), - one bottom surface (bottom_surface).

Design responsibilities#

  • Horizontal discretization (XY) is handled outside this builder, typically in Surface (resample_to_shape(…)).

  • This builder handles only: - geometric consistency checks for vertical construction, - vertical layering (constant, decay, list), - assembly of a StructuredGridSpec POPO.

Important convention#

top_surface and bottom_surface are absolute altitudes in the same datum. No additive combination is done between the two surfaces. HydroModPy assumes metric geometry throughout this workflow.

FloPy is intentionally not imported here. Translation to a flopy.discretization.StructuredGrid is performed at the solver boundary by hydromodpy.solver.modflow_common.sgrid_to_flopy.translate.

Classes

StructuredGridBuilder()

Build StructuredGridSpec objects from explicit top/bottom surfaces.

StructuredGridSpec(delc, delr, top, botm, ...)

HydroModPy-native structured-grid descriptor (no FloPy dependency).