Commit a037e702 authored by Delaigue Olivier's avatar Delaigue Olivier Committed by Dorchies David
Browse files

v1.6.1.2 UPDATE: new names of the outputs returned by the CreateInputsModel...

v1.6.1.2 UPDATE: new names of the outputs returned by the  CreateInputsModel function are now used in RunModel #34
Linked to commit 617bc09d
Showing with 5 additions and 5 deletions
+5 -5
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.1.1 Version: 1.6.1.2
Date: 2020-04-05 Date: 2020-04-05
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
### 1.6.1.1 Release Notes (2020-04-05) ### 1.6.1.2 Release Notes (2020-04-05)
#### New features #### New features
......
...@@ -10,10 +10,10 @@ RunModel <- function (InputsModel, RunOptions, Param, FUN_MOD) { ...@@ -10,10 +10,10 @@ RunModel <- function (InputsModel, RunOptions, Param, FUN_MOD) {
if ("hourly" %in% class(InputsModel)) { if ("hourly" %in% class(InputsModel)) {
TimeStep <- 60 * 60 TimeStep <- 60 * 60
} }
surf_tot <- sum(InputsModel$S_basin) surf_tot <- sum(InputsModel$BasinAreas)
Outputs_down$Qsim <- Outputs_down$Qdown * InputsModel$S_basin[length(InputsModel$S_basin)] / surf_tot + Outputs_down$Qsim <- Outputs_down$Qdown * InputsModel$BasinAreas[length(InputsModel$BasinAreas)] / surf_tot +
1000 / tail(Param, 1) / TimeStep * 1000 / tail(Param, 1) / TimeStep *
InputsModel$Q_upstr %*% (InputsModel$L_hyd[1, ] * InputsModel$S_basin[1:length(InputsModel$L_hyd)]) InputsModel$QobsUpstr %*% (InputsModel$LengthHydro[1, ] * InputsModel$BasinAreas[1:length(InputsModel$LengthHydro)])
} else { } else {
Outputs_down <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param) Outputs_down <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, Param = Param)
} }
......
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