landlab

FastscapeEroder: Compute fluvial erosion using stream power theory (“fastscape” algorithm)

This module attempts to “component-ify” GT’s Fastscape stream power erosion. Created DEJH, March 2014.

class FastscapeEroder(*args, **kwds)[source]

Bases: landlab.core.model_component.Component

This class uses the Braun-Willett Fastscape approach to calculate the amount of erosion at each node in a grid, following a stream power framework. This should allow it to be stable against larger timesteps than an explicit stream power scheme.

Note that although this scheme is nominally implicit, and will reach a numerically-correct solution under topographic steady state regardless of timestep length, the accuracy of transient solutions is not timestep independent (see Braun & Willett 2013, Appendix B for further details). Although the scheme remains significantly more robust and permits longer timesteps than a traditional explicit solver under such conditions, it is still possible to create numerical instability through use of too long a timestep while using this component. The user is cautioned to check their implementation is behaving stably before fully trusting it.

Stream power erosion is implemented as:

E = K * (rainfall_intensity*A)**m * S**n - threshold_sp,

if K * A**m * S**n > threshold_sp, and:

E = 0,

if K * A**m * S**n <= threshold_sp.

This module assumes you have already run landlab.components.flow_routing.route_flow_dn.FlowRouter.route_flow() in the same timestep. It looks for ‘flow__upstream_node_order’, ‘flow__link_to_receiver_node’, ‘drainage_area’, ‘flow__receiver_node’, and ‘topographic__elevation’ at the nodes in the grid. ‘drainage_area’ should be in area upstream, not volume (i.e., set runoff_rate=1.0 when calling FlowRouter.route_flow).

The primary method of this class is run_one_step().

Construction:

FastscapeEroder(grid, K_sp=None, m_sp=0.5, n_sp=1., threshold_sp=0.,
                rainfall_intensity=1.)
Parameters:

grid : ModelGrid

A grid.

K_sp : float, array, or field name

K in the stream power equation (units vary with other parameters).

m_sp : float, optional

m in the stream power equation (power on drainage area).

n_sp : float, optional, ~ 0.5<n_sp<4.

n in the stream power equation (power on slope). Performance will be VERY degraded if n < 1.

threshold_sp : float, array, or field name

The threshold stream power.

rainfall_intensity : float; optional

Modifying factor on drainage area to convert it to a true water volume flux in (m/time). i.e., E = K * (r_i*A)**m * S**n. For a time varying rainfall intensity, pass rainfall_intensity_if_used to run_one_step. For a spatially variable rainfall, use the StreamPowerEroder component.

Examples

>>> import numpy as np
>>> from landlab import RasterModelGrid
>>> from landlab import CLOSED_BOUNDARY, FIXED_VALUE_BOUNDARY
>>> from landlab.components import FlowRouter, FastscapeEroder
>>> mg = RasterModelGrid((5, 5), 10.)
>>> z = np.array([7.,  7.,  7.,  7.,  7.,
...               7.,  5., 3.2,  6.,  7.,
...               7.,  2.,  3.,  5.,  7.,
...               7.,  1., 1.9,  4.,  7.,
...               7.,  0.,  7.,  7.,  7.])
>>> z = mg.add_field('node', 'topographic__elevation', z)
>>> fr = FlowRouter(mg)
>>> sp = FastscapeEroder(mg, K_sp=1.)
>>> fr.run_one_step()
>>> sp.run_one_step(dt=1.)
>>> z  
array([ 7.        ,  7.        ,  7.        ,  7.        ,  7.        ,
        7.        ,  2.92996598,  2.02996598,  4.01498299,  7.        ,
        7.        ,  0.85993197,  1.87743897,  3.28268321,  7.        ,
        7.        ,  0.28989795,  0.85403051,  2.42701526,  7.        ,
        7.        ,  0.        ,  7.        ,  7.        ,  7.        ])
>>> mg2 = RasterModelGrid((3, 7), 1.)
>>> z = np.array(mg2.node_x**2.)
>>> z = mg2.add_field('node', 'topographic__elevation', z)
>>> mg2.status_at_node[mg2.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_top_edge] = CLOSED_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_bottom_edge] = CLOSED_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_right_edge] = CLOSED_BOUNDARY
>>> fr2 = FlowRouter(mg2)
>>> sp2 = FastscapeEroder(mg2, K_sp=0.1, m_sp=0., n_sp=2.,
...                       threshold_sp=2.)
>>> fr2.run_one_step()
>>> sp2.run_one_step(dt=10.)
>>> z.reshape((3, 7))[1, :]  
array([  0.        ,   1.        ,   4.        ,   8.52493781,
        13.29039716,  18.44367965,  36.        ])
