passaH2O / pygeoflood

Compound flood mapping program based on high-resolution terrain analyses
https://passah2o.github.io/pygeoflood/
GNU General Public License v3.0
7 stars 0 forks source link

Calculate HAND with D-infinity flow directions #2

Open markwang0 opened 5 months ago

markwang0 commented 5 months ago

We are removing TauDEM as a dependency to simplify installation of pygeoflood. As of commit c6afbcf all of the TauDEM operations have been replaced with jblindsay/whitebox-tools, including HAND.

But, we find the inundation map created with TauDEM's D-infinity HAND tool appears better than the one created with WBT's tool. The WBT tool uses D8 flow directions to find each cell's distance to the channel. WBT can calculate Dinf flow directions, but I don't think it has a tool to use that output to calculate HAND.

mdbartos/pysheds also has a method that calculates HAND with Dinf flow directions. Below are HAND rasters and their corresponding inundation maps created with TauDEM, WBT, and pysheds. TauDEM/pysheds used Dinf, WBT used D8 to calculate HAND.

The Dinf flow direction grids are almost identical between TauDEM, pysheds, and WBT (after converting degrees to radians). But the TauDEM HAND grid is much less blocky than pysheds/WBT, which results in a better inundation map. Maybe TauDEM is doing something slightly different when it calculates HAND. We run dinfdistancedown with the flag -m ave v, which I don't think is an option in WBT or pysheds.

We should either accept the HAND created with WBT or pysheds, or submit a pull request to one of these projects that calculates HAND similarly to TauDEM.

These differences might be easier to see if you download the tiffs and view in QGIS: https://utexas.box.com/s/ae139y4jpsfk91ecl2t9mo5h6d50cfzc

hand_fim_comparison

diff_comparison

mdp0023 commented 3 months ago

Here is another example of where D8 is likely causing erroneous HAND results. First figure shows HAND map for a catchment in Austin (COMID=5781217). Second figure is resultant inundation map. I believe when hydroprop table is made, because the slope is inaccurate for the catchment, it results in poorly defined relationship between flow and stage height compared to the rest of the reach.

image

image