Class StraMesh#

class sed.stratplex.STRAMesh[source]#

This class encapsulates all the functions related to underlying stratigraphic information.

Note

Sediment compaction in stratigraphic layers geometry and properties change are also considered.

Methods

deposeStrat()

Add deposition on top of an existing stratigraphic layer.

elevStrat()

This function updates the current stratigraphic layer elevation.

erodeStrat()

This function removes eroded sediment thicknesses from the stratigraphic pile.

getCompaction()

This function computes the change in sedimentary layers porosities and thicknesses due to compaction.

readStratLayers()

When stratigraphic layers are turned on, this function reads any initial stratigraphic layers provided in the input file (key: npstrata).

stratalRecord(indices, weights, onIDs)

Once the interpolation has been performed, the following function updates the stratigraphic records based on the advected mesh.

Initialise

__init__()

The initialisation of STRAMesh class related to stratigraphic informations.

Public Methods

readStratLayers()

When stratigraphic layers are turned on, this function reads any initial stratigraphic layers provided in the input file (key: npstrata).

deposeStrat()

Add deposition on top of an existing stratigraphic layer.

erodeStrat()

This function removes eroded sediment thicknesses from the stratigraphic pile.

elevStrat()

This function updates the current stratigraphic layer elevation.

getCompaction()

This function computes the change in sedimentary layers porosities and thicknesses due to compaction.

stratalRecord(indices, weights, onIDs)

Once the interpolation has been performed, the following function updates the stratigraphic records based on the advected mesh.

Private Methods

_initProvenance()

Allocate and seed the provenance state (opt-in provenance:; Phase 0).

_fillZeroPorosity(phiS)

Where phiS == 0 (layer has been emptied or never deposited), inherit the value from the nearest underlying layer with non-zero porosity.

_surfaceK()

Return the per-node erodibility multiplier of the topmost non-empty stratigraphic layer.

_surfaceComposition()

Return the per-node coarse fraction fc (by bulk thickness) of the topmost non-empty stratigraphic layer; the fine fraction is 1 - fc.

_surfaceLithoK()

Per-node erodibility multiplier from the exposed surface composition: fc + (1 - fc) * fine_k_factor.

_surfaceLithoD()

Per-node diffusivity multiplier from the exposed surface composition: fc + (1 - fc) * fine_diff_factor.

_depthPorosity(depth)

This function uses the depth-porosity relationships to compute the porosities for each lithology and then the solid phase to get each layer thickness changes due to compaction.

_depthPorosityDual(depth)

Dual-lithology depth-porosity / compaction.

Public functions#

STRAMesh.readStratLayers()[source]#

When stratigraphic layers are turned on, this function reads any initial stratigraphic layers provided in the input file (key: npstrata).

The following variables will be read from the file:

  • thickness of each stratigrapic layer strataH accounting for both erosion & deposition events.

  • elevation at time of deposition, considered to be to the current elevation for the top stratigraphic layer strataZ.

  • porosity of coarse sediment phiS in each stratigraphic layer computed at center of each layer.

With dual lithology enabled (strata: dual: True), two optional keys let each initial layer carry its own coarse/fine composition:

  • strataHf: fine-fraction bulk thickness per layer (coarse = strataH - strataHf); absent -> all-coarse.

  • phiF: fine porosity per layer; absent -> defaults to phi0f.

STRAMesh.deposeStrat()[source]#

Add deposition on top of an existing stratigraphic layer. The following variables will be recorded:

  • thickness of each stratigrapic layer stratH accounting for both erosion & deposition events.

  • porosity of sediment phiS in each stratigraphic layer computed at center of each layer.

In dual-lithology mode the deposit is split into a coarse and a fine fraction using the per-node deposit fine fraction self.depoFineFrac. It starts each step as self.fineFrac (the composition of the routed sediment arriving at each node, from sedplex._getSedFlux) and is refined inside continental depressions by _pitFineFraction (3b: fine biased to the depocenter, coarse to the inlet/margins).

STRAMesh.erodeStrat()[source]#

This function removes eroded sediment thicknesses from the stratigraphic pile. The function takes into account the porosity values of considered lithologies in each eroded stratigraphic layers.

It follows the assumptions:

  • Eroded thicknesses from stream power law and hillslope diffusion are considered to encompass both the solid and void phase.

  • Only the solid phase will be moved dowstream by surface processes.

  • The corresponding deposit thicknesses for those freshly eroded sediments correspond to uncompacted thicknesses based on the porosity at surface given from the input file.

