sry.wateres: Calculation of storage, reliability and yield

View source: R/wateres.R

sryR Documentation

Calculation of storage, reliability and yield

Description

Calculates one of the water reservoir characteristics: storage, time-based reliability or yield (release) while the two remaining values are provided.

Usage

sry(reser, storage, reliability, yield, prob_type, upper_limit,
  throw_exceed, get_series)

## S3 method for class 'wateres'
sry(reser, storage, reliability, yield, prob_type = 7,
  upper_limit = 5, throw_exceed = FALSE, get_series = FALSE)

Arguments

reser

A wateres object.

storage

A water reservoir storage value in m3. (If missing together with reliability or yield, the default value equal to the potential volume of reser will be used. If only storage is missing, it will be optimized using reliability and yield.)

reliability

A reliability value, cannot be less than zero or greater than maximum reliability value (depending on data and probability type). Alternatively, “max” value can be used to set reliability to its maximum value. (If missing, reliability will be calculated using storage and yield.)

yield

A required yield in m3.s-1, constant for all months. (If missing, it will be optimized using storage and reliability.)

prob_type

Type of empirical probability used for calculation of reliability given as a number corresponding with the type argument of the quantile function or “chegodayev” representing the (m - 0.3) / (n + 0.4) formula. For the numeric argument, currently only types 4 [m / n] and 7 [(m - 1) / (n - 1)] are supported.

Therefore, maximum reliability value can be less than 1 for certain types.

upper_limit

An upper limit for optimization of storage or yield given as multiple of potential volume of the reservoir (for storage) or as multiple of mean monthly flow (for yield).

throw_exceed

Whether volume exceeding storage will be thrown or added to yield. This will affect calculated yield series, however resulting storage, reliability or yield value is not likely to be influenced.

get_series

Whether time series of reservoir balance variables will be returned.

Details

If all the three values are provided, the reliability value will be ignored and it will be calculated for the provided storage and yield.

To optimize the value of storage or yield, a simple bisection algorithm is applied. If the optimization fails because the required reliability is not contained within the provided interval, try to change its upper limit given as the upper_limit argument.

As the required reliability represents a range of storage or yield values, the smallest value of storage (or the greatest value of yield) is returned, considering some tolerance value of the optimization algorithm.

When optimizing the storage or yield value, a value which produces reliability closest to the required reliability is selected, hence the resulting reliability can be less or greater than the required one.

If the calculated reliability is even for the zero storage value greater than the required reliability, the zero storage and the corresponding reliability will be returned. Contrary to this, if the calculated reliability is for the optimized yield greater, the optimization fails as the reliability can be decreased by increasing the upper limit.

Value

A list consisting of:

storage

storage value, optimized, equal to the storage argument or default (potential volume of reser)

reliability

reliability value calculated for the given or optimized values of yield and storage

yield

yield value, optimized or equal to the yield argument

series

only if get_series is enabled, time series of water balance variables as returned by the calc_series.wateres function

See Also

calc_series.wateres used for calculation of time series of water balance variables

Examples

reser = data.frame(
    Q = c(0.078, 0.065, 0.168, 0.711, 0.154, 0.107, 0.068, 0.057, 0.07, 0.485, 0.252, 0.236,
          0.498, 0.248, 0.547, 0.197, 0.283, 0.191, 0.104, 0.067, 0.046, 0.161, 0.16, 0.094),
    DTM = seq(as.Date("2000-01-01"), by = "months", length.out = 24))
reser = as.wateres(reser, storage = 14.4e6, area = 754e3)
sry(reser, reliab = 0.9, yield = 0.14)
sry(reser, storage = 41e3, yield = 0.14)
sry(reser, yield = 0.14)
sry(reser, storage = 41e3, reliab = 0.5)

tgmwri/wateres documentation built on Feb. 13, 2024, 10:25 p.m.