hydromodpy.simulation.extraction.calibration_bridge#

Calibration bridge: hot path (RAM) vs cold path (SimulationCatalog).

During calibration, the optimizer runs hundreds of simulations. Each iteration must be fast - no disk I/O in the inner loop. Only the best result is persisted at the end.

The bridge provides:

  • make_hot_simulator: wraps a run function into a RAM-only callback returning (calibration_vector, raw_results) so the calibration engine can score against the observation plan while keeping the raw solver output available for optional post-calibration persistence.

  • promote_trial: after calibration converges, stores one run into the SimulationCatalog for archival and comparison.

Functions

make_hot_simulator(run_fn, observation_plan)

Wrap a solver run function into a RAM-only calibration callback.

persist_calibration_summary_to_store(store, ...)

Persist a lightweight calibration summary into the SimulationCatalog.

promote_trial(store, sim_id, run_fn, ...[, ...])

Persist one best-of-calibration run into the SimulationCatalog.