calc_series | R Documentation |
Calculates time series of water balance variables for the reservoir. If provided in the reser
object, the precipitation, evaporation,
water use or transfer variables are applied.
calc_series(reser, storage, yield, throw_exceed, initial_storage,
initial_level, initial_pos, last_pos, get_level, till_def, first_def_pos,
storage_optim, yield_max, complex_properties, get_routing_output)
## S3 method for class 'wateres'
calc_series(reser, storage = attr(reser, "storage"),
yield = attr(reser, "yield"), throw_exceed = FALSE,
initial_storage = attr(reser, "storage_initial"), initial_level,
initial_pos = 1, last_pos = nrow(reser), get_level = FALSE,
till_def = FALSE, first_def_pos = initial_pos,
storage_optim = attr(reser, "storage_optim"), yield_max = attr(reser,
"yield_max"), complex_properties = TRUE, get_routing_output = FALSE)
reser |
A |
storage |
A maximum reservoir storage in m3, either a value of fixed maximum storage or a vector
of the length of the reservoir series plus one. If not given, taken from the |
yield |
A required yield in m3.s-1, either a value of fixed yield or a vector of the same length as the reservoir series. |
throw_exceed |
Whether volume exceeding storage will be thrown or added to yield. |
initial_storage |
A value of initial reservoir storage in m3. If not specified, the value is given by the “storage_initial” property, if that is not given, the reservoir is considered to be full. |
initial_level |
A value of initial water level in m.a.s.l. If specified and elevation-area-storage relationship is not provided within the
|
initial_pos |
An index of time series where the calculation starts. If greater than one, returned time series will be shorter than the input. |
last_pos |
An index of time series where the calculation stops. |
get_level |
Whether to obtain water level series for calculated storages. It is ignored if no elevation-area-storage relationship
is provided within the |
till_def |
If TRUE, the calculation will stop at time step when any deficit occurs provided that this time step is greater or equal to |
first_def_pos |
If the |
storage_optim |
An optimum reservoir storage in m3, i.e. the value which will be tried to be not exceeded if this is allowed by the value of |
yield_max |
A maximum value of yield (in m3.s-1) that can be obtained from storage below the maximum value (the |
complex_properties |
If FALSE, constant values of |
get_routing_output |
If TRUE, routing output will be provided as the |
When calculating water balance, a simple explicit method is applied. Finally, the initial time step of storage is omitted to get a time series of the same length as for other variables.
If one of storage_optim
or yield_max
is missing while the second is specified, both values are set to NULL and thus they are not considered in the calculation.
A wateres_series
object which is a data table with water balance variables: inflow (in m3.s-1), storage (in m3), yield, unrouted yield (in m3.s-1),
precipitation, evaporation, water use, deficits and transfer (in m3).
The deficits represent the missing volume which would satisfy the remaining sum of yield and withdrawal demands.
There is the water transfer only in case of non-zero values, resulting from calculations of a reservoir system. Positive values of transfer mean additional inflow whereas negative represent additional withdrawal.
Unrouted yield is available only if a routing has been set for the reservoir (by the set_routing
function).
Additionally, water levels are included if the get_level
argument is TRUE.
If the get_routing_output
argument is TRUE, routing information is returned as the routing
attribute. Data depends on the used routing method (set in the set_routing
function):
for linear_reservoir
, time series of storage (in m3) in the transforming resevoir is obtained.
plot.wateres_series
for plotting the time series
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)
resul = calc_series(reser, 14.4e6, 0.14)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.