DOI-USGS / hyRefactor

https://code.usgs.gov/wma/nhgf/reference-fabric/hyrefactor
Creative Commons Zero v1.0 Universal
5 stars 0 forks source link

hyRefactor domain review #55

Closed mewieczo closed 2 months ago

mewieczo commented 3 months ago

Thank you for allowing me to review your hyRefactor tools for manipulating the NHDPlus network in preparation for hydrologic modeling. I tested your package on a set of USGS gauges used in Water Watch, as described in the following synopsis: The hyRefactor package was successfully installed into an R workspace with the following implementation: install.packages("remotes") remotes::install_git("https://code.usgs.gov/Water/hyRefactor")

The package was used on a digital hydrologic network (NHDPlus version 2) to split flowlines and catchments at over 9,000 points of interest, USGS stream gages (refer to figure 1). Using the network's topology and published gauge locations, the flowline network (NHDPlus version 2) and catchments the package effectively split (see figure 2) these features as expected. Additionally, the package successfully combined all NHDPlus version 2 upstream flowline catchments into one watershed delineation for each point of interest. This was achieved by using a minimum area threshold of 1 in the options for the aggregate_catchments function (see figure 3) Picture1

Figure 1. USGS stream gages (black diamonds) along the NHDPlus flowline network (in blue) with flowline catchments (in brown) also drawn.

Picture2

Figure 2. Output from using the hyRefactor package ( red lines) to split the flowlines and catchments at gage locations.

Picture3

Figure 3. Output from the aggregation functions in hyRefactor to delineate one upstream watershed (brown lines) from each USGS stream gage.

The hyRefactor package produced the expected results. Basin area outputs from hyRefactor were compared to National Water Information System (NWIS) published gage basin areas. Only 6% of the 9,059 gages delineated did not match NWIS published basin areas. Upon further inspection, it was found that the 6% discrepancy was not due to the hyRefactor package, but rather resulted from incorrect hydro-locations on the NHDPlus version 2 network and/or the baseline hydrography network used.

dblodgett-usgs commented 2 months ago

Thank you Mike! A release is cut here and I've moved it along in IPDS. https://code.usgs.gov/wma/nhgf/reference-fabric/hyrefactor/-/releases/v0.4.11