Commit 9cb45ef6 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.6.3.12 style: TransfoParam_LAG renamed into

Refs #34
parent ea066eb4
Pipeline #16656 failed with stages
in 11 minutes and 7 seconds
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.3.11
Version: 1.6.3.12
Date: 2020-10-14
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -57,7 +57,7 @@ export(TransfoParam_GR5H)
export(TransfoParam_GR4J)
export(TransfoParam_GR5J)
export(TransfoParam_GR6J)
export(TransfoParam_LAG)
export(TransfoParam_Lag)
export(plot.OutputsModel)
exportPattern(".FortranOutputs")
exportPattern(".ErrorCrit")
......
......@@ -2,7 +2,7 @@
### 1.6.3.11 Release Notes (2020-10-14)
### 1.6.3.12 Release Notes (2020-10-14)
#### New features
......
......@@ -148,7 +148,7 @@ CreateCalibOptions <- function(FUN_MOD,
}
##_set_FUN_LAG
if (IsSD) {
FUN_LAG <- TransfoParam_LAG
FUN_LAG <- TransfoParam_Lag
}
##_set_FUN_TRANSFO
if (sum(ObjectClass %in% c("GR4H", "GR5H", "GR4J", "GR5J", "GR6J", "GR2M", "GR1A", "CemaNeige")) > 0) {
......
RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) {
FUN_MOD <- match.fun(FUN_MOD)
if (inherits(InputsModel, "SD")) {
# LAG Model take one parameter at the beginning of the vector
iFirstParamRunOffModel <- 2
......@@ -9,13 +9,13 @@ RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) {
# All parameters
iFirstParamRunOffModel <- 1
}
OutputsModel <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param[iFirstParamRunOffModel:length(Param)])
Param = Param[iFirstParamRunOffModel:length(Param)])
if (inherits(InputsModel, "SD")) {
InputsModel$OutputsModel <- OutputsModel
OutputsModel <- RunModel_LAG(InputsModel, RunOptions, Param[1])
OutputsModel <- RunModel_Lag(InputsModel, RunOptions, Param[1])
}
return(OutputsModel)
}
\ No newline at end of file
TransfoParam_LAG <- function(ParamIn, Direction) {
TransfoParam_Lag <- function(ParamIn, Direction) {
## number of model parameters
NParam <- 1L
......
......@@ -12,7 +12,7 @@
\alias{TransfoParam_GR5H}
\alias{TransfoParam_CemaNeige}
\alias{TransfoParam_CemaNeigeHyst}
\alias{TransfoParam_LAG}
\alias{TransfoParam_Lag}
\title{Transformation of the parameters using the provided function}
......
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