NOAA-OWP / inundation-mapping

Flood inundation mapping and evaluation software configured to work with U.S. National Water Model.
Other
95 stars 30 forks source link

[13pt] Stream routing errors due to pit filling #916

Open mluck opened 1 year ago

mluck commented 1 year ago

There seem to be stream routing errors in the DEM due to pit filling. The streams are burned into the DEM but in the following pit-filling step the burned streams are filled in with the same elevation. The pit filling might be considering the entire stream network as a single pit which it fills with the elevation at the lowest spill point which is near the HUC outlet. The result of this is possibly the reason why some of the flow routing doesn't always follow monotonically increasing stream orders.

Current behavior

Investigating HUC 18030007 where the first order agricultural canal (white line) crosses the third order river (light blue) from https://github.com/NOAA-OWP/inundation-mapping/issues/860#issuecomment-1511747452, the burned DEM shows the burned channel between -896 and -894 meters deep, approximately 1000 meters below the surrounding terrain (brown is lower elevation and green is higher elevation). According to this, the flow should (correctly) stay in the third order stream channel.

image

However, after pit filling, all of the stream channel pixels have the exact same value (57.9 meters), and the DEM-derived reaches that start in the 3rd order stream follow the 1st order channel (black dotted line). The DEM elevation of the channels in this area are 114-116 meters, so the 57.9 meter value is coming from somewhere else.

image

The 57.9 meter elevation appears to be coming from the lowest point near the outlet, which makes sense if the stream network is being treated as a single large sink. The solid black line is the HUC boundary.

image

This may have been caused by the fix in PR #679 that clipped the streamlines to a buffer inside the WBD HUC boundary to prevent DEM edge effects from creating reverse flows and thalweg notches in the pit filling process. A possible solution might be to not clip the outlet streams.

mluck commented 1 year ago

A combination of changes in stream burning (differentially burning stream lines by stream order) and pit filling (altering the stream network so that outlet streams are not clipped) seems to resolve the stream routing errors. In the image below, the DEM-derived streams (black dotted lines) follow the level paths in new feature branch (dev-fix-stream-routing) in the right panel. In addition, the different channel depths generated by the AGREE process can be seen.

image
BradfordBates-NOAA commented 1 year ago

Moving to backlog as this was not a key focus of the current Sprint.

mluck commented 1 year ago

The "pit-filling" fix in #970 doesn't resolve the intersecting stream routing issue so that will be tracked in #971.

mluck commented 8 months ago

There are cases where the complete outlet flowline doesn't reach the edge of the DEM, so this issue is still occurring, for example, as noted in https://github.com/NOAA-OWP/hydrofabric/issues/38.

The NWM flowlines (blue) terminate before they reach the edge of the buffered DEM (shaded area).

image

I considered the possibility of clipping the DEM by the ocean mask (red) but the northern flowline doesn't even extend to the ocean mask or the WBD boundary (black).

image
mluck commented 7 months ago

Clipping the landsea (ocean) layer from the WBD and buffered WBD and derivatives, including the DEM, and extending the remaining NWM streams that don't reach the clipped and buffered WBD by snapping the end of the stream to the nearest clipped and buffered WBD boundary resulted in fixing the reverse flow issue (dev on left, dev-extend-outlets on right) such that the DEM-derived reaches (dashed red lines) flow correctly to their outlets (bold red lines indicate flow direction).

image