Commit 083e9fdf authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

style: format comments in CreateCalibOptions

Showing with 12 additions and 12 deletions
+12 -12
......@@ -21,7 +21,7 @@ CreateCalibOptions <- function(FUN_MOD,
if (!is.logical(IsSD) | length(IsSD) != 1L) {
stop("'IsSD' must be a logical of length 1")
}
##check_FUN_MOD
## check FUN_MOD
BOOL <- FALSE
if (identical(FUN_MOD, RunModel_GR4H)) {
......@@ -87,7 +87,7 @@ CreateCalibOptions <- function(FUN_MOD,
return(NULL)
}
##check_FUN_CALIB
## check FUN_CALIB
BOOL <- FALSE
if (identical(FUN_CALIB, Calibration_Michel)) {
......@@ -100,9 +100,9 @@ CreateCalibOptions <- function(FUN_MOD,
}
##check_FUN_TRANSFO
## check FUN_TRANSFO
if (is.null(FUN_TRANSFO)) {
##_set_FUN1
## set FUN1
if (identical(FUN_MOD, RunModel_GR4H) |
identical(FUN_MOD, RunModel_CemaNeigeGR4H)) {
FUN_GR <- TransfoParam_GR4H
......@@ -140,17 +140,17 @@ CreateCalibOptions <- function(FUN_MOD,
stop("'FUN_GR' was not found")
return(NULL)
}
##_set_FUN2
## set FUN2
if (IsHyst) {
FUN_SNOW <- TransfoParam_CemaNeigeHyst
} else {
FUN_SNOW <- TransfoParam_CemaNeige
}
##_set_FUN_LAG
## set FUN_LAG
if (IsSD) {
FUN_LAG <- TransfoParam_Lag
}
##_set_FUN_TRANSFO
## set FUN_TRANSFO
if (sum(ObjectClass %in% c("GR4H", "GR5H", "GR4J", "GR5J", "GR6J", "GR2M", "GR1A", "CemaNeige")) > 0) {
if (!IsSD) {
FUN_TRANSFO <- FUN_GR
......@@ -252,7 +252,7 @@ CreateCalibOptions <- function(FUN_MOD,
return(NULL)
}
##NParam
## NParam
if ("GR4H" %in% ObjectClass) {
NParam <- 4
}
......@@ -299,7 +299,7 @@ CreateCalibOptions <- function(FUN_MOD,
NParam <- NParam + 1
}
##check_FixedParam
## check FixedParam
if (is.null(FixedParam)) {
FixedParam <- rep(NA, NParam)
} else {
......@@ -317,7 +317,7 @@ CreateCalibOptions <- function(FUN_MOD,
}
}
##check_SearchRanges
## check SearchRanges
if (is.null(SearchRanges)) {
ParamT <- matrix(c(rep(-9.99, NParam), rep(+9.99, NParam)),
ncol = NParam, byrow = TRUE)
......@@ -341,7 +341,7 @@ 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 ("GR4H" %in% ObjectClass) {
ParamT <- matrix(c(+5.12, -1.18, +4.34, -9.69,
......@@ -440,7 +440,7 @@ CreateCalibOptions <- function(FUN_MOD,
}
##check_StartParamList_and_StartParamDistrib__format
## check StartParamList and StartParamDistrib format
if ("HBAN" %in% ObjectClass & !is.null(StartParamList)) {
if (!is.matrix(StartParamList)) {
stop("'StartParamList' must be a matrix")
......
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