Commit 52a26064 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.6.3.2ç style: minor code revision in RunModel_GR1A

Refs #65
Showing with 6 additions and 4 deletions
+6 -4
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.3.28
Version: 1.6.3.29
Date: 2020-11-06
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -4,7 +4,7 @@
### 1.6.3.27 Release Notes (2020-11-06)
### 1.6.3.29 Release Notes (2020-11-06)
#### New features
......
......@@ -3,6 +3,7 @@ RunModel_GR1A <- function(InputsModel, RunOptions, Param) {
NParam <- 1
FortranOutputs <- .FortranOutputs(GR = "GR1A")$GR
## Arguments_check
if (!inherits(InputsModel, "InputsModel")) {
stop("'InputsModel' must be of class 'InputsModel'")
......@@ -29,7 +30,7 @@ RunModel_GR1A <- function(InputsModel, RunOptions, Param) {
## Input data preparation
if (identical(RunOptions$IndPeriod_WarmUp, as.integer(0))) {
if (identical(RunOptions$IndPeriod_WarmUp, 0L)) {
RunOptions$IndPeriod_WarmUp <- NULL
}
IndPeriod1 <- c(RunOptions$IndPeriod_WarmUp, RunOptions$IndPeriod_Run)
......@@ -40,11 +41,13 @@ RunModel_GR1A <- function(InputsModel, RunOptions, Param) {
IndOutputs <- which(FortranOutputs %in% RunOptions$Outputs_Sim)
}
## Output data preparation
IndPeriod2 <- (length(RunOptions$IndPeriod_WarmUp) + 1):LInputSeries
ExportDatesR <- "DatesR" %in% RunOptions$Outputs_Sim
ExportStateEnd <- "StateEnd" %in% RunOptions$Outputs_Sim
## Call_fortan
RESULTS <- .Fortran("frun_gr1a", PACKAGE = "airGR",
## inputs
......@@ -93,7 +96,6 @@ RunModel_GR1A <- function(InputsModel, RunOptions, Param) {
## End
rm(RESULTS)
class(OutputsModel) <- c("OutputsModel", "yearly", "GR")
return(OutputsModel)
......
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