From 329e4a8cd3f36e86c45129c6963784839afc3185 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.fr> Date: Sun, 5 Apr 2020 09:37:14 +0200 Subject: [PATCH] v1.6.1.1 CLEAN: minor typo revisions in new RunModel #34 --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/RunModel.R | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index efaa8e5b..a8cf73dd 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.1.0 +Version: 1.6.1.1 Date: 2020-04-05 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 20c7c5b3..ac872dba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ -### 1.6.1.0 Release Notes (2020-04-05) +### 1.6.1.1 Release Notes (2020-04-05) #### New features diff --git a/R/RunModel.R b/R/RunModel.R index 29812bcb..84cf66d9 100644 --- a/R/RunModel.R +++ b/R/RunModel.R @@ -4,16 +4,16 @@ RunModel <- function (InputsModel, RunOptions, Param, FUN_MOD) { Outputs_down <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param[-length(Param)]) Outputs_down$Qdown <- Outputs_down$Qsim - if ("daily" %in% class(InputsModel)){ + if ("daily" %in% class(InputsModel)) { TimeStep <- 60 * 60 * 24 } - if ("hourly" %in% class(InputsModel)){ + if ("hourly" %in% class(InputsModel)) { TimeStep <- 60 * 60 } surf_tot <- sum(InputsModel$S_basin) - Outputs_down$Qsim <- Outputs_down$Qdown * InputsModel$S_basin[length(InputsModel$S_basin)] / surf_tot + + Outputs_down$Qsim <- Outputs_down$Qdown * InputsModel$S_basin[length(InputsModel$S_basin)] / surf_tot + 1000 / tail(Param, 1) / TimeStep * - InputsModel$Q_upstr %*% (InputsModel$L_hyd[1,] * InputsModel$S_basin[1:length(InputsModel$L_hyd)]) + InputsModel$Q_upstr %*% (InputsModel$L_hyd[1, ] * InputsModel$S_basin[1:length(InputsModel$L_hyd)]) } else { Outputs_down <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) } -- GitLab