as.catchment | R Documentation |
Creates an object of system of provided wateres reservoirs organized in a catchment.
as.catchment(id, down_id, data, area, res_data, branches, main_branch,
res_wateruse = NULL, res_properties = NULL)
id |
A catchment ID. |
down_id |
An ID of catchment located downwards. |
data |
A data frame containing time series for the catchment: dates as |
area |
Whole catchment area in km2. |
res_data |
A data frame containing columns describing catchment reservoirs: If the catchment contains no reservoir, this is NULL. |
branches |
A list of individual branches with reservoirs; list names correspond to reservoir IDs.
Each branch is represented by a list consisting of an ID of the downstream branch ( If missing or NULL, the catchment is supposed to contain only one branch whose name is given as
the |
main_branch |
An ID of the main branch, i.e. inflow from upstream catchments goes to this branch. |
res_wateruse |
A list of time series of water use in m3 for individual reservoirs. The list names
corresponds to reservoir IDs (for catchment outlet, use |
res_properties |
A list whose keys are property names (as used in |
Water use can be given directly as time series for reservoirs in m3 (as the res_wateruse
argument) or
for the whole catchment in mm (within the data
argument). If the direct series are given, the water use in
data
is ignored. Water use for the whole catchment is divided to individual reservoirs (or to the outlet).
By default, the division is done proportionally to the area of intercatchment belonging to the reservoir or outlet.
However, the default divison can be overriden by setting the part_wateruse
column of the res_data
argument. Sum of the parts has to be lesser than 1, the rest to 1 represents the part for the outlet.
An error occurs if there is a branch (downstream or in res_data
) which has not been provided
in the branches
list or if branch connecting point does not comply with catchment parts (if sum of part
of the connecting branch and part of the corresponding reservoir at the downstream branch is greater than
part for the connecting point).
A catchment
object which is also of list class.
data_catch = data.frame(DTM = seq(as.Date("1982-11-01"), length.out = 7, by = "day"), PET = rep(0.5, 7), R = rep(24 * 3.6, 7), P = rep(1, 7))
res_data = data.frame(
storage = c(1e7, 1e7, 1e7), area = c(1e4, 1e4, 1e4), part = c(0.25, 0.25, 0.5), branch_id = c("main", "lateral", "lateral"), id = c("M1", "L1", "L2"))
branches = list(main = list(down_id = NA), lateral = list(down_id = "main", connect_to_part = 0.8))
catch = as.catchment(id = "C1", down_id = "C2", data = data_catch, area = 100, res_data = res_data, branches = branches, main_branch = "main")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.