[GRASS-SVN] r59120 - grass/trunk/raster/r.ros

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 21 14:24:48 PST 2014


Author: wenzeslaus
Date: 2014-02-21 14:24:48 -0800 (Fri, 21 Feb 2014)
New Revision: 59120

Modified:
   grass/trunk/raster/r.ros/main.c
   grass/trunk/raster/r.ros/r.ros.html
Log:
r.ros: manual improvements, moving parameters descriptions from HTML

Modified: grass/trunk/raster/r.ros/main.c
===================================================================
--- grass/trunk/raster/r.ros/main.c	2014-02-21 21:58:07 UTC (rev 59119)
+++ grass/trunk/raster/r.ros/main.c	2014-02-21 22:24:48 UTC (rev 59120)
@@ -6,8 +6,10 @@
  *               Markus Neteler <neteler itc.it>
  *               Roberto Flor <flor itc.it>, Brad Douglas <rez touchofmadness.com>,
  *               Glynn Clements <glynn gclements.plus.com>, Jachym Cepicky <jachym les-ejk.cz>
- * PURPOSE:
+ * PURPOSE:      Generates rate of spread raster map layers for wildfire modeling
  *
+ * TODO: (re)move following documentation
+ *
  * This raster module creates three raster map layers:
  *	1. Base (perpendicular) rate of spread (ROS);
  *	2. Maximum (forward) ROS; and
@@ -210,75 +212,122 @@
     module = G_define_module();
     G_add_keyword(_("raster"));
     G_add_keyword(_("fire"));
-    module->label = _("Generates rate of spread raster map layers.");
+    G_add_keyword(_("spread"));
+    G_add_keyword(_("rate of spread"));
+    G_add_keyword(_("hazard"));
+    module->label = _("Generates rate of spread raster maps.");
     module->description =
-	_("Generates three, or four raster map layers showing 1) the base "
-	  "(perpendicular) rate of spread (ROS), 2) the maximum (forward) ROS, "
-	  "3) the direction of the maximum ROS, and optionally 4) the "
-	  "maximum potential spotting distance.");
+	_("Generates three, or four raster map layers showing the base "
+	  "(perpendicular) rate of spread (ROS), the maximum (forward) ROS, "
+	  "the direction of the maximum ROS, and optionally the "
+	  "maximum potential spotting distance for fire spread simulation.");
 
     parm.model = G_define_standard_option(G_OPT_R_INPUT);
     parm.model->key = "model";
-    parm.model->description = _("Name of raster map containing fuel MODELs");
+    parm.model->label = _("Raster map containing fuel models");
+    parm.model->description =
+	_("Name of an "
+	  "existing raster map layer in the user's current mapset search path containing "
+	  "the standard fuel models defined by the USDA Forest Service. Valid values "
+	  "are 1-13; other numbers are recognized as barriers by r.ros.");
 
     parm.mois_1h = G_define_standard_option(G_OPT_R_INPUT);
     parm.mois_1h->key = "moisture_1h";
     parm.mois_1h->required = NO;
-    parm.mois_1h->description =
-	_("Name of raster map containing the 1-HOUR fuel MOISTURE (%)");
+    parm.mois_1h->label =
+	_("Raster map containing the 1-hour fuel moisture (%)");
+	parm.mois_1h->description =
+	_("Name of an existing raster map layer in "
+	  "the user's current mapset search path containing the 1-hour (<.25\") "
+	  "fuel moisture (percentage content multiplied by 100).");
 
     parm.mois_10h = G_define_standard_option(G_OPT_R_INPUT);
     parm.mois_10h->key = "moisture_10h";
     parm.mois_10h->required = NO;
+    parm.mois_10h->label =
+	_("Raster map containing the 10-hour fuel moisture (%)");
     parm.mois_10h->description =
-	_("Name of raster map containing the 10-HOUR fuel MOISTURE (%)");
+	_("Name of an existing raster map layer in the "
+	  "user's current mapset search path containing the 10-hour (.25-1\") fuel "
+	  "moisture (percentage content multiplied by 100).");
 
     parm.mois_100h = G_define_standard_option(G_OPT_R_INPUT);
     parm.mois_100h->key = "moisture_100h";
     parm.mois_100h->required = NO;
+    parm.mois_100h->label =
+	_("Raster map containing the 100-hour fuel moisture (%)");
     parm.mois_100h->description =
