Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
landlab
Logo

Getting Started

  • Install
  • Getting started
  • User Guide
    • Grid & Component reference
      • Landlab Grids
      • Layers
      • Values
      • Components
    • List of Components
    • List of Landlab Fields
    • List of Grid Methods
      • Nodes, Links, and Patches
      • Corners, Faces, and Cells
      • Boundary conditions
      • Subsets of elements
      • Mapping between elements
      • Gradients, fluxes, and divergences
      • Surface analysis
      • Fields
      • Uncategorized or Deprecated
    • Introduction to Landlab’s Gridding Library
    • The Component Library
    • What goes into a Landlab model?
    • How Landlab Is/Is Not Unit Agnostic
    • Time steps
    • Frequently Asked Questions
    • Overland Flow Component User Manual
    • CellLab-CTS User Guide
  • Tutorials
    • Gallery
      • TVD advection solver and related functions
      • Agent-based modeling with Landlab and Mesa
      • Coupling a Landlab groundwater with a Mesa agent-based model
      • Wolf-Sheep-Grass Model with Soil Creep
      • Setting Boundary Conditions: interior rectangle
      • Setting Boundary Conditions on the Perimeter of a Raster.
      • Setting Boundary Conditions on a Voronoi.
      • Setting watershed boundary conditions on a raster grid
      • The Carbonate Producer component
      • Getting to know the Landlab component library
      • DataRecord Tutorial
      • Tutorial For Cellular Automaton Vegetation Model Coupled With Ecohydrologic Model
      • Tutorial For Cellular Automaton Vegetation Model Coupled With Ecohydrologic Model
      • Introduction to Landlab: Creating a simple 2D scarp diffusion model
      • Understanding and working with Landlab data fields
      • Using the Landlab 1D flexure component
      • Using the Landlab flexure component
      • Landscape evolution model with Priority flood and Space_v2
      • Introduction to priority flood component
      • Comparison of FlowDirectors
      • Introduction to the FlowAccumulator
      • Introduction to FlowDirectors
      • Introduction to PriorityFloodFlowRouter (priorityFlood filler, director and accumulator)
      • Using the Landlab FractureGridGenerator component
      • Using Landlab’s gradient and flux divergence functions
      • Diverse grid classes
      • What happens when you create a grid object?
      • How to create and visualize a Landlab Icosphere Grid
      • Icosphere example models
      • Modeling groundwater flow in a conceptual catchment
      • Component Overview: DepthDependentTaylorDiffuser
      • Component Overview: TaylorNonLinearDiffuser
      • The transport-length hillslope diffuser
      • The Basics
      • Example 1:
      • Example 2:
      • Unit tests and parameterization for AreaSlopeTransporter
      • Example of a transport-limited LEM using AreaSlopeTransporter
      • Introduction to the ErosionDeposition component
      • Using the Landlab Shared Stream Power Model
      • Run with Transient Uplift
      • Unit Tests for the Landlab GravelBedrockEroder Component
      • The Landlab GravelRiverTransporter Component
      • HyLands: modelling the evolution of landscapes and mass movements
      • Adding a discharge point source to a LEM
      • The StreamPowerSmoothThresholdEroder component
      • User guide and example for the Landlab SPACE_large_Scale_eroder component
      • User guide and example for the Landlab SPACE component
      • User guide and example for the Landlab threshold_eroder component
      • Introduction to the Lithology and LithoLayers objects
      • Tips on Writing Landlab Components
      • How to write a Landlab component
      • Mapping values between grid elements
      • Using the Landlab SimpleSubmarineDiffuser component
      • Landslide Runout Animation
      • Synthetic landscape animation
      • Building a matrix for numerical methods using a Landlab grid
      • Using the Landlab BedParcelInitializer components to initialize river bed sediment parcels for the NetworkSedimentTransporter component
      • Create A Network Grid from Raster Grid
      • Using plotting tools associated with the Landlab NetworkSedimentTransporter component
      • Using the Landlab NetworkSedimentTransporter component
      • Using USGS NHDPlus HR Datasets With the Landlab NetworkSedimentTransporter Component
      • Using the Landlab NetworkSedimentTransporter component starting with a shapefile river network
      • Profiling and Scaling Analysis of the NetworkSedimentTransporter
      • Generate a Network Model Grid on an OpenTopography DEM
      • Using SedimentPulserAtLinks to add sediment parcels to a channel network
      • Using SedimentPulserEachParcel to add sediment parcels to a channel network
      • Introduction to the NormalFault component
      • Writing with legacy vtk files
      • A coupled rainfall-runoff model in Landlab
      • How to do “D4” pit-filling on a digital elevation model (DEM)
      • The deAlmeida Overland Flow Component
      • The Implicit Kinematic Wave Overland Flow Component
      • The Linear Diffusion Overland Flow Router
      • Components for modeling overland flow erosion
      • Green-Ampt infiltration and kinematic wave overland flow
      • Animate Landlab output
      • Plotting grid data with Landlab
      • A super-brief intro to Python and NumPy
      • How to read a DEM as a Landlab grid
      • 2D Surface Water Flow component
      • 2D Surface Water Flow component
      • River Flow Dynamics Simulation with Landlab
      • Introduction to the SpeciesEvolver component
      • Using the Landlab ListricKinematicExtender component
      • Using the ChiFinder Component
      • Using the DrainageDensity Component
      • Application of the flow__distance utility on a Sicilian basin
      • Using the HackCalculator Component
      • Using the SteepnessFinder Component
      • Tidal Flow Calculator
      • Importing Landlab .obj format output into Blender
      • Viewing Landlab output in ParaView
  • Teaching with Landlab
    • Getting started
    • Gallery
      • Quantifying river channel evolution with Landlab
      • Modeling Hillslopes and Channels with Landlab
      • Linear diffusion exercise with Landlab
      • Using Landlab to explore a diffusive hillslope in the piedmont of North Carolina
      • Exploring rainfall driven hydrographs with Landlab

