Commit f4d12c16 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

refactor: set GR5H X1 transformation as it is done for GR4H

Refs #50
parent 0bf5bf7e
Pipeline #22522 passed with stages
in 8 minutes and 53 seconds
......@@ -23,7 +23,7 @@ TransfoParam_GR5H <- function(ParamIn, Direction) {
## transformation
if (Direction == "TR") {
ParamOut <- ParamIn
ParamOut[, 1] <- exp(1.5 * ParamIn[, 1]) ### GR5H X1 (production store capacity)
ParamOut[, 1] <- exp(ParamIn[, 1]) ### GR5H X1 (production store capacity)
ParamOut[, 2] <- sinh(ParamIn[, 2]) ### GR5H X2 (groundwater exchange coefficient)
ParamOut[, 3] <- exp(ParamIn[, 3]) ### GR5H X3 (routing store capacity)
ParamOut[, 4] <- 480 + (480 - 0.01) * (ParamIn[, 4] - 10) / 20 ### GR5H X4 (unit hydrograph time constant)
......@@ -31,7 +31,7 @@ TransfoParam_GR5H <- function(ParamIn, Direction) {
}
if (Direction == "RT") {
ParamOut <- ParamIn
ParamOut[, 1] <- log(ParamIn[, 1]) / 1.5 ### GR5H X1 (production store capacity)
ParamOut[, 1] <- log(ParamIn[, 1]) ### GR5H X1 (production store capacity)
ParamOut[, 2] <- asinh(ParamIn[, 2]) ### GR5H X2 (groundwater exchange coefficient)
ParamOut[, 3] <- log(ParamIn[, 3]) ### GR5H X3 (routing store capacity)
ParamOut[, 4] <- (ParamIn[, 4] - 480) * 20 / (480 - 0.01) + 10 ### GR5H X4 (unit hydrograph time constant)
......
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