STRAMesh.elevStrat()[source]#

This function updates the current stratigraphic layer elevation.

STRAMesh.getCompaction()[source]#

This function computes the change in sedimentary layers porosities and thicknesses due to compaction.

Note

We assume a simple depth-porosiy relationship.

STRAMesh.stratalRecord(indices, weights, onIDs)[source]#

Once the interpolation has been performed, the following function updates the stratigraphic records based on the advected mesh.

The function relies on the fortran subroutine strataonesed. In dual-lithology mode the fine pile (stratHf, phiF) is advected with a second strataonesed call — stratHf is a bulk thickness, so the plain weighted interpolation applies directly (the unused stratathreesed kernel instead treats its extra fields as 0–1 fractions and renormalises them, which does not match the thickness representation here).

Parameters:
  • indices – indices of the closest nodes used for interpolation

  • weights – weights based on the distances to closest nodes

  • onIDs – index of nodes remaining at the same position.

Private functions#

STRAMesh._initProvenance()[source]#

Allocate and seed the provenance state (opt-in provenance:; Phase 0).

source_class (per-vertex bedrock class) is read from the uniform scalar or the source [file, key] map; stratP[node, layer, class] is the per-class thickness in each layer, seeded so every initial layer (and the bedrock sentinel) carries the node’s bedrock source class (Σ over classes == stratH). A passive tracer — no physics feedback — so a provenance-on run is identical to provenance-off until the erosion/transport/deposition hooks of later phases are added.

STRAMesh._fillZeroPorosity(phiS)[source]#

Where phiS == 0 (layer has been emptied or never deposited), inherit the value from the nearest underlying layer with non-zero porosity. Vectorised forward-fill from low → high index along axis 1. Leading zeros at the column base stay zero (no valid layer below).

STRAMesh._surfaceK()[source]#

Return the per-node erodibility multiplier of the topmost non-empty stratigraphic layer. Used by the SPL flavours to scale the scalar self.K according to the bedrock currently exposed at the surface.

Returns 1.0 everywhere when stratigraphy is disabled (stratNb == 0) or when the column is fully empty at a node, so the SPL evaluation falls back to the YAML-default K.

STRAMesh._surfaceComposition()[source]#

Return the per-node coarse fraction fc (by bulk thickness) of the topmost non-empty stratigraphic layer; the fine fraction is 1 - fc.

Returns all-ones (all coarse) when dual lithology is disabled or the fine pile is unallocated, so single-fraction callers are unchanged. Shared hook for the SPL erodibility blend (_surfaceLithoK) and the hillslope diffusivity blend (see DESIGN_DUAL_LITHOLOGY.md).

STRAMesh._surfaceLithoK()[source]#

Per-node erodibility multiplier from the exposed surface composition: fc + (1 - fc) * fine_k_factor.

Equals 1.0 everywhere when dual lithology is off (or fine_k_factor == 1, i.e. no lithology contrast), so it composes multiplicatively with _surfaceK in the SPL flavours without altering single-fraction behaviour.

STRAMesh._surfaceLithoD()[source]#

Per-node diffusivity multiplier from the exposed surface composition: fc + (1 - fc) * fine_diff_factor.

Equals 1.0 everywhere when dual lithology is off (or fine_diff_factor == 1, i.e. no contrast), so it composes multiplicatively with the base hillslope coefficients (Cda/Cdm) without altering single-fraction behaviour. Fines diffuse faster when fine_diff_factor > 1 (see DESIGN_DUAL_LITHOLOGY.md Section 7).

STRAMesh._depthPorosity(depth)[source]#

This function uses the depth-porosity relationships to compute the porosities for each lithology and then the solid phase to get each layer thickness changes due to compaction.

Note

We assume that porosity cannot increase after unloading.

Parameters:

depth – depth below basement for each sedimentary layer

Returns:

newH updated sedimentary layer thicknesses after compaction

STRAMesh._depthPorosityDual(depth)[source]#

Dual-lithology depth-porosity / compaction. Each fraction (coarse, fine) compacts on its own porosity-depth curve; the layer’s new thickness is the sum of the two recompacted bulk thicknesses, and the fine pile stratHf is updated consistently.

This is the headline physics of dual lithology: fine and coarse have different compaction, so the same solid load yields a different preserved thickness depending on the layer’s grain mix.

Parameters:

depth – depth below basement for each sedimentary layer

Returns:

newH updated layer thicknesses after compaction