hydromodpy.solver.modflow_common.boundary_packages#

Shared descriptors for MODFLOW boundary-condition stress-period data.

MODFLOW-NWT and MODFLOW 6 both expect stress-period payloads of the form (layer, row, col, *attrs) (DIS) or ((layer, cell_id), *attrs) (DISV). The attributes depend on the package:

  • DRN : elev, cond

  • GHB : bhead, cond

  • RIV : stage, cond, rbot

  • CHD : head

  • WEL : flux

This module centralises the attribute names and the helper that turns a dataclass payload into a tuple row, so that both backends share a single source of truth.

Functions

package_attr_names(kind)

Return the attribute names (in order) for a package kind.

validate_attrs(kind, attrs)

Raise when attrs does not match the arity expected for kind.

Classes

BoundaryCell(layer, row, col[, attrs])

Structured-grid cell reference (layer, row, col) plus attrs.

DisvBoundaryCell(layer, cell_id[, attrs])

DISV cell reference: layer, cell id, plus attrs.

PackageKind(value[, names, module, ...])

MODFLOW package families that share a stress-period row of cell plus attrs.