Commit 1e3506c0 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.4.2.5 CLEAN: minor syntax revision in Imax fun

parent 3cb331f8
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.4.2.4
Version: 1.4.2.5
Date: 2019-12-10
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -2,7 +2,7 @@
### 1.4.2.4 Release Notes (2019-12-10)
### 1.4.2.5 Release Notes (2019-12-10)
#### New features
......
Imax <- function(InputsModel,
IndPeriod_Run,
tested_values = seq(0.1, 3, 0.1)) {
tested_values = seq(from = 0.1, to = 3, seq = 0.1)) {
##_____Arguments_check_____________________________________________________________________
if (!inherits(InputsModel, "InputsModel")) {
......@@ -46,7 +46,7 @@ Imax <- function(InputsModel,
cum_hourly <- 0
for (i in IndPeriod_Run) {
Ec <- min(InputsModel$PotEvap[i], InputsModel$Precip[i] + C0)
Pth <- max(0, InputsModel$Precip[i] - (Imax-C0)-Ec)
Pth <- max(0, InputsModel$Precip[i] - (Imax-C0) - Ec)
C0 <- C0 + InputsModel$Precip[i] - Ec - Pth
cum_hourly <- cum_hourly + Ec
}
......
Markdown is supported
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