>>> mg3 = RasterModelGrid((3, 7), 1.)
>>> z = np.array(mg3.node_x**2.)
>>> z = mg3.add_field('node', 'topographic__elevation', z)
>>> mg3.status_at_node[mg3.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_top_edge] = CLOSED_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_bottom_edge] = CLOSED_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_right_edge] = CLOSED_BOUNDARY
>>> fr3 = FlowRouter(mg3)
>>> K_field = mg3.ones('node')  # K can be a field
>>> sp3 = FastscapeEroder(mg3, K_sp=K_field, m_sp=1., n_sp=0.6,
...                       threshold_sp=mg3.node_x,
...                       rainfall_intensity=2.)
>>> fr3.run_one_step()
>>> sp3.run_one_step(1.)
>>> z.reshape((3, 7))[1, :]  
array([  0.        ,   0.0647484 ,   0.58634455,   2.67253503,
         8.49212152,  20.92606987,  36.        ])
>>> previous_z = z.copy()
>>> sp3.run_one_step(1., rainfall_intensity_if_used=0.)
>>> np.allclose(z, previous_z)
True
erode(grid_in, dt=None, K_if_used=None, flooded_nodes=None, rainfall_intensity_if_used=None)[source]

This method implements the stream power erosion, following the Braun- Willett (2013) implicit Fastscape algorithm. This should allow it to be stable against larger timesteps than an explicit stream power scheme.

This driving method for this component is now superceded by the new, standardized wrapper run_one_step(), but is retained for back compatibility.

Set ‘K_if_used’ as a field name or nnodes-long array if you set K_sp as ‘array’ during initialization.

It returns the grid, in which it will have modified the value of value_field, as specified in component initialization.

Parameters:

grid_in : a grid

This is a dummy argument maintained for component back- compatibility. It is superceded by the copy of the grid passed during initialization.

dt : float

Time-step size. If you are calling the deprecated function gear_timestep(), that method will supercede any value supplied here.

K_if_used : array (optional)

Set this to an array if you set K_sp to ‘array’ in your input file.

flooded_nodes : ndarray of int (optional)

IDs of nodes that are flooded and should have no erosion. If not provided but flow has still been routed across depressions, erosion may still occur beneath the apparent water level (though will always still be positive).

rainfall_intensity_if_used : float or None (optional)

Supply to drive this component with a time-varying spatially constant rainfall.

Returns:

grid

A reference to the grid.

run_one_step(dt, flooded_nodes=None, rainfall_intensity_if_used=None, **kwds)[source]

This method implements the stream power erosion across one time interval, dt, following the Braun-Willett (2013) implicit Fastscape algorithm.

This follows Landlab standardized component design, and supercedes the old driving method erode().

Parameters:

dt : float

Time-step size

flooded_nodes : ndarray of int (optional)

IDs of nodes that are flooded and should have no erosion. If not provided but flow has still been routed across depressions, erosion may still occur beneath the apparent water level (though will always still be positive).

rainfall_intensity_if_used : float or None (optional)

Supply to drive this component with a time-varying spatially constant rainfall.

StreamPower: Compute fluvial erosion using stream power theory (also uses “fastscape” algorithm but provides slightly different formulation and options)

class StreamPowerEroder(*args, **kwds)[source]

Bases: landlab.core.model_component.Component

Erode where channels are.

Implemented as:

\[E = K A^m S^n - sp_{crit},\]

and if \(E < 0\), \(E = 0\).

If use_W is declared and True, the module instead implements:

\[E = K A^m S^n / W - sp_{crit}\]

DEJH Sept 2013, major modifications Sept 14 and May 16. This component now wraps Fastscape-style functionality under the hood.

Note that although the Braun-Willett (2013) scheme that underlies this component is nominally implicit, and will reach a numerically-correct solution under topographic steady state regardless of timestep length, the accuracy of transient solutions is not timestep independent (see Braun & Willett 2013, Appendix B for further details). Although the scheme remains significantly more robust and permits longer timesteps than a traditional explicit solver under such conditions, it is still possible to create numerical instability through use of too long a timestep while using this component. The user is cautioned to check their implementation is behaving stably before fully trusting it.

