CreateIniStates.Rd 2.45 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
\encoding{UTF-8}


\name{CreateIniStates}
\alias{CreateIniStates}


\title{Creation of the IniStates object possible required to the CreateRunOptions functions}


\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)}

\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}

\item{ProdStore}{[numeric]}

\item{RoutStore}{[numeric]}

\item{ExpStore}{[numeric]}

\item{UH1}{[numeric]}

\item{UH2}{[numeric]}

\item{GCemaNeigeLayers}{[numeric]}

\item{eTGCemaNeigeLayers}{[numeric]}

\item{verbose}{(optional) [boolean] boolean indicating if the function is run in verbose mode or not, \code{default = TRUE}}

}


\value{
[list] object of class \emph{IniStates} containing the initial model internal states; it includes the following:
         \itemize{
         \item{Store          }{}
         \item{UH             }{}
         \item{CemaNeigeLayers}{}
         }
}


\description{
Creation of the IniStates object required to XXXX
}

\details{
XXXX
}


\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}}
}