landlab.components.carbonate.carbonate_producer

class CarbonateProducer[source]

Bases: Component

Calculate marine carbonate production and deposition.

Uses the growth-rate of Bosscher and Schlager (1992), which represents the vertical growth rate \(G\) as:

..math:

G = G_m         anh (I_0 e^{-kz} / I_k)

where \(G_m\) is the maximum growth rate, \(I_0\) is the surface light intensity, \(I_k\) is the saturating light intensity, \(z\) is water depth, and \(k\) is the light extinction coefficient.

Bosscher and Schlager (1992) suggest plausible values or ranges for these parameters as follows: \(G_m\) = 10 to 15 mm/y, \(I_0\) = 2,000 to 2,250 micro Einsteins per square meter per second in the tropics, \(I_k\) = 50 to 450 micro Einsteins per square meter per second, and \(k\) = 0.04 to 0.16 m:math:^{-1} (corresponding to a decay depth of 6.25 to 16 m). The default values used in this component are based on these estimates.

Examples

>>> from landlab import RasterModelGrid
>>> from landlab.components import CarbonateProducer
>>> grid = RasterModelGrid((3, 3))
>>> elev = grid.add_zeros("topographic__elevation", at="node")
>>> sealevel = grid.add_field("sea_level__elevation", 0.0, at="grid")
>>> elev[:] = -1.0
>>> cp = CarbonateProducer(grid)
>>> np.round(cp.calc_carbonate_production_rate()[4], 2)
0.01
>>> elev[:] = -40.0
>>> np.round(cp.calc_carbonate_production_rate()[4], 5)
0.00091
>>> cp.sea_level = -39.0
>>> np.round(cp.calc_carbonate_production_rate()[4], 2)
0.01
>>> thickness = cp.produce_carbonate(10.0)
>>> np.round(10 * grid.at_node["carbonate_thickness"][4])
1.0
>>> thickness is grid.at_node["carbonate_thickness"]
True
>>> cp.run_one_step(10.0)
>>> np.round(10 * thickness[4])
2.0

References

Bosscher, H., & Schlager, W. (1992). Computer simulation of reef growth. Sedimentology, 39(3), 503-512.

Parameters:
  • grid (ModelGrid (RasterModelGrid, HexModelGrid, etc.)) – A landlab grid object.

  • max_carbonate_production_rate (float (default 0.01 m/y)) – Maximum rate of carbonate production, in m thickness per year

  • extinction_coefficient (float (default 0.1 m^-1)) – Coefficient of light extinction in water column

  • surface_light (float (default 2000.0 micro Einstein per m2 per s)) – Light intensity (photosynthetic photon flux density) at sea surface.

  • saturating_light (float (default 400.0 micro Einstein per m2 per s)) – Saturating light intensity (photosynthetic photon flux density)

  • tidal_range (float (default zero)) – Tidal range used to smooth growth rate when surface is near mean sea level.

__init__(grid, max_carbonate_production_rate=0.01, extinction_coefficient=0.1, surface_light=2000.0, saturating_light=400.0, tidal_range=0.0)[source]
Parameters:
  • grid (ModelGrid (RasterModelGrid, HexModelGrid, etc.)) – A landlab grid object.

  • max_carbonate_production_rate (float (default 0.01 m/y)) – Maximum rate of carbonate production, in m thickness per year

  • extinction_coefficient (float (default 0.1 m^-1)) – Coefficient of light extinction in water column

  • surface_light (float (default 2000.0 micro Einstein per m2 per s)) – Light intensity (photosynthetic photon flux density) at sea surface.

  • saturating_light (float (default 400.0 micro Einstein per m2 per s)) – Saturating light intensity (photosynthetic photon flux density)

  • tidal_range (float (default zero)) – Tidal range used to smooth growth rate when surface is near mean sea level.

static __new__(cls, *args, **kwds)
calc_carbonate_production_rate()[source]

Update carbonate production rate and store in field.

Returns:

Reference to updated carbonate_production_rate field

Return type:

float array x number of grid nodes

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 = (('carbonate_production_rate', 'Carbonate production rate'), ('carbonate_thickness', 'Carbonate thickness'), ('sea_level__elevation', 'Sea level elevation'), ('topographic__elevation', 'Land surface topographic elevation'), ('water_depth', 'Water depth'))
property extinction_coefficient
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 = ('sea_level__elevation', 'topographic__elevation')
property max_carbonate_production_rate
name = 'CarbonateProducer'
optional_var_names = ('carbonate_thickness',)
output_var_names = ('carbonate_production_rate', 'topographic__elevation', 'water_depth')
produce_carbonate(dt)[source]

Grow carbonate for one time step & add to carbonate thickness field.

If optional carbonate_thickness field does not already exist, this function creates it and initializes all values to zero.

Returns:

Reference to updated carbonate_thickness field

Return type:

float array x number of grid nodes

run_one_step(dt)[source]

Advance by one time step.

Simply calls the produce_carbonate() function.

Parameters:

dt (float) – Time step duration (normally in years)

property saturating_light
property sea_level
property shape

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

property surface_light
property tidal_range
unit_agnostic = True
units = (('carbonate_production_rate', 'm / y'), ('carbonate_thickness', 'm'), ('sea_level__elevation', 'm'), ('topographic__elevation', 'm'), ('water_depth', '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.

Parameters:

name (str) – A field name.

Returns:

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

Return type:

str

var_mapping = (('carbonate_production_rate', 'node'), ('carbonate_thickness', 'node'), ('sea_level__elevation', 'grid'), ('topographic__elevation', 'node'), ('water_depth', 'node'))
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

set_numpy_err(*args, **kwds)[source]
smooth_heaviside(x, width=0.5, out=None)[source]

Return a smoothed heaviside function (step function).

Parameters:
  • x (array or float) – Dependent variable

  • width (float (default 0.5)) – Width parameter for smoothing (same units as x)

  • out (array (default None)) – Optional array in which to store result; must have len(x)

Examples

>>> import numpy as np
>>> np.round(smooth_heaviside(np.array([-1, 0, 1])), 3)
array([0.018, 0.5  , 0.982])
>>> smooth_heaviside(np.array([-1, 0, 1]), width=0.0)
array([0. , 0.5, 1. ])