[GRASS-user] Interpreting r.watershed accumulation map

   The input to r.watershed (be_cropped) has elevation range of 148.2m -
168.4m. The accumulation output map has values ranging from
-89397.3-38013.4. An image of a portion of the map is attached.

   How do I interpret the colors on the map since the legend shows only a
narrow blue bar on a black background? As there are cells with high negative
values does this map contain any useful information?

   Given such flat land (the area in the image has an elevation difference of
approximately 1m) I have not identified a module that produces insights into
surface runoff patterns. I've tried several with no success; r.lake does
produce water depths based on the elevation of a blockage.

   Itzi does not work on these data because there are no stream channels for
use by r.water.outlet.

   Have I missed something?

Rich

(attachments)

accumulation-map.png

Hello Rich,

According to the r.watershed manual:
"Output accumulation map contains the absolute value of each cell in
this output map is the amount of overland flow that traverses the
cell. This value will be the number of upland cells plus one if no
overland flow map is given. If the overland flow map is given, the
value will be in overland flow units. Negative numbers indicate that
those cells possibly have surface runoff from outside of the current
geographic region. Thus, any cells with negative values cannot have
their surface runoff and sedimentation yields calculated accurately.
"

So basically the darker the cell, the larger the drained area. Darker
cells therefore show the flow courses according to the topography.

Note that Itzï does not need an output to run. If you set a simulation
with only the DEM, an uniform friction coefficient and an uniform
rainfall, the water will simply accumulate in the depressions, giving
you an insight of the flow patterns.

Regards,
Laurent

2016-10-10 11:23 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

  The input to r.watershed (be_cropped) has elevation range of 148.2m -
168.4m. The accumulation output map has values ranging from
-89397.3-38013.4. An image of a portion of the map is attached.

  How do I interpret the colors on the map since the legend shows only a
narrow blue bar on a black background? As there are cells with high negative
values does this map contain any useful information?

  Given such flat land (the area in the image has an elevation difference of
approximately 1m) I have not identified a module that produces insights into
surface runoff patterns. I've tried several with no success; r.lake does
produce water depths based on the elevation of a blockage.

  Itzi does not work on these data because there are no stream channels for
use by r.water.outlet.

  Have I missed something?

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 10 Oct 2016, Laurent C. wrote:

According to the r.watershed manual: "Output accumulation map contains the
absolute value of each cell in this output map is the amount of overland
flow that traverses the cell. This value will be the number of upland
cells plus one if no overland flow map is given. If the overland flow map
is given, the value will be in overland flow units. Negative numbers
indicate that those cells possibly have surface runoff from outside of the
current geographic region. Thus, any cells with negative values cannot
have their surface runoff and sedimentation yields calculated accurately.

   Yep, that's what I read, too.

So basically the darker the cell, the larger the drained area. Darker
cells therefore show the flow courses according to the topography.

   I thought this to be the case, but the legend doesn't reflect it.

Note that Itzï does not need an output to run. If you set a simulation
with only the DEM, an uniform friction coefficient and an uniform
rainfall, the water will simply accumulate in the depressions, giving you
an insight of the flow patterns.

   Now, this is very useful information that I did not pick up from reading
the manual page.

Thanks, Laurent,

Rich

On Mon, Oct 10, 2016 at 3:03 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 10 Oct 2016, Laurent C. wrote:

According to the r.watershed manual: "Output accumulation map contains the
absolute value of each cell in this output map is the amount of overland
flow that traverses the cell. This value will be the number of upland
cells plus one if no overland flow map is given. If the overland flow map
is given, the value will be in overland flow units. Negative numbers
indicate that those cells possibly have surface runoff from outside of the
current geographic region. Thus, any cells with negative values cannot
have their surface runoff and sedimentation yields calculated accurately.

  Yep, that's what I read, too.

So basically the darker the cell, the larger the drained area. Darker
cells therefore show the flow courses according to the topography.

  I thought this to be the case, but the legend doesn't reflect it.

the color table is logarithmic, so try to use logarithmic option in
d.legend (GRASS 7.2 and higher only)

Anna

Note that Itzï does not need an output to run. If you set a simulation
with only the DEM, an uniform friction coefficient and an uniform
rainfall, the water will simply accumulate in the depressions, giving you
an insight of the flow patterns.

  Now, this is very useful information that I did not pick up from reading
the manual page.

