[GRASS-SVN] r30387 - in
grass/branches/releasebranch_6_3/raster/simwe: r.sim.sediment simlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 28 07:35:41 EST 2008
Author: neteler
Date: 2008-02-28 07:35:40 -0500 (Thu, 28 Feb 2008)
New Revision: 30387
Modified:
grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/description.html
grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/main.c
grass/branches/releasebranch_6_3/raster/simwe/simlib/input.c
Log:
further fixes (ported from HEAD)
Modified: grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/description.html
===================================================================
--- grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/description.html 2008-02-28 11:55:07 UTC (rev 30386)
+++ grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/description.html 2008-02-28 12:35:40 UTC (rev 30387)
@@ -9,31 +9,35 @@
function Monte Carlo method, to provide robustness necessary for
spatially variable conditions and high resolutions (Mitas and Mitasova
1998). Key inputs of the model include the following raster maps:
- elevation (<i> elevin</i>), flow gradient given by the first-order partial
+ elevation (<i> elevin</i> [m]), flow gradient given by the first-order partial
derivatives of elevation field (<i> dxin</i> and <i>dyin</i>),
-overland flow water depth (<i> wdepth</i>), detachment capacity coefficient (<i>detin</i>),
-transport capacity coefficient (<i>tranin</i>), critical shear stress (<i>tauin</i>)
+overland flow water depth (<i> wdepth</i> [m]), detachment capacity coefficient
+(<i>detin</i> [s/m]), transport capacity coefficient (<i>tranin</i> [s]),
+critical shear stress (<i>tauin</i> [Pa])
and surface roughness coefficient called Manning's n (<i>manin</i> raster map).
Partial derivatives can be computed by <a href="v.surf.rst.html">v.surf.rst</a>
or <a href="r.slope.aspect.html">r.slope.aspect</a>
-module. The data are automatically converted data from feet to metric
-system using database/projection information. The water depth file can be
-computed using <a href="r.sim.water.html">r.sim.water</a>
+module. The data are automatically converted from feet to metric
+system using database/projection information, so the elevation always should be in meters.
+The water depth file can be computed using <a href="r.sim.water.html">r.sim.water</a>
module. Other parameters must be determined using field measurements or
reference literature (see suggested values in Notes and References). <br>
<p>
Output includes transport capacity raster map <i>tc</i> in [kg/ms],
transport capacity limited erosion/deposition raster map
-<i>et</i> [kg/m<sup>2</sup>s], sediment flow rate raster map
-<i>flux</i> [kg/ms], and net erosion/deposition raster map [kg/m<sup>2</sup>s].
-Simulation time is controled by <i> niter</i> parameter. The default value is 1000,
-depending on complexity of terrain, land cover and size of the area, several thousand
- iterations may be needed to reach the steady state. Output
-files can be saved during simulation using <i>outiter</i> parameter
+<i>et</i> [kg/m<sup>2</sup>s]i that are output almost immediately and
+can be viewed while the simulation continues. Sediment flow rate raster map
+<i>flux</i> [kg/ms], and net erosion/deposition raster map [kg/m<sup>2</sup>s]
+can take longer time depending on time step and simulation time.
+Simulation time is controled by <i> niter</i> [minutes] parameter.
+<!-- Output files can be saved during simulation using <i>outiter</i> parameter
defining simulation time step for writing output files. This option requires
time series flag <i>-t</i>. Files are saved with suffix containing
-iteration number (e.g. name.500, name.1000, etc.).<br>
+iteration number (e.g. name.500, name.1000, etc.) representing time in seconds.
+-->
+If the resulting erosion/deposition map is noisy, higher number of walkers,
+given by <i>nwalk</i> should be used.
<br>
<h2>NOTES</h2>
@@ -71,17 +75,26 @@
Path sampling method for modeling overland water flow, sediment transport
and short term terrain evolution in Open Source GIS.
In: C.T. Miller, M.W. Farthing, V.G. Gray, G.F. Pinder eds.,
-Computational Methods in Water Resources, Elsevier.
+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.
<P>
+<a href="http://skagit.meas.ncsu.edu/~helena/gmslab/gisc00/duality.html">
+Mitasova H, Mitas, L., 2000, Modeling spatial processes in multiscale framework:
+exploring duality between particles and fields, </a>
+plenary talk at GIScience2000 conference, Savannah, GA.
+<P>
+Mitas, L., and Mitasova, H., 1998, Distributed soil erosion simulation
+for effective erosion prevention. Water Resources Research, 34(3), 505-516.
+<P>
+<a href="http://skagit.meas.ncsu.edu/~helena/gmslab/papers/LLEmiterev1.pdf">
+ Mitasova, H., Mitas, L., 2001, 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.
<p>
-Mitas, L., and Mitasova, H., 1998, Distributed soil erosion
-simulation for effective erosion prevention. Water Resources Research,
-34(3), 505-516.</p>
-<p>
<a href="http://www.grassbook.org">
-Neteler, M. and Mitasova, H., 2004, Open Source GIS: A GRASS GIS Approach, Second Edition, </a>
-Kluwer International Series in Engineering and Computer Science, 773, Kluwer Academic Press / Springer,
-Boston, Dordrecht, 424 pages.
+Neteler, M. and Mitasova, H., 2008, Open Source GIS: A GRASS GIS Approach. Third Edition.</a>
+The International Series in Engineering and Computer Science: Volume 773. Springer New York Inc, p. 406.
+<P>
<p><br>
Last changed: $Date$</p>
Modified: grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/main.c
===================================================================
--- grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/main.c 2008-02-28 11:55:07 UTC (rev 30386)
+++ grass/branches/releasebranch_6_3/raster/simwe/r.sim.sediment/main.c 2008-02-28 12:35:40 UTC (rev 30387)
@@ -49,10 +49,10 @@
/********************************/
/* DEFINE GLOB VAR */
/********************************/
-#define NWALK "2000000"
+/* #define NWALK "1000000" */
#define DIFFC "0.8"
-#define NITER "1200"
-#define ITEROUT "300"
+#define NITER "10"
+#define ITEROUT "2"
#define DENSITY "200"
#define MANINVAL "0.1"
@@ -133,7 +133,9 @@
yp0 = ymin + stepy / 2.;
xmax = xmin + stepx * (float) mx;
ymax = ymin + stepy * (float) my;
+ hhc = hhmax = 0.;
+/*
bxmi=2093113. * conv;
bymi=731331. * conv;
bxma=2093461. * conv;
@@ -142,12 +144,10 @@
bresy=2. * conv;
maxwab=100000;
- hhc = hhmax = 0.;
-
mx2o= (int)((bxma-bxmi)/bresx);
my2o= (int)((byma-bymi)/bresy);
- /* relative small box coordinates: leave 1 grid layer for overlap */
+ /* relative small box coordinates: leave 1 grid layer for overlap
bxmi = bxmi - mixx + stepx;
bymi = bymi - miyy + stepy;
@@ -155,6 +155,7 @@
byma = byma - miyy - stepy;
mx2 = mx2o - 2*((int) (stepx / bresx));
my2 = my2o - 2*((int) (stepy / bresy));
+*/
parm.elevin = G_define_standard_option(G_OPT_R_INPUT);
parm.elevin->key = "elevin";
@@ -248,7 +249,7 @@
parm.nwalk = G_define_option();
parm.nwalk->key = "nwalk";
parm.nwalk->type = TYPE_INTEGER;
- parm.nwalk->answer = NWALK;
+/* parm.nwalk->answer = NWALK; */
parm.nwalk->required = NO;
parm.nwalk->description = _("Number of walkers");
parm.nwalk->guisection = _("Parameters");
@@ -284,7 +285,7 @@
parm.diffc->required = NO;
parm.diffc->description = _("Water diffusion constant");
parm.diffc->guisection = _("Parameters");
-
+/*
flag.mscale = G_define_flag ();
flag.mscale->key = 'm';
flag.mscale->description = _("Multiscale simulation");
@@ -292,12 +293,13 @@
flag.tserie = G_define_flag ();
flag.tserie->key = 't';
flag.tserie->description = _("Time-series output");
+*/
if (G_parser (argc, argv))
exit (EXIT_FAILURE);
- mscale=flag.mscale->answer ? "m" : NULL;
- tserie=flag.tserie->answer ? "t" : NULL;
+/* mscale=flag.mscale->answer ? "m" : NULL;
+ tserie=flag.tserie->answer ? "t" : NULL; */
elevin = parm.elevin->answer;
wdepth = parm.wdepth->answer;
@@ -315,7 +317,7 @@
erdep = parm.erdep->answer;
sfile = parm.sfile->answer;
- sscanf(parm.nwalk->answer, "%d", &maxwa);
+/* sscanf(parm.nwalk->answer, "%d", &maxwa); */
sscanf(parm.niter->answer, "%d", ×ec);
sscanf(parm.outiter->answer, "%d", &iterout);
sscanf(parm.density->answer, "%d", &ldemo);
Modified: grass/branches/releasebranch_6_3/raster/simwe/simlib/input.c
===================================================================
--- grass/branches/releasebranch_6_3/raster/simwe/simlib/input.c 2008-02-28 11:55:07 UTC (rev 30386)
+++ grass/branches/releasebranch_6_3/raster/simwe/simlib/input.c 2008-02-28 12:35:40 UTC (rev 30387)
@@ -605,7 +605,8 @@
fprintf (stderr, "\n");
G_message (_("Min elevation \t= %.2f m\nMax elevation \t= %.2f m\n"),zmin,zmax);
- G_message (_("Mean Rainfall \t= %f m/s\nMean flow velocity \t= %f m/s\n"),si0,vmean);
+ G_message (_("Mean Source Rate (rainf. excess or sediment) \t= %f m/s or kg/m2s \n"),si0);
+ G_message (_("Mean flow velocity \t= %f m/s\n"),vmean);
G_message (_("Mean Mannings \t= %f\n"),1.0/chmean);
deltap = amin1(deltap,deltaw);
More information about the grass-commit
mailing list