[GRASS-SVN] r70044 - grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.recommended

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 9 01:57:18 PST 2016


Author: Giulia
Date: 2016-12-09 01:57:18 -0800 (Fri, 09 Dec 2016)
New Revision: 70044

Modified:
   grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.recommended/r.green.hydro.recommended.py
Log:
r.green.hydro: limit discharge to positive values

Modified: grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.recommended/r.green.hydro.recommended.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.recommended/r.green.hydro.recommended.py	2016-12-09 09:13:27 UTC (rev 70043)
+++ grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.recommended/r.green.hydro.recommended.py	2016-12-09 09:57:18 UTC (rev 70044)
@@ -348,6 +348,8 @@
                                          discharge_natural,
                                          percentage)
         mapcalc(formula, overwrite=OVW)
+        formula = '%s=if(%s>0, %s, 0)'
+        mapcalc(formula, overwrite=OVW)
         TMPRAST.append(tmp_disch)
         discharge_current = tmp_disch
 



More information about the grass-commit mailing list