SortGeoData: 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)
Value
SortGeoData returns a GeoData dataframe.
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.