Contributing

  • Developer Install
    • Virtual Environments
    • Updating and uninstalling
  • Developer Guide
    • Guidelines for Contributing Code to Landlab
      • Develop your own component or utility
      • Recommendations and Rules for User-Contributed Components
      • Ongoing Development in Landlab
      • Desired Contributions to Landlab
      • Workflow to submit your Landlab contribution to Journal of Open Source Software
    • Software Development Practices
      • Develop with Git
      • Continuous Integration Practices
      • Style Guidelines and Enforcement
      • Writing docstring and unit tests for your component (or utility)
      • How to create a Landlab release
      • How Landlab Specifies Dependencies
    • Package Organization
  • API Reference
    • bmi
      • bmi_bridge
      • components
      • standard_names
    • ca
      • boundaries
        • hex_lattice_tectonicizer
      • celllab_cts
      • hex_cts
      • oriented_hex_cts
      • oriented_raster_cts
      • raster_cts
    • cmd
      • authors
      • landlab
    • components
      • advection
        • advection_solver_tvd
        • flux_limiters
      • area_slope_transporter
        • area_slope_transporter
      • bedrock_landslider
        • bedrock_landslider
      • carbonate
        • carbonate_producer
      • chi_index
        • channel_chi
      • concentration_tracker
        • concentration_tracker_for_diffusion
        • concentration_tracker_for_space
      • depression_finder
        • floodstatus
        • lake_mapper
      • depth_dependent_diffusion
        • hillslope_depth_dependent_linear_flux
      • depth_dependent_taylor_soil_creep
        • hillslope_depth_dependent_taylor_flux
      • detachment_ltd_erosion
        • generate_detachment_ltd_erosion
        • generate_erosion_by_depth_slope
      • diffusion
        • diffusion
      • dimensionless_discharge
        • dimensionless_discharge
      • discharge_diffuser
        • diffuse_by_discharge
      • drainage_density
        • drainage_density
      • erosion_deposition
        • erosion_deposition
        • generalized_erosion_deposition
        • shared_stream_power
      • fire_generator
        • generate_fire
      • flexure
        • flexure
        • flexure_1d
        • funcs
      • flow_accum
        • flow_accum_bw
        • flow_accum_to_n
        • flow_accumulator
        • lossy_flow_accumulator
      • flow_director
        • flow_direction_DN
        • flow_direction_dinf
        • flow_direction_mfd
        • flow_director
        • flow_director_d8
        • flow_director_dinf
        • flow_director_mfd
        • flow_director_steepest
        • flow_director_to_many
        • flow_director_to_one
      • flow_router
        • ext
          • single_flow
            • priority_routing
      • fracture_grid
        • fracture_grid
      • gflex
        • flexure
      • gravel_bedrock_eroder
        • gravel_bedrock_eroder
      • gravel_river_transporter
        • gravel_river_transporter
      • groundwater
        • dupuit_percolator
      • hack_calculator
        • hack_calculator
      • hand_calculator
        • hand_calculator
      • lake_fill
        • lake_fill_barnes
      • landslides
        • landslide_probability
      • lateral_erosion
        • lateral_erosion
        • node_finder
      • lithology
        • litholayers
        • lithology
      • marine_sediment_transport
        • simple_submarine_diffuser
      • mass_wasting_runout
        • mass_wasting_runout
        • mass_wasting_saver
      • network_sediment_transporter
        • bed_parcel_initializers
        • network_sediment_transporter
        • sediment_pulser_at_links
        • sediment_pulser_base
        • sediment_pulser_each_parcel
      • nonlinear_diffusion
        • Perron_nl_diffuse
      • normal_fault
        • normal_fault
      • overland_flow
        • generate_overland_flow_Bates
        • generate_overland_flow_deAlmeida
        • generate_overland_flow_implicit_kinwave
        • generate_overland_flow_kinwave
        • kinematic_wave_rengers
        • linear_diffusion_overland_flow_router
      • pet
        • potential_evapotranspiration_field
      • plant_competition_ca
        • plant_competition_ca
      • potentiality_flowrouting
        • route_flow_by_boundary
      • priority_flood_flow_router
        • priority_flood_flow_router
      • profiler
        • base_profiler
        • channel_profiler
        • profiler
        • trickle_down_profiler
      • radiation
        • radiation
      • river_flow_dynamics
        • river_flow_dynamics
      • sink_fill
        • fill_sinks
        • sink_fill_barnes
      • soil_moisture
        • infiltrate_soil_green_ampt
        • soil_moisture_dynamics
      • space
        • space
        • space_large_scale_eroder
      • spatial_precip
        • generate_spatial_precip
      • species_evolution
        • base_taxon
        • record
        • species_evolver
        • zone
        • zone_controller
        • zone_taxon
      • steepness_index
        • channel_steepness
      • stream_power
        • fastscape_stream_power
        • sed_flux_dep_incision
        • stream_power
        • stream_power_smooth_threshold
      • taylor_nonlinear_hillslope_flux
        • taylor_nonlinear_hillslope_flux
      • tectonics
        • listric_kinematic_extender
      • threshold_eroder
        • threshold_eroder
      • tidal_flow
        • tidal_flow_calculator
      • transport_length_diffusion
        • transport_length_hillslope_diffusion
      • uniform_precip
        • generate_uniform_precip
      • vegetation_dynamics
        • vegetation_dynamics
      • weathering
        • exponential_weathering
        • exponential_weathering_integrated
    • core
      • errors
      • messages
      • model_component
      • model_parameter_loader
      • utils
    • data_record
      • aggregators
      • data_record
    • field
      • errors
      • graph_field
    • framework
      • component
      • decorators
      • interfaces
    • graph
      • ext
      • framed_voronoi
        • dual_framed_voronoi
        • framed_voronoi
      • hex
        • ext
        • dual_hex
        • hex
      • matrix
        • ext
        • at_node
        • at_patch
      • object
        • ext
        • at_node
        • at_patch
      • quantity
        • ext
        • of_link
        • of_patch
      • quasi_spherical
        • dual_icosphere
        • refinable_icosahedron
      • radial
        • dual_radial
        • radial
      • sort
        • ext
        • intpair
        • sort
      • structured_quad
        • ext
        • dual_structured_quad
        • structured_quad
      • voronoi
        • ext
        • dual_voronoi
        • voronoi
        • voronoi_to_graph
      • dual
      • graph
      • graph_convention
      • ugrid
    • grid
      • unstructured
        • base
        • cells
        • links
        • nodes
        • status
      • base
      • create
      • create_network
      • decorators
      • diagonals
      • divergence
      • framed_voronoi
      • gradients
      • grid_funcs
      • hex
      • hex_mappers
      • icosphere
      • linkorientation
      • linkstatus
      • mappers
      • network
      • nodestatus
      • radial
      • raster
      • raster_aspect
      • raster_divergence
      • raster_funcs
      • raster_gradients
      • raster_mappers
      • raster_set_status
      • voronoi
      • warnings
    • io
      • netcdf
        • dump
        • errors
        • load
        • read
        • write
      • esri_ascii
      • legacy_vtk
      • native_landlab
      • obj
      • shapefile
    • layers
      • ext
      • eventlayers
      • materiallayers
    • plot
      • network_sediment_transporter
        • locate_parcel_xy
        • plot_network_and_parcels
      • colors
      • drainage_plot
      • event_handler
      • graph
      • imshow
      • imshowhs
      • layers
      • video_out
    • utils
      • ext
      • add_halo
      • count_repeats
      • decorators
      • depth_dependent_roughness
      • distance_to_divide
      • fault_facet_finder
      • flow__distance
      • jaggedarray
      • jaggedarray_ma
      • matrix
      • return_array
      • source_tracking_algorithm
      • stable_priority_queue
      • structured_grid
      • suppress_output
      • watershed
      • window_statistic
    • values
      • synthetic

