#2901 closed defect (fixed)

Change r.watershed message type for flag a

Reported by: isaacullah Owned by: grass-dev@…
Priority: normal Milestone: 7.0.4
Component: Raster Version: svn-releasebranch70
Keywords: r.watershed, messages Cc:
CPU: x86-64 Platform: All

Description

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.

Change History (4)

comment:1 Changed 22 months ago by wenzeslaus

Perhaps verbose level message is appropriate in this case.

comment:2 Changed 22 months ago by annakrat

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

Documentation says that you can get rid of all warnings and error messages by setting variable GRASS_VERBOSE to -1 in your script.

comment:3 Changed 22 months ago 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.

comment:4 Changed 22 months ago by annakrat

Resolution: fixed
Status: newclosed

Changed in r67794 and backported in r67795.

Note: See TracTickets for help on using tickets.