-	_("Name of raster map containing the 100-HOUR fuel MOISTURE (%)");
+	_("Name of an existing raster map layer in the "
+	  "user's current mapset search path containing the 100-hour (1-3\") fuel moisture "
+	  "(percentage content multiplied by 100).");
 
     parm.mois_live = G_define_standard_option(G_OPT_R_INPUT);
     parm.mois_live->key = "moisture_live";
+    parm.mois_live->label =
+	_("Raster map containing live fuel moisture (%)");
     parm.mois_live->description =
-	_("Name of raster map containing LIVE fuel MOISTURE (%)");
+	_("Name of an existing raster map layer in the "
+	  "user's current mapset search path containing live (herbaceous) fuel "
+	  "moisture (percentage content multiplied by 100).");
 
     parm.vel = G_define_standard_option(G_OPT_R_INPUT);
     parm.vel->key = "velocity";
     parm.vel->required = NO;
     parm.vel->description =
-	_("Name of raster map containing midflame wind VELOCITYs (ft/min)");
+	_("Raster map containing midflame wind velocitys (ft/min)");
+    parm.vel->description =
+	_("Name of an existing raster map layer in the user's "
+	  "current mapset search path containing wind velocities at half of the average "
+	  "flame height (feet/minute).");
 
     parm.dir = G_define_standard_option(G_OPT_R_INPUT);
     parm.dir->key = "direction";
     parm.dir->required = NO;
+    parm.dir->label =
+	_("Name of raster map containing wind directions (degree)");
     parm.dir->description =
-	_("Name of raster map containing wind DIRECTIONs (degree)");
+	_("Name of an existing raster map "
+	  "layer in the user's current mapset search path containing wind direction, "
+	  "clockwise from north (degree).");
 
     parm.slope = G_define_standard_option(G_OPT_R_INPUT);
     parm.slope->key = "slope";
     parm.slope->required = NO;
+    parm.slope->label =
+	_("Name of raster map containing slope (degree)");
     parm.slope->description =
-	_("Name of raster map containing SLOPE (degree)");
+	_("Name of an existing raster map layer "
+	  "in the user's current mapset search path containing "
+	  "topographic slope (degree).");
 
     parm.aspect = G_define_standard_option(G_OPT_R_INPUT);
     parm.aspect->key = "aspect";
     parm.aspect->required = NO;
+    parm.aspect->label =
+	_("Raster map containing aspect (degree, CCW from E)");
     parm.aspect->description =
-	_("Name of raster map containing ASPECT (degree, anti-clockwise from E)");
+	_("Name of an existing "
+	  "raster map layer in the user's current mapset search path containing "
+	  "topographic aspect, counterclockwise from east (GRASS convention) "
+	  "in degrees.");
 
     parm.elev = G_define_standard_option(G_OPT_R_ELEV);
     parm.elev->required = NO;
+    parm.elev->label =
+	_("Raster map containing elevation (m, required with -s)");
     parm.elev->description =
-	_("Name of raster map containing ELEVATION (m) (required w/ -s)");
+	_("Name of an existing raster map "
+	  "layer in the user's current mapset search path containing elevation (meters). "
+	  "Option is required from spotting distance computation "
+	  "(when -s flag is enabled)");
 
     parm.output = G_define_standard_option(G_OPT_R_OUTPUT);
-    parm.output->description = _("Name prefix for output raster maps (.base, .max, .maxdir)");
+    parm.output->description =
+	_("Prefix for output raster maps (.base, .max, .maxdir, .spotdist)");
 
     flag_s = G_define_flag();
     flag_s->key = 's';
-    flag_s->description = _("Also produce maximum SPOTTING distance");
+    flag_s->description = _("Also produce maximum spotting distance");
 
     /*   Parse command line */
     if (G_parser(argc, argv))

Modified: grass/trunk/raster/r.ros/r.ros.html
===================================================================
--- grass/trunk/raster/r.ros/r.ros.html	2014-02-21 21:58:07 UTC (rev 59119)
+++ grass/trunk/raster/r.ros/r.ros.html	2014-02-21 22:24:48 UTC (rev 59120)
@@ -1,126 +1,100 @@
 <h2>DESCRIPTION</h2>
 
