I recently discovered TauDEM and overall experience is fantastic.

However I found something weird, when computing flow accumulation (ESRI ArcGIS term) or D8 Contributing area (TauDEM term). Some neighboring cells, very few though, along high flow line store the same value:

enter image description here

which in my opinion defeats the definition of flow accumulation. Even stranger, this is happening on a single flow path only, unless I've failed to find other duplicates.

enter image description here

I am posting this question, because software author David Tarboton suggested to do so on his site. So hopefully he might comment on this (minor) issue to benefit multiple users.

1 Answer 1


This is most likely due to numerical rounding and precision. As currently implemented in TauDEM, the aread8 results are held in a "float" variable in C++ which has about 7 decimal digits of precision (line 152 in https://github.com/dtarb/TauDEM/blob/Develop/src/aread8.cpp). Specifically, if the number 1 is added to 26648268 numerical effects will result in no change.

To the degree that this is a problem it could be fixed by switching to double at a cost of using more memory. We would also have to ensure that the grid where results are written accommodates double. Another fix could be for the unweighted version to use an integer representation for the contributing area result. The decision (by me a long time ago at time of implementation) to use float was to have the same code handle weighted and unweighted contributing area, recognizing that weights may be floating point numbers. The problem reported is a consequence of this decision when contributing area gets very large and in hindsight it could be argued that using double or integer for unweighted contributing area would have been better.

Numerical representation and precision could be changed if there is sufficient ground swell concern that this is a problem, or someone with the time and energy to work through the code to change it makes the changes and offers them back to TauDEM as a pull request.

  • Not a big deal, something to keep in mind. I found it when tried to find overflow points of depressions. Was surprised to see that some of them have multiple cells with Max. accumulation.
    – FelixIP
    Commented Jan 20, 2020 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.