CreateIniStates.Rd 3.81 KB
 1 2 3 4 5 6 7 \encoding{UTF-8} \name{CreateIniStates} \alias{CreateIniStates}  unknown committed Jun 23, 2017 8 \title{Creation of the IniStates object possibly required by the CreateRunOptions functions}  9 10 11 12 13 14 15 16 17 18 19 20 21 22  \usage{ CreateIniStates(FUN_MOD, InputsModel, ProdStore = 0.3, RoutStore = 0.5, ExpStore = NULL, UH1 = NULL, UH2 = NULL, GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL, verbose = TRUE) } \arguments{ \item{FUN_MOD}{[function] hydrological model function (e.g. RunModel_GR4J, RunModel_CemaNeigeGR4J)}  unknown committed Jun 23, 2017 23 \item{InputsModel}{[object of class \code{InputsModel}] see \code{\link{CreateInputsModel}} for details}  24   unknown committed Jun 23, 2017 25 \item{ProdStore}{[numeric] production store level [mm]}  26   unknown committed Jun 23, 2017 27 \item{RoutStore}{[numeric] routing store level [mm]}  28   unknown committed Jun 23, 2017 29 \item{ExpStore}{(optional) [numeric] series of exponential store level (negative) [mm] for the GR6J model}  30   unknown committed Jun 23, 2017 31 \item{UH1}{(optional) [numeric] unit hydrograph 1 levels [mm]}  32   unknown committed Jun 23, 2017 33 \item{UH2}{(optional) [numeric] unit hydrograph 2 levels [mm]}  34   unknown committed Jun 23, 2017 35 \item{GCemaNeigeLayers}{(optional) [numeric] snow pack [mm], possibly used to create the CemaNeige model initial state}  36   unknown committed Jun 23, 2017 37 \item{eTGCemaNeigeLayers}{(optional) [numeric] snow pack thermal state [°C], possibly used to create the CemaNeige model initial state}  38 39 40 41 42 43 44  \item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, \code{default = TRUE}} } \value{  unknown committed Jun 23, 2017 45 46 47 48 49 [list] object of class \code{IniStates} containing the initial model internal states; it includes the following: \tabular{ll}{ \emph{$Store } \tab [numeric] list of store levels (always \emph{$Prod}, \emph{$Rout} and \emph{$Exp}) \cr \emph{$UH } \tab [numeric] list of unit hydrographs levels (always \emph{$UH1} and \emph{$UH2} \cr \emph{$CemaNeigeLayers} \tab [numeric] list of CemaNeige variables (always \emph{$G} and \emph{$eTG})  50 51 52 53 54  } } \description{  unknown committed Jun 23, 2017 55 Creation of the IniStates object possibly required by the CreateRunOptions functions  56 57 58 } \details{  unknown committed Jun 23, 2017 59 60 61 62 63 64 20 floats are required for UH1 and 40 floats are required for UH2 (repectivly 20*24 and 40*24 for the daily model GR4H). \cr NLayers floats are required for GCemaNeigeLayers and eTGCemaNeigeLayers. \cr The structure of the object of class \code{IniStates} returned is always the exactly same for all models(except for the unit hydrographs more longer with GR4H), even some states don't exist (e.g. \emph{$UH$UH1} for GR2M). \cr If CemaNeige is not used , \emph{$CemaNeigeLayers$G} and \emph{$CemaNeigeLayers$eTG} are set to \code{NA}. \cr Nota: the \code{StateEnd} objects from the outputs of \code{RunModel*} functions already respect the format given by the \code{CreateIniStates} function.  65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 } \examples{ library(airGR) ## loading catchment data data(L0123001) ## preparation of the InputsModel object InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR4J, DatesR = BasinObs$DatesR, Precip = BasinObs$P, PotEvap = BasinObs$E) ## run period selection Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="01/01/1990 00:00"), which(format(BasinObs\$DatesR, format = "\%d/\%m/\%Y \%H:\%M")=="31/12/1999 00:00")) ## preparation of the IniStates object IniStates <- CreateIniStates(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel, ProdStore = 0.1, RoutStore = 0.6, ExpStore = NULL, UH1 = c(0.52, 0.54, 0.15, rep(0, 17)), UH2 = c(0.057, 0.042, 0.015, 0.005, rep(0, 36)), GCemaNeigeLayers = NULL, eTGCemaNeigeLayers = NULL) str(IniStates) ## preparation of the RunOptions object RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR4J, InputsModel = InputsModel, IndPeriod_Run = Ind_Run, IniStates = IniStates) } \author{ Olivier Delaigue } \seealso{ \code{\link{CreateRunOptions}} }