-<em>r.ros</em> generates the base ROS value, maximum ROS value, direction
-of the maximum ROS, and optionally the maximum potential spotting distance
-of a wildfire for each raster cell in the current geographic region. The
-calculation of the two ROS values for each raster cell is based on the
+<em>r.ros</em> is used for fire (wildfire) modeling. The input is fuel model
+and moisture and the outputs are rate of spread (ROS) values.
+The module generates the base ROS value, maximum ROS value,
+direction of the maximum ROS, and optionally the maximum potential spotting distance
+of wildfire for each raster cell in the current geographic region.
+These three or four raster map layers
+serve as inputs for the <em><a href="r.spread.html">r.spread</a></em> module
+which is the next step in fire simulation.
+
+<p>
+The <em>r.ros</em> module and two related modules
+<em><a href="r.spread.html">r.spread</a></em>,
+and <em><a href="r.spreadpath.html">r.spreadpath</a></em> can be used
+not only for wildfire modeling but also generally
+to simulate other events where spread of something is involved and
+elliptical spread is appropriate.
+
+<p>
+The calculation of the two ROS values for each raster cell is based on the
 Fortran code by Pat Andrews (1983) of the Northern Forest Fire Laboratory,
 USDA Forest Service. The direction of the maximum ROS results from the
 vector addition of the forward ROS in wind direction and that in upslope
 direction. The spotting distance, if required, will be calculated by a
 separate function, spot_dist(), which is based on Lathrop and Xu (in preparation),
-Chase (1984) and Rothermel (1991). These three or four raster map layers
-serve as inputs for another GRASS raster program r.spread. More information
-on r.ros and r.spread can be found in Xu (1994).
+Chase (1984) and Rothermel (1991).  More information
+on <em>r.ros</em> and <em><a href="r.spread.html">r.spread</a></em> can be found in Xu (1994).
 
-<h3>Parameters</h3>
-<dl>
-<dt><b>model</b>
-<dd> Name of an
-existing raster map layer in the user's current mapset search path containing
-the standard fuel models defined by the USDA Forest Service. Valid values
-are 1-13; other numbers are recognized as barriers by r.ros.
+<p>
+The <b>output</b> parameter is a basename (prefix) for all generated
+raster maps and each map gets a unique suffix:
 
-<dt><b>moisture_1h</b>
-<dd> Name of an existing raster map layer in
-the user's current mapset search path containing the 1-hour (<.25")
-fuel moisture (percentage content multiplied by 100).
+<ul>
+  <li><tt>.base</tt> for the base (perpendicular) ROS (cm/minute)
+  <li><tt>.max</tt> for the maximum (forward) ROS (cm/minute),
+  <li><tt>.maxdir</tt> for the direction of the maximum
+    ROS, clockwise from north (degree), and optionally
+  <li><tt>.spotdist</tt> for the maximum potential
+    spotting distance (meters).
+</ul>
 
-<dt><b>moisture_10h</b> 
-<dd>Name of an existing raster map layer in the
-user's current mapset search path containing the 10-hour (.25-1") fuel
-moisture (percentage content multiplied by 100).
+<p>
+So, if the output parameter is <tt>blackforest_ros</tt>, <em>r.ros</em> creates
+<tt>blackforest_ros.base</tt>, <tt>blackforest_ros.max</tt>,
+<tt>blackforest_ros.maxdir</tt>,
+and (optionally) <tt>blackforest_ros.spotdist</tt> raster maps.
 
-<dt><b>moisture_100h</b>
-<dd>Name of an existing raster map layer in the
-user's current mapset search path containing the 100-hour (1-3") fuel moisture
-(percentage content multiplied by 100).
-
-<dt><b>moisture_live</b>
-<dd>Name of an existing raster map layer in the
-user's current mapset search path containing live (herbaceous) fuel fuel
-moisture (percentage content multiplied by 100).
-
-<dt><b>velocity</b>
-<dd>Name of an existing raster map layer in the user's
-current mapset search path containing wind velocities at half of the average
-flame height (feet/minute).
-
-<dt><b>direction</b>
-<dd>Name of an existing raster map
-layer in the user's current mapset search path containing wind direction,
-clockwise from north (degree).
-
-<dt><b>slope</b>
-<dd>Name of
-an existing raster map layer in the user's current mapset search path containing
-topographic slope (degree).
-
-<dt><b>aspect</b>
-<dd>Name of an existing
-raster map layer in the user's current mapset search path containing
-topographic aspect, counter-clockwise from east (GRASS convention)
-(degree).
-
-<dt><b>elevation</b>
-<dd>Name of an existing raster map
-layer in the user's current mapset search path containing elevation (meters).
-
-<dt><b>output</b>
-<dd>Prefix of new
-raster map layers in the user's current mapset to contain
-<br> 1) the base (perpendicular) ROS
-(cm/minute);
-<br> 2) the maximum (forward) ROS (cm/minute),
-<br> 3) the direction of the maximum
-ROS, clockwise from north (degree), and optionally
-<br> 4) the maximum potential
-spotting distance (meters).
-<br>If 'my_ros' is given as the output name, then r.ros automatically
-assigns 'my_ros.base', 'my_ros.max', 'my_ros.maxdir', and optionally,
-'my_ros.spotdist' as the names for the actual output map layers.
-</dl>
-
-<h3>OPTIONS</h3>
-
-<p>If the options <b>moisture_1h</b>, <b>moisture_10h</b>, and
-<b>moisture_100h</b> are partially given, the program will assign
+<p>If only one or two of the options <b>moisture_1h</b>, <b>moisture_10h</b>,
+and <b>moisture_100h</b> are given, the module will assign
 values to the missing option using the formula:
 
 <div class="code"><pre>
