RunModel_CemaNeige.Rd 6.1 KB
Newer Older
Delaigue Olivier's avatar
Delaigue Olivier committed
1
\encoding{UTF-8}
2
3


Delaigue Olivier's avatar
Delaigue Olivier committed
4
5
\name{RunModel_CemaNeige}
\alias{RunModel_CemaNeige}
6
7


Delaigue Olivier's avatar
Delaigue Olivier committed
8
\title{Run with the CemaNeige snow module}
9
10


Delaigue Olivier's avatar
Delaigue Olivier committed
11
\usage{
12
RunModel_CemaNeige(InputsModel, RunOptions, Param)
Delaigue Olivier's avatar
Delaigue Olivier committed
13
}
14
15


Delaigue Olivier's avatar
Delaigue Olivier committed
16
17
18
19
20
\arguments{
\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details}

\item{RunOptions}{[object of class \emph{RunOptions}] see \code{\link{CreateRunOptions}} for details}

21
\item{Param}{[numeric] vector of 2 (or 4 parameters if \code{IsHyst = TRUE})
Delaigue Olivier's avatar
Delaigue Olivier committed
22
\tabular{ll}{                                                                      
23
24
25
26
CemaNeige X1 \tab weighting coefficient for snow pack thermal state [-]                   \cr
CemaNeige X2 \tab degree-day melt coefficient [mm/°C/d]                                   \cr
CemaNeige X3 \tab (optional) accumulation threshold [mm] (needed if \code{IsHyst = TRUE}) \cr
CemaNeige X4 \tab (optional) percentage (between 0 and 1) of annual snowfall defining the melt threshold [-] (needed if \code{IsHyst = TRUE}) \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
27
28
}}
}
29
30


Delaigue Olivier's avatar
Delaigue Olivier committed
31
\value{
Delaigue Olivier's avatar
Delaigue Olivier committed
32
[list] list containing the function outputs organised as follows:                                         
33
34
         \tabular{ll}{
         \emph{$DatesR}                                    \tab [POSIXlt] series of dates                                    \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
35
36
37
38
         \emph{$CemaNeigeLayers}                           \tab [list] list of CemaNeige outputs (1 list per layer)          \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Pliq         }   \tab [numeric] series of liquid precip. [mm/d]                    \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Psol         }   \tab [numeric] series of solid precip. [mm/d]                     \cr
         \emph{$CemaNeigeLayers[[iLayer]]$SnowPack     }   \tab [numeric] series of snow pack [mm]                           \cr
39
         \emph{$CemaNeigeLayers[[iLayer]]$ThermalState }   \tab [numeric] series of snow pack thermal state [°C]             \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
40
         \emph{$CemaNeigeLayers[[iLayer]]$Gratio       }   \tab [numeric] series of Gratio [0-1]                             \cr
41
42
43
44
45
46
         \emph{$CemaNeigeLayers[[iLayer]]$PotMelt      }   \tab [numeric] series of potential snow melt [mm/d]               \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Melt         }   \tab [numeric] series of actual snow melt [mm/d]                  \cr
         \emph{$CemaNeigeLayers[[iLayer]]$PliqAndMelt  }   \tab [numeric] series of liquid precip. + actual snow melt [mm/d] \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Temp         }   \tab [numeric] series of air temperature [°C]                     \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Gthreshold   }   \tab [numeric] series of melt threshold [mm]                      \cr
         \emph{$CemaNeigeLayers[[iLayer]]$Glocalmax    }   \tab [numeric] series of local melt threshold for hysteresis [mm] \cr
47
         \emph{$StateEnd}                                  \tab [numeric] states at the end of the run: CemaNeige states [mm & °C], \cr\tab see \code{\link{CreateIniStates}} for more details \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
48
         }                                                                                                     
Delaigue Olivier's avatar
Delaigue Olivier committed
49
50
         (refer to the provided references or to the package source code for further details on these model outputs)
}
51
52


