hydromodpy.spatial.mesh.cartesian_grid.sgrid_mesh_adapter#

Adapters from structured-grid objects to field-mesh objects.

Why this module exists#

The solver side (SolverMesh or FloPy StructuredGrid) and the field side (StructuredFieldMesh used by field/geology discretization) do not share the same object model. This module is the bridge between both worlds.

The adapter follows a simple contract: 1) recover consistent vertex coordinates from the solver grid, 2) expose them in the format expected by StructuredFieldMesh.

Functions

build_field_mesh_from_sgrid(sgrid)

Build a StructuredFieldMesh view from one solver grid.

extract_structured_vertices(sgrid)

Return (x_vertices, y_vertices) from a StructuredGrid-like object.