Skip to content
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

Is there a "simple" way to set a minimum value for AreaD8 or AreaDinf? #226

Closed
chamesoul opened this issue Apr 3, 2021 · 4 comments
Closed

Comments

@chamesoul
Copy link

Hi,
I'm using TauDEM on RStudio, with the system command.
AreaD8 allows to sum all values from upslope pixels , values that can be taken from an optionnal weight grid. My grid represents the balance between infiltration and runoff and can sometimes take negative values. As much as it makes sens for the runoff from upslope pixels to be diminished when going through pixels with high infiltration rate, my issue is that after going through numerous "negative" pixels, the runoff value calculated by AreaD8 becomes negative too, and then adds up to the next downslope pixel runoff value. I'm wondering if there is a way to force the value of the flowaccumulation not to go under 0.
Thanks!

@dtarb
Copy link
Owner

dtarb commented Apr 3, 2021

@chamesoul take a look at the retention limited runoff function. This is new (ish) and only implemented in the command line set of functions, not in ArcGIS toolbox and there is no documentation. It is sketched out in #124

It is implemented in RetlimFlow.cpp and I think that line 175 effectively does what you want.

I think that if you provide this function with weight grid the grid that has positive and negative values, and retention capacity grid 0, that you will get what you want.

It may also be that the retention limited concept addresses your problem in a way that you like better. Rather than inputting a weight that is runoff minus infiltration capacity, you could input these as separate quantities (runoff as the weight and infiltration capacity as the retention capacity) and have the program do the differencing and only pass the positive quantity downslope.

Sadly, I have had limited time to keep the documentation of TauDEM up to date and have not had time to roll this function into the main release (and it has been years now). I've had others ask about this fundtion and my temporary distribution is at https://hydrology.usu.edu/docs/RetLimFlow.zip. You could also compile from source if you want to tweak it.

This is implemented in Dinfinity flow model (not D8) .

@chamesoul
Copy link
Author

Thank you for your fast answer, I'll try to advance with what you told me (I wanted to compare AreaD8 with AreaDInf in my study but I guess it's a no-go then), I'll come back here if any issue arises or close the topic if all's good

@dtarb
Copy link
Owner

dtarb commented Apr 3, 2021

You could take the D8 flow directions (1, 2, ..., 8) and map them onto Dinfinity angles (0, pi/4, pi/2, ...7pi/4) and use these in the Dinfinity function to get what D8 would have given.

@chamesoul
Copy link
Author

Thank you so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants