Commit 0719b6ae authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Merge branch '132-runmodel_lag-add-warmupqsim-to-outputsmodel' into 'dev'

Resolve "RunModel_Lag: add WarmUpQsim to OutputsModel"

Closes #132

See merge request !54
parents 049160fa 7289e026
Pipeline #27650 failed with stages
in 221 minutes and 6 seconds
...@@ -35,11 +35,11 @@ default: ...@@ -35,11 +35,11 @@ default:
extends: .check extends: .check
scheduled_tests_patched: scheduled_tests_patched:
only: # only:
refs: # refs:
- dev # - dev
- master # - master
- schedules # - schedules
variables: variables:
R_VERSION: "patched" R_VERSION: "patched"
extends: .scheduled_tests extends: .scheduled_tests
...@@ -108,10 +108,10 @@ check_as_cran_oldrel: ...@@ -108,10 +108,10 @@ check_as_cran_oldrel:
revdepcheck_patched: revdepcheck_patched:
stage: revdepcheck stage: revdepcheck
only: # only:
refs: # refs:
- tags # - tags
- schedules # - schedules
variables: variables:
R_VERSION: "patched" R_VERSION: "patched"
script: script:
......
# .test-regression.ignore contains the list of topic/variables produces by # .test-regression.ignore contains the list of topic/variables produces by
# documentation examples that should be ignore in the regression test # documentation examples that should be ignore in the regression test
# The format of this file is: 5 lines of comments followed by one line by # The format of this file is: 5 lines of comments followed by one line by
# ignored variable : [Topic]<SPACE>[Variable]. # ignored variable : [Topic]<SPACE>[Variable] or *<SPACE>[Variable] for every variable whatever the topic
# Example for ignoring OutputsModel variable produced by example("RunModel_GR2M"): RunModel_GR2M OutputsModel # Example for ignoring OutputsModel variable produced by example("RunModel_GR2M"): RunModel_GR2M OutputsModel
Calibration_Michel RunOptions * RunOptions$Outputs_Sim
Calibration RunOptions * RunOptions$Outputs_Cal
CreateCalibOptions RunOptions * RunOptions$FeatFUN_MOD
CreateIniStates RunOptions * RunOptions$FortranOutputs
CreateInputsCrit RunOptions RunModel_CemaNeige RunOptions$Outputs_Cal
CreateInputsModel RunOptions
CreateRunOptions RunOptions
ErrorCrit_KGE RunOptions
ErrorCrit_KGE2 RunOptions
ErrorCrit_NSE RunOptions
ErrorCrit_RMSE RunOptions
ErrorCrit RunOptions
Imax RunOptions
Param_Sets_GR4J RunOptions_Cal Param_Sets_GR4J RunOptions_Cal
Param_Sets_GR4J RunOptions_Val Param_Sets_GR4J RunOptions_Val
RunModel_CemaNeige RunOptions * OutputsModel$Param
RunModel_CemaNeigeGR4J RunOptions * OutputsModel$WarmUpQsim
RunModel_CemaNeigeGR5J RunOptions * OutputsModel$StateEnd
RunModel_CemaNeigeGR6J RunOptions
RunModel_GR1A RunOptions
RunModel_GR2M RunOptions
RunModel_GR4H RunOptions
RunModel_GR4J RunOptions
RunModel_GR5H RunOptions
RunModel_GR5J RunOptions
RunModel_GR6J RunOptions
RunModel_Lag RunOptions
RunModel RunOptions
SeriesAggreg RunOptions
Calibration OutputsModel
Calibration_Michel OutputsModel
CreateCalibOptions OutputsModel
CreateIniStates OutputsModel
CreateInputsCrit OutputsModel
CreateInputsModel OutputsModel
CreateRunOptions OutputsModel
ErrorCrit OutputsModel
ErrorCrit_KGE OutputsModel
ErrorCrit_KGE2 OutputsModel
ErrorCrit_NSE OutputsModel
ErrorCrit_RMSE OutputsModel
Imax OutputsModel
RunModel OutputsModel
RunModel_CemaNeige OutputsModel
RunModel_CemaNeigeGR4J OutputsModel
RunModel_CemaNeigeGR5J OutputsModel
RunModel_CemaNeigeGR6J OutputsModel
RunModel_GR1A OutputsModel
RunModel_GR2M OutputsModel
RunModel_GR4H OutputsModel
RunModel_GR4J OutputsModel
RunModel_GR5H OutputsModel
RunModel_GR5J OutputsModel
RunModel_GR6J OutputsModel
RunModel_Lag OutputsModel
SeriesAggreg OutputsModel
Param_Sets_GR4J OutputsModel_Val Param_Sets_GR4J OutputsModel_Val
RunModel_Lag InputsModel
RunModel_Lag OutputsModel
RunModel_Lag OutputsModelDown RunModel_Lag OutputsModelDown
SeriesAggreg SimulatedMonthlyRegime SeriesAggreg SimulatedMonthlyRegime
* InputsCrit$FUN_CRIT
* InputsCritSingle$FUN_CRIT
* InputsCritCompo
* InputsCritMulti
Param_Sets_GR4J InputsCrit_Val$FUN_CRIT
...@@ -38,3 +38,4 @@ BugReports: https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues ...@@ -38,3 +38,4 @@ BugReports: https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues
NeedsCompilation: yes NeedsCompilation: yes
Encoding: UTF-8 Encoding: UTF-8
VignetteBuilder: knitr VignetteBuilder: knitr
RoxygenNote: 7.1.1
...@@ -24,8 +24,10 @@ S3method(SeriesAggreg, OutputsModel) ...@@ -24,8 +24,10 @@ S3method(SeriesAggreg, OutputsModel)
export(Calibration) export(Calibration)
export(Calibration_Michel) export(Calibration_Michel)
export(CreateCalibOptions) export(CreateCalibOptions)
export(CreateErrorCrit_GAPX)
export(CreateIniStates) export(CreateIniStates)
export(CreateInputsCrit) export(CreateInputsCrit)
export(CreateInputsCrit_Lavenne)
export(CreateInputsModel) export(CreateInputsModel)
export(CreateRunOptions) export(CreateRunOptions)
export(DataAltiExtrapolation_Valery) export(DataAltiExtrapolation_Valery)
......
...@@ -404,7 +404,7 @@ Calibration_Michel <- function(InputsModel, ...@@ -404,7 +404,7 @@ Calibration_Michel <- function(InputsModel,
listNameCrit <- OutputsCrit$CritCompo$MultiCritNames listNameCrit <- OutputsCrit$CritCompo$MultiCritNames
msgForm <- paste(sprintf("%.2f", listweights), listNameCrit, sep = " * ", collapse = ", ") msgForm <- paste(sprintf("%.2f", listweights), listNameCrit, sep = " * ", collapse = ", ")
msgForm <- unlist(strsplit(msgForm, split = ",")) msgForm <- unlist(strsplit(msgForm, split = ","))
msgFormSep <- rep(c(",", ",", ",\n\t\t "), times = ceiling(length(msgForm)/3))[1: length(msgForm)] msgFormSep <- rep(c(",", ",", ",\n\t\t "), times = ceiling(length(msgForm)/3))[1:length(msgForm)]
msgForm <- paste(msgForm, msgFormSep, sep = "", collapse = "") msgForm <- paste(msgForm, msgFormSep, sep = "", collapse = "")
msgForm <- gsub("\\,\\\n\\\t\\\t $|\\,$", "", msgForm) msgForm <- gsub("\\,\\\n\\\t\\\t $|\\,$", "", msgForm)
message("\tFormula: sum(", msgForm, ")") message("\tFormula: sum(", msgForm, ")")
......
...@@ -21,67 +21,15 @@ CreateCalibOptions <- function(FUN_MOD, ...@@ -21,67 +21,15 @@ CreateCalibOptions <- function(FUN_MOD,
if (!is.logical(IsSD) | length(IsSD) != 1L) { if (!is.logical(IsSD) | length(IsSD) != 1L) {
stop("'IsSD' must be a logical of length 1") stop("'IsSD' must be a logical of length 1")
} }
## check FUN_MOD ## check FUN_MOD
BOOL <- FALSE FeatFUN_MOD <- .GetFeatModel(FUN_MOD = FUN_MOD)
FeatFUN_MOD$IsHyst <- IsHyst
FeatFUN_MOD$IsSD <- IsSD
ObjectClass <- FeatFUN_MOD$Class
if (identical(FUN_MOD, RunModel_GR4H)) { if (identical(FUN_MOD, RunModel_Lag) && IsSD) {
ObjectClass <- c(ObjectClass, "GR4H")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR5H)) {
ObjectClass <- c(ObjectClass, "GR5H")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR4J)) {
ObjectClass <- c(ObjectClass, "GR4J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR5J)) {
ObjectClass <- c(ObjectClass, "GR5J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR6J)) {
ObjectClass <- c(ObjectClass, "GR6J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR2M)) {
ObjectClass <- c(ObjectClass, "GR2M")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_GR1A)) {
ObjectClass <- c(ObjectClass, "GR1A")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeige)) {
ObjectClass <- c(ObjectClass, "CemaNeige")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeigeGR4H)) {
ObjectClass <- c(ObjectClass, "CemaNeigeGR4H")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeigeGR5H)) {
ObjectClass <- c(ObjectClass, "CemaNeigeGR5H")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeigeGR4J)) {
ObjectClass <- c(ObjectClass, "CemaNeigeGR4J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeigeGR5J)) {
ObjectClass <- c(ObjectClass, "CemaNeigeGR5J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_CemaNeigeGR6J)) {
ObjectClass <- c(ObjectClass, "CemaNeigeGR6J")
BOOL <- TRUE
}
if (identical(FUN_MOD, RunModel_Lag)) {
ObjectClass <- c(ObjectClass, "Lag")
if (IsSD) {
stop("RunModel_Lag should not be used with 'isSD=TRUE'") stop("RunModel_Lag should not be used with 'isSD=TRUE'")
}
BOOL <- TRUE
} }
if (IsHyst) { if (IsHyst) {
ObjectClass <- c(ObjectClass, "hysteresis") ObjectClass <- c(ObjectClass, "hysteresis")
...@@ -89,10 +37,6 @@ CreateCalibOptions <- function(FUN_MOD, ...@@ -89,10 +37,6 @@ CreateCalibOptions <- function(FUN_MOD,
if (IsSD) { if (IsSD) {
ObjectClass <- c(ObjectClass, "SD") ObjectClass <- c(ObjectClass, "SD")
} }
if (!BOOL) {
stop("incorrect 'FUN_MOD' for use in 'CreateCalibOptions'")
return(NULL)
}
## check FUN_CALIB ## check FUN_CALIB
BOOL <- FALSE BOOL <- FALSE
...@@ -109,202 +53,11 @@ CreateCalibOptions <- function(FUN_MOD, ...@@ -109,202 +53,11 @@ CreateCalibOptions <- function(FUN_MOD,
## check FUN_TRANSFO ## check FUN_TRANSFO
if (is.null(FUN_TRANSFO)) { if (is.null(FUN_TRANSFO)) {
## set FUN1 FUN_TRANSFO <- .FunTransfo(FeatFUN_MOD)
if (identical(FUN_MOD, RunModel_GR4H) |
identical(FUN_MOD, RunModel_CemaNeigeGR4H)) {
FUN_GR <- TransfoParam_GR4H
}
if (identical(FUN_MOD, RunModel_GR5H) |
identical(FUN_MOD, RunModel_CemaNeigeGR5H)) {
FUN_GR <- TransfoParam_GR5H
}
if (identical(FUN_MOD, RunModel_GR4J) |
identical(FUN_MOD, RunModel_CemaNeigeGR4J)) {
FUN_GR <- TransfoParam_GR4J
}
if (identical(FUN_MOD, RunModel_GR5J) |
identical(FUN_MOD, RunModel_CemaNeigeGR5J)) {
FUN_GR <- TransfoParam_GR5J
}
if (identical(FUN_MOD, RunModel_GR6J) |
identical(FUN_MOD, RunModel_CemaNeigeGR6J)) {
FUN_GR <- TransfoParam_GR6J
}
if (identical(FUN_MOD, RunModel_GR2M)) {
FUN_GR <- TransfoParam_GR2M
}
if (identical(FUN_MOD, RunModel_GR1A)) {
FUN_GR <- TransfoParam_GR1A
}
if (identical(FUN_MOD, RunModel_CemaNeige)) {
if (IsHyst) {
FUN_GR <- TransfoParam_CemaNeigeHyst
} else {
FUN_GR <- TransfoParam_CemaNeige
}
}
if (identical(FUN_MOD, RunModel_Lag)) {
FUN_GR <- TransfoParam_Lag
}
if (is.null(FUN_GR)) {
stop("'FUN_GR' was not found")
return(NULL)
}
## set FUN2
if (IsHyst) {
FUN_SNOW <- TransfoParam_CemaNeigeHyst
} else {
FUN_SNOW <- TransfoParam_CemaNeige
}
## set FUN_LAG
if (IsSD) {
FUN_LAG <- TransfoParam_Lag
}
## set FUN_TRANSFO
if (sum(ObjectClass %in% c("GR4H", "GR5H", "GR4J", "GR5J", "GR6J", "GR2M", "GR1A", "CemaNeige", "Lag")) > 0) {
if (!IsSD) {
FUN_TRANSFO <- FUN_GR
} else {
FUN_TRANSFO <- function(ParamIn, Direction) {
Bool <- is.matrix(ParamIn)
if (!Bool) {
ParamIn <- rbind(ParamIn)
}
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
ParamOut[, 2:NParam] <- FUN_GR(ParamIn[, 2:NParam], Direction)
ParamOut[, 1 ] <- FUN_LAG(as.matrix(ParamIn[, 1]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
return(ParamOut)
}
}
} else {
if (IsHyst & !IsSD) {
FUN_TRANSFO <- function(ParamIn, Direction) {
Bool <- is.matrix(ParamIn)
if (!Bool) {
ParamIn <- rbind(ParamIn)
}
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam - 4) ] <- FUN_GR(ParamIn[, 1:(NParam - 4)], Direction)
ParamOut[, (NParam - 3):NParam] <- FUN_SNOW(ParamIn[, (NParam - 3):NParam], Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
return(ParamOut)
}
}
if (!IsHyst & !IsSD) {
FUN_TRANSFO <- function(ParamIn, Direction) {
Bool <- is.matrix(ParamIn)
if (!Bool) {
ParamIn <- rbind(ParamIn)
}
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
if (NParam <= 3) {
ParamOut[, 1:(NParam - 2)] <- FUN_GR(cbind(ParamIn[, 1:(NParam - 2)]), Direction)
} else {
ParamOut[, 1:(NParam - 2)] <- FUN_GR(ParamIn[, 1:(NParam - 2)], Direction)
}
ParamOut[, (NParam - 1):NParam] <- FUN_SNOW(ParamIn[, (NParam - 1):NParam], Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
return(ParamOut)
}
}
if (IsHyst & IsSD) {
FUN_TRANSFO <- function(ParamIn, Direction) {
Bool <- is.matrix(ParamIn)
if (!Bool) {
ParamIn <- rbind(ParamIn)
}
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
ParamOut[, 2:(NParam - 4) ] <- FUN_GR(ParamIn[, 2:(NParam - 4)], Direction)
ParamOut[, (NParam - 3):NParam] <- FUN_SNOW(ParamIn[, (NParam - 3):NParam], Direction)
ParamOut[, 1 ] <- FUN_LAG(as.matrix(ParamIn[, 1]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
return(ParamOut)
}
}
if (!IsHyst & IsSD) {
FUN_TRANSFO <- function(ParamIn, Direction) {
Bool <- is.matrix(ParamIn)
if (!Bool) {
ParamIn <- rbind(ParamIn)
}
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
if (NParam <= 3) {
ParamOut[, 2:(NParam - 2)] <- FUN_GR(cbind(ParamIn[, 2:(NParam - 2)]), Direction)
} else {
ParamOut[, 2:(NParam - 2)] <- FUN_GR(ParamIn[, 2:(NParam - 2)], Direction)
}
ParamOut[, (NParam - 1):NParam] <- FUN_SNOW(ParamIn[, (NParam - 1):NParam], Direction)
ParamOut[, 1 ] <- FUN_LAG(as.matrix(ParamIn[, 1]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
return(ParamOut)
}
}
}
}
if (is.null(FUN_TRANSFO)) {
stop("'FUN_TRANSFO' was not found")
return(NULL)
} }
## NParam ## NParam
if ("GR4H" %in% ObjectClass) { NParam <- FeatFUN_MOD$NbParam
NParam <- 4
}
if ("GR5H" %in% ObjectClass) {
NParam <- 5
}
if ("GR4J" %in% ObjectClass) {
NParam <- 4
}
if ("GR5J" %in% ObjectClass) {
NParam <- 5
}
if ("GR6J" %in% ObjectClass) {
NParam <- 6
}
if ("GR2M" %in% ObjectClass) {
NParam <- 2
}
if ("GR1A" %in% ObjectClass) {
NParam <- 1
}
if ("CemaNeige" %in% ObjectClass) {
NParam <- 2
}
if ("CemaNeigeGR4H" %in% ObjectClass) {
NParam <- 6
}
if ("CemaNeigeGR5H" %in% ObjectClass) {
NParam <- 7
}
if ("CemaNeigeGR4J" %in% ObjectClass) {
NParam <- 6
}
if ("CemaNeigeGR5J" %in% ObjectClass) {
NParam <- 7
}
if ("CemaNeigeGR6J" %in% ObjectClass) {
NParam <- 8
}
if ("Lag" %in% ObjectClass) {
NParam <- 1
}
if (IsHyst) { if (IsHyst) {
NParam <- NParam + 2 NParam <- NParam + 2
...@@ -357,80 +110,80 @@ CreateCalibOptions <- function(FUN_MOD, ...@@ -357,80 +110,80 @@ CreateCalibOptions <- function(FUN_MOD,
## check StartParamList and StartParamDistrib default values ## check StartParamList and StartParamDistrib default values
if (("HBAN" %in% ObjectClass & is.null(StartParamList) & is.null(StartParamDistrib))) { if (("HBAN" %in% ObjectClass & is.null(StartParamList) & is.null(StartParamDistrib))) {
if ("GR4H" %in% ObjectClass) { if ("GR4H" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+5.12, -1.18, +4.34, -9.69, ParamT <- matrix(c(+5.12, -1.18, +4.34, -9.69,
+5.58, -0.85, +4.74, -9.47, +5.58, -0.85, +4.74, -9.47,
+6.01, -0.50, +5.14, -8.87), ncol = 4, byrow = TRUE) +6.01, -0.50, +5.14, -8.87), ncol = 4, byrow = TRUE)
} }
if (("GR5H" %in% ObjectClass) & ("interception" %in% ObjectClass)) { if (("GR5H" == FeatFUN_MOD$CodeMod) & ("interception" %in% ObjectClass)) {
ParamT <- matrix(c(+3.46, -1.25, +4.04, -9.53, -9.34, ParamT <- matrix(c(+3.46, -1.25, +4.04, -9.53, -9.34,
+3.74, -0.41, +4.78, -8.94, -3.33, +3.74, -0.41, +4.78, -8.94, -3.33,
+4.29, +0.16, +5.39, -7.39, +3.33), ncol = 5, byrow = TRUE) +4.29, +0.16, +5.39, -7.39, +3.33), ncol = 5, byrow = TRUE)
} }
if (("GR5H" %in% ObjectClass) & !("interception" %in% ObjectClass)) { if (("GR5H" == FeatFUN_MOD$CodeMod) & !("interception" %in% ObjectClass)) {
ParamT <- matrix(c(+3.28, -0.39, +4.14, -9.54, -7.49, ParamT <- matrix(c(+3.28, -0.39, +4.14, -9.54, -7.49,
+3.62, -0.19, +4.80, -9.00, -6.31, +3.62, -0.19, +4.80, -9.00, -6.31,
+4.01, -0.04, +5.43, -7.53, -5.33), ncol = 5, byrow = TRUE) +4.01, -0.04, +5.43, -7.53, -5.33), ncol = 5, byrow = TRUE)
} }
if ("GR4J" %in% ObjectClass) { if ("GR4J" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+5.13, -1.60, +3.03, -9.05, ParamT <- matrix(c(+5.13, -1.60, +3.03, -9.05,
+5.51, -0.61, +3.74, -8.51, +5.51, -0.61, +3.74, -8.51,
+6.07, -0.02, +4.42, -8.06), ncol = 4, byrow = TRUE) +6.07, -0.02, +4.42, -8.06), ncol = 4, byrow = TRUE)
} }
if ("GR5J" %in% ObjectClass) { if ("GR5J" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+5.17, -1.13, +3.08, -9.37, -7.45, ParamT <- matrix(c(+5.17, -1.13, +3.08, -9.37, -7.45,
+5.55, -0.46, +3.75, -9.09, -4.69, +5.55, -0.46, +3.75, -9.09, -4.69,
+6.10, -0.11, +4.43, -8.60, -0.66), ncol = 5, byrow = TRUE) +6.10, -0.11, +4.43, -8.60, -0.66), ncol = 5, byrow = TRUE)
} }
if ("GR6J" %in% ObjectClass) { if ("GR6J" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+3.60, -1.00, +3.30, -9.10, -0.90, +3.00, ParamT <- matrix(c(+3.60, -1.00, +3.30, -9.10, -0.90, +3.00,
+3.90, -0.50, +4.10, -8.70, +0.10, +4.00, +3.90, -0.50, +4.10, -8.70, +0.10, +4.00,
+4.50, +0.50, +5.00, -8.10, +1.10, +5.00), ncol = 6, byrow = TRUE) +4.50, +0.50, +5.00, -8.10, +1.10, +5.00), ncol = 6, byrow = TRUE)
} }
if ("GR2M" %in% ObjectClass) { if ("GR2M" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+5.03, -7.15, ParamT <- matrix(c(+5.03, -7.15,
+5.22, -6.74, +5.22, -6.74,
+5.85, -6.37), ncol = 2, byrow = TRUE) +5.85, -6.37), ncol = 2, byrow = TRUE)
} }
if ("GR1A" %in% ObjectClass) { if ("GR1A" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(-1.69, ParamT <- matrix(c(-1.69,
-0.38, -0.38,
+1.39), ncol = 1, byrow = TRUE) +1.39), ncol = 1, byrow = TRUE)
} }
if ("CemaNeige" %in% ObjectClass) { if ("CemaNeige" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(-9.96, +6.63, ParamT <- matrix(c(-9.96, +6.63,
-9.14, +6.90, -9.14, +6.90,
+4.10, +7.21), ncol = 2, byrow = TRUE) +4.10, +7.21), ncol = 2, byrow = TRUE)
} }
if ("CemaNeigeGR4H" %in% ObjectClass) { if ("CemaNeigeGR4H" == FeatFUN_MOD$CodeMod) {
ParamT <- matrix(c(+5.12, -1.18, +4.34, -9.69, -9.96, +6.63, ParamT <- matrix(c(+5.12, -1.18, +4.34, -9.69, -9.96, +6.63,
+5.58, -0.85, +4.74, -9.47, -9.14, +6.90, +5.58, -0.85, +4.74, -9.47, -9.14, +6.90,
+6.01, -0.50, +5.14, -8.87, +4.10, +7.21), ncol = 6, byrow = TRUE) +6.01, -0.50, +5.14, -8.87, +4.10, +7.21), ncol = 6, byrow = TRUE)
} }
if (("CemaNeigeGR5H" %in% ObjectClass) & ("interception" %in% ObjectClass)) { if (("CemaNeigeGR5H" == FeatFUN_MOD$CodeMod) & ("interception" %in% ObjectClass)) {
ParamT <- matrix(c(+3.46, -1.25, +4.04, -9.53, -9.34, -9.96, +6.63, ParamT <- matrix(c(+3.46, -1.25, +4.04, -9.53, -9.34, -9.96, +6.63,
+3.74, -0.41, +4.78, -8.94, -3.33, -9.14, +6.90, +3.74, -0.41, +4.78, -8.94, -3.33, -9.14,