NB: If you want spatially or temporally variable runoff, pass the runoff values at each pixel to the flow router using the input argument use_Q.

Construction:

StreamPowerEroder(grid, K_sp=None, threshold_sp=0., sp_type='set_mn',
                  m_sp=0.5, n_sp=1., a_sp=None, b_sp=None, c_sp=None,
                  use_W=None, use_Q=None)
Parameters:

grid : ModelGrid

A grid.

K_sp : float, array, or field name

K in the stream power equation (units vary with other parameters).

threshold_sp : positive float, optional

The threshold stream power, below which no erosion occurs. This threshold is assumed to be in “stream power” units, i.e., if sp_type is ‘Shear_stress’, the value should be tau**a.

sp_type : {‘set_mn’, ‘Total’, ‘Unit’, ‘Shear_stress’}

Controls how the law is implemented. If ‘set_mn’, use the supplied values of m_sp and n_sp. Else, component will derive values of m and n from supplied values of a_sp, b_sp, and c_sp, following Whipple and Tucker:

  • If 'Total', m = a * c, n = a.
  • If 'Unit', m = a * c *(1 - b), n = a.
  • If 'Shear_stress', m = 2 * a * c * (1 - b) / 3, n = 2 * a / 3.

m_sp : float, optional

m in the stream power equation (power on drainage area). Overridden if a_sp, b_sp, and c_sp are supplied.

n_sp : float, optional, ~ 0.5<n_sp<4.

n in the stream power equation (power on slope). Overridden if a_sp, b_sp, and c_sp are supplied.

a_sp : float, optional

The power on the SP/shear term to get the erosion rate; the “erosional process” term. Only used if sp_type is not ‘set_mn’.

b_sp : float, optional

The power on discharge to get width; the “hydraulic geometry” term. Only used if sp_type in (‘Unit’, ‘Shear_stress’).

c_sp : float, optional

The power on area to get discharge; the “basin hydology” term. Only used if sp_type is not ‘set_mn’.

use_W : None, array, or field name, optional

If not None, component will look for node-centered data describing channel width in grid.at_node[use_W] or if an array, will take the array as the channel widths. It will use the widths to implement incision ~ stream power per unit width. If sp_type is ‘set_mn’, follows the equation given above. If sp_type in (‘Unit’, ‘Shear_stress’), the width value will be implemented directly. W has no effect if sp_type is ‘Total’.

use_Q : None, array, or field name, optional

If not None, the equation becomes E=K*Q**m*S**n. Effectively sets c=1 in Wh&T’s 1999 derivation, if you are setting m and n through a, b, and c.

Examples

>>> import numpy as np
>>> from landlab import RasterModelGrid
>>> from landlab import CLOSED_BOUNDARY, FIXED_VALUE_BOUNDARY
>>> from landlab.components import FlowRouter
>>> from landlab.components import StreamPowerEroder
>>> mg = RasterModelGrid((5, 5), 10.)
>>> z = np.array([7.,  7.,  7.,  7.,  7.,
...               7.,  5., 3.2,  6.,  7.,
...               7.,  2.,  3.,  5.,  7.,
...               7.,  1., 1.9,  4.,  7.,
...               7.,  0.,  7.,  7.,  7.])
>>> z = mg.add_field('node', 'topographic__elevation', z)
>>> fr = FlowRouter(mg)
>>> sp = StreamPowerEroder(mg, K_sp=1.)
>>> fr.run_one_step()
>>> sp.run_one_step(dt=1.)
>>> z  
array([ 7.        ,  7.        ,  7.        ,  7.        ,  7.        ,
        7.        ,  2.92996598,  2.02996598,  4.01498299,  7.        ,
        7.        ,  0.85993197,  1.87743897,  3.28268321,  7.        ,
        7.        ,  0.28989795,  0.85403051,  2.42701526,  7.        ,
        7.        ,  0.        ,  7.        ,  7.        ,  7.        ])
