landlab.components.threshold_eroder.threshold_eroder¶
Created on Wed Aug 4 11:00:08 2021.
@author: benjamincampforts
- class ThresholdEroder[source]¶
Bases:
Component
Threshold eroder.
Threshold eroder that cuts off slopes at a given threshold slope (Sc) and assumes material to dissolve away
\[S(S>Sc) = Sc\]To be coupled with
FlowDirectorSteepest
orPriorityFloodFlowRouter
for the calculation of steepest slope at each timestep. Note that ThresholdEroder run_one_step() cuts off slopes and computes new elevations based on the steepest slopes as calculated by the FlowDirectorSteepest or PriorityFloodFlowRouter. If slopes over the entire model grid need be set to a threshold slope, several iterations of running the flow router and the Threshold eroder are required.Component written by Benjamin Campforts, 2022
- Parameters:
Examples
>>> import numpy as np >>> from landlab import RasterModelGrid >>> from landlab.components import ThresholdEroder, PriorityFloodFlowRouter
Define grid and initial topography:
3x5 grid
east and west boundaries are open, north and south are closed
Initial topography is plane at base level on the boundaries and 1m of elevation elsewhere (core)
>>> mg = RasterModelGrid((5, 5)) >>> mg.set_closed_boundaries_at_grid_edges(False, False, False, False) >>> z = np.array( ... [ ... [0.0, 0.0, 0.0, 0.0, 0.0], ... [0.0, 1.0, 1.0, 1.0, 0.0], ... [0.0, 1.0, 10.0, 1.0, 0.0], ... [0.0, 1.0, 1.0, 1.0, 0.0], ... [0.0, 0.0, 0.0, 0.0, 0.0], ... ] ... ) >>> _ = mg.add_field("topographic__elevation", z, at="node")
Instantiate Flow director (steepest slope type) and TL hillslope diffuser
>>> fdir = PriorityFloodFlowRouter(mg) >>> th_ero = ThresholdEroder(mg, slope_crit=0.6)
Run the components for ten short timepsteps
>>> for t in range(2): ... fdir.run_one_step() ... th_ero.run_one_step() ...
References
Required Software Citation(s) Specific to this Component
None Listed
Additional References
Initialize Threshold Eroder.
- Parameters:
- static __new__(cls, *args, **kwds)¶
- cite_as = '\n @Article{gmd-13-3863-2020,\n AUTHOR = {Campforts B., Shobe C.M., Steer P., Vanmaercke M., Lague D., Braun J.},\n TITLE = {BedrockLandslider 1.0: a hybrid landscape evolution model to\n simulate the impact of landslides and landslide-derived sediment on\n landscape evolution.},\n JOURNAL = {Geoscientific Model Development},\n VOLUME = {13},\n YEAR = {2020},\n NUMBER = {9},\n PAGES = {3863--3886},\n URL = {https://doi.org/10.5194/gmd-13-3863-2020},\n DOI = {10.5194/gmd-13-3863-2020}\n }'¶
- property coords¶
Return the coordinates of nodes on grid attached to the component.
- property current_time¶
Current time.
Some components may keep track of the current time. In this case, the
current_time
attribute is incremented. Otherwise it is set to None.- Return type:
current_time
- definitions = (('bedrock__elevation', 'elevation of the bedrock surface'), ('flow__link_to_receiver_node', 'ID of link downstream of each node, which carries the discharge'), ('flow__receiver_node', 'Node array of receivers (node that receives flow from current node)'), ('flow__upstream_node_order', 'Node array containing downstream-to-upstream ordered list of node IDs'), ('soil__depth', 'Depth of soil or weathered bedrock'), ('topographic__elevation', 'Land surface topographic elevation'))¶
- classmethod from_path(grid, path)¶
Create a component from an input file.
- property grid¶
Return the grid attached to the component.
- initialize_optional_output_fields()¶
Create fields for a component based on its optional field outputs, if declared in _optional_var_names.
This method will create new fields (without overwrite) for any fields output by the component as optional. New fields are initialized to zero. New fields are created as arrays of floats, unless the component also contains the specifying property _var_type.
- initialize_output_fields(values_per_element=None)¶
Create fields for a component based on its input and output var names.
This method will create new fields (without overwrite) for any fields output by, but not supplied to, the component. New fields are initialized to zero. Ignores optional fields. New fields are created as arrays of floats, unless the component specifies the variable type.
- Parameters:
values_per_element (int (optional)) – On occasion, it is necessary to create a field that is of size (n_grid_elements, values_per_element) instead of the default size (n_grid_elements,). Use this keyword argument to acomplish this task.
- input_var_names = ('flow__link_to_receiver_node', 'flow__receiver_node', 'flow__upstream_node_order', 'topographic__elevation')¶
- name = 'ThresholdEroder'¶
- optional_var_names = ('bedrock__elevation', 'soil__depth')¶
- output_var_names = ('topographic__elevation',)¶
- property shape¶
Return the grid shape attached to the component, if defined.
- unit_agnostic = True¶
- units = (('bedrock__elevation', 'm'), ('flow__link_to_receiver_node', '-'), ('flow__receiver_node', '-'), ('flow__upstream_node_order', '-'), ('soil__depth', 'm'), ('topographic__elevation', 'm'))¶
- classmethod var_definition(name)¶
Get a description of a particular field.
- Parameters:
name (str) – A field name.
- Returns:
A description of each field.
- Return type:
tuple of (name, *description*)
- classmethod var_help(name)¶
Print a help message for a particular field.
- Parameters:
name (str) – A field name.
- classmethod var_loc(name)¶
Location where a particular variable is defined.
- var_mapping = (('bedrock__elevation', 'node'), ('flow__link_to_receiver_node', 'node'), ('flow__receiver_node', 'node'), ('flow__upstream_node_order', 'node'), ('soil__depth', 'node'), ('topographic__elevation', 'node'))¶