landlab.components.plant_competition_ca.plant_competition_ca

class VegCA[source]

Bases: Component

Landlab component that simulates inter-species plant competition using a 2D cellular automata model.

This code is based on Cellular Automata Tree Grass Shrub Simulator (CATGraSS). It simulates spatial competition of multiple plant functional types through establishment and mortality. In the current code, tree, grass and shrubs are used.

Ref: Zhou, X., Istanbulluoglu, E., & Vivoni, E. R. (2013). Modeling the ecohydrological role of aspect controlled radiation on tree grass shrub coexistence in a semiarid climate. Water Resources Research, 49(5), 2872-2895.

Code author: Sai Nudurupati and Erkan Istanbulluoglu

Examples

>>> from landlab import RasterModelGrid
>>> from landlab.components import VegCA
>>> grid = RasterModelGrid((5, 4), xy_spacing=(0.2, 0.2))
>>> VegCA.name
'Cellular Automata Plant Competition'
>>> sorted(VegCA.output_var_names)
['plant__age', 'plant__live_index']
>>> sorted(VegCA.units)
[('plant__age', 'Years'),
 ('plant__live_index', 'None'),
 ('vegetation__cumulative_water_stress', 'None'),
 ('vegetation__plant_functional_type', 'None')]
>>> grid["cell"]["vegetation__plant_functional_type"] = np.arange(
...     0, grid.number_of_cells, dtype=int
... )
>>> grid["cell"]["vegetation__cumulative_water_stress"] = np.ones(
...     grid.number_of_cells
... )
>>> ca_veg = VegCA(grid)
>>> ca_veg.grid.number_of_cell_rows
3
>>> ca_veg.grid.number_of_cell_columns
2
>>> ca_veg.grid is grid
True
>>> import numpy as np
>>> A = np.copy(grid["cell"]["plant__age"])
>>> ca_veg.update()
>>> np.all(grid["cell"]["plant__age"] == A)
False

References

Required Software Citation(s) Specific to this Component

None Listed

Additional References

Zhou, X., Istanbulluoglu, E., and Vivoni, E. R.: Modeling the ecohydrological role of aspect-controlled radiation on tree-grass-shrub coexistence in a semiarid climate, Water Resour. Res., 49, 2872– 2895, doi:10.1002/wrcr.20259, 2013.

Parameters:
  • grid (RasterModelGrid) – A grid.

  • Pemaxg (float, optional) – Maximal establishment probability of grass.

  • ING (float, optional) – Parameter to define allelopathic effect of creosote on grass.

  • ThetaGrass (float, optional) – Drought resistance threshold of grass.

  • PmbGrass (float, optional) – Background mortality probability of grass.

  • Pemaxsh (float, optional) – Maximal establishment probability of shrub.

  • ThetaShrub (float, optional) – Drought resistance threshold of shrub.

  • PmbShrub (float, optional) – Background mortality probability of shrub.

  • tpmaxShrub (float, optional) – Maximum age of shrub (years).

  • Pemaxtr (float, optional) – Maximal establishment probability of tree.

  • Thetatree (float, optional) – Drought resistance threshold of tree.

  • PmbTree (float, optional) – Background mortality probability of tree.

  • tpmaxTree (float, optional) – Maximum age of tree (years).

  • ThetaShrubSeedling (float, optional) – Drought resistance threshold of shrub seedling.

  • PmbShrubSeedling (float, optional) – Background mortality probability of shrub seedling.

  • tpmaxShrubSeedling (float, optional) – Maximum age of shrub seedling (years).

  • ThetaTreeSeedling (float, optional) – Drought resistance threshold of tree seedling.

  • PmbTreeSeedling (float, optional) – Background mortality probability of tree seedling.

  • tpmaxTreeSeedling (float, optional) – Maximum age of tree seedling (years).

  • method (str, optional) – Method used.

  • Edit_VegCov (bool, optional) – If Edit_VegCov=True, an optional field ‘vegetation__boolean_vegetated’ will be output, (i.e.) if a cell is vegetated the corresponding cell of the field will be 1, otherwise it will be 0.

