<div dir="ltr"><div><br><br>On Tue, Jun 20, 2017 at 10:05 AM, Ken Mankoff <<a href="mailto:mankoff@gmail.com">mankoff@gmail.com</a>> wrote:<br>><br>><br>> On 2017-06-20 at 06:28, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>> > You don't need to fill sinks with r.watershed, internal sinks are by<br>> > default drained.<br>><br>> I have negative values in the drainage direction raster produced by r.watershed in the interior. Is this a bug? Or am I misunderstanding the definition of a sink?<br><br></div>Negative values in the drainage direction should only occur at the borders of the current region and around NULL cells. Note that if you want internal sinks to be drained, you must not use the depression option.<br><div><br>><br>> While looking into this, I also notice that I get different accumulation maps if I scale the elevation (e.g. divide by 100), even when using the "-s" flag. At first consideration, this does not make sense to me.<br><br></div><div>There could be small differences due to floating point representation differences.<br></div><div>><br>> > You can create flat areas (also with r.terraflow), then use the -b<br>> > flag of r.watershed to create a gentle slope for flat areas.<br>><br>> I tried this and the accumulation map still has end-points (and direction has negative values) in the interior.<br><br></div><div>Accumulation stops only if true sinks are defined with the depression option or if the elevation of any neighbor is unknown (border of the current region, NULL cells).<br><br></div><div>I tested with elev_lid792_1m in the NC dataset and don't get negative drainage in internal sinks:<br><br>g.region -p rast=elev_lid792_1m<br>r.watershed ele=elev_lid792_1m drain=elev_lid792_1m_drain acc=elev_lid792_1m_acc<br></div><div><br></div><div>Markus M<br></div></div>