>>> mg2 = RasterModelGrid((3, 7), 1.)
>>> z = np.array(mg2.node_x**2.)
>>> z = mg2.add_field('node', 'topographic__elevation', z)
>>> mg2.status_at_node[mg2.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_top_edge] = CLOSED_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_bottom_edge] = CLOSED_BOUNDARY
>>> mg2.status_at_node[mg2.nodes_at_right_edge] = CLOSED_BOUNDARY
>>> fr2 = FlowRouter(mg2)
>>> sp2 = StreamPowerEroder(mg2, K_sp=0.1, m_sp=0., n_sp=2.,
...                         threshold_sp=2.)
>>> fr2.run_one_step()
>>> sp2.run_one_step(dt=10.)
>>> z.reshape((3, 7))[1, :]  
array([  0.        ,   1.        ,   4.        ,   8.52493781,
        13.29039716,  18.44367965,  36.        ])
>>> mg3 = RasterModelGrid((5, 5), 2.)
>>> z = mg.node_x/100.
>>> z = mg3.add_field('node', 'topographic__elevation', z)
>>> mg3.status_at_node[mg3.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_top_edge] = CLOSED_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_bottom_edge] = CLOSED_BOUNDARY
>>> mg3.status_at_node[mg3.nodes_at_right_edge] = CLOSED_BOUNDARY
>>> mg3.at_node['water__unit_flux_in'] = mg3.node_y
>>> fr3 = FlowRouter(mg3)
>>> Q = mg3.at_node['surface_water__discharge']
>>> sp3 = StreamPowerEroder(mg3, K_sp=1., sp_type='Unit', a_sp=1.,
...                         b_sp=0.5, c_sp=1., use_Q=Q)
>>> fr3.run_one_step()
>>> sp3.run_one_step(1.)
>>> z
array([ 0.        ,  0.1       ,  0.2       ,  0.3       ,  0.4       ,
        0.        ,  0.02898979,  0.0859932 ,  0.17463772,  0.4       ,
        0.        ,  0.02240092,  0.06879049,  0.14586033,  0.4       ,
        0.        ,  0.01907436,  0.05960337,  0.12929386,  0.4       ,
        0.        ,  0.1       ,  0.2       ,  0.3       ,  0.4       ])
erode(grid, dt, elevs='topographic__elevation', drainage_areas='drainage_area', flow_receiver='flow__receiver_node', order_upstream='flow__upstream_node_order', slopes_at_nodes='topographic__steepest_slope', link_mapping='flow__link_to_receiver_node', link_slopes=None, slopes_from_elevs=None, W_if_used=None, Q_if_used=None, K_if_used=None, flooded_nodes=None)[source]

Note

deprecated This run method is now DEPRECATED. Use the fully standardized method run_one_step() instead.

A simple, explicit implementation of a stream power algorithm.

Parameters:

grid : RasterModelGrid

A grid.

dt : float

Component time step.

elevs : str or ndarray, optional

Elevations on the grid, either a field string or nnodes-long array.

drainage_areas: str or ndarray, optional

Tells the component where to look for the drainage area values. Change to another string to override which grid field the component looks at, or pass a nnodes-long array of drainage areas values directly instead.

flow_receiver, order_upstream : str or ndarray, optional

The downstream node to which each node flows and the ordering of the nodes in the network starting at the outlet, respectively, are both necessary as inputs to allow stability testing.

If you already have slopes defined at nodes on the grid, pass them to the component with slopes_at_nodes. The same syntax is expected: string gives a name in the grid fields, an array gives values direct.

Alternatively, set link_slopes (and link_mapping) if this data is only available at links. ‘topographic__derivative_of_elevation’ is the default field name for link slopes. Override this name by setting the variable as the appropriate string, or override use of grid fields altogether by passing an array. link_mapping controls how the component maps these link values onto the arrays. We assume there is always a 1:1 mapping (pass the values already projected onto the nodes using slopes_at_nodes if not). Other components, e.g., flow_routing.route_flow_dn, may provide the necessary outputs to make the mapping easier: e.g., just pass ‘flow__link_to_receiver_node’ from that module (the default name). If the component cannot find an existing mapping through this parameter, it will derive one on the fly, at considerable cost of speed (see on-screen reports).

slopes_from_elevs : str, optional

Allows the module to create gradients internally from elevations rather than have them provided. Set to True to force the component to look for the data in the location specified by elevs. Using this option is considerably slower than any of the alternatives, as it also has to calculate the link_mapping from stratch each time.

In both these cases, at present the mapping is to use the maximum slope of any link attached to the node as the representative node slope. This is primarily for speed, but may be a good idea to modify later.

W_if_used, Q_if_used : str or ndarray, optional

