hydromodpy.solver.modflow_common.flow_adapter_helpers#

Shared helpers for MODFLOW-family flow adapters.

This module contains only MODFLOW-agnostic flow lifecycle logic:

  • derive stable model names from the resolved simulation plan,

  • build flow pre-processing options for solver backends,

  • run the common pre/process sequence once a concrete flow model exists.

Post-processing (derived variables, result extraction) is handled by the SimulationCatalog pipeline via post_run_results().

Keeping that code here avoids duplicating the same lifecycle in both modflow_nwt and modflow6 adapters.

Functions

build_preprocess_options(state)

Build the flow pre-processing options from the runtime setup.

flow_model_name(plan, base_name, run)

Return the stable model name used for one flow run.

resolve_base_model_name(setup)

Resolve the launcher base model name from runtime setup state.

resolve_run_model_name(ctx)

Resolve the model name from the run context.

run_flow_model(ctx, model_modflow, ...)

Execute the shared lifecycle for one already-instantiated flow model.