About

  • Release Notes
  • Contact
  • Citing Landlab
  • Funding
  • Contributors
  • License
  • Used by

Project Links

  • GitHub
  • PyPI
  • Conda-Forge
Back to top
View this page
Edit this page

landlab.components.network_sediment_transporter.sediment_pulser_at_links¶

class SedimentPulserAtLinks[source]¶

Bases: SedimentPulserBase

Send a pulse of parcels to specific links in a channel network

SedimentPulserAtLinks is instantiated by specifying the NetworkModelGrid it will pulse the parcels into and the time(s) when a pulse is allowed to occur. It inherits attributes and functions from the SedimentPulserBase.

SedimentPulserAtLinks is run (adds parcels to DataRecord) by calling the instance with a list of links and a list of the number of parcels added to each link.

If parcel attributes are constant with time and uniform across the basin, these constant-uniform-attributes can be defined when SedimentPulserAtLinks is instantiated. If parcel attributes vary with location and time, the user specifies the varying parcel attributes each time the instance is called with a list for each attribute of length equal to the number of links included in the pulse.

Code author: Jeff Keck, Allison Pfeiffer, Shelby Ahrendt (with help from Eric Hutton and Katy Barnhart)

Examples

>>> import numpy as np
>>> from landlab import NetworkModelGrid

