Skip to content

Commit

Permalink
r.sim.water: NC SPM example and other modernizations (#171)
Browse files Browse the repository at this point in the history
* r.sim.water: NC SPM example and other modernizations

Updated URLs, simplified example (no spatially constant maps),
using NC SPM, not Sprearfish, rendering code in the example,
a representative image at the beging of in the description,
better rendering of example, better HTML with margins for figures.

* r.sim.water: use full option names, explain the value used in a g.region call

Co-Authored-By: Markus Neteler <neteler@gmail.com>
  • Loading branch information
wenzeslaus and neteler committed Nov 3, 2019
1 parent 657ef28 commit e443904
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
67 changes: 49 additions & 18 deletions raster/r.sim/r.sim.water/r.sim.water.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,21 @@ <h2>DESCRIPTION</h2>
predefined direction of flow, map algebra can be used to replace terrain-derived
partial derivatives with pre-defined partial derivatives in selected grid cells such
as man-made channels, ditches or culverts. Equations (2) and (3) from
<a href="http://www4.ncsu.edu/~hmitaso/gmslab/reports/cerl99/rep99.html">this report</a>
<a href="http://fatra.cnr.ncsu.edu/~hmitaso/gmslab/reports/cerl99/rep99.html">this report</a>
can be used to compute partial derivates of the predefined flow using its direction given
by aspect and slope.

<p>
<div align="center" style="margin: 10px;">
<img style="margin: 0.5em;" src="r_sim_water.png" alt="r.sim.water generated depth map"><br>
<i >
Figure: Simulated water flow in a rural area
showing the areas with highest water depth
highlighting streams, pooling, and wet areas
during a rainfall event.
</i>
</div>

<p>
The module automatically converts horizontal distances from feet to metric system using
database/projection information. Rainfall excess is defined as rainfall intensity
Expand Down Expand Up @@ -137,26 +148,46 @@ <h2>NOTES</h2>

<h2>EXAMPLE</h2>

Spearfish region:
Using the North Carolina full sample dataset:

<div class="code"><pre>
g.region raster=elevation.10m -p
r.slope.aspect elevation=elevation.10m dx=elev_dx dy=elev_dy
# set computational region
g.region raster=elev_lid792_1m -p

# compute dx, dy
r.slope.aspect elevation=elev_lid792_1m dx=elev_lid792_dx dy=elev_lid792_dy

# synthetic maps
r.mapcalc "rain = if(elevation.10m, 5.0, null())"
r.mapcalc "manning = if(elevation.10m, 0.05, null())"
r.mapcalc "infilt = if(elevation.10m, 0.0, null())"
# simulate (this may take a minute or two)
r.sim.water elevation=elev_lid792_1m dx=elev_lid792_dx dy=elev_lid792_dy depth=water_depth disch=water_discharge nwalk=10000 rain_value=100 niter=5
</pre></div>

Now, let's visualize the result using rendering to a file
(note the further management of computational region and
usage of <a href="d.mon.html">d.mon</a> module
which are not needed when working in GUI):

# simulate
r.sim.water elevation=elevation.10m dx=elev_dx dy=elev_dy rain=rain man=manning infil=infilt nwalkers=5000000 depth=depth
<div class="code"><pre>
# increase the computational region by 350 meters
g.region e=e+350
# initiate the rendering
d.mon start=cairo output=r_sim_water_water_depth.png
# render raster, legend, etc.
d.rast map=water_depth_1m
d.legend raster=water_depth_1m title="Water depth [m]" label_step=0.10 font=sans at=20,80,70,75
d.barscale at=67,10 length=250 segment=5 font=sans
d.northarrow at=90,25
# finish the rendering
d.mon stop=cairo
</pre></div>

<p>
<center>
<img src="r_sim_water.png" alt="r.sim.water generated depth map"><br>
<i>Figure: Water depth map in the Spearfish (SD) area</i>
</center>
<div align="center" style="margin: 10px;">
<img style="margin: 0.5em;" src="r_sim_water_water_depth.png" alt="r.sim.water generated depth map"><br>
<i >
Figure: Simulated water depth map in the rural area of
the North Carolina sample dataset.
</i>
</div>


<h2>ERROR MESSAGES</h2>
Expand All @@ -173,23 +204,23 @@ <h2>REFERENCES</h2>

<ul>
<li> Mitasova, H., Thaxton, C., Hofierka, J., McLaughlin, R., Moore, A., Mitas L., 2004,
<a href="http://www4.ncsu.edu/~hmitaso/gmslab/papers/II.6.8_Mitasova_044.pdf">
<a href="http://fatra.cnr.ncsu.edu/~hmitaso/gmslab/papers/II.6.8_Mitasova_044.pdf">
Path sampling method for modeling overland water flow, sediment transport
and short term terrain evolution in Open Source GIS.</a>
In: C.T. Miller, M.W. Farthing, V.G. Gray, G.F. Pinder eds.,
Proceedings of the XVth International Conference on Computational Methods in Water
Resources (CMWR XV), June 13-17 2004, Chapel Hill, NC, USA, Elsevier, pp. 1479-1490.

<li> Mitasova H, Mitas, L., 2000,
<a href="http://www4.ncsu.edu/~hmitaso/gmslab/gisc00/duality.html">Modeling spatial
<a href="http://fatra.cnr.ncsu.edu/~hmitaso/gmslab/gisc00/duality.html">Modeling spatial
processes in multiscale framework: exploring duality between particles and fields,</a>
plenary talk at GIScience2000 conference, Savannah, GA.

<li> Mitas, L., and Mitasova, H., 1998, Distributed soil erosion simulation
for effective erosion prevention. Water Resources Research, 34(3), 505-516.

<li> Mitasova, H., Mitas, L., 2001,
<a href="http://www4.ncsu.edu/~hmitaso/gmslab/papers/LLEmiterev1.pdf">
<a href="http://fatra.cnr.ncsu.edu/~hmitaso/gmslab/papers/LLEmiterev1.pdf">
Multiscale soil erosion simulations for land use management,</a>
In: Landscape erosion and landscape evolution modeling, Harmon R. and Doe W. eds.,
Kluwer Academic/Plenum Publishers, pp. 321-347.
Expand All @@ -203,7 +234,7 @@ <h2>REFERENCES</h2>
Simulating aspects of a flash flood using the Monte Carlo method and
GRASS GIS: a case study of the Mal&aacute; Svinka Basin (Slovakia),
Open Geosciences. Volume 7, Issue 1, ISSN (Online) 2391-5447, DOI:
<a href="http://dx.doi.org/10.1515/geo-2015-0013">10.1515/geo-2015-0013</a>,
<a href="https://doi.org/10.1515/geo-2015-0013">10.1515/geo-2015-0013</a>,
April 2015

<li> Neteler, M. and Mitasova, H., 2008,
Expand Down
Binary file modified raster/r.sim/r.sim.water/r_sim_water.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e443904

Please sign in to comment.