CreateInputsPert {airGRdatassim}R Documentation

Generation of ensemble model inputs for data assimilation

Description

Function which perturbs the model inputs to generate probabilistic meteorological forcings required to perform ensemble-based data assimilation.

Usage

CreateInputsPert(FUN_MOD, DatesR, Precip = NULL,
                 PotEvap = NULL, TempMean = NULL,
                 ZInputs = NULL, HypsoData = NULL, NLayers = 5,
                 NbMbr = 50, Seed = NULL)

## S3 method for class 'InputsPert'
x[i]

## S3 method for class 'InputsPert'
plot(x, which = "all", main = NULL,
     ColPrecip = "royalblue", ColPotEvap = "green3",
     ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...)

Arguments

FUN_MOD

[function] hydrological model function (e.g. RunModel_GR5J, RunModel_CemaNeigeGR5J)

DatesR

[POSIXct] vector of dates

Precip

(optional) [numeric] time series of total precipitation to perturb [mm/d]

PotEvap

(optional) [numeric] time series of potential evapotranspiration to perturb [mm/d]

TempMean

(optional) [numeric] time series of mean air temperature [°C] (not perturbed), required to create the CemaNeige module inputs

ZInputs

(optional) [numeric] real giving the mean elevation of the Precip and Temp series (before extrapolation) [m], possibly used to create the CemaNeige module inputs

HypsoData

(optional) [numeric] vector of 101 reals: min, q01 to q99 and max of catchment elevation distribution [m], if not defined a single elevation is used for CemaNeige

NLayers

(optional) [numeric] integer giving the number of elevation layers requested [-], required to create CemaNeige module inputs, default=5

NbMbr

(optional) [numeric] number of ensemble members (minimum of 20 recommanded for the EnKF scheme and of 30 for the PF scheme)

Seed

(optional) [numeric] seed of random number generator

x

[InputsPert] containing the vector of dates (POSIXt) and the time series of numeric values list perturbed

i

[integer] of the indices to subset a time series or [character] names of the elements to extract

which

(optional) [character] choice of plots (e.g. "Precip" or "PotEvap", default = "all")

main

(optional) [character] an overall title for the plot (see title)

ColPrecip, ColPotEvap

(optional) [character] color to be used for perturbed precipitation and perturbed potential evapotransipration (in any format that col2rgb accepts)

ask

(optional) [logical] if TRUE, the user is asked before each plot, see par(ask = .)

...

other parameters to be passed through to plotting functions

Details

The function generates an ensemble of precipitation or/and potential evapotranspiration time series, from data provided as function argument/s. The mean air temperature required to create CemaNeige inputs is not perturbed.

Probabilistic forcing/s is/are generated by stochastically perturbing the meteorological variable/s through a multiplicative stochastic noise, according to the methodology proposed by Clark et al. (2008).

The random perturbations are provided through a first-order autoregressive model relying on a fractional error parameter equal to 0.65 and a temporal decorrelation length of 1 day for rainfall and 2 days for potential evapotranspiration.

In order to ensure reproducible results, Seed can be set to fix the randomness in the generation of perturbations.

For further details, see the references section.

Nota: The function can be applied when using GR4J, GR5J and GR6J models (i.e. daily model time step), with or withouth the CemaNeige module.

On the graphical outputs:
- solid line: medians of the input values
- polygon: minima and maxima of the input values

Value

InputsPert[list] object of class InputsModel containing the ensembles of perturbed model inputs required to perform data assimilation:

$DatesR [POSIXlt] vector of dates
$Precip [numeric] matrix (dim(NbTime, NbMbr)) of ensemblist time series of perturbed total precipitation [mm/d] (with NbTime the length of the period; generated only if the precipitation time series is provided as a function argument)
$PotEvap [numeric] matrix (dim(NbTime, NbMbr)) of ensemblist time series of perturbed potential evapotranspiration [mm/d] (generated only if the time series of potential evapotranspiration is provided as a function argument)
$NbMbr [integer] atomic vector of number of ensemble members

Author(s)

Gaia Piazzi, Olivier Delaigue

References

- Clark, M. P., Rupp, D. E., Woods, R. A., Zheng, X., Ibbitt, R. P., Slater, A. G. et al. (2008). Hydrological data assimilation with the ensemble Kalman filter: Use of streamflow observations to update states in a distributed hydrological model. Advances in Water Resources, 31(10), 1309-1324, doi: 10.1016/j.advwatres.2008.06.005

- Piazzi, G., Thirel, G., Perrin, C. and Delaigue, O. (accepted). Sequential data assimilation for streamflow forecasting: assessing the sensitivity to uncertainties and updated variables of a conceptual hydrological model. Water Resources Research, doi: 10.1029/2020WR028390.

See Also

RunModel_DA

Examples

library(airGRdatassim)

## loading catchment data
data(L0123001, package = "airGR")

## preparation of the InputsModel object
InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5J, DatesR = BasinObs$DatesR,
                                 Precip = BasinObs$P, PotEvap = BasinObs$E)

## run period selection
IndRun <- seq(which(format(BasinObs$DatesR, format = "%Y-%m-%d")=="2006-01-01"),
              which(format(BasinObs$DatesR, format = "%Y-%m-%d")=="2006-01-31"))

## preparation of perturbed meteorological ensemble
InputsPert <- CreateInputsPert(FUN_MOD = RunModel_GR5J,
                               DatesR = BasinObs$DatesR,
                               Precip = BasinObs$P,
                               PotEvap = BasinObs$E,
                               NbMbr = 100L)
str(InputsPert)

## results preview
oldpar <- par(mfrow = c(2, 1))
plot(InputsPert)
par(oldpar)

## results preview on a subset on one perturbed variable
oldpar <- par(mfrow = c(1, 1))
plot(InputsPert[IndRun], which = "PotEvap")
par(oldpar)

[Package airGRdatassim version 0.1.3 Index]