[GRASS-user] r.watershed: Problems Using

Markus Metz markus.metz.giswork at googlemail.com
Wed Feb 10 04:27:48 EST 2010


Rich Shepard wrote:
>   Running r.watershed failed:
>
> GRASS 6.4.0svn (Oregon):/usr4/grassbase > r.watershed -m elev=aber5m
> accum=aber5m.ws.accum drain=aber5m.drain basin=aber5m.basin
> stream=aber5m.streams visual=aber5m.visual thresh=1500 --o
> SECTION 1 beginning: Initiating Variables. 5 sections total.
> WARNING: No such file or directory
> WARNING: seg_open(): could not write segment file
> SECTION 1b (of 5): Determining Offmap Flow.
> WARNING: Subprocess failed with exit code 8
> WARNING: category information for [aber5m.ws.accum] in [beaver_lake]
>          missing or invalid
> WARNING: category information for [aber5m.drain] in [beaver_lake] missing
>          or invalid
> WARNING: category information for [aber5m.basin] in [beaver_lake] missing
>          or invalid
> WARNING: category information for [aber5m.streams] in [beaver_lake] 
> missing
>          or invalid
> WARNING: category information for [aber5m.visual] in [beaver_lake] 
> missing
>          or invalid
>
>   The warnings at the end must be spurious since these are all output 
> maps
> and not created until further along the module run.
Yes.
>
>   The first three WARNINGs look to me to be ERRORs instead. How to I 
> learn
> why the module failed?
The segment library failed to format a temporary file, it could not 
write to the file, but I don't know why. What does g.region -p say, and 
is there enough disk space free where your GISDBASE is?

I can't reproduce with Spearfish or NC sample datasets:

nc_spm_08
g.region -p rast=elevation at PERMANENT
r.watershed -m elev=elevation at PERMANENT accum=elevation.ws.accum 
drain=elevation.ws.drain basin=elevation.ws.basin 
stream=elevation.ws.streams visual=elevation.ws.visual thresh=1500 --o

spearfish60
g.region -p rast=elevation.10m at PERMANENT
r.watershed -m elev=elevation.10m at PERMANENT accum=elevation.10m.ws.accum 
drain=elevation.10m.ws.drain basin=elevation.10m.ws.basin 
stream=elevation.10m.ws.streams visual=elevation.10m.ws.visual 
thresh=1500 --o

Both complete successfully.
>
>   Also, what guidelines does one apply to determine an appropriate 
> threshold
> value for an exterior watershed basin?
That depends on your question, how detailed the extracted stream network 
and basins should be. Given a minimum total catchment area (TCA) to 
start a stream, the threshold would be TCA / (nsres * ewres), 
translating catchment area to number of cells.

Markus M


More information about the grass-user mailing list