Create the network model grid the parcels will be added to.

>>> y_of_node = (0, 100, 200, 200, 300, 400, 400, 125)
>>> x_of_node = (0, 0, 100, -50, -100, 50, -150, -100)
>>> nodes_at_link = ((1, 0), (2, 1), (1, 7), (3, 1), (3, 4), (4, 5), (4, 6))
>>> grid = NetworkModelGrid((y_of_node, x_of_node), nodes_at_link)
>>> grid.at_link["channel_width"] = np.full(grid.number_of_links, 1.0)  # m
>>> grid.at_link["channel_slope"] = np.full(grid.number_of_links, 0.01)  # m / m
>>> grid.at_link["reach_length"] = np.full(grid.number_of_links, 100.0)  # m

Define a function that contains which times a pulse is allowed to occur. This function says a pulse can occur at any time

>>> def time_to_pulse(time):
...     return True
...

Instantiate SedimentPulserAtLinks

>>> make_pulse = SedimentPulserAtLinks(grid, time_to_pulse=time_to_pulse)

Run the instance with inputs for the time, link location and number of parcels. Other attributes will use the default values in the base class

>>> time = 11
>>> links = [2, 6]
>>> n_parcels_at_link = [2, 3]
>>> parcels = make_pulse(
...     time=time, links=links, n_parcels_at_link=n_parcels_at_link
... )

Check the element_id of each parcel

>>> print(parcels.dataset["element_id"].values)
[[2]
 [2]
 [6]
 [6]
 [6]]

Create SedimentPulserAtLinks.

Parameters:
  • grid (ModelGrid) – landlab ModelGrid to place sediment parcels on.

  • time_to_pulse (function, optional) – The condition when a pulse occurs using the _pulse_characteristics method. If not specified, a pulse occurs whenever the instance is run

  • parcels (landlab DataRecord) – Tracks parcel location and variables.

  • D50 (float, optional) – Median grain size [m].

  • D84_D50 (float, optional) – Ratio of 84th percentile grain size to the median grain size.

  • rho_sediment (float, optional) – Sediment grain density [kg / m^3].

  • parcel_volume (float) – Parcel volume [m^3]

  • abrasion_rate (float) – Volumetric abrasion exponent [1 / m]

__call__(time, links=None, n_parcels_at_link=None, D50=None, D84_D50=None, rho_sediment=None, parcel_volume=None, abrasion_rate=None)[source]¶

specify the time, link(s) and attributes of pulses added to a NetworkModelGrid at stochastically determined locations within the link(s).

