HypeSubidChecks: Check HYPE SUBID properties

HypeSubidChecksR Documentation

Check HYPE SUBID properties

Description

Quickly query vectors of HYPE sub-basin IDs (SUBID) for various properties.

Usage

IsHeadwater(subid, gd)

IsOutlet(subid, gd)

IsRegulated(subid, gd, dd = NULL, ld = NULL)

Arguments

subid

Numeric, vector of SUBIDs to be queried

gd

HypeGeoData or base data frame with columns SUBID and MAINDOWN, typically an imported GeoData.txt file.

dd

Data frame, typically an imported DamData.txt file. Defaults to NULL. dd or ld has to be provided in IsRegulated.

ld

Data frame, typically an imported LakeData.txt file. Defaults to NULL. dd or ld has to be provided in IsRegulated.

Details

These are convenience functions to query subbasin properties. Some functions can be inefficient if applied to many or all subbasins of a HYPE model setup and more efficient functions may exist in HYPEtools, see links in See also section below or browse the package index.

Value

The functions return a logical vector of the same length as subid, with NA values for all SUBIDs which do not exist in gd.

See Also

AllUpstreamSubids(); AllDownstreamSubids(); OutletSubids(); OutletIds()

Examples

te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
IsHeadwater(subid = 40556, gd = te)
IsHeadwater(subid = te$SUBID, gd = te)


rcapell/RHYPE documentation built on Feb. 28, 2024, 3:11 p.m.