TransfoParam: Transformation of the parameters using the provided function

Description Usage Arguments Details Value Author(s) Examples

View source: R/TransfoParam.R

Description

Function which transforms model parameters using the provided function (from raw to transformed parameters and vice versa).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Generic function
TransfoParam(ParamIn, Direction, FUN_TRANSFO)

## Specific functions
TransfoParam_GR1A(ParamIn, Direction)
TransfoParam_GR2M(ParamIn, Direction)
TransfoParam_GR4J(ParamIn, Direction)
TransfoParam_GR5J(ParamIn, Direction)
TransfoParam_GR6J(ParamIn, Direction)
TransfoParam_GR4H(ParamIn, Direction)
TransfoParam_GR5H(ParamIn, Direction)
TransfoParam_CemaNeige(ParamIn, Direction)
TransfoParam_CemaNeigeHyst(ParamIn, Direction)

Arguments

ParamIn

[numeric] vector or matrix of parameter sets (sets in line, parameter values in column)

Direction

[character] direction of the transformation: use "RT" for Raw -> Transformed and "TR" for Transformed -> Raw

FUN_TRANSFO

[function] model parameters transformation function (e.g. TransfoParam_GR4J, TransfoParam_CemaNeige)

Details

The transformation functions proposed in airGR for calibrating the GR models result from numerous testings at INRAE-Antony (HYCAR Research Unit, France). The proposed transformations were obtained with the Calibration_Michel algorithm and may differ for the same parameter of different models (e.g. X5 in GR5J and GR6J).

Value

ParamOut [numeric] matrix of parameter sets (sets in line, parameter values in column)

Author(s)

Laurent Coron, Olivier Delaigue

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(airGR)

## --- generic function

## transformation Raw -> Transformed for the GR4J model
Xraw  <- matrix(c(+221.41, -3.63,  +30.00, +1.37,
                  +347.23, -1.03,  +60.34, +1.76,
                  +854.06, -0.10, +148.41, +2.34),
                  ncol = 4, byrow = TRUE)
Xtran <- TransfoParam(ParamIn = Xraw, Direction = "RT", FUN_TRANSFO = TransfoParam_GR4J)

## transformation Transformed -> Raw for the GR4J model
Xtran <- matrix(c(+3.60, -2.00, +3.40, -9.10,
                  +3.90, -0.90, +4.10, -8.70,
                  +4.50, -0.10, +5.00, -8.10),
                  ncol = 4, byrow = TRUE)
Xraw  <- TransfoParam(ParamIn = Xtran, Direction = "TR", FUN_TRANSFO = TransfoParam_GR4J)


## --- specific function

## transformation Raw -> Transformed for the GR4J model
Xraw  <- matrix(c(+221.41, -3.63,  +30.00, +1.37,
                  +347.23, -1.03,  +60.34, +1.76,
                  +854.06, -0.10, +148.41, +2.34),
                  ncol = 4, byrow = TRUE)
Xtran <- TransfoParam_GR4J(ParamIn = Xraw , Direction = "RT")

## transformation Transformed -> Raw for the GR4J model
Xtran <- matrix(c(+3.60, -2.00, +3.40, -9.10,
                  +3.90, -0.90, +4.10, -8.70,
                  +4.50, -0.10, +5.00, -8.10),
                  ncol = 4, byrow = TRUE)
Xraw  <- TransfoParam_GR4J(ParamIn = Xtran, Direction = "TR")

Example output



airGR documentation built on April 27, 2021, 9:07 a.m.