property Edit_VegCov

Flag to indicate whether an optional field is created.

If Edit_VegCov=True, an optional field ‘vegetation__boolean_vegetated’ will be output, (i.e.) if a cell is vegetated the corresponding cell of the field will be 1, otherwise it will be 0.

__init__(grid, Pemaxg=0.35, ING=2.0, ThetaGrass=0.62, PmbGrass=0.05, Pemaxsh=0.2, ThetaShrub=0.8, PmbShrub=0.01, tpmaxShrub=600, Pemaxtr=0.25, ThetaTree=0.72, PmbTree=0.01, tpmaxTree=350, ThetaShrubSeedling=0.64, PmbShrubSeedling=0.03, tpmaxShrubSeedling=18, ThetaTreeSeedling=0.64, PmbTreeSeedling=0.03, tpmaxTreeSeedling=18, method='Grid', Edit_VegCov=True)[source]
Parameters:
  • grid (RasterModelGrid) – A grid.

  • Pemaxg (float, optional) – Maximal establishment probability of grass.

  • ING (float, optional) – Parameter to define allelopathic effect of creosote on grass.

  • ThetaGrass (float, optional) – Drought resistance threshold of grass.

  • PmbGrass (float, optional) – Background mortality probability of grass.

  • Pemaxsh (float, optional) – Maximal establishment probability of shrub.

  • ThetaShrub (float, optional) – Drought resistance threshold of shrub.

  • PmbShrub (float, optional) – Background mortality probability of shrub.

  • tpmaxShrub (float, optional) – Maximum age of shrub (years).

  • Pemaxtr (float, optional) – Maximal establishment probability of tree.

  • Thetatree (float, optional) – Drought resistance threshold of tree.

  • PmbTree (float, optional) – Background mortality probability of tree.

  • tpmaxTree (float, optional) – Maximum age of tree (years).

  • ThetaShrubSeedling (float, optional) – Drought resistance threshold of shrub seedling.

  • PmbShrubSeedling (float, optional) – Background mortality probability of shrub seedling.

  • tpmaxShrubSeedling (float, optional) – Maximum age of shrub seedling (years).

  • ThetaTreeSeedling (float, optional) – Drought resistance threshold of tree seedling.

  • PmbTreeSeedling (float, optional) – Background mortality probability of tree seedling.

  • tpmaxTreeSeedling (float, optional) – Maximum age of tree seedling (years).

  • method (str, optional) – Method used.

  • Edit_VegCov (bool, optional) – If Edit_VegCov=True, an optional field ‘vegetation__boolean_vegetated’ will be output, (i.e.) if a cell is vegetated the corresponding cell of the field will be 1, otherwise it will be 0.

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 = (('plant__age', 'Age of plant'), ('plant__live_index', '1 - vegetation__cumulative_water_stress'), ('vegetation__cumulative_water_stress', 'cumulative vegetation__water_stress over the growing season'), ('vegetation__plant_functional_type', 'classification of plants (int), grass=0, shrub=1, tree=2, bare=3, shrub_seedling=4, tree_seedling=5'))
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 = ('vegetation__cumulative_water_stress', 'vegetation__plant_functional_type')
name = 'Cellular Automata Plant Competition'
optional_var_names = ()
output_var_names = ('plant__age', 'plant__live_index')
property shape

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

unit_agnostic = False
units = (('plant__age', 'Years'), ('plant__live_index', 'None'), ('vegetation__cumulative_water_stress', 'None'), ('vegetation__plant_functional_type', 'None'))
update(dt=1)[source]

Update fields with current loading conditions.

Parameters:

dt (int, optional) – Time elapsed - time step (years).

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 = (('plant__age', 'cell'), ('plant__live_index', 'cell'), ('vegetation__cumulative_water_stress', 'cell'), ('vegetation__plant_functional_type', 'cell'))
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

WS_PFT(VegType, PlantType, WS)[source]
assert_method_is_valid(method)[source]
count(Arr, value)[source]