-moisture_100h = moisture_10h + 1 = moisture_1h + 2.
+moisture_100h = moisture_10h + 1 = moisture_1h + 2
 </pre></div>
 
-However at least one of them should be given. Options <b>velocity</b>
-and <b>direction</b> must be in pair, whether given or not. If none is
-given, the program will assume a no-wind
-condition. Options <b>slope</b> and <b>aspect</b> must be in pair,
-whether given or not. If none is given, the program will assume a
+However, at least one of them should be given.
+
+<p>
+Options <b>velocity</b>
+and <b>direction</b> must be both given or both omitted.
+If none is given, the module will assume a no-wind
+condition.
+
+<p>
+Options <b>slope</b> and <b>aspect</b> must be also given together.
+If none is given, the module will assume a
 topographically flat condition. Option
-<b>elevation</b> must be given if <b>-s</b> option is used.
+<b>elevation</b> must be given if <b>-s</b> (spotting) flag is used.
 
 <h2>EXAMPLES</h2>
 Assume we have inputs, the following generates ROSes and spotting distances:
 
 <div class="code"><pre>
-r.ros -s model=fire_model moisture_1h=1hour_moisture moisture_live=live_moisture
-velocity=wind_speed direction=wind_direction
-slope=slope aspect=aspect elevation=elevation output=my_ros
+r.ros -s model=fire_model moisture_1h=1hour_moisture moisture_live=live_moisture \
+    velocity=wind_speed direction=wind_direction \
+    slope=slope aspect=aspect elevation=elevation output=ros
 </pre></div>
 
 <h2>NOTES</h2>
 
 <ol>
-  <li>r.ros is supposed to be run before running another GRASS program r.spread.
-    The combination of the two forms a simulation of the spread of wildfires.
-  <li>The inputs to r.ros should be in proper units.
+  <li>r.ros is supposed to be run before running
+    <em><a href="r.spread.html">r.spread</a></em> module.
+    The combination of these two modules forms
+    a simulation of the spread of wildfires.
+  <li>The user should be sure that the inputs to
+    <em>r.ros</em> are in proper units.
   <li>The output units for the base and maximum ROSes are in cm/minute
     rather than ft/minute, which is due to that a possible zero ft/minute base
     ROS value and a positive integer ft/minute maximum ROS would result in
-    calculation failure in the r.spread program.
-  <li>The user needs to provide only ONE output name even the program
-    actually generates THREE or FOUR map layers.
-  <li>The rules for optional parameters must be followed.
+    calculation failure in the
+    <em><a href="r.spread.html">r.spread</a></em> module.
+    <!-- This is caused by usage of CELL instead of FCELL/DCELL. ? -->
+    As far as the user just use <em>r.ros</em> together with
+    <em><a href="r.spread.html">r.spread</a></em>, there is no need to
+    concern about these output units.
 </ol>
 
 <h2>REFERENCES</h2>
@@ -153,7 +127,8 @@
 <em>
   <a href="g.region.html">g.region</a>,
   <a href="r.slope.aspect.html">r.slope.aspect</a>,
-  <a href="r.spread.html">r.spread</a>
+  <a href="r.spread.html">r.spread</a>,
+  <a href="r.spreadpath.html">r.spreadpath</a>
 </em>
 
 <h2> AUTHOR</h2>



More information about the grass-commit mailing list