Thanks, Laurent,

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 10 Oct 2016, Anna Petrášová wrote:

the color table is logarithmic, so try to use logarithmic option in
d.legend (GRASS 7.2 and higher only)

Anna,

   Thanks; that's good to know. I used the annotation widget in the map
display window.

Rich

On Mon, 10 Oct 2016, Laurent C. wrote:

Note that Itzï does not need an output to run. If you set a simulation
with only the DEM, an uniform friction coefficient and an uniform
rainfall, the water will simply accumulate in the depressions, giving you
an insight of the flow patterns.

Laurent,

   I tried to run Itzi after defining variables as:
   rain=0.01 # assuming this is the rate in mm/hr
   n=0.05
   bctype=4
   bcvalue=0
and this parameter file:

[time]
duration = 24:00:00
record_step = 01:00:00

[input]
dem = be_cropped
friction = n
rain = rain
bctype = bctype
bcval = bcvalue

[output]
prefix = pop
values = h, wse, v, vdir, boundaries

[statistics]
stats_file = pop.csv

   Two issues:

   First, Itzi is installed in Python-3.5's site-packages/ directory and I
want to install it also Python-2.7.5's site-packages/ directory, too, and
use that version since it seems that grass is using Python2. How do I
specify to Itzi to install in /usr/lib/Python-2.7.5/site-packages/?

   Second, /usr/lib/Python-3.5/site-packages/itzi/configreader.py exists, yet
I get this python error trace back from the attempted run:

itzi run itzi-param.txt

Traceback (most recent call last):
   File "/usr/bin/itzi", line 9, in <module>
     load_entry_point('itzi==16.8', 'console_scripts', 'itzi')()
   File "/usr/lib/python3.5/site-packages/itzi/itzi.py", line 40, in main
     args.func(args)
   File "/usr/lib/python3.5/site-packages/itzi/itzi.py", line 54, in itzi_run
     from configreader import ConfigReader
ImportError: No module named 'configreader'

   I've not examined the source code; I can fix this error here but am I the
only one to run into this?

Thanks,

Rich

Hello Rich,

First some remarks about your entry data:
- Your rainfall rate is very small. For your entire simulation of 24h,
it will rain only 0.24mm on your domain. Since the depth values under
the 'hmin' threshold are not output, you'll end up with empty output.
If you want to see flow patterns, set this value to at the very least
10mm/h. 100 if you want to have faster result (without the need of
simulating 24h)
- By setting bctype=4 and bcvalue=0 on all your region, you're forcing
a water depth of zero everywhere. For a start, you can drop those
parameters.

About the problem you encounter. Since GRASS does not support python3
(AFAIK), Itzï is only tested with python 2.7. It is strange that it
installed with python3. To force the installation with python2, you
can run the following command:
$ pip2 install itzi --user

Hope this will solve your problem.

Regards,
Laurent

2016-10-11 11:18 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Mon, 10 Oct 2016, Laurent C. wrote:

Note that Itzï does not need an output to run. If you set a simulation
with only the DEM, an uniform friction coefficient and an uniform
rainfall, the water will simply accumulate in the depressions, giving you
an insight of the flow patterns.

Laurent,

  I tried to run Itzi after defining variables as:
        rain=0.01 # assuming this is the rate in mm/hr
        n=0.05
        bctype=4
        bcvalue=0
and this parameter file:

[time]
duration = 24:00:00
record_step = 01:00:00

[input]
dem = be_cropped
friction = n
rain = rain
bctype = bctype
bcval = bcvalue

[output]
prefix = pop
values = h, wse, v, vdir, boundaries

[statistics]
stats_file = pop.csv

  Two issues:

  First, Itzi is installed in Python-3.5's site-packages/ directory and I
want to install it also Python-2.7.5's site-packages/ directory, too, and
use that version since it seems that grass is using Python2. How do I
specify to Itzi to install in /usr/lib/Python-2.7.5/site-packages/?

  Second, /usr/lib/Python-3.5/site-packages/itzi/configreader.py exists, yet
I get this python error trace back from the attempted run:

itzi run itzi-param.txt

Traceback (most recent call last):
  File "/usr/bin/itzi", line 9, in <module>
    load_entry_point('itzi==16.8', 'console_scripts', 'itzi')()
  File "/usr/lib/python3.5/site-packages/itzi/itzi.py", line 40, in main
    args.func(args)
  File "/usr/lib/python3.5/site-packages/itzi/itzi.py", line 54, in itzi_run
    from configreader import ConfigReader
