set_property | R Documentation |
Sets a value or time series of values of a reservoir property, i.e. characteristics which affect water balance calculation.
set_property(reser, property_name, values)
## S3 method for class 'wateres'
set_property(reser, property_name, values)
reser |
A |
property_name |
One of “storage” (maximum storage), “storage_optim” (optimum storage), “storage_initial” (initial storage), “yield” (reservoir yield) or “yield_max” (maximum yield relevant if optimum, but not maximum storage is exceeded). |
values |
One constant value (mandatory for initial storage) or a vector of property values (in m3 for storages or m3.s-1 for yields), either monthly or daily of length of reservoir time series (or plus one in case of storages), or 12 monthly values starting by January (for monthly or daily data only). For storages, the values relate to the beginning of the particular month (e.g. the first of 12 values relates to the beginning of January, i.e. the end of December). |
The reservoir properties are implemented as attributes of the wateres
object.
If “storage” is given, it replaces the value provided as the storage
argument of the as.wateres
function. However, “yield” or “storage_initial”
given as a property is overriden by the yield
or initial_storage
argument of the calc_series
function.
A modified wateres
object with the property added as its attribute.
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)
reser = set_property(reser, "storage", 1e6 * c(10, 10, 10, 14, 14, 14, 12, 12, 12, 6, 6, 6))
resul = calc_series(reser, yield = 0.17)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.