[GRASS-SVN] r70102 - grass-addons/grass7/raster/r.subdayprecip.design
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 20 06:01:28 PST 2016
Author: martinl
Date: 2016-12-20 06:01:28 -0800 (Tue, 20 Dec 2016)
New Revision: 70102
Modified:
grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.html
grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py
Log:
r.subdayprecip.design: parameter 'raster' renamed to 'return_period'
options renamed to NX
Modified: grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.html
===================================================================
--- grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.html 2016-12-20 13:54:25 UTC (rev 70101)
+++ grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.html 2016-12-20 14:01:28 UTC (rev 70102)
@@ -22,9 +22,9 @@
<p>
First automatization has been implemented by well-known method
which is based on reduction of 24 hours design precipitation to
-shorter time. GIS is used for spatial supervised classification of
+shorter time. GIS can used for spatial supervised classification of
point values of specified return periods (2, 10, 20, 50 and 100
-years) over the area of the Czech Republic.
+years).
<center>
<table>
@@ -41,14 +41,14 @@
<img src="r_subdayprecip_design_result.png">
<p>
-<em>Figure: IV.order basins colored by mean H_002_60 value (in millimeters)</em>
+<em>Figure: IV.order basins colored by mean H_N2T60 value (in millimeters)</em>
</center>
<h2>EXAMPLE</h2>
<div class="code"><pre>
-r.subdayprecip.design map=basin raster=H_002,H_005,H_010,H_020 rainlength=60
+r.subdayprecip.design map=basin return_period=N2,N5,N10,N20 rainlength=60
</pre></div>
<h2>REFERENCES</h2>
@@ -74,7 +74,8 @@
<h3>Acknowledgement</h3>
-This work has been supported by the <a href="http://rain.fsv.cvut.cz">research project QJ1520265</a> -
+This work has been supported by
+the <a href="http://rain.fsv.cvut.cz">research project QJ1520265</a> -
"Variability of Short-term Precipitation and Runoff in Small
Czech Drainage Basins and its Influence on Water Resources
Management".
@@ -88,9 +89,11 @@
<h2>AUTHORS</h2>
-Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech
-Republic<br> The module is inspired by Python script developed for
-Esri ArcGIS platform by M. Tomasu in 2013.
+Martin Landa, GeoForAll (OSGeoREL) Lab, Czech Technical University in Prague, Czech
+Republic<br>
+The module is inspired by Python script developed for Esri ArcGIS
+platform by M. Tomasu in 2013.
+
<p>
<i>Last changed: $Date$</i>
Modified: grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py
===================================================================
--- grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py 2016-12-20 13:54:25 UTC (rev 70101)
+++ grass-addons/grass7/raster/r.subdayprecip.design/r.subdayprecip.design.py 2016-12-20 14:01:28 UTC (rev 70102)
@@ -28,9 +28,9 @@
#%end
#%option G_OPT_R_INPUTS
-#% key: raster
+#% key: return_period
#% description: Rainfall raster maps of required return period
-#% options: H_002,H_005,H_010,H_020,H_050,H_100
+#% options: N2,N5,N10,N20,N50,N100
#%end
#%option
@@ -50,7 +50,7 @@
def coeff(name, rl):
a = c = None
- if name == 'H_002':
+ if name == 'N2':
if rl < 40:
a = 0.166
c = 0.701
@@ -60,7 +60,7 @@
elif rl < 1440:
a = 0.235
c = 0.801
- elif name == 'H_005':
+ elif name == 'N5':
if rl < 40:
a = 0.171
c = 0.688
@@ -70,7 +70,7 @@
elif rl < 1440:
a = 0.324
c = 0.845
- elif name == 'H_010':
+ elif name == 'N10':
if rl < 40:
a = 0.163
c = 0.656
@@ -80,7 +80,7 @@
elif rl < 1440:
a = 0.380
c = 0.867
- elif name == 'H_020':
+ elif name == 'N20':
if rl < 40:
a = 0.169
c = 0.648
@@ -90,7 +90,7 @@
elif rl < 1440:
a = 0.463
c = 0.894
- elif name == 'H_050':
+ elif name == 'N50':
if rl < 40:
a = 0.174
c = 0.638
@@ -100,7 +100,7 @@
elif rl < 1440:
a = 0.580
c = 0.925
- elif name == 'H_100':
+ elif name == 'N100':
if rl < 40:
a = 0.173
c = 0.625
@@ -125,7 +125,7 @@
except CalledModuleError as e:
return 1
- allowed_rasters = ('H_002', 'H_005', 'H_010', 'H_020', 'H_050', 'H_100')
+ allowed_rasters = ('N2', 'N5', 'N10', 'N20', 'N50', 'N100')
# test input feature type
vinfo = grass.vector_info_topo(opt['map'])
@@ -133,7 +133,7 @@
grass.fatal(_("No points or areas found in input vector map <{}>").format(opt['map']))
# extract multi values to points
- for rast in opt['raster'].split(','):
+ for rast in opt['return_period'].split(','):
# check valid rasters
name = grass.find_file(rast, element='cell')['name']
if not name:
@@ -169,7 +169,7 @@
# add column to the attribute table if not exists
rl = float(opt['rainlength'])
- field_name='{}_{}'.format(name, opt['rainlength'])
+ field_name='H_{}T{}'.format(name, opt['rainlength'])
if field_name not in columns:
Module('v.db.addcolumn', map=opt['map'],
columns='{} double precision'.format(field_name))
More information about the grass-commit
mailing list