ImportError: No module named 'configreader'

  I've not examined the source code; I can fix this error here but am I the
only one to run into this?

Thanks,

Rich

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, 11 Oct 2016, Laurent C. wrote:

- Your rainfall rate is very small.

Laurent,

   Changed rain to 10 mm/h, time to 2 hrs with 5 min steps. Specified mapset
for DEM map (be_cropped) as it's not in the analyses mapset.

- By setting bctype=4 and bcvalue=0 on all your region, you're forcing
a water depth of zero everywhere. For a start, you can drop those
parameters.

   Removed both bctype and bcvalue.

About the problem you encounter. Since GRASS does not support python3
(AFAIK), Itzï is only tested with python 2.7. It is strange that it
installed with python3. To force the installation with python2, you
can run the following command:
$ pip2 install itzi --user

   Yes, now itzi is installed for both python2 and python3.

   There is an issue with the time-space databases that prevent the
simulation from running:

itzi run itzi-param.txt

Starting simulation of itzi-param.txt... WARNING: Error during execution: Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/itzi/itzi.py", line 183, in
sim_runner_worker
     sim_runner.run()
   File "/usr/lib/python2.7/site-packages/itzi/itzi.py", line 90, in run
     sim_param=self.conf.sim_param)
   File "/usr/lib/python2.7/site-packages/itzi/simulation.py", line 77, in
__init__
     self.gis.read(self.in_map_names)
   File "/usr/lib/python2.7/site-packages/itzi/gis.py", line 187, in read
     elif self.name_is_stds(self.format_id(map_name)):
   File "/usr/lib/python2.7/site-packages/itzi/gis.py", line 138, in
name_is_stds
     if tgis.SpaceTimeRasterDataset(name).is_in_db():
   File
"/usr/local/grass-7.3.svn/etc/python/grass/temporal/abstract_dataset.py",
line 368, in is_in_db
     return self.base.is_in_db(dbif)
   File "/usr/local/grass-7.3.svn/etc/python/grass/temporal/base.py", line
315, in is_in_db
     dbif.execute(sql, mapset=self.mapset)
   File "/usr/local/grass-7.3.svn/etc/python/grass/temporal/core.py", line
981, in execute
     self._create_mapset_error_message(mapset)))
   File
"/usr/local/grass-7.3.svn/etc/python/grass/pygrass/messages/__init__.py",
line 271, in fatal
     sys.exit(1)
SystemExit: 1

Simulations complete. Elapsed times: itzi-param.txt: 0:00:00 Total: 0:00:00 Average: 0:00:00

Rich

Richard,

It seems to be a problem from within the temporal framework. I never
had this specific problem before, but I've run into some other obscure
errors using TGRASS.
Are other temporal commands (t.list, t.create...) working properly?

Laurent

2016-10-11 13:38 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Tue, 11 Oct 2016, Laurent C. wrote:

- Your rainfall rate is very small.

Laurent,

  Changed rain to 10 mm/h, time to 2 hrs with 5 min steps. Specified mapset
for DEM map (be_cropped) as it's not in the analyses mapset.

- By setting bctype=4 and bcvalue=0 on all your region, you're forcing
a water depth of zero everywhere. For a start, you can drop those
parameters.

  Removed both bctype and bcvalue.

About the problem you encounter. Since GRASS does not support python3
(AFAIK), Itzï is only tested with python 2.7. It is strange that it
installed with python3. To force the installation with python2, you
can run the following command:
$ pip2 install itzi --user

  Yes, now itzi is installed for both python2 and python3.

  There is an issue with the time-space databases that prevent the
simulation from running:

itzi run itzi-param.txt

Starting simulation of itzi-param.txt... WARNING: Error during execution:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/itzi/itzi.py", line 183, in
sim_runner_worker
    sim_runner.run()
  File "/usr/lib/python2.7/site-packages/itzi/itzi.py", line 90, in run
    sim_param=self.conf.sim_param)
  File "/usr/lib/python2.7/site-packages/itzi/simulation.py", line 77, in
__init__
    self.gis.read(self.in_map_names)
  File "/usr/lib/python2.7/site-packages/itzi/gis.py", line 187, in read
    elif self.name_is_stds(self.format_id(map_name)):
  File "/usr/lib/python2.7/site-packages/itzi/gis.py", line 138, in
