Commit b1644c21 authored by Dorchies David's avatar Dorchies David
Browse files

fix(RunModel_LLR): use RunModel_Lag by default

When running SD model without defining the routing model as before.

Refs HYCAR-Hydro/airgr#152, HYCAR-Hydro/airgr#153
parent b7230c94
No related merge requests found
Showing with 6 additions and 3 deletions
+6 -3
......@@ -3,7 +3,7 @@ CreateCalibOptions <- function(FUN_MOD,
FUN_TRANSFO = NULL,
IsHyst = FALSE,
IsSD = FALSE,
FUN_SD = NULL,
FUN_SD = RunModel_Lag,
FixedParam = NULL,
SearchRanges = NULL,
StartParamList = NULL,
......
......@@ -2,8 +2,8 @@ CreateRunOptions <- function(FUN_MOD, InputsModel,
IndPeriod_WarmUp = NULL, IndPeriod_Run,
IniStates = NULL, IniResLevels = NULL, Imax = NULL,
Outputs_Cal = NULL, Outputs_Sim = "all",
MeanAnSolidPrecip = NULL, FUN_SD = NULL, IsHyst = FALSE,
warnings = TRUE, verbose = TRUE) {
MeanAnSolidPrecip = NULL, FUN_SD = RunModel_Lag,
IsHyst = FALSE, warnings = TRUE, verbose = TRUE) {
if (!is.null(Imax)) {
if (!is.numeric(Imax) | length(Imax) != 1L) {
......@@ -20,6 +20,9 @@ CreateRunOptions <- function(FUN_MOD, InputsModel,
## check FUN_MOD
FUN_MOD <- match.fun(FUN_MOD)
if (!inherits(InputsModel, "SD")) {
FUN_SD <- NULL
}
FeatFUN_MOD <- .GetFeatModel(FUN_MOD = FUN_MOD, DatesR = InputsModel$DatesR,
FUN_SD = FUN_SD)
ObjectClass <- FeatFUN_MOD$Class
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment