Learn R Programming

HYPEtools (version 1.6.8)

LakeDataOutlets: 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)

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.

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.

See Also

AllUpstreamSubids()

Examples

Run this code
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)

Run the code above in your browser using DataLab