[GRASS-dev] [GRASS GIS] #2901: Change r.watershed message type for flag a

#2901: Change r.watershed message type for flag a
-----------------------------------+---------------------------------
Reporter: isaacullah | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-releasebranch70
Keywords: r.watershed, messages | CPU: x86-64
Platform: All |
-----------------------------------+---------------------------------
Currently, using the flag -a in r.watershed ("Use positive flow
accumulation even for likely underestimates") induces an output message at
the GRASS_WARNING level:

{{{
WARNING: Writing out only positive flow accumulation values.
WARNING: Cells with a likely underestimate for flow accumulation can no
longer be identified.
}}}

That this message is at the WARNING level means that it will not be
silenced in GRASS quiet mode. Can this warning message be changed from
WARNING level to standard GRASS_MESSAGE level? The reason is that in user
or addon scripts that want to do some iteration with r.watershed, this
message will be repeatedly written out to the terminal. Not only is that
annoying and washes out any more meaningful messages being output from the
script, but we also loose some processing time to the many repeated screen
writeouts of this message. If it was at the normal MESSAGE level, it would
follow the typical GRASS verbosity settings, making it play along better
in addon scripts.

In any case, I think it shouldn't be at the WARNING level anyway, since it
makes the less experienced GRASS user think an error has occurred, rather
than acting as a simple reminder that you've checked a particular flag.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2901&gt;
GRASS GIS <https://grass.osgeo.org>

#2901: Change r.watershed message type for flag a
-------------------------+-----------------------------------
  Reporter: isaacullah | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-releasebranch70
Resolution: | Keywords: r.watershed, messages
       CPU: x86-64 | Platform: All
-------------------------+-----------------------------------

Comment (by wenzeslaus):

Perhaps verbose level message is appropriate in this case.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2901#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2901: Change r.watershed message type for flag a
-------------------------+-----------------------------------
  Reporter: isaacullah | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-releasebranch70
Resolution: | Keywords: r.watershed, messages
       CPU: x86-64 | Platform: All
-------------------------+-----------------------------------

Comment (by annakrat):

I agree, I would just use a regular message. If there are no objections, I
will do that.

[https://grass.osgeo.org/grass71/manuals/variables.html Documentation]
says that you can get rid of all warnings and error messages by setting
variable `GRASS_VERBOSE` to -1 in your script.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2901#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2901: Change r.watershed message type for flag a
-------------------------+-----------------------------------
  Reporter: isaacullah | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-releasebranch70
Resolution: | Keywords: r.watershed, messages
       CPU: x86-64 | Platform: All
-------------------------+-----------------------------------

Comment (by isaacullah):

Thanks! Good to know that I can silence this kind of warning in future,
but I'm glad that this particular message will be changed to regular
verbosity, as it's not really a true warning-level message.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2901#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#2901: Change r.watershed message type for flag a
-------------------------+-----------------------------------
  Reporter: isaacullah | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-releasebranch70
Resolution: fixed | Keywords: r.watershed, messages
       CPU: x86-64 | Platform: All
-------------------------+-----------------------------------
Changes (by annakrat):

* status: new => closed
* resolution: => fixed

Comment:

Changed in r67794 and backported in r67795.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2901#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>