
Simulate a Hydrological Model
simulate_model.RdSimulates discharge using a specified hydrological model over a given time period. Supports models from the airGR, TUWmodel, hydromad, and topmodel packages. Optionally includes snow-related outputs if the model supports it.
Usage
simulate_model(
model,
model_param,
input,
ind = seq_along(input[[1]]),
Qobs = NULL,
airGR_RunOptions = NULL
)Arguments
- model
A string specifying the hydrological model to use. Supported models include
"TUW","topmodel","hydromad"models (e.g.,"sacramento","cwi"), and airGR models (e.g.,"GR4J","CemaNeigeGR4J"). For a complete list see table invignette("model_overview").- model_param
A numeric vector of model parameters specific to the chosen model.
- input
A list of model input data, typically created using
create_input. Must include time series of precipitation (P), temperature (T), and optionally evapotranspiration (E), as well as spatial data like catchment area or topography.- ind
A vector of indices specifying the time steps to simulate. Defaults to the full range.
- Qobs
Optional. A vector of observed discharge values to include in the output for comparison.
- airGR_RunOptions
Optional. A pre-created
RunOptionsobject for airGR models.
Value
A list containing:
date: Vector of simulation dates.Qsim: Simulated discharge.Qobs: Observed discharge (if provided).SWE: Snow water equivalent (if available).psolid: Solid precipitation (if available).pliquid: Liquid precipitation (if available).melt: Meltwater (if available).more_info: A list with model-specific output.
Note
For airGR models, the appropriate
RunModel_*function is called.For hydromad models, missing dates are filled to ensure compatibility.
Snow-related outputs are only available for models that simulate snow processes.
If
Qobsis provided, its length must match the length ofQsim.