Must be provided if you set use_W and use_Q respectively in the component initialization. They can be either field names or nnodes arrays as in the other cases.

If you are routing across flooded depressions in your flow routing scheme, be sure to set flooded_nodes with a boolean array or array of IDs to ensure erosion cannot occur in the lake. Erosion is always zero if the gradient is adverse, but can still procede as usual on the entry into the depression unless flooded_nodes is set.

NB: If you want spatially or temporally variable runoff, pass the runoff values at each pixel to the flow router, then pass discharges at each node using Q_if_used to this component.

Returns:

tuple

Tuple of (grid, modified_elevs, stream_power_erosion); modifies grid elevation fields to reflect updates. Note the value stream_power_erosion is not an excess stream power; any specified erosion threshold is not incorporated into it.

run_one_step(dt, flooded_nodes=None, **kwds)[source]

A simple, explicit implementation of a stream power algorithm.

This component now looks exclusively for the field ‘topographic__steepest_slope’ at each node to determine the local slope (previoiusly it was possible to map values from links explicitly within the component, but this functionality is now deprecated).

If you are routing across flooded depressions in your flow routing scheme, be sure to set flooded_nodes with a boolean array or array of IDs to ensure erosion cannot occur in the lake. Erosion is always zero if the gradient is adverse, but can still procede as usual on the entry into the depression unless flooded_nodes is set.

Parameters:

dt : float

Time-step size

flooded_nodes : ndarray of int (optional)

IDs of nodes that are flooded and should have no erosion. If not provided but flow has still been routed across depressions, erosion may still occur beneath the apparent water level (though will always still be positive).

SedDepEroder: Compute fluvial erosion using using “tools and cover” theory

class SedDepEroder(grid, K_sp=1e-06, g=9.81, rock_density=2700, sediment_density=2700, fluid_density=1000, runoff_rate=1.0, sed_dependency_type='generalized_humped', kappa_hump=13.683, nu_hump=1.13, phi_hump=4.24, c_hump=0.00181, Qc='power_law', m_sp=0.5, n_sp=1.0, K_t=0.0001, m_t=1.5, n_t=1.0, C_MPM=1.0, a_sp=1.0, b_sp=0.5, c_sp=1.0, k_w=2.5, k_Q=2.5e-07, mannings_n=0.05, threshold_shear_stress=None, Dchar=0.05, set_threshold_from_Dchar=True, set_Dchar_from_threshold=False, threshold_Shields=0.05, slope_sensitive_threshold=False, pseudoimplicit_repeats=5, return_stream_properties=False, **kwds)[source]

Bases: landlab.core.model_component.Component

This module implements sediment flux dependent channel incision following:

E = f(Qs, Qc) * ([a stream power-like term] - [an optional threshold]),

where E is the bed erosion rate, Qs is the volumetric sediment flux into a node, and Qc is the volumetric sediment transport capacity at that node.

This component is under active research and development; proceed with its use at your own risk.

The details of the implementation are a function of the two key arguments, sed_dependency_type and Qc. The former controls the shape of the sediment dependent response function f(Qs, Qc), the latter controls the way in which sediment transport capacities are calculated (primarily, whether a full Meyer-Peter Muller approach is used, or whether simpler stream-power-like equations can be assumed). For Qc, ‘power_law’ broadly follows the assumptions in Gasparini et al. 2006, 2007; ‘MPM’ broadly follows those in Hobley et al., 2011. Note that a convex-up channel can result in many cases assuming MPM, unless parameters b and c are carefully tuned.

If Qc == 'power_law':

E  = K_sp * f(Qs, Qc) * A ** m_sp * S ** n_sp;
Qc = K_t * A ** m_t * S ** n_t

If Qc == 'MPM':

shear_stress = fluid_density * g * depth * S
             = fluid_density * g * (mannings_n/k_w) ** 0.6 * (
               k_Q* A ** c_sp) ** (0.6 * (1. - b_sp)) * S ** 0.7,
               for consistency with MPM

E = K_sp * f(Qs, Qc) * (shear_stress ** a_sp - [threshold_sp])

Qc = 8 * C_MPM * sqrt((sed_density-fluid_density)/fluid_density *
     g * D_char**3) * (shields_stress - threshold_shields)**1.5

shields_stress = shear_stress / (g * (sed_density-fluid_density) *
                 D_char)

