sequence.processes module#
All available processes to include in a Sequence model.
- class sequence.processes.Compact(*args, **kwds)[source]#
Bases:
Component
- __init__(grid, c: float = 5e-08, rho_grain: float = 2650.0, excess_pressure: float = 0.0, porosity_min: float = 0.0, porosity_max: float = 1.0, rho_void: float = 1000.0, gravity: float = 9.80665)[source]#
Compact layers of sediment.
- Parameters:
grid (RasterModelGrid) – A landlab grid.
c (ndarray or number, optional) – Compaction coefficient that describes how easily the sediment is to compact [Pa^-1].
rho_grain (ndarray or number, optional) – Grain density of the sediment [kg / m^3].
excess_pressure (ndarray or number, optional) – Excess pressure with depth [Pa].
porosity_min (ndarray or number, optional) – Minimum porosity that can be achieved by the sediment. This is the porosity of the sediment in its closest-compacted state [-].
porosity_max (ndarray or number, optional) – Maximum porosity of the sediment. This is the porosity of the sediment without any compaction [-].
rho_void (ndarray or number, optional) – Density of the interstitial fluid [kg / m^3].
gravity (float) – Acceleration due to gravity [m / s^2].
Examples
>>> import numpy as np >>> from landlab import RasterModelGrid
>>> grid = RasterModelGrid((3, 5)) >>> for layer in range(5): ... grid.event_layers.add(100.0, porosity=0.7)
>>> compact = Compact(grid, porosity_min=0.1, porosity_max=0.7) >>> compact.run_one_step() RasterModelGrid((3, 5), xy_spacing=(1.0, 1.0), xy_of_lower_left=(0.0, 0.0))
>>> compact.grid.event_layers["porosity"] < 0.7 array([[ True, True, True], [ True, True, True], [ True, True, True], [ True, True, True], [False, False, False]], dtype=bool) >>> compact.grid.event_layers.dz < 100.0 array([[ True, True, True], [ True, True, True], [ True, True, True], [ True, True, True], [False, False, False]], dtype=bool)
- property params#
- class sequence.processes.Fluvial(*args, **kwds)[source]#
Bases:
Component
Landlab component that calculates delta-plain sand fraction.
- __init__(grid: SequenceModelGrid, sand_frac: float = 0.5, wave_base: float = 60.0, sediment_load: float = 3.0, sand_density: float = 2650.0, plain_slope: float = 0.0008, hemipelagic: float = 0.0, sea_level: float = 0.0)[source]#
Generate percent sand/mud for fluvial section.
Add hemipelagic mud to the seaward end of section.
- Parameters:
grid (SequenceModelGrid) – A landlab grid.
sand_frac (str, optional) – Fraction of sand on the delta.
wave_base (float, optional) – Wave base (m).
sediment_load (float, optional) – Sediment load.
sand_density (float, optional) – The grain density of sand [kg / m^3]
plain_slope (float, optional) – The gradient of the flood plain.
hemipelagic (float, optional) – Hemipelagic sedimentation.
sea_level (float, optional) – The current sea level (m).
- class sequence.processes.SeaLevelTimeSeries(*args, **kwds)[source]#
Bases:
Component
Modify sea level through a time series.
- __init__(grid: SequenceModelGrid, filepath: str | PathLike[str], kind: str = 'linear', start: float = 0.0)[source]#
Generate sea level values.
- Parameters:
grid (SequenceModelGrid) – A landlab grid.
filepath (str) – Name of csv-formatted sea-level file.
kind (str, optional) – Kind of interpolation as a string (one of ‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’). Default is ‘linear’.
start (float, optional) – Set the initial time for the component.
- class sequence.processes.SedimentFlexure(*args, **kwds)[source]#
Bases:
DynamicFlexure
Landlab component that deflects a SequenceModelGrid due to sediment loading.
- __init__(grid: SequenceModelGrid, sand_density: float = 2650, mud_density: float = 2720.0, isostasytime: float | None = 7000.0, water_density: float = 1030.0, **kwds: dict)[source]#
Subside elevations due to sediment loading.
- Parameters:
grid (ModelGrid) – A landlab grid.
sand_density (float, optional) – Grain density of the sediment sand-fraction.
mud_density (float, optional) – Grain density of the sediment mud-fraction.
water_density (float, optional) – Density of water.
isostasytime (float, optional) – Response time of the lithosphere to loading.
**kwds (dict, optional) – Additional keyword arguments that are passed to
Flexure1D
.
- static calc_bulk_density(grain_density: float | ndarray[Any, dtype[floating]], void_density: float | ndarray[Any, dtype[floating]], porosity: float | ndarray[Any, dtype[floating]]) float | ndarray[Any, dtype[floating]] [source]#
Calculate the bulk density of a material with a given porosity.
- run_one_step(dt: float = 1.0) None [source]#
Update the component by a time step.
- Parameters:
dt (float, optional) – The time step over which to update the component.
- class sequence.processes.ShorelineFinder(*args, **kwds)[source]#
Bases:
Component
Find a grid’s shoreline.
- __init__(grid: SequenceModelGrid, alpha: float = 0.0005)[source]#
Create a shoreline finder.
- Parameters:
grid (SequenceModelGrid) – A Sequence grid.
alpha (float, optional) – Parameter used to find the shoreline when interpolating between nodes.
- class sequence.processes.SinusoidalSeaLevel(*args, **kwds)[source]#
Bases:
SeaLevelTimeSeries
Adjust a grid’s sea level using a sine curve.
- __init__(grid: SequenceModelGrid, wave_length: float = 1.0, amplitude: float = 1.0, phase: float = 0.0, mean: float = 0.0, start: float = 0.0, linear: float = 0.0)[source]#
Generate sea level values.
- Parameters:
grid (SequenceModelGrid) – A landlab grid.
wave_length (float, optional) – The wave length of the sea-level curve in [y].
amplitude (float, optional) – The amplitude of the sea-level curve.
phase (float, optional) – The phase shift of the sea-level curve [y].
mean (float, optional) – Mean sea-level (disregarding any trend with time).
start (float, optional) – The time of the component [y].
linear (float, optional) – Linear trend of the sea-level curve with time [m / y].
- class sequence.processes.SubmarineDiffuser(*args, **kwds)[source]#
Bases:
LinearDiffuser
Model sea-floor evolution on a SequenceModelGrid as diffusion.
- __init__(grid: SequenceModelGrid, sea_level: float = 0.0, plain_slope: float = 0.0008, wave_base: float = 60.0, shoreface_height: float = 15.0, alpha: float = 0.0005, shelf_slope: float = 0.001, sediment_load: float = 3.0, load_sealevel: float = 0.0, basin_width: float = 500000.0, **kwds: Any)[source]#
Diffuse the ocean bottom.
- Parameters:
grid (RasterModelGrid) – A landlab grid.
sea_level (float, optional) – The current sea level (m).
plain_slope (float, optional) – Slope of the delta plain (m / m).
wave_base (float, optional) – Wave base (m).
shoreface_height (float, optional) – Water depth of the shelf/slope break (m).
alpha (float, optional) – Coefficient used to calculate the diffusion coefficient (1 / m).
shelf_slope (float, optional) – Slope of the shelf (m / m).
sediment_load (float, optional) – Sediment load entering the profile (m2 / y).
load_sealevel (float, optional) – Fractional variation of sediment load with sea level (m2/y/m_sl). i.e., .003 =0.3% increase/decrease with sea level rise/fall (30% with 100m)
basin_width (float, optional) – Length of drainage basin upstream of model. Creates increase in diffusivity downstream by (basin_width + x) / basin_width from increase river flow (m).
**kwds (dict, optional) – Additional keyword arguments that are passed along to
LinearDiffuser
.
- calc_diffusion_coef(x_of_shore: ndarray[Any, dtype[floating]] | float) ndarray[Any, dtype[floating]] [source]#
Calculate and store diffusion coefficient values.
- Parameters:
x_of_shore (float) – The x-position of the shoreline.
Examples
The example below tests the result with 3 of the middle-row nodes above sea level and three below, two of which are in deep water (below the default 60 m wave base).
>>> from sequence.grid import SequenceModelGrid >>> import numpy as np
>>> grid = SequenceModelGrid((1, 6), spacing=(1.0, 200.0)) >>> z = grid.add_zeros("topographic__elevation", at="node") >>> z[6:12] = np.array([3., 3., 1., -1., -85., -85.]) >>> z.reshape((3, 6)) array([[ 0., 0., 0., 0., 0., 0.], [ 3., 3., 1., -1., -85., -85.], [ 0., 0., 0., 0., 0., 0.]])
>>> submarine_diffuser = SubmarineDiffuser(grid, basin_width=0.0) >>> diffusion_coef = submarine_diffuser.calc_diffusion_coef(x_of_shore=500.0)
>>> np.round(diffusion_coef.reshape((3, 6))[1]) array([ 3750., 3750., 3750., 333., 11., 16.])
The calculated diffusion coefficient is also saved as an at-node field.
>>> diffusion_coef is grid.at_node["kd"] True
- class sequence.processes.SubsidenceTimeSeries(*args, **kwds)[source]#
Bases:
Component
A Landlab component that subsides a grid.
- __init__(grid: SequenceModelGrid, filepath: PathLike, kind: str = 'linear')[source]#
Create a grid subsider from a time-series file.
- Parameters:
grid (SequenceModelGrid) – A landlab grid.
filepath (os.PathLike) – Name of csv-formatted subsidence file.
kind (str, optional) – Kind of interpolation as a string (one of ‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’). Default is ‘linear’.