<commit_before>"""Calculates erosion rate as a function of the depth-slope product

Erosion rate = k_e * ((Tau**a - Tau_crit**a))

k_e = erodibility coefficient
Tau = bed shear stress 
    = density of fluid (rho) * gravitational acceleration (g) * water depths (h) * slopes (S)
Tau_crit = critical shear stress
a = positive exponent

Note this equation was presented in Tucker, G.T., 2004, Drainage basin 
sensitivityto tectonic and climatic forcing: Implications of a stochastic 
model for the role of entrainment and erosion thresholds, 
Earth Surface Processes and Landforms.

More generalized than other erosion components, as it doesn't require the 
upstream node order, links to flow receiver and flow receiver fields. Instead, 
takes in the water depth and slope fields on NODES calculated by the 
OverlandFlow class and erodes the landscape in response to the hydrograph
generted by that method.

As of right now, this component relies on the OverlandFlow component 
for stability. There are no stability criteria implemented in this class. 
To ensure model stability, use StreamPowerEroder or FastscapeEroder
components instead. 

.. codeauthor:: <NAME>

Examples
--------
>>> import numpy as np
>>> from landlab import RasterModelGrid
>>> from landlab.components import DetachmentLtdErosion

Create a grid on which to calculate detachment ltd sediment transport.

>>> grid = RasterModelGrid((5, 5))

The grid will need some data to provide the detachment limited sediment
transport component. To check the names of the fields that provide input to
the detachment ltd transport component, use the *input_var_names* class
property.

Create fields of data for each of these input variables.

First create toopgraphy. This is a flat surface of elevation 10 m. 
>>> grid.at_node['topographic__elevation'] = np.ones(grid.number_of_nodes)
>>> grid.at_node['topographic__elevation'] *= 10.
>>> grid.at_node['topographic__elevation'] = np.array([<commit_msg>small typo in doctest!<commit_after>"""Calculates erosion rate as a function of the depth-slope product

Erosion rate = k_e * ((Tau**a - Tau_crit**a))

k_e = erodibility coefficient
Tau = bed shear stress 
    = density of fluid (rho) * gravitational acceleration (g) * water depths (h) * slopes (S)
Tau_crit = critical shear stress
a = positive exponent

Note this equation was presented in <NAME>., 2004, Drainage basin 
sensitivityto tectonic and climatic forcing: Implications of a stochastic 
model for the role of entrainment and erosion thresholds, 
Earth Surface Processes and Landforms.

More generalized than other erosion components, as it doesn't require the 
upstream node order, links to flow receiver and flow receiver fields. Instead, 
takes in the water depth and slope fields on NODES calculated by the 
OverlandFlow class and erodes the landscape in response to the hydrograph
generted by that method.

As of right now, this component relies on the OverlandFlow component 
for stability. There are no stability criteria implemented in this class. 
To ensure model stability, use StreamPowerEroder or FastscapeEroder
components instead. 

.. codeauthor:: <NAME>

Examples
--------
>>> import numpy as np
>>> from landlab import RasterModelGrid
>>> from landlab.components import DepthSlopeProductErosion

Create a grid on which to calculate detachment ltd sediment transport.

>>> grid = RasterModelGrid((5, 5))

The grid will need some data to provide the detachment limited sediment
transport component. To check the names of the fields that provide input to
the detachment ltd transport component, use the *input_var_names* class
property.

Create fields of data for each of these input variables.

First create toopgraphy. This is a flat surface of elevation 10 m. 
>>> grid.at_node['topographic__elevation'] = np.ones(grid.number_of_nodes)
>>> grid.at_node['topographic__elevation'] *= 10.
>>> grid.at_node['topographic__elevation'] = np.array([
{'fraction_non_alphanumeric': 0.06695519348268839, 'fraction_numerical': 0.0050916496945010185, 'mean_word_length': 4.864179104477612, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2373058', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1033, 'n_words': 501}