Commit 9cb63cfd authored by Delaigue Olivier's avatar Delaigue Olivier

v1.6.1.11 fix: FUN_LAG function now takes a matrix in input in...

v1.6.1.11 fix: FUN_LAG function now takes a matrix in input in CreateCalibOptions and Calibration_Michel #34
parent 31352a7b
Pipeline #12827 passed with stages
in 11 minutes and 2 seconds
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.1.10
Version: 1.6.1.11
Date: 2020-04-07
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -2,7 +2,7 @@
### 1.6.1.10 Release Notes (2020-04-07)
### 1.6.1.11 Release Notes (2020-04-07)
#### New features
......
......@@ -102,7 +102,7 @@ Calibration_Michel <- function(InputsModel,
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam-1)] <- FUN1(ParamIn[, 1:(NParam-1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam ], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam ]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......@@ -159,7 +159,7 @@ Calibration_Michel <- function(InputsModel,
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam-5)] <- FUN1( ParamIn[, 1:(NParam-5)], Direction)
ParamOut[, (NParam-4):(NParam-1)] <- FUN2( ParamIn[, (NParam-4):(NParam-1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam ], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam ]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......@@ -176,7 +176,7 @@ Calibration_Michel <- function(InputsModel,
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam-3)] <- FUN1( ParamIn[, 1:(NParam-3)], Direction)
ParamOut[, (NParam-2):(NParam-1)] <- FUN2( ParamIn[, (NParam-2):(NParam-1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam ], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam ]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......
......@@ -163,7 +163,7 @@ CreateCalibOptions <- function(FUN_MOD,
ParamOut <- NA * ParamIn
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam-1)] <- FUN1(ParamIn[, 1:(NParam-1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam ], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam ]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......@@ -217,7 +217,7 @@ CreateCalibOptions <- function(FUN_MOD,
NParam <- ncol(ParamIn)
ParamOut[, 1:(NParam - 5) ] <- FUN1( ParamIn[, 1:(NParam - 5) ], Direction)
ParamOut[, (NParam - 4):(NParam - 1)] <- FUN2( ParamIn[, (NParam - 4):(NParam - 1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam ], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam ]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......@@ -238,7 +238,7 @@ CreateCalibOptions <- function(FUN_MOD,
ParamOut[, 1:(NParam - 3)] <- FUN1( ParamIn[, 1:(NParam - 3)], Direction)
}
ParamOut[, (NParam - 2):(NParam - 1)] <- FUN2( ParamIn[, (NParam - 2):(NParam - 1)], Direction)
ParamOut[, NParam ] <- FUN_LAG(ParamIn[, NParam], Direction)
ParamOut[, NParam ] <- FUN_LAG(as.matrix(ParamIn[, NParam]), Direction)
if (!Bool) {
ParamOut <- ParamOut[1, ]
}
......@@ -484,4 +484,4 @@ CreateCalibOptions <- function(FUN_MOD,
return(CalibOptions)
}
}
\ No newline at end of file
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