Learn R Programming

airGR (version 1.0.15.2)

RunModel_CemaNeige: Run with the CemaNeige snow module

Description

Function which performs a single run for the CemaNeige daily snow module.

Usage

RunModel_CemaNeige(InputsModel, RunOptions, Param)

Arguments

InputsModel

[object of class InputsModel] see CreateInputsModel for details

RunOptions

[object of class RunOptions] see CreateRunOptions for details

Param

[numeric] vector of 2 parameters

CemaNeige X1 weighting coefficient for snow pack thermal state [-]
CemaNeige X2 degree-day melt coefficient [mm/<U+00B0>C/d]

Value

[list] list containing the function outputs organised as follows:

$DatesR [POSIXlt] series of dates
$CemaNeigeLayers [list] list of CemaNeige outputs (1 list per layer)
$CemaNeigeLayers[[iLayer]]$Pliq [numeric] series of liquid precip. [mm/d]
$CemaNeigeLayers[[iLayer]]$Psol [numeric] series of solid precip. [mm/d]
$CemaNeigeLayers[[iLayer]]$SnowPack [numeric] series of snow pack [mm]
$CemaNeigeLayers[[iLayer]]$ThermalState [numeric] series of snow pack thermal state [<U+00B0>C]
$CemaNeigeLayers[[iLayer]]$Gratio [numeric] series of Gratio [0-1]
$CemaNeigeLayers[[iLayer]]$PotMelt [numeric] series of potential snow melt [mm/d]
$CemaNeigeLayers[[iLayer]]$Melt [numeric] series of actual snow melt [mm/d]
$CemaNeigeLayers[[iLayer]]$PliqAndMelt [numeric] series of liquid precip. + actual snow melt [mm/d]
$CemaNeigeLayers[[iLayer]]$Temp [numeric] series of air temperature [<U+00B0>C]
$StateEnd [numeric] states at the end of the run: CemaNeige states [mm & <U+00B0>C],
see CreateIniStates for more details

(refer to the provided references or to the package source code for further details on these model outputs)

Details

For further details on the model, see the references section. For further details on the argument structures and initialisation options, see CreateRunOptions.

References

Val<U+00E9>ry, A., V. Andr<U+00E9>assian and C. Perrin (2014), "As simple as possible but not simpler": what is useful in a temperature-based snow-accounting routine? Part 1 - Comparison of six snow accounting routines on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.059. Val<U+00E9>ry, A., V. Andr<U+00E9>assian and C. Perrin (2014), "As simple as possible but not simpler": What is useful in a temperature-based snow-accounting routine? Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.058.

See Also

RunModel_CemaNeigeGR4J, CreateInputsModel, CreateRunOptions, CreateIniStates.

Examples

Run this code
# NOT RUN {
library(airGR)

## load of catchment data
data(L0123002)

## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_CemaNeige, DatesR = BasinObs$DatesR,
                                 Precip = BasinObs$P,TempMean = BasinObs$T,
                                 ZInputs = BasinInfo$HypsoData[51], HypsoData=BasinInfo$HypsoData,
                                 NLayers = 5)

## run period selection
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"))

## preparation of the RunOptions object
RunOptions <- CreateRunOptions(FUN_MOD = RunModel_CemaNeige, InputsModel = InputsModel,
                               IndPeriod_Run = Ind_Run)

## simulation
Param <- c(0.962, 2.249)
OutputsModel <- RunModel_CemaNeige(InputsModel = InputsModel,
                                   RunOptions = RunOptions, Param = Param)

## results preview
plot(OutputsModel)

# }

Run the code above in your browser using DataLab