hydromodpy.spatial.mesh.grid_wrappers#

Concrete implementations of the Grid Protocol.

Three wrappers cover the topologies HydroModPy recognises:

  • RegularGrid - DIS / structured-in-plan grids built from a DEM raster transform (uniform cell size, (nrow, ncol) shape).

  • IrregularGrid - DISV planar meshes carrying explicit vertices and face-node connectivity (typically Gmsh triangulations).

  • LumpedGrid - sentinel for lumped models such as GR4J. A HydroMesh cannot be materialised: to_hydro_mesh() raises.

These are purely data-carrying wrappers around HydroMesh. They expose the topology property required by downstream readers (Run.grid / Run.fields / Run.mesh) without changing the storage layout.

Classes

IrregularGrid(mesh[, n_layers, crs])

Unstructured-in-plan grid (DISV) backed by an explicit HydroMesh.

LumpedGrid([crs])

Single-cell sentinel for lumped catchment models (GR4J).

RegularGrid(shape, dx, dy, origin[, ...])

Structured-in-plan grid backed by a uniform DEM raster.