Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] r.traveltime gives incomplete results #816

Open
plvoit opened this issue Oct 7, 2022 · 0 comments
Open

[Bug] r.traveltime gives incomplete results #816

plvoit opened this issue Oct 7, 2022 · 0 comments

Comments

@plvoit
Copy link

plvoit commented Oct 7, 2022

faulty_traveltime_raster
Name of the addon
r.traveltime

Describe the bug
r.traveltime gives incomplete results. Sometimes the module needs really long to get results. Sometimes the resulting traveltime raster just consists of just a few pixel (below ten) even though the outlet coordinates were placed at the outlet of a subbasin derived with r.watershed using the same input data as r.traveltime.

To Reproduce
Steps to reproduce the behavior:

  1. Download the supplied data. Unpack and start GRASS. Change of the GRASS GIS Database window to the unpacked folder (grass_example). The project contains pre-computed rasters for flowdirection, flow accumulation, a filled DEM and a raster containing the manning values The DEM was filled 5 times, flowdirection was derived using the necessary agpns-format. The accumulation raster was derived with r.watershed using single flow directions (flag -s) and just positive flow accumulation (flag -a). The x and y coordinates are the outlet of the largest subbasin.
  2. paste following command in the command line to compute the traveltime raster:

r.traveltime dir=flowdir@PERMANENT accu=accu@PERMANENT dtm=demfilled@PERMANENT manningsn=n@PERMANENT out_x=4111637.5 out_y=3281262.5 threshold=3000 b=1 nchannel=0.03 dis=2777.8 out=tt

  1. To reproduce the whole process via command line, here are the commands:

grass78 -c EPSG:3035 path/to/new/location

r.in.gdal input=.../grass_example/accu output=accu #complete your path here
r.in.gdal input=.../grass_example/flowdir output=flowdir #complete your path here
r.in.gdal input=../grass_example/demfilled output=demfilled #complete your path here
r.in.gdal input=../grass_example/n output=n #complete your path here

g.region rast=demfilled grow=20

r.watershed -s -a elevation=demfilled@PERMANENT threshold=10000 basin=subbasins

r.traveltime dir=flowdir@PERMANENT accu=accu@PERMANENT dtm=demfilled@PERMANENT manningsn=n@PERMANENT out_x=4111637.5 out_y=3281262.5 threshold=3000 b=1 nchannel=0.03 dis=2777.8 out=tt
r.out.gdal input=tt output=../grass_example/traveltime_raster format=GTiff #complete your path here
r.out.gdal input=subbasins output=../grass_example/subbasins format=GTiff #complete your path here

Expected behavior
r.watershed and r.traveltime use the same input data. A subbasin derived with r.watershed should contain all the cells that flow to its outlet. Therefore the raster resulting from r.traveltime should have the same shape (or larger, if one subbasin flows into the next subbasin) as the respective subbasin when the outlet coordinates are placed one the outlet of the subbasin (point with highest accumulation).

Screenshots
On attached screenshot you can see in red a subbasin derived with r.watershed and in viridis scale the results of r.watershed. The traveltime raster does not cover the whole subbasin and leaves out strange horizontal lines.

System description (please complete the following information):

  • Operating System:Ubuntu 20.04
  • GRASS GIS version 7.8.6

Additional context
grass_example.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant