SortGeoData {HYPEtools} | R Documentation |
Sort a GeoData dataframe in downstream order
Description
Function to sort an imported GeoData.txt file in downstream order, so that all upstream sub-basins are listed in rows above downstream sub-basins.
Usage
SortGeoData(gd, bd = NULL, progbar = TRUE)
Arguments
gd |
A data frame containing a column with SUBIDs and a column (MAINDOWN) containing the corresponding downstream SUBID, e.g. an imported 'GeoData.txt' file. |
bd |
A data frame with bifurcation connections, e.g. an imported 'BranchData.txt' file. Optional argument. |
progbar |
Logical, display a progress bar while calculating SUBID sorting. |
Details
GeoData.txt files need to be sorted in downstream order for HYPE to run without errors. SortGeoData
considers bifurcation connections, but not
irrigation or groundwater flow links.
Value
SortGeoData
returns a GeoData dataframe.
See Also
AllUpstreamSubids
OutletSubids
Examples
te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
SortGeoData(gd = te)
[Package HYPEtools version 1.6.2 Index]