If you choose Qc=’MPM’, you may provide thresholds for both channel incision and shields number, or alternatively set either or both of these threshold dynamically. The minimum shear stress can be made equivalent to the Shields number using set_threshold_from_Dchar, for full consistency with the MPM approach (i.e., the threshold becomes a function of the characteristic grain size on the bed). The Shields threshold itself can also be a weak function of slope if slope_sensitive_threshold, following Lamb et al. 2008, taustar_c = 0.15 * S ** 0.25.

The component is able to handle flooded nodes, if created by a lake filler. It assumes the flow paths found in the fields already reflect any lake routing operations, and then requires the optional argument flooded_depths be passed to the run method. A flooded depression acts as a perfect sediment trap, and will be filled sequentially from the inflow points towards the outflow points.

Construction:

SedDepEroder(grid, K_sp=1.e-6, g=9.81, rock_density=2700,
             sediment_density=2700, fluid_density=1000,
             runoff_rate=1.,
             sed_dependency_type='generalized_humped',
             kappa_hump=13.683, nu_hump=1.13, phi_hump=4.24,
             c_hump=0.00181, Qc='power_law', m_sp=0.5, n_sp=1.,
             K_t=1.e-4, m_t=1.5, n_t=1., C_MPM=1., a_sp=1.,
             b_sp=0.5, c_sp=1., k_w=2.5, k_Q=2.5e-7,
             mannings_n=0.05, threshold_shear_stress=None,
             Dchar=0.05, set_threshold_from_Dchar=True,
             set_Dchar_from_threshold=False,
             threshold_Shields=0.05,
             slope_sensitive_threshold=False,
             pseudoimplicit_repeats=5,
             return_stream_properties=False)
Parameters:

grid : a ModelGrid

A grid.

K_sp : float (time unit must be years)

K in the stream power equation; the prefactor on the erosion equation (units vary with other parameters).

g : float (m/s**2)

Acceleration due to gravity.

rock_density : float (Kg m**-3)

Bulk intact rock density.

sediment_density : float (Kg m**-3)

Typical density of loose sediment on the bed.

fluid_density : float (Kg m**-3)

Density of the fluid.

runoff_rate : float, array or field name (m/s)

The rate of excess overland flow production at each node (i.e., rainfall rate less infiltration).

pseudoimplicit_repeats : int

Number of loops to perform with the pseudoimplicit iterator, seeking a stable solution. Convergence is typically rapid.

return_stream_properties : bool

Whether to perform a few additional calculations in order to set the additional optional output fields, ‘channel__width’, ‘channel__depth’, and ‘channel__discharge’ (default False).

sed_dependency_type : {‘generalized_humped’, ‘None’, ‘linear_decline’,

‘almost_parabolic’}

The shape of the sediment flux function. For definitions, see Hobley et al., 2011. ‘None’ gives a constant value of 1. NB: ‘parabolic’ is currently not supported, due to numerical stability issues at channel heads.

Qc : {‘power_law’, ‘MPM’}

Whether to use simple stream-power-like equations for both sediment transport capacity and erosion rate, or more complex forms based directly on the Meyer-Peter Muller equation and a shear stress based erosion model consistent with MPM (per Hobley et al., 2011).

If ``sed_dependency_type == ‘generalized_humped’``...

kappa_hump : float

Shape parameter for sediment flux function. Primarily controls function amplitude (i.e., scales the function to a maximum of 1). Default follows Leh valley values from Hobley et al., 2011.

nu_hump : float

Shape parameter for sediment flux function. Primarily controls rate of rise of the “tools” limb. Default follows Leh valley values from Hobley et al., 2011.

phi_hump : float

Shape parameter for sediment flux function. Primarily controls rate of fall of the “cover” limb. Default follows Leh valley values from Hobley et al., 2011.

c_hump : float

Shape parameter for sediment flux function. Primarily controls degree of function asymmetry. Default follows Leh valley values from Hobley et al., 2011.

If ``Qc == ‘power_law’``...

m_sp : float

Power on drainage area in the erosion equation.

n_sp : float

Power on slope in the erosion equation.

K_t : float (time unit must be in years)

Prefactor in the transport capacity equation.

m_t : float

Power on drainage area in the transport capacity equation.

n_t : float

Power on slope in the transport capacity equation.

if ``Qc == ‘MPM’``...

C_MPM : float

