hydromodpy.core.rng.manager#
Centralized RNG seed manager.
What#
RngManager derives deterministic per-consumer child seeds from a
single master_seed. Every code path that needs a random source
(stochastic calibration, mesh point sampling, synthetic forcing, …)
goes through this manager so that the same master_seed reproduces
the same draws.
Why#
Without a single entry point, each consumer instantiates its own
np.random.default_rng(seed) from a config field that is not
persisted in the catalog. A run is then unreproducible from the snapshot.
The manager solves both problems: it is the only place where seeds are
derived, and the master seed is persisted in
runs_environment.rng_seed at registration time.