View source: R/function_UpstreamSLCClasses.R
UpstreamSLCClasses | R Documentation |
Function to calculate SLC class fractions over all upstream areas of a vector of SUBIDs or all SUBIDs in a GeoData table.
UpstreamSLCClasses(
subid = NULL,
gd,
bd = NULL,
signif.digits = 3,
progbar = TRUE
)
subid |
Integer vector of SUBIDs to calculate upstream SUBID fractions for (must exist in |
gd |
A data frame containing columns 'SUBID' with SUBIDs, 'MAINDOWN' with downstream SUBIDs, and 'AREA' with sub-basin areas, e.g. an imported 'GeoData.txt' file. |
bd |
A data frame with bifurcation connections, e.g. an imported 'BranchData.txt' file. Optional argument. |
signif.digits |
Integer, number of significant digits to round upstream SLCs to. See also |
progbar |
Logical, display a progress bar while calculating SLC class fractions. Adds overhead to calculation time but useful when |
UpstreamSLCClasses
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.
UpstreamSLCClasses
returns a data frame with columns containing SUBIDs, total upstream areas (in area unit as provided in gd
), and SLC
class fractions for upstream areas.
This function is now superseded by UpstreamGeoData
, which returns more upstream variables.
SumUpstreamArea
, UpstreamGeoData
, UpstreamGroupSLCClasses
# Import source data
te1 <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
# Upstream SLCs for single SUBID
UpstreamSLCClasses(subid = 3361, gd = te1, progbar = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.