Commit 5fe52d94 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.3.0.12 UPDATE: RunModel_CemaNeigeGR4H example uses U2345030 dataset

Showing with 7 additions and 29 deletions
+7 -29
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.3.0.11
Version: 1.3.0.12
Date: 2019-05-20
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,7 +14,7 @@ output:
### 1.3.0.11 Release Notes (2019-05-20)
### 1.3.0.12 Release Notes (2019-05-20)
#### New features
......
......@@ -88,19 +88,18 @@ For further details on the argument structures and initialisation options, see \
library(airGR)
## loading catchment data
data(L0123002)
BasinObs$DatesR <- seq(from = BasinObs$DatesR[1L],
length.out = length(BasinObs$DatesR),
by = "hour")
data(U2345030)
## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeigeGR4H, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E, TempMean = BasinObs$T,
ZInputs = median(BasinInfo$HypsoData),
ZInputs = BasinInfo$ZInputs,
HypsoData = BasinInfo$HypsoData, NLayers = 5)
## run period selection
Ind_Run <- 2193:5844
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H:\%M")=="2004-03-01 00:00"),
which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d \%H:\%M")=="2008-12-31 23:00"))
## ---- original version of CemaNeige
......@@ -118,27 +117,6 @@ OutputsModel <- RunModel_CemaNeigeGR4H(InputsModel = InputsModel,
## results preview
#plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
## ---- version of CemaNeige with the Linear Hysteresis
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeigeGR4H, InputsModel = InputsModel,
IndPeriod_Run = Ind_Run, IsHyst = TRUE)
## simulation
Param <- c(X1 = 408.774, X2 = 2.646, X3 = 131.264, X4 = 1.174,
CNX1 = 0.962, CNX2 = 2.249, CNX3 = 100, CNX4 = 0.4)
OutputsModel <- RunModel_CemaNeigeGR4H(InputsModel = InputsModel,
RunOptions = RunOptions, Param = Param)
## results preview
#plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run])
## efficiency criterion: Nash-Sutcliffe Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
......
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