View source: R/CreateCalibOptions.R
CreateCalibOptions | R Documentation |
Creation of the CalibOptions object required by the Calibration*
functions.
CreateCalibOptions(FUN_MOD, FUN_CALIB = Calibration_Michel,
FUN_TRANSFO = NULL, IsHyst = FALSE, IsSD = FALSE,
FixedParam = NULL,
SearchRanges = NULL, StartParamList = NULL,
StartParamDistrib = NULL)
FUN_MOD |
[function] hydrological model function (e.g. | |||||||||||||||||||||||||||||||
FUN_CALIB |
(optional) [function] calibration algorithm function (e.g. Calibration_Michel), default = | |||||||||||||||||||||||||||||||
FUN_TRANSFO |
(optional) [function] model parameters transformation function, if the | |||||||||||||||||||||||||||||||
IsHyst |
[boolean] boolean indicating if the hysteresis version of CemaNeige is used. See details | |||||||||||||||||||||||||||||||
IsSD |
[boolean] boolean indicating if the semi-distributed lag model is used. See details | |||||||||||||||||||||||||||||||
FixedParam |
(optional) [numeric] vector giving the values set for the non-optimised parameter values (NParam columns, 1 line)
| |||||||||||||||||||||||||||||||
SearchRanges |
(optional) [numeric] matrix giving the ranges of real parameters (NParam columns, 2 lines)
| |||||||||||||||||||||||||||||||
StartParamList |
(optional) [numeric] matrix of parameter sets used for grid-screening calibration procedure (values in columns, sets in line)
| |||||||||||||||||||||||||||||||
StartParamDistrib |
(optional) [numeric] matrix of parameter values used for grid-screening calibration procedure (values in columns, percentiles in line)
|
Users wanting to use FUN_MOD
, FUN_CALIB
or FUN_TRANSFO
functions that are not included in
the package must create their own CalibOptions
object accordingly.
## — CemaNeige version
If IsHyst = FALSE
, the original CemaNeige version from Valéry et al. (2014) is used.
If IsHyst = TRUE
, the CemaNeige version from Riboust et al. (2019) is used. Compared to the original version, this version of CemaNeige needs two more parameters and it includes a representation of the hysteretic relationship between the Snow Cover Area (SCA) and the Snow Water Equivalent (SWE) in the catchment. The hysteresis included in airGR is the Modified Linear hysteresis (LH*); it is represented on panel b) of Fig. 3 in Riboust et al. (2019). Riboust et al. (2019) advise to use the LH* version of CemaNeige with parameters calibrated using an objective function combining 75 % of KGE calculated on discharge simulated from a rainfall-runoff model compared to observed discharge and 5 % of KGE calculated on SCA on 5 CemaNeige elevation bands compared to satellite (e.g. MODIS) SCA (see Eq. (18), Table 3 and Fig. 6). Riboust et al. (2019)'s tests were realized with GR4J as the chosen rainfall-runoff model.
If InputsModel
parameter has been created for using a semi-distributed (SD) model (See CreateInputsModel
), the parameter isSD
should be set to TRUE
.
[list] object of class CalibOptions containing the data required to evaluate the model outputs; it can include the following:
$FixedParam | [numeric] vector giving the values to allocate to non-optimised parameter values |
$SearchRanges | [numeric] matrix giving the ranges of raw parameters |
$StartParamList | [numeric] matrix of parameter sets used for grid-screening calibration procedure |
$StartParamDistrib | [numeric] matrix of parameter values used for grid-screening calibration procedure |
Laurent Coron, Olivier Delaigue, Guillaume Thirel, David Dorchies
Calibration
, RunModel
library(airGR)
## loading catchment data
data(L0123001)
## preparation of InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR,
Precip = BasinObs$P, PotEvap = BasinObs$E)
## calibration period selection
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "%Y-%m-%d")=="1990-01-01"),
which(format(BasinObs$DatesR, format = "%Y-%m-%d")=="1999-12-31"))
## preparation of RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J,
InputsModel = InputsModel, IndPeriod_Run = Ind_Run)
## calibration criterion: preparation of the InputsCrit object
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
## preparation of CalibOptions object
CalibOptions <- CreateCalibOptions(FUN_MOD = RunModel_GR4J, FUN_CALIB = Calibration_Michel)
## calibration
OutputsCalib <- Calibration(InputsModel = InputsModel, RunOptions = RunOptions,
InputsCrit = InputsCrit, CalibOptions = CalibOptions,
FUN_MOD = RunModel_GR4J,
FUN_CALIB = Calibration_Michel)
## simulation
Param <- OutputsCalib$ParamFinalR
OutputsModel <- RunModel(InputsModel = InputsModel, RunOptions = RunOptions,
Param = Param, FUN = RunModel_GR4J)
## 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)
## efficiency criterion: Kling-Gupta Efficiency
InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_KGE, InputsModel = InputsModel,
RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run])
OutputsCrit <- ErrorCrit_KGE(InputsCrit = InputsCrit, OutputsModel = OutputsModel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.