LakeDataOutlets: Identify LakeData Outlet SUBIDs

View source: R/function_LakeDataOutlets.R

LakeDataOutletsR Documentation

Identify LakeData Outlet SUBIDs

Description

Identifies the SUBID(s) corresponding to the outlet of each lake in a LakeData data frame.

Usage

LakeDataOutlets(ld, gd)

Arguments

ld

A data frame containing LakeData information (i.e. an imported 'LakeData.txt' file). Must contain the columns LAKEID and SUBID.

gd

A data frame containing GeoData information used to determine the upstream connectivity between SUBIDs (i.e. an imported 'GeoData.txt' file).

Details

A SUBID is identified as a lake outlet when all SUBIDs belonging to the same lake occur in the upstream area of that SUBID. The function uses AllUpstreamSubids() to determine the upstream SUBIDs.

Value

An integer vector containing the SUBIDs identified as lake outlets. One or more SUBIDs may be returned for a lake if the lake contains multiple downstream outlets.

See Also

AllUpstreamSubids()

Examples

ld <- ReadLakeData(
  filename = system.file("demo_model", "LakeData.txt", package = "HYPEtools")
)
gd <- ReadGeoData(
  filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools")
)

LakeDataOutlets(ld, gd)


HYPEtools documentation built on Sept. 3, 2026, 1:06 a.m.