name_is_stds
    if tgis.SpaceTimeRasterDataset(name).is_in_db():
  File
"/usr/local/grass-7.3.svn/etc/python/grass/temporal/abstract_dataset.py",
line 368, in is_in_db
    return self.base.is_in_db(dbif)
  File "/usr/local/grass-7.3.svn/etc/python/grass/temporal/base.py", line
315, in is_in_db
    dbif.execute(sql, mapset=self.mapset)
  File "/usr/local/grass-7.3.svn/etc/python/grass/temporal/core.py", line
981, in execute
    self._create_mapset_error_message(mapset)))
  File
"/usr/local/grass-7.3.svn/etc/python/grass/pygrass/messages/__init__.py",
line 271, in fatal
    sys.exit(1)
SystemExit: 1

Simulations complete. Elapsed times: itzi-param.txt: 0:00:00 Total: 0:00:00
Average: 0:00:00

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, 11 Oct 2016, Laurent C. wrote:

It seems to be a problem from within the temporal framework. I never had
this specific problem before, but I've run into some other obscure errors
using TGRASS. Are other temporal commands (t.list, t.create...) working
properly?

Laurent,

   I've no idea because I've not used any of them before. However, if I can
find an appropriate data set I'll test some of them.

Rich

On Tue, 11 Oct 2016, Rich Shepard wrote:

I've no idea because I've not used any of them before. However, if I can
find an appropriate data set I'll test some of them.