A prefactor on the MPM relation, allowing tuning to known sediment saturation conditions (leave as 1. in most cases).

a_sp : float

Power on shear stress to give erosion rate.

b_sp : float

Power on drainage area to give channel width.

c_sp : float

Power on drainage area to give discharge.

k_w : float (unit variable with b_sp)

Prefactor on A**b_sp to give channel width.

k_Q : float (unit variable with c_sp, but time unit in seconds)

Prefactor on A**c_sp to give discharge.

mannings_n : float

Manning’s n for the channel.

threshold_shear_stress : None or float (Pa)

The threshold shear stress in the equation for erosion rate. If None, implies that set_threshold_from_Dchar is True, and this parameter will get set from the Dchar value and critical Shields number.

Dchar :None, float, array, or field name (m)

The characteristic grain size on the bed, that controls the relationship between critical Shields number and critical shear stress. If None, implies that set_Dchar_from_threshold is True, and this parameter will get set from the threshold_shear_stress value and critical Shields number.

set_threshold_from_Dchar : bool

If True (default), threshold_shear_stress will be set based on Dchar and threshold_Shields.

set_Dchar_from_threshold : bool

If True, Dchar will be set based on threshold_shear_stress and threshold_Shields. Default is False.

threshold_Shields : None or float

The threshold Shields number. If None, implies that slope_sensitive_threshold is True.

slope_sensitive_threshold : bool

If True, the threshold_Shields will be set according to 0.15 * S ** 0.25, per Lamb et al., 2008 & Hobley et al., 2011.

characteristic_grainsize

Return the characteristic grain size used by the component.

Particularly useful if the set_Dchar_from_threshold flag was True at initialization.

Returns:Dchar : float or array

Examples

>>> from landlab import RasterModelGrid
>>> mg1 = RasterModelGrid((3,4), 1.)
>>> thresh_shields = np.arange(1, mg1.number_of_nodes+1, dtype=float)
>>> thresh_shields /= 100.
>>> sde1 = SedDepEroder(mg1, threshold_shear_stress=100., Qc='MPM',
...                     Dchar=None, set_threshold_from_Dchar=False,
...                     set_Dchar_from_threshold=True,
...                     threshold_Shields=thresh_shields)
>>> sde1.characteristic_grainsize
array([ 0.59962823,  0.29981412,  0.19987608,  0.14990706,  0.11992565,
        0.09993804,  0.08566118,  0.07495353,  0.06662536,  0.05996282,
        0.05451166,  0.04996902])
>>> mg2 = RasterModelGrid((3,4), 1.)
>>> sde2 = SedDepEroder(mg2, threshold_shear_stress=100., Qc='MPM',
...                     Dchar=None, set_threshold_from_Dchar=False,
...                     set_Dchar_from_threshold=True,
...                     threshold_Shields=None,
...                     slope_sensitive_threshold=True)
>>> S = mg2.add_ones('node', 'topographic__steepest_slope')
>>> S *= 0.05  # thresh = 100 Pa @ 5pc slope
>>> sde2.characteristic_grainsize  
array([ 0.08453729,  0.08453729,  0.08453729,  0.08453729,
        0.08453729,  0.08453729,  0.08453729,  0.08453729,
        0.08453729,  0.08453729,  0.08453729,  0.08453729])
erode(dt, flooded_depths=None, **kwds)[source]

Erode and deposit on the channel bed for a duration of dt.

Erosion occurs according to the sediment dependent rules specified during initialization.

Parameters:

dt : float (years, only!)

Timestep for which to run the component.

flooded_depths : array or field name (m)

Depths of flooding at each node, zero where no lake. Note that the component will dynamically update this array as it fills nodes with sediment (...but does NOT update any other related lake fields).

get_sed_flux_function(rel_sed_flux)[source]
get_sed_flux_function_pseudoimplicit(sed_in, trans_cap_vol_out, prefactor_for_volume, prefactor_for_dz)[source]
run_one_step(dt, flooded_depths=None, **kwds)[source]

Run the component across one timestep increment, dt.

Erosion occurs according to the sediment dependent rules specified during initialization. Method is fully equivalent to the erode() method.

Parameters:

dt : float (years, only!)

Timestep for which to run the component.

flooded_depths : array or field name (m)

Depths of flooding at each node, zero where no lake. Note that the component will dynamically update this array as it fills nodes with sediment (...but does NOT update any other related lake fields).