-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Refactor NHDPlus HR preprocessing workflow #371
Conversation
… routed as outflow in hydroconditioning
I was able to check out the feature branch (dev-local-headwaters) and successfully run HUC 03150107 and verified that the catchments appear as indicated. I also inspected IOWI4 and agree that this feature branch, although a reduction in CSI, produces more consistent and realistic results by changing how the catchments are made. Additionally, when viewing the aggregate CSI of all AHPS sites (NWS & USGS) they are only vary by up to 0.3% between 3.0.15.3 vs this feature branch. |
@@ -45,8 +45,6 @@ def agreedem(rivers_raster, dem, output_raster, workspace, grass_workspace, buff | |||
# Import dem layer and river layer and get dem profile. | |||
elev = rasterio.open(dem) | |||
dem_profile = elev.profile | |||
if elev.nodata == 0.0: | |||
dem_profile.update(nodata = -999) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brian, Can you please elaborate why this change was added? Was this an oversight from earlier that is also fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in PR #358 make this code redundant.
@BrianAvant-NOAA , please make sure this FB is up to date with dev prior to merging. |
Refactor NHDPlus HR preprocessing workflow. Resolves issue #238
Changes
NHD streams, NWM catchments, and headwaters input layers are consolidated for MS and FR. HUC8 intersections are now included in the input headwaters layer and there are attributes that define the type of each point. Both streams and headwater points have a
mainstem
attribute.clip_vectors_to_wbd.py
checks stream segments that intersect with the WBD boundary and removes incoming streams from the selected layers. This is to prevent them from being routed out of the HUC during the flow direction calculation.Some gaps/overlap in coverage exist at the confluences of HUC8s. This is not likely to be fixed. FIM4 may provide a solution to this issue if we process FIM on a reach scale instead of HUC8s.
Screenshots
FIM v3.0.15.5 MS HUC 03150107

FIM v3.0.15.8 MS HUC 03150107

Fixes MS deviation

Testing
Marginal improvements are observed at

BLE
andNWS
sites whereas a slight regression is observed across all thresholds of theUSGS
sites.Looking at metrics of individual

USGS
sites, it seems the regression in aggregate CSI score may be caused by two specific sites. These sites show a reduction in related to the adjustment in catchment size of the incoming stream segments.For example, NWS LID IOWI4 in HUC 07080209 shows a ~0.2 drop in CSI across all thresholds:
Further inspections reveals that the changes in the new version result in more complete mapping of the upstream boundary.

So even thought there is a regression in
USGS
CSI scores, the subsetting method produces a better output from a hydrologic and visual perspective.