[GRASS-dev] r.watershed flow option
markus.metz.giswork at googlemail.com
Mon May 24 04:52:32 EDT 2010
> Helena wrote:
>> Maybe I am overlooking it but the man
>> page for r.watershed does not say what units
>> the option "flow" should be in - I am guessing it is
>> fraction of 1 (or percent given as decimal - e.g. 50% will
>> be 0.5)
>> so should flow amount read as fraction or something
>> like that, so that if all rainfall turns to runoff = 1
>> only 50% rainfall turns to runoff (rest is captured by
>> vegetation or infiltrates) = 0.5
> I don't think so, it seems to be reading the map as CELL, so
> giving it input data in the range of 0.0-1.0 would be binary.
>From the manual:
"Overland flow units represent the amount of overland flow each cell
contributes to surface flow. If omitted, a value of one (1) is
Therefore I think that Helena is right, but there is a bug in
r.watershed because any given input flow map is read as CELL, probably
because accumulation was of type CELL before MFD came in. For MFD,
accumulation must be floating point, so it was changed to DCELL
(probably too much precision, FCELL should do as in r.terraflow).
Changing r.watershed in order to read flow as DCELL seems IMHO
appropriate and would be a small fix.
BTW, an input flow map could be used to determine where water or some
other liquid is distributed to by setting flow to 100 for selected
start points e.g. houses and zero otherwise. Running r.watershed with
MFD would give as accumulation output percentage distributed from
start point (in this example always 100 for SFD), assuming that
nothing is lost by infiltration, evaporation etc.
> /* read flow accumulation from input map flow: amount of overland flow per cell */
> opened with
> G_open_cell_old(run_name, "")
> read with
> value set as
> wat[SEG_INDEX(wat_seg, r, c)] = buf[c];
> after that I lose track of what it does.. maybe it is setting up
> initial conditions??
>> should some explanation go into manual?
> once we know the answer, sure :)
> grass-dev mailing list
> grass-dev at lists.osgeo.org
More information about the grass-dev