[GRASS-SVN] r68064 - grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.discharge

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 15 08:00:21 PDT 2016


Author: Giulia
Date: 2016-03-15 08:00:20 -0700 (Tue, 15 Mar 2016)
New Revision: 68064

Modified:
   grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.discharge/r.green.hydro.discharge.py
Log:
r.green: set the pixel area based on the resolution in meter

Modified: grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.discharge/r.green.hydro.discharge.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.discharge/r.green.hydro.discharge.py	2016-03-15 10:56:34 UTC (rev 68063)
+++ grass-addons/grass7/raster/r.green/r.green.hydro/r.green.hydro.discharge/r.green.hydro.discharge.py	2016-03-15 15:00:20 UTC (rev 68064)
@@ -94,7 +94,7 @@
 #% type: string
 #% key_desc: name
 #% description: Name of raster map with minimum flow along the river [m3/s]
-#% required: yes
+#% required: no
 #%end
 #%option G_OPT_R_OUTPUT
 #% key: a_river
@@ -195,7 +195,7 @@
         the accumulation map and the new streams
     """
     pid = os.getpid()
-    info = gcore.parse_command('g.region', flags='pg')
+    info = gcore.parse_command('g.region', flags='pgm')
     area_px = float(info['nsres'])*float(info['ewres'])
     tmp_stream = 'tmprgreen_%i_stream' % pid
     tmp_tmp_stream = 'tmprgreen_%i_tmpstream' % pid
@@ -219,7 +219,7 @@
     """ Compute the discharge along the river given the specific discharge
     """
     pid = os.getpid()
-    info = gcore.parse_command('g.region', flags='pg')
+    info = gcore.parse_command('g.region', flags='pgm')
     area_px = float(info['nsres'])*float(info['ewres'])
     q_cum = "tmprgreen_%i_q_cum" % pid
     gcore.run_command('r.watershed',



More information about the grass-commit mailing list