Parameters:
  • time (integer or datetime64) – Time that the pulse is occurs.

  • links (list of int) – Link ID # that parcels are added to.

  • n_parcels_at_link (list of int) – Number of parcels added to each link listed in links

  • D50 (list of float, optional) – Median grain size of parcels added to each link listed in links [m].

  • D84_D50 (list of float, optional) – Ratio of 84th percentile grain size to the median grain size.

  • rho_sediment (list of float, optional) – Density of grains [kg / m^3].

  • parcel_volume (list of float, optional) – Volume of each parcel added to link listed in links [m^3].

  • abrasion_rate (list of float, optional) – Rate that grain size decreases with distance along channel [mm / km?].

Returns:

DataRecord containing all information on each individual parcel.

Return type:

parcels

__init__(grid, time_to_pulse=None, parcels=None, D50=0.05, D84_D50=2.1, rho_sediment=2650.0, parcel_volume=0.5, abrasion_rate=0.0, rng=None)[source]¶

Create SedimentPulserAtLinks.

Parameters:
  • grid (ModelGrid) – landlab ModelGrid to place sediment parcels on.

  • time_to_pulse (function, optional) – The condition when a pulse occurs using the _pulse_characteristics method. If not specified, a pulse occurs whenever the instance is run

  • parcels (landlab DataRecord) – Tracks parcel location and variables.

  • D50 (float, optional) – Median grain size [m].

  • D84_D50 (float, optional) – Ratio of 84th percentile grain size to the median grain size.

  • rho_sediment (float, optional) – Sediment grain density [kg / m^3].

  • parcel_volume (float) – Parcel volume [m^3]

  • abrasion_rate (float) – Volumetric abrasion exponent [1 / m]

static __new__(cls, *args, **kwds)¶
cite_as = ''¶
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 = ()¶
classmethod from_path(grid, path)¶

Create a component from an input file.

Parameters:
  • grid (ModelGrid) – A landlab grid.

  • path (str or file_like) – Path to a parameter file, contents of a parameter file, or a file-like object.

Returns:

A newly-created component.

Return type:

Component

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 = ()¶
name = 'SedimentPulserAtLinks'¶
optional_var_names = ()¶
output_var_names = ()¶
property shape¶

Return the grid shape attached to the component, if defined.

unit_agnostic = False¶
units = ()¶
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.

Parameters:

name (str) – A field name.

Returns:

The location (‘node’, ‘link’, etc.) where a variable is defined.

Return type:

str

var_mapping = ()¶
classmethod var_type(name)¶

Returns the dtype of a field (float, int, bool, str…).

Parameters:

name (str) – A field name.

Returns:

The dtype of the field.

Return type:

dtype

classmethod var_units(name)¶

Get the units of a particular field.

Parameters:

name (str) – A field name.

Returns:

Units for the given field.

Return type:

str

Next
landlab.components.network_sediment_transporter.sediment_pulser_base
Previous
landlab.components.network_sediment_transporter.network_sediment_transporter
Copyright © 2025, The Landlab Team
Made with Sphinx and @pradyunsg's Furo
Powered by CSDMS
On this page
  • landlab.components.network_sediment_transporter.sediment_pulser_at_links
    • SedimentPulserAtLinks
      • SedimentPulserAtLinks.__call__
      • SedimentPulserAtLinks.__init__
      • SedimentPulserAtLinks.__new__
      • SedimentPulserAtLinks.cite_as
      • SedimentPulserAtLinks.coords
      • SedimentPulserAtLinks.current_time
      • SedimentPulserAtLinks.definitions
      • SedimentPulserAtLinks.from_path
      • SedimentPulserAtLinks.grid
      • SedimentPulserAtLinks.initialize_optional_output_fields
      • SedimentPulserAtLinks.initialize_output_fields
      • SedimentPulserAtLinks.input_var_names
      • SedimentPulserAtLinks.name
      • SedimentPulserAtLinks.optional_var_names
      • SedimentPulserAtLinks.output_var_names
      • SedimentPulserAtLinks.shape
      • SedimentPulserAtLinks.unit_agnostic
      • SedimentPulserAtLinks.units
      • SedimentPulserAtLinks.var_definition
      • SedimentPulserAtLinks.var_help
      • SedimentPulserAtLinks.var_loc
      • SedimentPulserAtLinks.var_mapping
      • SedimentPulserAtLinks.var_type
      • SedimentPulserAtLinks.var_units