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

fix(TransfoParam): issue with Cemaneige models

- Missing item "IsHyst" in `RunOptions$FeatFUN_MOD` causes crash

Regression after refactoring in #111
parent ee73e80d
Pipeline #25991 failed with stages
in 7 minutes and 26 seconds
...@@ -32,11 +32,13 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, ...@@ -32,11 +32,13 @@ CreateRunOptions <- function(FUN_MOD, InputsModel,
if (IsIntStore) { if (IsIntStore) {
ObjectClass <- c(ObjectClass, "interception") ObjectClass <- c(ObjectClass, "interception")
} }
if (IsHyst) { if ("CemaNeige" %in% FeatFUN_MOD$Class) {
ObjectClass <- c(ObjectClass, "hysteresis")
FeatFUN_MOD$IsHyst <- IsHyst FeatFUN_MOD$IsHyst <- IsHyst
if (isHyst) {
ObjectClass <- c(ObjectClass, "hysteresis")
FeatFUN_MOD$NbParam <- FeatFUN_MOD$NbParam + 2 FeatFUN_MOD$NbParam <- FeatFUN_MOD$NbParam + 2
} }
}
## SD model ## SD model
FeatFUN_MOD$IsSD <- inherits(InputsModel, "SD") FeatFUN_MOD$IsSD <- inherits(InputsModel, "SD")
......
Markdown is supported
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