fastscapelib.SPLEroder#

class fastscapelib.SPLEroder#

Bedrock channel erosion modelled using the Stream Power Law.

It numerically solves the Stream Power Law (SPL) using an implicit finite difference scheme 1st order in space and time. The method is detailed in Braun and Willet’s (2013) and has been slightly adapted.

For more details about the Stream Power Law and the numerical scheme used here, see spl_eroder from the C++ API. See also Braun and Willett [BW13].

__init__(self, flow_graph: FlowGraph, k_coef: float | numpy.ndarray, area_exp: float, slope_exp: float, tolerance: float = 1e-3)#

SPLEroder initializer.

Parameters:
  • flow_graph (FlowGraph) – Flow graph instance.

  • k_coef (float or numpy.ndarray) – Spatially uniform or variable erosion coefficient value. For the spatially variable case, the shape of the array must match the shape of the grid used (node arrays) or the size of the graph.

  • area_exp (float) – Drainage area exponent value.

  • slope_exp (float) – Channel slope exponent value.

  • tolerance (float, optional) – Tolerance controlling the convergence of the Newton-Raphson iterations used for the non-linear case (i.e., slope_exp != 1).

Methods

__init__(self, flow_graph, k_coef, area_exp, ...)

SPLEroder initializer.

erode(elevation, drainage_area, dt)

Slove SPL for one time step.

Attributes

area_exp

Drainage area exponent value.

k_coef

Erosion coefficient (spatially variable or uniform).

n_corr

Returns the number of nodes for which erosion has been arbitrarily limited during the last computed time step (see n_corr()) from the C++ API.

slope_exp

Channel slope exponent value.

tolerance

Tolerance controlling the convergence of the Newton-Raphson method used for the non-linear case (i.e., slope_exp != 1).

property area_exp#

Drainage area exponent value.

erode(elevation: numpy.ndarray, drainage_area: numpy.ndarray, dt: float) numpy.ndarray#

Slove SPL for one time step.

Parameters:
  • elevation (numpy.ndarray) – Surface topography elevation at each grid node (shape must match grid node array shape).

  • drainage_area (numpy.ndarray) – Upslope drainage area at each grid node (same shape than elevation).

  • dt (float) – Duration of the time step.

Returns:

erosion (numpy.ndarray) – SPL vertical erosion computed for the time step (>= 0). Same shape than the input arrays.

property k_coef#

Erosion coefficient (spatially variable or uniform).

property n_corr#

Returns the number of nodes for which erosion has been arbitrarily limited during the last computed time step (see n_corr()) from the C++ API.

property slope_exp#

Channel slope exponent value.

property tolerance#

Tolerance controlling the convergence of the Newton-Raphson method used for the non-linear case (i.e., slope_exp != 1).