View source: R/function_SumUpstreamArea.R
SumUpstreamArea | R Documentation |
Function to calculate upstream areas of a vector of SUBIDs or all SUBIDs in a GeoData table.
SumUpstreamArea(subid = NULL, gd, bd = NULL, cl = 2, progbar = FALSE)
subid |
Integer vector of SUBIDs to calculate upstream areas for (must exist in |
gd |
A data frame, containing 'SUBID', 'MAINDOWN', and 'AREA' columns, e.g. an imported 'GeoData.txt' file. |
bd |
A data frame, containing 'BRANCHID' and 'SOURCEID' columns, e.g. an imported 'BranchData.txt' file. Optional argument. |
cl |
Integer, number of processes to use for parallel computation. Set to |
progbar |
Logical, display a progress bar while calculating upstream areas. Adds overhead to calculation time but useful if you want HYPEtools to decide how long your coffee break should take. |
SumUpstreamArea
sums upstream areas of all connected upstream SUBIDs, including branch connections in case of stream bifurcations
but not including potential irrigation links or groundwater flows.
SumUpstreamArea
returns a data frame with two columns containing SUBIDs and total upstream areas (in area units as provided in gd
).
Upstream areas include areas of outlet SUBIDs.
AllUpstreamSubids
te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
SumUpstreamArea(subid = c(3361, 63794), gd = te, progbar = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.