pub struct Scenario {
pub basin: BasinInfo,
pub forcing: Vec<Forcing>,
pub dt_h: f64,
pub models: Vec<ModelType>,
pub observed: Option<Vec<f64>>,
pub params_overrides: Option<Map<String, Value>>,
}Expand description
A forecast scenario: basin + forcing + selected models + optional observation + optional per-model parameter overrides.
Pass to run_scenario to execute every selected model on the same
forcing and collect a ComparisonResult. Field defaults (via struct
literal in tests / examples) are typically observed: None and
params_overrides: None; supply Some(obs) to enable per-model
metrics, and Some(overrides) keyed by ModelType::name to swap in
non-default parameters per model.
Fields§
§basin: BasinInfoBasin descriptor (area used for depth→discharge conversion + GB/T 22482 runoff-depth error).
forcing: Vec<Forcing>Forcing series (P / PET / T) — shared by all selected models.
dt_h: f64Time-step length in hours. Must match the time-step implicit in
forcing (e.g. 1.0 for hourly forcing, 24.0 for daily SWAT+).
models: Vec<ModelType>Which models to run on this scenario. Order is preserved in the
returned ComparisonResult::results.
observed: Option<Vec<f64>>Optional observed discharge series. When supplied and of the same
length as forcing, each ModelResult::metrics is populated.
params_overrides: Option<Map<String, Value>>Per-model parameter overrides (JSON keyed by ModelType::name()).
Missing → use model defaults.