[GRASS-dev] Re: [GRASS GIS] #518: negative flow accumulation with r.watershed SFD or MFD

Michael Barton michael.barton at asu.edu
Fri Mar 6 11:09:04 EST 2009

Thanks for the ideas and response Markus. See below.
On Mar 6, 2009, at 8:48 AM, Markus Metz wrote:

> Michael Barton wrote:
>>> Comment (by mmetz):
>>> There is a good reason *not* to add this option/flag, nicely  
>>> illustrated
>>> by Dylan creating this ticket. The purpose of negative  
>>> accumulation values
>>> is to make people wonder what on earth is going here, then figure  
>>> out that
>>> not the whole catchment area under study was included and expand the
>>> computational region accordingly to get proper results: only  
>>> positive
>>> accumulation values for the catchment under study.
>> IMHO, this is a very poor way to achieve this end--i.e., silently  
>> performing all hydrology operations and producing completely bogus  
>> values to get you to scratch your head and wonder what is going on  
>> when you notice it. I suspect this is a legacy of the age of this  
>> module. To make things worse, GRASS's other hydrology modules do  
>> not work this way.
> AFAIK, other hydrology modules also calculate what you termed  
> "completely bogus" values, but there is no way to find out what  
> values are bogus if all flow accumulation values are positive. The  
> most conservative solution for cells for which flow accumulation  
> could not be exactly determined would be to set flow accumulation to  
> NULL and not give a minimum estimate.
>> A much more direct way is to give a warning for each problematic  
>> basin in the output:
>> WARNING: part of basin XX extends beyond region extent;  
>> accumulation values may be too low.
> IMHO not very practical. When thousands of basins are calculated,  
> you would get flooded with these warnings.

Are people calculating so many basins that thousands would be along  
the region extents? Maybe my own work is much different from others,  
but 10's to a few 100 seems more likely. 200 warnings could still be a  
lot, if all basins ran off the map. But this should only happen with a  
limited number of basins. That is, for many small basins, only the  
ones along the region edges will be affected. For few large basins,  
there are many fewer basins to be affected.

>> It should be possible to turn off this "feature" of negative  
>> accumulation. This is especially important for scripting. For  
>> example, we use accumulation values as part of a complex, iterative  
>> erosion/deposition model.
> Hmm, don't you need to know the exact flow accumulation to calculate  
> erosion/deposition? Are some "at least so much, but probably much  
> more" values really ok? BTW, RUSLE factors as created by r.watershed  
> are also only correct for cells with positive flow accumulation.

It depends on how much difference there is. A couple cells would not  
make much difference, 100's would make a difference. But I'd still  
like to know which ones are a problem of course. I'm not suggesting to  
make absolute value of accumulation a default (not permitted in 6.5  
anyway), but simply making it an option that the user could exercise

>> We are currently running this on complete watersheds created with  
>> r.watershed (although an earlier version). Our goal is not to  
>> create accumulation maps and in fact never see the accumulation  
>> maps but use the values for additional modeling. Watershed maps get  
>> deleted along the way unless a flag is set to keep them because of  
>> the very large numbers of maps created to model decades or  
>> centuries of surface process dynamics. The new version seems to be  
>> calculating the watershed in a slightly different way, and now a  
>> tiny bit must extend off the region because we are getting negative  
>> values in some watersheds that were not problematic before.
> The new SFD version should produce results identical to previous  
> versions. If not, I introduced a bug. The MFD version calculates  
> different, improved basins compared to SFD.

This is the issue. It happened when we tried MFD. I'm happy for the  
better calculations and we'll redo our watershed boundaries. But this  
points out some of the problems.

>> We will check this of course. But we never knew that we were  
>> getting negative values until this issue came up in another  
>> context. So our model values are completely bogus and we have to  
>> run this over again. The slight difference in accumulation would  
>> have only a very tiny effect on our results, but entire negative  
>> accumulation values make a big difference. So we'll have to build  
>> in taking the absolute value of accumulation (completely negating  
>> the goal of the negative values, BTW),
> Absolute values are still bogus in the sense that they are lower  
> than the real values, sometimes by orders of magnitude.
>> but it would still be nice to have a text informational warning  
>> about which watersheds might be a problem for users of the model.
> It could be possible to print out two tables like
> basin_no|complete
> and
> half_basin_no|complete
> with complete = 0 meaning that there is a problem and complete = 1  
> meaning that there is no problem.
> Or introduce a new output option named something like  
> "incomplete_basin_parts" where the incomplete parts are assigned the  
> negative value of the basin they belong to.

If this is better than warnings, that's OK too. I just think that  
there might be a better way to do this than only by making the  
accumulation values negative.


More information about the grass-dev mailing list