[GRASS-git] [OSGeo/grass] 2c573d: r.sim.water: Document flow_control as trapping pro...

Vaclav Petras noreply at github.com
Tue Sep 29 12:39:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 2c573d9a8693f39ede85112f604a5230d337cccf
      https://github.com/OSGeo/grass/commit/2c573d9a8693f39ede85112f604a5230d337cccf
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M raster/r.sim/r.sim.water/main.c
    M raster/r.sim/r.sim.water/r.sim.water.html
    M raster/r.sim/r.sim.water/r.sim.water.md

  Log Message:
  -----------
  r.sim.water: Document flow_control as trapping probability (#7971)

The manual and the option description called flow_control a permeability
ratio, the probability of particles to pass through a structure, but the
code traps a particle (reverses its velocity and scales it to 10%) when a
uniform random number is at or below the cell value, so higher values
increase depth. The comparison, the name of the trap array, the skip for
cells with value 0, and the documentation text are all unchanged since
the first commit in the repository (db49180dd7, 2008, then under
raster/simwe/), where the option was still named traps, so the code is
not a later regression and is self-consistent only under the trapping
reading. Correct the documentation rather than the code to keep results
unchanged for existing users. r.sim.sediment does not expose this
parameter. The test test_flow_control_increases_depth added in #7968
asserts the behavior the new text describes.

The history analysis and the wording were done with AI assistance
(Claude Code).



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list