2

I have downloaded a DEM from the NASA server with "SRTM Downloader".

enter image description here

I want to find the watershed area, so I run the "r.watershed" function form the Processing Toolbox.

enter image description here

However, I got a multi- "not fond" errors when I run it (see the full log below) enter image description here

I saved the DEM on the Desktop, but it did not help. What do I need to do in order to run this process properly?

Full log processing algorithm

Algorithm 'r.watershed' starting…
Input parameters:
{ '-4' : False, '-a' : False, '-b' : False, '-m' : False, '-s' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'accumulation' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/a710f43c24d4455aafd3ea7d82d33b29/accumulation.tif', 'basin' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/23a8c4140274424289ae8bc183275ab3/basin.tif', 'blocking' : None, 'convergence' : 5, 'depression' : None, 'disturbed_land' : None, 'drainage' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/13754e04e06942f9b51292b2a13631dc/drainage.tif', 'elevation' : 'C:/Users/nitza/AppData/Local/Temp/N27E086.hgt', 'flow' : None, 'half_basin' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/79e4452449a04740a5360a6f1503fa57/half_basin.tif', 'length_slope' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e5eaddcab7fa41e4a62d459ffb40a1ea/length_slope.tif', 'max_slope_length' : None, 'memory' : 300, 'slope_steepness' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/5a3b13f0b3b647a89dfe27c0bc391175/slope_steepness.tif', 'spi' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/c6dbe7a35861445b82d4186e3ffb4bd9/spi.tif', 'stream' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/3c624b66e44e447f91252f08949efbe1/stream.tif', 'tci' : 'C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e38ef9fd14d341b5b7a297f0a7bec0df/tci.tif', 'threshold' : None }