Delaigue Olivier's avatar
Delaigue Olivier committed
53
54
55
\description{
Function which performs a single run for the CemaNeige daily snow module.
}
56
57


Delaigue Olivier's avatar
Delaigue Olivier committed
58
\details{
59
The choice of the CemaNeige version is explained in \code{\link{CreateRunOptions}}. \cr
60
For further details on the model, see the references section. \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
61
62
For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}.
}
63
64


Delaigue Olivier's avatar
Delaigue Olivier committed
65
\examples{
unknown's avatar
unknown committed
66
67
library(airGR)

Delaigue Olivier's avatar
Delaigue Olivier committed
68
69
70
71
## load of catchment data
data(L0123002)

## preparation of the InputsModel object
unknown's avatar
unknown committed
72
73
74
75
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeige, DatesR = BasinObs$DatesR,
                                 Precip = BasinObs$P,TempMean = BasinObs$T,
                                 ZInputs = BasinInfo$HypsoData[51], HypsoData=BasinInfo$HypsoData,
                                 NLayers = 5)
Delaigue Olivier's avatar
Delaigue Olivier committed
76
77

## run period selection
78
79
Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="01/01/1990"),
               which(format(BasinObs$DatesR, format = "\%d/\%m/\%Y")=="31/12/1999"))
Delaigue Olivier's avatar
Delaigue Olivier committed
80
81

## preparation of the RunOptions object
unknown's avatar
unknown committed
82
83
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel,
                               IndPeriod_Run = Ind_Run)
Delaigue Olivier's avatar
Delaigue Olivier committed
84

85
## simulation with original CemaNeige version
unknown's avatar
unknown committed
86
Param <- c(0.962, 2.249)
87
88
OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel,
                                   RunOptions = RunOptions, Param = Param)
Delaigue Olivier's avatar
Delaigue Olivier committed
89
90

## results preview
91
plot(OutputsModel)
Delaigue Olivier's avatar
Delaigue Olivier committed
92

93
94

## simulation with the Linear Hysteresis
95
96
97
## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel,
                               IndPeriod_Run = Ind_Run, IsHyst = TRUE)
98
99
Param <- c(0.962, 2.249, 100, 0.4)
OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel,
100
                                   RunOptions = RunOptions, Param = Param)
101
102
103

## results preview
plot(OutputsModel)
Delaigue Olivier's avatar
Delaigue Olivier committed
104
}
105
106


Delaigue Olivier's avatar
Delaigue Olivier committed
107
\author{
108
Laurent Coron, Olivier Delaigue
Delaigue Olivier's avatar
Delaigue Olivier committed
109
}
110
111


Delaigue Olivier's avatar
Delaigue Olivier committed
112
\references{
113
114
115
Riboust, P., G. Thirel, N. Le Moine and P. Ribstein (2019), 
      Revisiting a simple degree-day model for integrating satellite data: implementation of SWE-SCA hystereses.
      Journal of Hydrology and Hydromechanics, doi:10.2478/johh-2018-0004, 67, 1, 70–81. \cr
Delaigue Olivier's avatar
Delaigue Olivier committed
116
117
Valéry, A., V. Andréassian and C. Perrin (2014), 
      "As simple as possible but not simpler": what is useful in a temperature-based snow-accounting routine? 
Delaigue Olivier's avatar
Delaigue Olivier committed
118
      Part 1 - Comparison of six snow accounting routines on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.059. \cr
119
Valéry, A., V. Andréassian and C. Perrin (2014), 
Delaigue Olivier's avatar
Delaigue Olivier committed
120
      "As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine? 
Delaigue Olivier's avatar
Delaigue Olivier committed
121
122
      Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.058.
}
123
124


Delaigue Olivier's avatar
Delaigue Olivier committed
125
\seealso{
126
\code{\link{RunModel_CemaNeigeGR4J}}, \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}, \code{\link{CreateIniStates}}, \code{\link{CreateCalibOptions}}.
Delaigue Olivier's avatar
Delaigue Olivier committed
127
128
}