prob_field.wateres: Calculation of probability fields

View source: R/plots.R

prob_fieldR Documentation

Calculation of probability fields

Description

Calculates monthly values of storage, yield and level (if possible) for given probabilities by using the quantile function with the default settings.

Usage

prob_field(reser, probs, yield, storage, throw_exceed)

## S3 method for class 'wateres'
prob_field(reser, probs, yield, storage = attr(reser,
  "storage"), throw_exceed = FALSE)

Arguments

reser

A wateres object.

probs

A vector of required probability values.

yield

A value of yield to be used for calculation of storages in the reservoir.

storage

A water reservoir storage value in m3, the default value is equal to the potential volume of reser.

throw_exceed

Whether volume exceeding storage will be thrown or added to yield (see also sry.wateres).

Details

An error occurs if time step of data in reser is not one month.

Value

A wateres_prob_field object which is a list consisting of:

quantiles

data.table containing storage, yield and level values for months and given probabilities. Level values are available only if the elevation-area-storage relationship for the reservoir has been provided (as an argument of as.wateres).

probs

given probability values in percent as characters

See Also

plot.wateres_prob_field for plotting the results

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)
prob_field = prob_field(reser, c(0.9, 0.95, 0.99), 0.14)

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