BumpRiverStage: Adjustment for Implausible River Stage
Description
This function decreases stage values in river cells if they are implausible
with respect to water always flowing downhill.
Usage
BumpRiverStage(r, outlets, min.drop = 1e-06)
Arguments
r
RasterLayer.
Numeric cell values represent river stages.
outlets
SpatialPoints*, SpatialLines*, SpatialPolygons* or Extent.
Designates the location of discharge outlets.
The rasterize function is used to locate outlet cells in the raster grid r.
min.drop
numeric.
Minimum drop in stage between adjacent river cells.
Value
Returns a RasterLayer with cell values representing the vertical change in stream stage.
These changes can be added to r to ensure that water always flows downhill.
Details
The https://en.wikipedia.org/wiki/Lee_algorithm (Lee, 1961)
is used to identify flow paths among the modeled river cells.
An analysis of river cell stage values along a flow path identifies any problematic cells
that are obstructing downhill surface-water flow.
Stage values for these problematic cells are then lowered to an acceptable elevation.
References
Lee, C.Y., 1961, An algorithm for path connections and its applications:
IRE Transactions on Electronic Computers, v. EC-10, no. 2, p. 346--365.