g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
r.external input="C:\Users\nitza\AppData\Local\Temp\N27E086.hgt" band=1 output="rast_5c18fd4fbdfad7" --overwrite -o
g.region n=28.000138888888888 s=26.99986111111111 e=87.0001388888889 w=85.99986111111112 res=0.000277777777777779
r.watershed elevation=rast_5c18fd4fbdfad7 convergence=5 memory=300 accumulation=accumulation629c106700f245b6b88447f28cabb2cb drainage=drainage629c106700f245b6b88447f28cabb2cb basin=basin629c106700f245b6b88447f28cabb2cb stream=stream629c106700f245b6b88447f28cabb2cb half_basin=half_basin629c106700f245b6b88447f28cabb2cb length_slope=length_slope629c106700f245b6b88447f28cabb2cb slope_steepness=slope_steepness629c106700f245b6b88447f28cabb2cb tci=tci629c106700f245b6b88447f28cabb2cb spi=spi629c106700f245b6b88447f28cabb2cb --overwrite
g.region raster=accumulation629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="accumulation629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\a710f43c24d4455aafd3ea7d82d33b29\accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=drainage629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="drainage629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\13754e04e06942f9b51292b2a13631dc\drainage.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=basin629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="basin629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\23a8c4140274424289ae8bc183275ab3\basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=stream629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="stream629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\3c624b66e44e447f91252f08949efbe1\stream.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=half_basin629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="half_basin629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\79e4452449a04740a5360a6f1503fa57\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=length_slope629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="length_slope629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\e5eaddcab7fa41e4a62d459ffb40a1ea\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=slope_steepness629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="slope_steepness629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\5a3b13f0b3b647a89dfe27c0bc391175\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=tci629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="tci629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\e38ef9fd14d341b5b7a297f0a7bec0df\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=spi629c106700f245b6b88447f28cabb2cb
r.out.gdal -t -m input="spi629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\c6dbe7a35861445b82d4186e3ffb4bd9\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Cleaning up temporary files...
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing <C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\grassdata\grass_batch_job.cmd> ...
C:\PROGRA~1\QGIS3~1.4\bin>chcp 1252 1>NUL
C:\PROGRA~1\QGIS3~1.4\bin>g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
Default region was updated to the new projection, but if you have multiple mapsets `g.region -d` should be run in each to update the region from the default
Projection information updated
C:\PROGRA~1\QGIS3~1.4\bin>r.external input="C:\Users\nitza\AppData\Local\Temp\N27E086.hgt" band=1 output="rast_5c18fd4fbdfad7" --overwrite -o
Over-riding projection check
Reading band 1 of 1...
r.external complete. Link to raster map <rast_5c18fd4fbdfad7> created.
C:\PROGRA~1\QGIS3~1.4\bin>g.region n=28.000138888888888 s=26.99986111111111 e=87.0001388888889 w=85.99986111111112 res=0.000277777777777779
C:\PROGRA~1\QGIS3~1.4\bin>r.watershed elevation=rast_5c18fd4fbdfad7 convergence=5 memory=300 accumulation=accumulation629c106700f245b6b88447f28cabb2cb drainage=drainage629c106700f245b6b88447f28cabb2cb basin=basin629c106700f245b6b88447f28cabb2cb stream=stream629c106700f245b6b88447f28cabb2cb half_basin=half_basin629c106700f245b6b88447f28cabb2cb length_slope=length_slope629c106700f245b6b88447f28cabb2cb slope_steepness=slope_steepness629c106700f245b6b88447f28cabb2cb tci=tci629c106700f245b6b88447f28cabb2cb spi=spi629c106700f245b6b88447f28cabb2cb --overwrite
Sorry, if any of the following options are set:
basin, stream, half_basin, length_slope, or slope_steepness
you MUST provide a value for the basin threshold parameter.
Calculates hydrological parameters and RUSLE factors.
Usage:
r.watershed [-s4mab] elevation=name [depression=name] [flow=name]
[disturbed_land=name] [blocking=name] [threshold=value]
[max_slope_length=value] [accumulation=name] [tci=name] [spi=name]
[drainage=name] [basin=name] [stream=name] [half_basin=name]
[length_slope=name] [slope_steepness=name] [convergence=value]
[memory=value] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
-s SFD (D8) flow (default is MFD)
-4 Allow only horizontal and vertical flow of water
-m Enable disk swap memory option: Operation is slow
-a Use positive flow accumulation even for likely underestimates
-b Beautify flat areas
Parameters:
elevation Name of input elevation raster map
depression Name of input depressions raster map
flow Name of input raster representing amount of overland flow per cell
disturbed_land Name of input raster map percent of disturbed land
blocking Name of input raster map blocking overland surface flow
threshold Minimum size of exterior watershed basin
max_slope_length Maximum length of surface flow in map units
accumulation Name for output accumulation raster map
tci Name for output topographic index ln(a / tan(b)) map
spi Stream power index a * tan(b)
drainage Name for output drainage direction raster map
basin Name for output basins raster map
stream Name for output stream segments raster map
half_basin Name for output half basins raster map
length_slope Name for output slope length raster map
slope_steepness Name for output slope steepness raster map
convergence Convergence factor for MFD (1-10)
default: 5
memory Maximum memory to be used with -m flag (in MB)
default: 300
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=accumulation629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <accumulation629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="accumulation629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\a710f43c24d4455aafd3ea7d82d33b29\accumulation.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <accumulation629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=drainage629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <drainage629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="drainage629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\13754e04e06942f9b51292b2a13631dc\drainage.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <drainage629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=basin629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <basin629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="basin629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\23a8c4140274424289ae8bc183275ab3\basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <basin629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=stream629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <stream629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="stream629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\3c624b66e44e447f91252f08949efbe1\stream.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <stream629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=half_basin629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <half_basin629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="half_basin629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\79e4452449a04740a5360a6f1503fa57\half_basin.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <half_basin629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=length_slope629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <length_slope629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="length_slope629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\e5eaddcab7fa41e4a62d459ffb40a1ea\length_slope.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <length_slope629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=slope_steepness629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <slope_steepness629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="slope_steepness629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\5a3b13f0b3b647a89dfe27c0bc391175\slope_steepness.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <slope_steepness629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=tci629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <tci629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="tci629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\e38ef9fd14d341b5b7a297f0a7bec0df\tci.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <tci629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>g.region raster=spi629c106700f245b6b88447f28cabb2cb
ERROR: Raster map <spi629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>r.out.gdal -t -m input="spi629c106700f245b6b88447f28cabb2cb" output="C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\c6dbe7a35861445b82d4186e3ffb4bd9\spi.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR: Raster map or group <spi629c106700f245b6b88447f28cabb2cb> not found
C:\PROGRA~1\QGIS3~1.4\bin>exit
Execution of <C:\Users\nitza\AppData\Local\Temp\processing_4c30c0c423384fee90bc3b7173b739cd\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
Press any key to continue . . .
Execution completed in 3.56 seconds
Results:
{'accumulation': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/a710f43c24d4455aafd3ea7d82d33b29/accumulation.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'basin': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/23a8c4140274424289ae8bc183275ab3/basin.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'drainage': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/13754e04e06942f9b51292b2a13631dc/drainage.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'half_basin': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/79e4452449a04740a5360a6f1503fa57/half_basin.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'length_slope': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e5eaddcab7fa41e4a62d459ffb40a1ea/length_slope.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'slope_steepness': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/5a3b13f0b3b647a89dfe27c0bc391175/slope_steepness.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'spi': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/c6dbe7a35861445b82d4186e3ffb4bd9/spi.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'stream': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/3c624b66e44e447f91252f08949efbe1/stream.tif, 'createOptions': {'fileEncoding': 'System'}}>,
'tci': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e38ef9fd14d341b5b7a297f0a7bec0df/tci.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/13754e04e06942f9b51292b2a13631dc/drainage.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/23a8c4140274424289ae8bc183275ab3/basin.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/3c624b66e44e447f91252f08949efbe1/stream.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/5a3b13f0b3b647a89dfe27c0bc391175/slope_steepness.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/79e4452449a04740a5360a6f1503fa57/half_basin.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/a710f43c24d4455aafd3ea7d82d33b29/accumulation.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/c6dbe7a35861445b82d4186e3ffb4bd9/spi.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e38ef9fd14d341b5b7a297f0a7bec0df/tci.tif</li><li>C:/Users/nitza/AppData/Local/Temp/processing_4c30c0c423384fee90bc3b7173b739cd/e5eaddcab7fa41e4a62d459ffb40a1ea/length_slope.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.
2
  • Please add the very top of the log to the post and better as text, not screenshot image. Dec 18, 2018 at 13:53
  • @bugmenot123, I added the full log as you asked. Thanks! Dec 18, 2018 at 14:07

1 Answer 1

6

I think that the problem is the missing threshold parameter. In the GUI window it appears as "optional" since there are some simple uses for r.watershed that do not require a threshold. But for any normal use of this module you must provide the threshold.

It is worth to notice that in the QGIS GUI, the parameter is not mentioned at all by its original name threshold of the GRASS command, but it is the value of the box under the text Minimum size of exterior watershed basin [optional].

In your posted error message, somewhere in the middle, it says:

"Sorry, if any of the following options are set: basin, stream, half_basin, length_slope, or slope_steepness you MUST provide a value for the basin threshold parameter."

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.