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

v1.6.3.12 style: TransfoParam_LAG renamed into

Refs #34
Showing with 11 additions and 11 deletions
+11 -11
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.3.11 Version: 1.6.3.12
Date: 2020-10-14 Date: 2020-10-14
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")),
......
...@@ -57,7 +57,7 @@ export(TransfoParam_GR5H) ...@@ -57,7 +57,7 @@ export(TransfoParam_GR5H)
export(TransfoParam_GR4J) export(TransfoParam_GR4J)
export(TransfoParam_GR5J) export(TransfoParam_GR5J)
export(TransfoParam_GR6J) export(TransfoParam_GR6J)
export(TransfoParam_LAG) export(TransfoParam_Lag)
export(plot.OutputsModel) export(plot.OutputsModel)
exportPattern(".FortranOutputs") exportPattern(".FortranOutputs")
exportPattern(".ErrorCrit") exportPattern(".ErrorCrit")
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
### 1.6.3.11 Release Notes (2020-10-14) ### 1.6.3.12 Release Notes (2020-10-14)
#### New features #### New features
......
...@@ -148,7 +148,7 @@ CreateCalibOptions <- function(FUN_MOD, ...@@ -148,7 +148,7 @@ CreateCalibOptions <- function(FUN_MOD,
} }
##_set_FUN_LAG ##_set_FUN_LAG
if (IsSD) { if (IsSD) {
FUN_LAG <- TransfoParam_LAG FUN_LAG <- TransfoParam_Lag
} }
##_set_FUN_TRANSFO ##_set_FUN_TRANSFO
if (sum(ObjectClass %in% c("GR4H", "GR5H", "GR4J", "GR5J", "GR6J", "GR2M", "GR1A", "CemaNeige")) > 0) { if (sum(ObjectClass %in% c("GR4H", "GR5H", "GR4J", "GR5J", "GR6J", "GR2M", "GR1A", "CemaNeige")) > 0) {
......
RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) { RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) {
FUN_MOD <- match.fun(FUN_MOD) FUN_MOD <- match.fun(FUN_MOD)
if (inherits(InputsModel, "SD")) { if (inherits(InputsModel, "SD")) {
# LAG Model take one parameter at the beginning of the vector # LAG Model take one parameter at the beginning of the vector
iFirstParamRunOffModel <- 2 iFirstParamRunOffModel <- 2
...@@ -9,13 +9,13 @@ RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) { ...@@ -9,13 +9,13 @@ RunModel <- function(InputsModel, RunOptions, Param, FUN_MOD) {
# All parameters # All parameters
iFirstParamRunOffModel <- 1 iFirstParamRunOffModel <- 1
} }
OutputsModel <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions, OutputsModel <- FUN_MOD(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param[iFirstParamRunOffModel:length(Param)]) Param = Param[iFirstParamRunOffModel:length(Param)])
if (inherits(InputsModel, "SD")) { if (inherits(InputsModel, "SD")) {
InputsModel$OutputsModel <- OutputsModel InputsModel$OutputsModel <- OutputsModel
OutputsModel <- RunModel_LAG(InputsModel, RunOptions, Param[1]) OutputsModel <- RunModel_Lag(InputsModel, RunOptions, Param[1])
} }
return(OutputsModel) return(OutputsModel)
} }
\ No newline at end of file
TransfoParam_LAG <- function(ParamIn, Direction) { TransfoParam_Lag <- function(ParamIn, Direction) {
## number of model parameters ## number of model parameters
NParam <- 1L NParam <- 1L
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
\alias{TransfoParam_GR5H} \alias{TransfoParam_GR5H}
\alias{TransfoParam_CemaNeige} \alias{TransfoParam_CemaNeige}
\alias{TransfoParam_CemaNeigeHyst} \alias{TransfoParam_CemaNeigeHyst}
\alias{TransfoParam_LAG} \alias{TransfoParam_Lag}
\title{Transformation of the parameters using the provided function} \title{Transformation of the parameters using the provided function}
......
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