hydromodpy.solver.modflow_common.flow_translator#

Canonical translation of HydroModPy BC kinds to MODFLOW packages.

Both MODFLOW-NWT and MODFLOW 6 translators resolve the same semantic boundary conditions (“stream”, “drain”, “chd”, “well”, “ghb”, “riv”, “ocean”) to solver-specific packages. The names of the canonical BC tokens live here so that downstream mappings stay consistent.

The module provides:

  • BoundaryKind : enum of BC kinds recognised by HydroModPy.

  • NWT_PACKAGES / MF6_PACKAGES : dispatch tables mapping each BoundaryKind to the solver package code expected by FloPy.

  • resolve_packages : helper returning the package list used by an adapter for a given (BoundaryKind, solver) combination.

Only the naming dispatch is centralised; the detailed payload builders stay with each backend because they depend on solver-specific data structures (DIS vs DISV coordinates, stress period data layouts, etc.).

Functions

resolve_package(kind, *, solver)

Return the FloPy package suffix for one (kind, solver) pair.

resolve_packages(kinds, *, solver)

Return the deduplicated list of packages matching kinds.

Classes

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

Semantic boundary-condition kinds understood by HydroModPy.