diff --git a/DESCRIPTION b/DESCRIPTION index 6a4cb6e9ed27de4328e50b6ff693cfe8b2b6a0a8..2262f50b0c8e7d06776dd4df2bb3687270fb4bba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.6.3.62 +Version: 1.6.3.63 Date: 2020-11-17 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.md b/NEWS.md index 7586e403e911f7391dc226863b1d08e47d08544e..505395fef59fc402ed20acc920bab66698a79f72 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ -### 1.6.3.62 Release Notes (2020-11-17) +### 1.6.3.63 Release Notes (2020-11-17) #### New features diff --git a/R/RunModel_CemaNeigeGR5J.R b/R/RunModel_CemaNeigeGR5J.R index 808339ff12a5bb423957c4146c7c5ce42068ce72..7482fe517e2d52eb4f2e24a3db203425c7f9ed18 100644 --- a/R/RunModel_CemaNeigeGR5J.R +++ b/R/RunModel_CemaNeigeGR5J.R @@ -10,25 +10,25 @@ RunModel_CemaNeigeGR5J <- function(InputsModel, RunOptions, Param) { ## Arguments_check - if (inherits(InputsModel, "InputsModel") == FALSE) { + if (!inherits(InputsModel, "InputsModel")) { stop("'InputsModel' must be of class 'InputsModel'") } - if (inherits(InputsModel, "daily") == FALSE) { + if (!inherits(InputsModel, "daily")) { stop("'InputsModel' must be of class 'daily'") } - if (inherits(InputsModel, "GR") == FALSE) { + if (!inherits(InputsModel, "GR")) { stop("'InputsModel' must be of class 'GR'") } - if (inherits(InputsModel, "CemaNeige") == FALSE) { + if (!inherits(InputsModel, "CemaNeige")) { stop("'InputsModel' must be of class 'CemaNeige'") } - if (inherits(RunOptions, "RunOptions") == FALSE) { + if (!inherits(RunOptions, "RunOptions")) { stop("'RunOptions' must be of class 'RunOptions'") } - if (inherits(RunOptions, "GR") == FALSE) { + if (!inherits(RunOptions, "GR")) { stop("'RunOptions' must be of class 'GR'") } - if (inherits(RunOptions, "CemaNeige") == FALSE) { + if (!inherits(RunOptions, "CemaNeige")) { stop("'RunOptions' must be of class 'CemaNeige'") } if (!is.vector(Param) | !is.numeric(Param)) { @@ -128,7 +128,7 @@ RunModel_CemaNeigeGR5J <- function(InputsModel, RunOptions, Param) { } ### ENDFOR_iLayer names(CemaNeigeLayers) <- sprintf("Layer%02i", seq_len(NLayers)) } ### ENDIF_RunSnowModule - if (inherits(RunOptions, "CemaNeige") == FALSE) { + if (!inherits(RunOptions, "CemaNeige")) { CemaNeigeLayers <- list() CemaNeigeStateEnd <- NULL NameCemaNeigeLayers <- NULL @@ -187,20 +187,20 @@ RunModel_CemaNeigeGR5J <- function(InputsModel, RunOptions, Param) { ## Output_data_preparation ## OutputsModel_only - if (ExportDatesR == FALSE & ExportStateEnd == FALSE) { + if (!ExportDatesR & !ExportStateEnd) { OutputsModel <- c(lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers)) names(OutputsModel) <- c(FortranOutputs$GR[IndOutputsMod], NameCemaNeigeLayers) } ## DatesR_and_OutputsModel_only - if (ExportDatesR & ExportStateEnd == FALSE) { + if (ExportDatesR & !ExportStateEnd) { OutputsModel <- c(list(InputsModel$DatesR[RunOptions$IndPeriod_Run]), lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers)) names(OutputsModel) <- c("DatesR", FortranOutputs$GR[IndOutputsMod], NameCemaNeigeLayers) } ## OutputsModel_and_SateEnd_only - if (ExportDatesR == FALSE & ExportStateEnd) { + if (!ExportDatesR & ExportStateEnd) { OutputsModel <- c(lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers), list(RESULTS$StateEnd)) diff --git a/R/RunModel_CemaNeigeGR6J.R b/R/RunModel_CemaNeigeGR6J.R index 6f2502814d9e170979f2c73333115892a7349f80..62e1786be80c93aab0c69c7ebd1b0a61270222b3 100644 --- a/R/RunModel_CemaNeigeGR6J.R +++ b/R/RunModel_CemaNeigeGR6J.R @@ -10,25 +10,25 @@ RunModel_CemaNeigeGR6J <- function(InputsModel, RunOptions, Param) { ## Arguments_check - if (inherits(InputsModel, "InputsModel") == FALSE) { + if (!inherits(InputsModel, "InputsModel")) { stop("'InputsModel' must be of class 'InputsModel'") } - if (inherits(InputsModel, "daily") == FALSE) { + if (!inherits(InputsModel, "daily")) { stop("'InputsModel' must be of class 'daily'") } - if (inherits(InputsModel, "GR") == FALSE) { + if (!inherits(InputsModel, "GR")) { stop("'InputsModel' must be of class 'GR'") } - if (inherits(InputsModel, "CemaNeige") == FALSE) { + if (!inherits(InputsModel, "CemaNeige")) { stop("'InputsModel' must be of class 'CemaNeige'") } - if (inherits(RunOptions, "RunOptions") == FALSE) { + if (!inherits(RunOptions, "RunOptions")) { stop("'RunOptions' must be of class 'RunOptions'") } - if (inherits(RunOptions, "GR") == FALSE) { + if (!inherits(RunOptions, "GR")) { stop("'RunOptions' must be of class 'GR'") } - if (inherits(RunOptions, "CemaNeige") == FALSE) { + if (!inherits(RunOptions, "CemaNeige")) { stop("'RunOptions' must be of class 'CemaNeige'") } if (!is.vector(Param) | !is.numeric(Param)) { @@ -132,7 +132,7 @@ RunModel_CemaNeigeGR6J <- function(InputsModel, RunOptions, Param) { } ### ENDFOR_iLayer names(CemaNeigeLayers) <- sprintf("Layer%02i", seq_len(NLayers)) } ### ENDIF_RunSnowModule - if (inherits(RunOptions, "CemaNeige") == FALSE) { + if (!inherits(RunOptions, "CemaNeige")) { CemaNeigeLayers <- list() CemaNeigeStateEnd <- NULL NameCemaNeigeLayers <- NULL @@ -192,20 +192,20 @@ RunModel_CemaNeigeGR6J <- function(InputsModel, RunOptions, Param) { ## Output_data_preparation ## OutputsModel_only - if (ExportDatesR == FALSE & ExportStateEnd == FALSE) { + if (!ExportDatesR== FALSE & !ExportStateEnd) { OutputsModel <- c(lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers)) names(OutputsModel) <- c(FortranOutputs$GR[IndOutputsMod], NameCemaNeigeLayers) } ## DatesR_and_OutputsModel_only - if (ExportDatesR & ExportStateEnd == FALSE) { + if (!ExportDatesR & ExportStateEnd) { OutputsModel <- c(list(InputsModel$DatesR[RunOptions$IndPeriod_Run]), lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers)) names(OutputsModel) <- c("DatesR", FortranOutputs$GR[IndOutputsMod], NameCemaNeigeLayers) } ## OutputsModel_and_SateEnd_only - if (ExportDatesR == FALSE & ExportStateEnd) { + if (!ExportDatesR & ExportStateEnd) { OutputsModel <- c(lapply(seq_len(RESULTS$NOutputs), function(i) RESULTS$Outputs[IndPeriod2, i]), list(CemaNeigeLayers), list(RESULTS$StateEnd))