hydromodpy.solver.boussinesq.calibration_extractors#

Lightweight readers for Boussinesq calibration trials.

During a calibration trial the Boussinesq solver writes a single _boussinesq_state_history.npz file to the scratch folder at the end of processing(). The optimizer needs the simulated series ASAP to score one trial - these helpers read the npz directly and return a pd.Series aligned with the simulation time grid.

Discharge is reconstructed from drainage_flux_history_m3_s summed over all cells per timestep (positive sign convention, matching the MODFLOW extract_discharge_from_cbc helper). Heads are read at flattened cell indices: the Boussinesq mesh is one-layer-unstructured so the (k, i, j) station tuple is interpreted as cell_id = j with k == 0 and i == 0 (other layouts raise).

Functions

extract_discharge_history(output_dir, *[, ...])

Sum drainage outflow per timestep and return a m3/s series.

extract_head_history_at_cells(output_dir, *, ...)

Return head timeseries keyed by station from the unstructured mesh.