View source: R/function_AllDownstreamSubids.R
AllDownstreamSubids | R Documentation |
Function to find all SUBIDs of downstream sub-catchments along the main stem for a single sub-catchment.
AllDownstreamSubids(subid, gd, bd = NULL, write.arcgis = FALSE)
subid |
Integer, SUBID of a target sub-catchment (must exist in |
gd |
Dataframe, an imported 'GeoData.txt' file. Mandatory argument. See 'Details'. |
bd |
Dataframe, an imported 'BranchData.txt' file. Optional argument. See 'Details'. |
write.arcgis |
Logical. If |
AllDownstreamSubids
finds all downstream SUBIDs of a given SUBID along the main stem (including itself but not
including potential irrigation links or groundwater flows) using GeoData columns 'SUBID' and 'MAINDOWN'. If a BranchData file
is provided, the function will also include information on downstream bifurcations.
AllDownstreamSubids
returns a vector of downstream SUBIDs to the outlet if no BranchData is provided, otherwise a data frame with
two columns downstream
with downstream SUBIDs and is.branch
with logical values indicating if a downstream SUBID contains a
bifurcation ('branch' in HYPE terms). Downstream SUBIDs are ordered from source to final outlet SUBID.
AllUpstreamSubids
, OutletSubids
, OutletIds
te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
AllDownstreamSubids(subid = 3344, gd = te)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.