Forest dieback
The forest dieback model of the Amazon.
- Class:
ForestDiebackSystem - Import:
from skcomplex.systems.physics.climate import ForestDiebackSystem - Field:
physics/climate - Topics:
tipping points,vegetation,bistability,hysteresis,ode - References:
- Van Nes et al. 2014
- Bury, Bauch, and Anand 2019
- Liu and Bauch 2023
Use this system
The block imports the class and simulates the system with its default parameters and its tuned run settings.
from skcomplex.systems.physics.climate import ForestDiebackSystem
trajectory = ForestDiebackSystem().prepare().simulate()
Parameters
The model parameters take these defaults, and set_params changes them.
| Parameter | Default |
|---|---|
v |
0.8 |
Tv |
30.0 |
g0 |
2.0 |
beta |
10.0 |
Topt |
28.0 |
a |
5.0 |
gamma |
0.2 |
solver |
'auto' |
backend |
'auto' |
Tags
The system with its default parameters has these capability tags, which solvers and analyses check.
| Tag | Values |
|---|---|
| Time | continuous |
| Space | none |
| Laws | rate |
| Randomness | deterministic |
| Domains | real |
| Structure | fixed |
Class
The source of the class shows how it builds its components from its model parameters.
class ForestDiebackSystem(BaseSystem):
"""The forest dieback model of the Amazon.
The cover tips to bare soil when the ambient temperature rises.
The cover follows `v' = g v (1 - v) - gamma v`, with the growth rate `g = g0 (1 - ((T - Topt) / beta)²)` at the
local temperature `T = Tv + a (1 - v)`. Losing forest warms the soil, which lowers the growth and loses more forest,
a positive feedback. Bare soil `v = 0` is always a fixed point, and the forest survives at the root of `(1 - v) g(v)
= gamma`. For the defaults the forest and bare soil are both stable for ambient temperatures between about 32.5 and
34.7 degrees, the bistable range of a hysteresis loop, and the forest dies beyond it. The system has the vegetation
cover `forest.v`.
Args:
v:
The initial vegetation cover, between 0 and 1.
Tv:
The ambient temperature under full forest cover, in degrees Celsius.
g0:
The largest growth rate.
beta:
The half width of the growth rate against the temperature.
Topt:
The optimal temperature of growth.
a:
The warming of bare soil over forest.
gamma:
The disturbance rate.
label:
The label of the system, which names it when it is nested in another one.
solver:
The solver of the problem, or `'auto'` for the one the system chooses.
backend:
The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.
Examples:
>>> from skcomplex.systems.physics.climate import ForestDiebackSystem
>>> ForestDiebackSystem(Tv=33.0).prepare().system_.elements[0].Tv
33.0
"""
field = 'physics/climate'
topics = ('tipping points', 'vegetation', 'bistability', 'hysteresis', 'ode')
references = ('Van Nes et al. 2014', 'Bury, Bauch, and Anand 2019', 'Liu and Bauch 2023')
until = 200.0
dt = 0.5
def __init__(
self,
v: float = 0.8,
*,
Tv: float = 30.0,
g0: float = 2.0,
beta: float = 10.0,
Topt: float = 28.0,
a: float = 5.0,
gamma: float = 0.2,
label: str = 'system',
solver: BaseSolver | str = 'auto',
backend: BaseBackend | str = 'auto',
) -> None:
super().__init__(label, solver=solver, backend=backend)
self.v = v
self.Tv = Tv
self.g0 = g0
self.beta = beta
self.Topt = Topt
self.a = a
self.gamma = gamma
def _prepare(self, context: Sequence[Observable] | None = None) -> None:
"""Set the system of the forest and the growth of its cover.
Args:
context:
The observables to compile with the problem, or `None` for none.
"""
super()._prepare(context)
growth = ForestGrowthInteraction(
'growth',
target='forest',
g0=self.g0,
beta=self.beta,
Topt=self.Topt,
gamma=self.gamma,
)
self.system_ = System(
self.label,
elements=[ForestCoverElement('forest', v=self.v, Tv=self.Tv, a=self.a)],
interactions=[growth],
)
Components
The system uses these element and interaction classes, each with its nearest class of the core.
Elements:
ForestCoverElement, fromElement
Interactions:
ForestGrowthInteraction, fromInteraction
class ForestCoverElement(Element):
"""Vegetation cover of a tropical forest and the temperature of its soil.
The cover `v` runs from 0 for bare soil to 1 for full forest. Bare soil is warmer than forest by `a`, so the local
temperature is `T = Tv + a (1 - v)`. `ForestGrowthInteraction` gives the growth of the cover.
Args:
label:
The label of the forest.
v:
The initial vegetation cover.
Tv:
The ambient temperature, the temperature under full forest cover, in degrees Celsius.
a:
The warming of bare soil over forest.
Examples:
>>> from skcomplex.systems.physics.climate import ForestCoverElement
>>> ForestCoverElement('forest').Tv
30.0
"""
def __init__(
self,
label: str,
*,
v: Annotated[float, RealSet.closed(0, 1)] = 0.8,
Tv: float = 30.0,
a: float = 5.0,
) -> None:
super().__init__(label)
self.v = v
self.Tv = Tv
self.a = a
class ForestGrowthInteraction(Interaction):
"""Logistic growth of the cover of a forest under its disturbance.
The cover `v` of the target follows `v' = g v (1 - v) - gamma v`, with the growth rate `g = g0 (1 - ((T - Topt) /
beta)²)` at the local temperature `T = Tv + a (1 - v)` of the forest, which peaks at `Topt`.
Args:
label:
The label of the interaction.
target:
The path of the forest.
g0:
The largest growth rate.
beta:
The half width of the growth rate against the temperature.
Topt:
The optimal temperature of growth.
gamma:
The disturbance rate.
Examples:
>>> from skcomplex.systems.physics.climate import ForestGrowthInteraction
>>> ForestGrowthInteraction('growth', target='forest').Topt
28.0
"""
law_classes = (RateLaw,)
@staticmethod
def _get_temperature(forest: SimpleNamespace, cover: Expression) -> Expression:
"""Return the local temperature `Tv + a (1 - v)` of a forest of a given cover."""
return forest.Tv + forest.a * (1 - cover)
def __init__(
self,
label: str,
*,
target: Role,
g0: Annotated[float, RealSet.closed_open(0, oo)] = 2.0,
beta: Annotated[float, RealSet.open(0, oo)] = 10.0,
Topt: float = 28.0,
gamma: Annotated[float, RealSet.closed_open(0, oo)] = 0.2,
) -> None:
super().__init__(label)
self.target = target
self.g0 = g0
self.beta = beta
self.Topt = Topt
self.gamma = gamma
def _get_efficiency(self, context: SimpleNamespace) -> Expression | float:
"""Return the factor of the growth rate, 1 for a forest on its own."""
return 1
def _prepare(self, context: SimpleNamespace) -> None:
"""Set the logistic growth of the cover minus its disturbance.
Args:
context:
The namespace of the forest, the time `t`, and the parameters.
"""
super()._prepare(context)
forest = context.target
temperature = self._get_temperature(forest, forest.v)
growth = context.g0 * (1 - ((temperature - context.Topt) / context.beta) ** 2)
rate = growth * self._get_efficiency(context) * forest.v * (1 - forest.v) - context.gamma * forest.v
self.laws_ = [RateLaw(forest.v.diff(context.t), rate)]
Equations
The equations are those that symbolic returns for the system with its default parameters.
forest.v: diff(v_forest(t), t) == g0_growth*((a_forest*(v_forest(t) - 1) + Topt_growth - Tv_forest)^2/beta_growth^2 - 1)*(v_forest(t) - 1)*v_forest(t) - gamma_growth*v_forest(t)