Laurent,

   I have precipitation data for several sites over a two month period (one
site has only one month's data). For each site I have the longlat
coordinates.

   The data are currently in database format (R long form) with columns names
of site_id, date, quantity. I planned on analyzing them with R's sp package
to produce heat maps of precipitation intensity. Would these data be useful
in testing tgrass modules?

Rich

Hello Rich,

Sure, raster time series of rainfall intensities is a very good way to
take advantage of GRASS temporal framework in hydrologic modelling.

Regards,
Laurent

2016-10-12 10:45 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Tue, 11 Oct 2016, Rich Shepard wrote:

I've no idea because I've not used any of them before. However, if I can
find an appropriate data set I'll test some of them.

Laurent,

  I have precipitation data for several sites over a two month period (one
site has only one month's data). For each site I have the longlat
coordinates.

  The data are currently in database format (R long form) with columns names
of site_id, date, quantity. I planned on analyzing them with R's sp package
to produce heat maps of precipitation intensity. Would these data be useful
in testing tgrass modules?

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Wed, 12 Oct 2016, Laurent C. wrote:

Sure, raster time series of rainfall intensities is a very good way to
take advantage of GRASS temporal framework in hydrologic modelling.

Laurent,

   These are point data, not raster. See attached .png.

Rich

(attachments)

weather-stations.png

Rich,

You can interpolate the data using v.surf.idw to get a raster map.
Literature says that a power parameter superior to 2 (between 3 to 5)
might get better result for rainfall.

Laurent

2016-10-12 12:20 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Wed, 12 Oct 2016, Laurent C. wrote:

Sure, raster time series of rainfall intensities is a very good way to
take advantage of GRASS temporal framework in hydrologic modelling.

Laurent,

  These are point data, not raster. See attached .png.

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Wed, 12 Oct 2016, Laurent C. wrote:

You can interpolate the data using v.surf.idw to get a raster map.
Literature says that a power parameter superior to 2 (between 3 to 5)
might get better result for rainfall.

Laurent,

   Hmm-m-m. I'll read the v.surf.idw manual page.

Thanks,

Rich

On Wed, 12 Oct 2016, Rich Shepard wrote:

Hmm-m-m. I'll read the v.surf.idw manual page.

   I don't see how v.surf.idw is helpful here. The current map has only
category values and the label for each station. Interpolating station
locations or labels makes no sense. The precipitation data for each station
has not been entered in the sqlite3 attribute table. More to the need of
this project would be extrapolation as the project area is east of this
cluster of weather stations. What I need to show are the locations of the
weather stations relative to the project area and the variability of
precipitation among sites for any given day. I don't see how interpolation
of any of these data is useful. If I'm wrong, please educate me.

Rich

2016-10-12 13:52 GMT-05:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Wed, 12 Oct 2016, Rich Shepard wrote:

Hmm-m-m. I'll read the v.surf.idw manual page.

  I don't see how v.surf.idw is helpful here. The current map has only
category values and the label for each station. Interpolating station
locations or labels makes no sense. The precipitation data for each station
has not been entered in the sqlite3 attribute table. More to the need of
this project would be extrapolation as the project area is east of this
cluster of weather stations. What I need to show are the locations of the
weather stations relative to the project area and the variability of
precipitation among sites for any given day. I don't see how interpolation
of any of these data is useful. If I'm wrong, please educate me.

Rich

In that case you may use the closest station as an uniform rainfall value.

Laurent

On Wed, 12 Oct 2016, Laurent C. wrote:

In that case you may use the closest station as an uniform rainfall value.

Laurent,

   That will not work for us. I'll follow my original plan and make a lattice
panel of bar charts, one for each weather station.

   I wondered if these vector data would be good for testing the tgrass
functions, but they're points and not lines or polygons.

Thanks,

Rich

On Tue, 11 Oct 2016, Laurent C. wrote:

It seems to be a problem from within the temporal framework. I never had
this specific problem before, but I've run into some other obscure errors
using TGRASS.

   To summarize my understanding: Itzi will not work with my current data
because of some issue with a tgrass module; r.lake does show water
accumulation area by depth above a blockage at a defined x, y, z point; and
other r.* modules (e.g., watershed. water.outlet, and sim.water) require
defined stream channels. Have I missed a module that will map precipitation
accumulation and flow across flat agricultural lands?

   A major concern (at least in the US) is nonpoint-source runoff of
pollutants. One such land use is farmland. Regulators attempt to address
such nonspecific-source water quality concerns using total maximum daily
loads/limits (TMDL) to apportion maximum contributions of the parameter of
concern by each potential contributor.

   Is there a grass7 work flow that can be applied to this situation?

Rich

Please try to put all mapsets that you use in your analysis into the mapset search path. The temporal framework will only access strds in mapsets that are located in the current search path.

Best
Soeren

···

2016-10-11 20:38 GMT+02:00 Rich Shepard <rshepard@appl-ecosys.com>:

On Tue, 11 Oct 2016, Laurent C. wrote:

  • Your rainfall rate is very small.

Laurent,

Changed rain to 10 mm/h, time to 2 hrs with 5 min steps. Specified mapset
for DEM map (be_cropped) as it’s not in the analyses mapset.

  • By setting bctype=4 and bcvalue=0 on all your region, you’re forcing
    a water depth of zero everywhere. For a start, you can drop those
    parameters.

Removed both bctype and bcvalue.

About the problem you encounter. Since GRASS does not support python3
(AFAIK), Itzï is only tested with python 2.7. It is strange that it
installed with python3. To force the installation with python2, you
can run the following command:
$ pip2 install itzi --user

Yes, now itzi is installed for both python2 and python3.

There is an issue with the time-space databases that prevent the
simulation from running:

itzi run itzi-param.txt

Starting simulation of itzi-param.txt… WARNING: Error during execution: Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/itzi/itzi.py”, line 183, in
sim_runner_worker
sim_runner.run()
File “/usr/lib/python2.7/site-packages/itzi/itzi.py”, line 90, in run
sim_param=self.conf.sim_param)
File “/usr/lib/python2.7/site-packages/itzi/simulation.py”, line 77, in
init
self.gis.read(self.in_map_names)
File “/usr/lib/python2.7/site-packages/itzi/gis.py”, line 187, in read
elif self.name_is_stds(self.format_id(map_name)):
File “/usr/lib/python2.7/site-packages/itzi/gis.py”, line 138, in
name_is_stds
if tgis.SpaceTimeRasterDataset(name).is_in_db():
File
“/usr/local/grass-7.3.svn/etc/python/grass/temporal/abstract_dataset.py”,
line 368, in is_in_db
return self.base.is_in_db(dbif)
File “/usr/local/grass-7.3.svn/etc/python/grass/temporal/base.py”, line
315, in is_in_db
dbif.execute(sql, mapset=self.mapset)
File “/usr/local/grass-7.3.svn/etc/python/grass/temporal/core.py”, line
981, in execute
self._create_mapset_error_message(mapset)))
File
“/usr/local/grass-7.3.svn/etc/python/grass/pygrass/messages/init.py”,
line 271, in fatal
sys.exit(1)
SystemExit: 1

Simulations complete. Elapsed times: itzi-param.txt: 0:00:00 Total: 0:00:00 Average: 0:00:00

Rich


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user