Learn R Programming

reservoir (version 1.1.5)

Rippl: Rippl analysis

Description

Computes the Rippl no-failure storage for given time series of inflows and releases using the sequent peak algorithm.

Usage

Rippl(Q, target, R, double_cycle = FALSE, plot = TRUE)

Arguments

Q
vector or time series object. Net inflow totals to the reservoir.
target
a target release constant in same volumteric units as Q. Can be omitted if R is given.
R
a time series or vector of target releases (volumetric). Must be the same length as Q.
double_cycle
logical. If TRUE the Q and R time series will be replicated and placed end-to-end to double the simulation. Recommended if the critical period occurs at the end of the sequence.
plot
logical. If TRUE (the default) the storage behavior diagram is plotted.

Value

Returns the no-fail storage capacity and corresponding storage behaviour time series.

Examples

Run this code
# define a release vector for a constant release equal to 90 % of the mean inflow
no_fail_storage <- Rippl(resX$Q_Mm3, target = 0.9 * mean(resX$Q_Mm3))$No_fail_storage

Run the code above in your browser using DataLab