From bd2c49c06a3f84b599276e9753dc62827d4c585e Mon Sep 17 00:00:00 2001
From: Dorchies David <david.dorchies@inrae.fr>
Date: Tue, 16 Mar 2021 11:40:01 +0100
Subject: [PATCH] doc(RunModel_Lag): Change `Lag` parameter to `Velocity`

- in `RunModel_lag` documentation
- in vignette V05

Fix #107
---
 man/RunModel_Lag.Rd        |  2 +-
 vignettes/V05_sd_model.Rmd | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/man/RunModel_Lag.Rd b/man/RunModel_Lag.Rd
index 2a3595a6..68c41a2b 100644
--- a/man/RunModel_Lag.Rd
+++ b/man/RunModel_Lag.Rd
@@ -25,7 +25,7 @@ RunModel_Lag(InputsModel, RunOptions, Param)
 
 \item{Param}{[numeric] vector of 1 parameter
   \tabular{ll}{
-    Lag \tab Mean flow velocity [m/s]
+    Velocity \tab Mean flow velocity [m/s]
   }}
 }
 
diff --git a/vignettes/V05_sd_model.Rmd b/vignettes/V05_sd_model.Rmd
index 383d8a93..cdd7ab79 100644
--- a/vignettes/V05_sd_model.Rmd
+++ b/vignettes/V05_sd_model.Rmd
@@ -56,7 +56,7 @@ For the observed flow at the downstream outlet, we generate it with the assumpti
 
 ```{r}
 QObsDown <- (BasinObs$Qmm + c(0, 0, BasinObs$Qmm[1:(length(BasinObs$Qmm)-2)])) / 2
-summary(cbind(QObsUp = BasinObs$Qmm, QObsDown))
+summary(cbind(QObsUp = BasinObs$Qmm, QObsDown), digits = 3)
 ```
 
 # Calibration of the upstream subcatchment
@@ -168,27 +168,27 @@ ParamDown2 <- OutputsCalibDown2$ParamFinalR
 
 # Discussion
 
-## Identification of Lag parameter
+## Identification of Velocity parameter
 
-The theoretical Lag parameter should be equal to:
+The theoretical Velocity parameter should be equal to:
 
 ```{r}
-Lag <- InputsModelDown1$LengthHydro / (2 * 86400)
-paste(format(Lag), "m/s")
+Velocity <- InputsModelDown1$LengthHydro / (2 * 86400)
+paste(format(Velocity), "m/s")
 ```
 
 Both calibrations overestimate this parameter:
 
 ```{r}
-mLag <- matrix(c(Lag,
+mVelocity <- matrix(c(Velocity,
                  OutputsCalibDown1$ParamFinalR[1],
                  OutputsCalibDown2$ParamFinalR[1]),
                ncol = 1,
                dimnames = list(c("theoretical",
                                  "calibrated with observed upstream flow",
                                  "calibrated with simulated  upstream flow"),
-                               c("Lag parameter")))
-knitr::kable(mLag)
+                               c("Velocity parameter")))
+knitr::kable(mVelocity)
 ```
 
 ## Value of the performance criteria with theoretical calibration
@@ -196,7 +196,7 @@ knitr::kable(mLag)
 Theoretically, the parameters of the downstream GR4J model should be the same as the upstream one and we know the lag time. So this set of parameter should give a better performance criteria:
 
 ```{r}
-ParamDownTheo <- c(Lag, OutputsCalibUp$ParamFinalR)
+ParamDownTheo <- c(Velocity, OutputsCalibUp$ParamFinalR)
 OutputsModelDownTheo <- RunModel(InputsModel = InputsModelDown2,
                                  RunOptions = RunOptionsDown,
                                  Param = ParamDownTheo,
@@ -219,7 +219,7 @@ comp <- cbind(comp, c(OutputsCalibUp$CritFinal,
                       CritDown1$CritValue,
                       OutputsCalibDown2$CritFinal,
                       CritDownTheo$CritValue))
-colnames(comp) <- c("Lag", paste0("X", 1:4), "NSE")
+colnames(comp) <- c("Velocity", paste0("X", 1:4), "NSE")
 rownames(comp) <- c("Calibration of the upstream subcatchment",
                     "Calibration 1 with observed upstream flow",
                     "Validation 1 with simulated upstream flow",
-- 
GitLab