Skip to content

Climate

Climate systems.

The package covers energy balance, variability, glacial cycles, low-order atmospheres, net energy, forests, and tipping.

BudykoSellersSystem(n_bands=30, T=15.0, *, Q=334.4, A=203.3, B=2.09, D=0.649, C=10.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The Budyko-Sellers energy balance of one hemisphere.

The balance is resolved in the sine of latitude.

The temperature of a band at x = sin(latitude) follows C dT/dt = Q s(x) (1 - a(x, T)) - (A + B T) + D d/dx((1 - x^2) dT/dx), with the annual insolation s(x) = 1 - 0.482 P2(x), where P2(x) = (3x^2 - 1) / 2. The albedo is 0.319 + 0.202 P2(x) without ice and rises to 0.62 where the temperature falls below -10 °C. Bands are centred at x = (i + 1/2) / n_bands, with no heat flux across the equator or the pole. Present insolation keeps both a climate with polar ice caps and a snowball Earth. The system has the temperatures bands.T from the equator to the pole.

Parameters:

Name Type Description Default
n_bands int

The number of latitude bands.

30
T float

The initial temperature of every band in °C.

15.0
Q float

The mean insolation in W m⁻².

334.4
A float

The outgoing radiation at 0 °C in W m⁻².

203.3
B float

The increase of outgoing radiation per degree in W m⁻² K⁻¹.

2.09
D float

The coefficient of meridional heat transport in W m⁻² K⁻¹.

0.649
C float

The heat capacity in W yr m⁻² K⁻¹, so time is in years.

10.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import BudykoSellersSystem
>>> trajectory = BudykoSellersSystem(10).prepare().simulate(until=2.0)
>>> trajectory.get_values('bands.T').shape
(2, 10)
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
def __init__(
    self,
    n_bands: int = 30,
    T: float = 15.0,
    *,
    Q: float = 334.4,
    A: float = 203.3,
    B: float = 2.09,
    D: float = 0.649,
    C: float = 10.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.n_bands = n_bands
    self.T = T
    self.Q = Q
    self.A = A
    self.B = B
    self.D = D
    self.C = C

CarbonCycleInteraction(label, *, target, mu=250.0, b=4.0, theta=5.0, c_x=55.0, c_p=110.0, nu=0.0, w0=2000.0, gamma=4.0, f0=0.694, c_f=43.9, beta=1.7)

Bases: Interaction

Rothman's balance of carbonate ion and dissolved inorganic carbon in the ocean.

The carbonate ion concentration c and the dissolved inorganic carbon w of the target follow dc/dt = f(c) (mu (1 - b s(c, c_p) - theta (1 - s(c, c_x)) - nu) + w - w0) and dw/dt = mu (1 - b s(c, c_p) + theta (1 - s(c, c_x)) + nu) - w + w0, with the sigmoids s(c, c*) = c^gamma / (c^gamma + c*^gamma) of burial and respiration and the buffer f(c) = f0 c^beta / (c^beta + c_f^beta).

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the ocean.

required
mu float

The characteristic rate of the carbon fluxes.

250.0
b float

The strength of the burial of organic carbon.

4.0
theta float

The strength of the respiration of organic carbon.

5.0
c_x float

The crossover carbonate concentration of respiration, which sets the excitability.

55.0
c_p float

The carbonate concentration at which the burial is half its maximum.

110.0
nu float

The rate of external carbon injection.

0.0
w0 float

The dissolved inorganic carbon at which the input balances the output.

2000.0
gamma float

The steepness of the sigmoids of burial and respiration.

4.0
f0 float

The maximum of the buffer factor.

0.694
c_f float

The carbonate concentration at which the buffer factor is half its maximum.

43.9
beta float

The steepness of the buffer factor.

1.7

Examples:

>>> from skcomplex.systems.physics.climate import CarbonCycleInteraction
>>> CarbonCycleInteraction('carbon', target='ocean', nu=0.1).nu
0.1
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
def __init__(
    self,
    label: str,
    *,
    target: Role,
    mu: float = 250.0,
    b: float = 4.0,
    theta: float = 5.0,
    c_x: float = 55.0,
    c_p: float = 110.0,
    nu: float = 0.0,
    w0: float = 2000.0,
    gamma: float = 4.0,
    f0: float = 0.694,
    c_f: float = 43.9,
    beta: float = 1.7,
) -> None:
    super().__init__(label)
    self.target = target
    self.mu = mu
    self.b = b
    self.theta = theta
    self.c_x = c_x
    self.c_p = c_p
    self.nu = nu
    self.w0 = w0
    self.gamma = gamma
    self.f0 = f0
    self.c_f = c_f
    self.beta = beta

CarbonCycleSystem(c=83.58, w=2050.0, *, c_x=55.0, nu=0.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Rothman's excitable carbon cycle.

A large enough perturbation of the ocean sets off an excursion.

The carbonate ion concentration c and the dissolved inorganic carbon w, in μmol kg⁻¹, follow dc/dt = f(c) (mu (1 - b s(c, c_p) - theta (1 - s(c, c_x)) - nu) + w - w0) and dw/dt = mu (1 - b s(c, c_p) + theta (1 - s(c, c_x)) + nu) - w + w0, with the sigmoids s(c, c*) = c^gamma / (c^gamma + c*^gamma) of burial and respiration and the buffer f(c) = f0 c^beta / (c^beta + c_f^beta). The steady state near c = 83.6 and w = 2197 is stable, and from a dissolved carbon far enough below it the ocean returns only after a large excursion of c. The system has the concentrations ocean.c and ocean.w.

Parameters:

Name Type Description Default
c float

The initial carbonate ion concentration.

83.58
w float

The initial dissolved inorganic carbon.

2050.0
c_x float

The crossover carbonate concentration of respiration, which sets the excitability.

55.0
nu float

The rate of external carbon injection.

0.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import CarbonCycleSystem
>>> CarbonCycleSystem(nu=0.1).prepare().system_.interactions[0].nu
0.1
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
def __init__(
    self,
    c: float = 83.58,
    w: float = 2050.0,
    *,
    c_x: float = 55.0,
    nu: float = 0.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.c = c
    self.w = w
    self.c_x = c_x
    self.nu = nu

ClimateAnomalyElement(label, *, T=0.0)

Bases: Element

Slow temperature anomaly of Hasselmann's stochastic climate.

The feedback of HasselmannSystem damps the anomaly and weather noise drives it.

Parameters:

Name Type Description Default
label str

The label of the anomaly.

required
T float

The initial temperature anomaly.

0.0

Examples:

>>> from skcomplex.systems.physics.climate import ClimateAnomalyElement
>>> ClimateAnomalyElement('ocean', T=0.5).T
0.5
Source code in src/skcomplex/systems/physics/climate/_variability.py
44
45
46
def __init__(self, label: str, *, T: float = 0.0) -> None:
    super().__init__(label)
    self.T = T

ClimateFeedbackInteraction(label, *, target, lam=0.5, sigma=0.3)

Bases: Interaction

Feedback that damps a temperature anomaly under weather noise.

The anomaly T of the target follows dT = -lam T dt + sigma dW, the relaxation to zero over the time 1 / lam with white weather noise of amplitude sigma.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the anomaly.

required
lam Annotated[float, open(0, oo)]

The feedback rate that damps the anomaly.

0.5
sigma Annotated[float, closed_open(0, oo)]

The amplitude of the weather noise.

0.3

Examples:

>>> from skcomplex.systems.physics.climate import ClimateFeedbackInteraction
>>> ClimateFeedbackInteraction('feedback', target='ocean').lam
0.5
Source code in src/skcomplex/systems/physics/climate/_variability.py
76
77
78
79
80
81
82
83
84
85
86
87
def __init__(
    self,
    label: str,
    *,
    target: Role,
    lam: Annotated[float, RealSet.open(0, oo)] = 0.5,
    sigma: Annotated[float, RealSet.closed_open(0, oo)] = 0.3,
) -> None:
    super().__init__(label)
    self.target = target
    self.lam = lam
    self.sigma = sigma

DaisyworldSystem(white=0.2, black=0.2, *, L=1.0, gamma=0.3, label='system', solver='auto', backend='auto')

Bases: DynamicalSystem

Daisyworld.

White and black daisies regulate the temperature of their planet through its albedo.

The areas covered by white and black daisies grow on the bare ground at a rate parabolic in their local temperature, with an optimum at 22.5 °C, and die at the rate gamma. The effective temperature follows the planetary albedo, sigma T^4 = S L (1 - A), and is recorded as the observable temperature. The system has the areas planet.white and planet.black and the observable temperature.

Parameters:

Name Type Description Default
white float

The initial area fraction of white daisies.

0.2
black float

The initial area fraction of black daisies.

0.2
L float

The luminosity of the sun relative to its present value.

1.0
gamma float

The death rate of daisies.

0.3
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import DaisyworldSystem
>>> DaisyworldSystem(L=1.2).prepare().system_.elements[0].values['L']
1.2
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
def __init__(
    self,
    white: float = 0.2,
    black: float = 0.2,
    *,
    L: float = 1.0,
    gamma: float = 0.3,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label=label, solver=solver, backend=backend)
    self.white = white
    self.black = black
    self.L = L
    self.gamma = gamma

DelayedOscillatorInteraction(label, *, target, alpha=0.75, delta=6.0)

Bases: Interaction

Local growth and delayed feedback of a temperature anomaly.

The anomaly T of the target follows T' = T - T^3 - alpha T(t - delta), a growth saturated by the cube and damped by its own value a delay delta earlier.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the anomaly.

required
alpha float

The strength of the delayed negative feedback.

0.75
delta float

The delay of the feedback.

6.0

Examples:

>>> from skcomplex.systems.physics.climate import DelayedOscillatorInteraction
>>> DelayedOscillatorInteraction('oscillator', target='pacific', delta=4.0).delta
4.0
Source code in src/skcomplex/systems/physics/climate/_variability.py
199
200
201
202
203
def __init__(self, label: str, *, target: Role, alpha: float = 0.75, delta: float = 6.0) -> None:
    super().__init__(label)
    self.target = target
    self.alpha = alpha
    self.delta = delta

ENSOSystem(T=0.1, *, alpha=0.75, delta=6.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The delayed oscillator of El Niño of Suarez and Schopf.

The oscillator is dT/dt = T - T^3 - alpha T(t - delta).

The sea surface temperature anomaly of the eastern Pacific grows by local feedback and is damped by the delayed return of oceanic waves reflected at the western boundary. For alpha < 1 and a long enough delay the warm and cold states lose stability to an oscillation between El Niño and La Niña. The history before the start is the initial anomaly. The system has the anomaly pacific.T.

Parameters:

Name Type Description Default
T float

The initial temperature anomaly, also its history.

0.1
alpha float

The strength of the delayed negative feedback.

0.75
delta float

The delay of the wave transit.

6.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import ENSOSystem
>>> ENSOSystem(delta=4.0).prepare().system_.interactions[0].delta
4.0
Source code in src/skcomplex/systems/physics/climate/_variability.py
258
259
260
261
262
263
264
265
266
267
268
269
270
271
def __init__(
    self,
    T: float = 0.1,
    *,
    alpha: float = 0.75,
    delta: float = 6.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.T = T
    self.alpha = alpha
    self.delta = delta

EarlyWarningResult(values, labels, statistic, trend, variance, autocorrelation, skewness, reddening, variance_trend, autocorrelation_trend, skewness_trend, reddening_trend) dataclass

Rolling indicators of critical slowing down of every series, and their trends.

Parameters:

Name Type Description Default
values Array

The series, one per column.

required
labels list[str]

The label of every series.

required
statistic Array

The lag-1 autocorrelation of every series in every window, the statistic of the rolling analysis.

required
trend Array

Kendall's tau of the statistic of every series against time.

required
variance Array

The variance of every series in every window, nan before the first full window.

required
autocorrelation Array

The lag-1 autocorrelation of every series in every window, nan before the first full window.

required
skewness Array

The skewness of every series in every window, nan before the first full window.

required
reddening Array

The reddening of every series in every window, nan before the first full window.

required
variance_trend Array

Kendall's tau of the variance of every series against time, positive when it rises.

required
autocorrelation_trend Array

Kendall's tau of the autocorrelation of every series against time, positive when it rises.

required
skewness_trend Array

Kendall's tau of the skewness of every series against time.

required
reddening_trend Array

Kendall's tau of the reddening of every series against time.

required

EnergyBalanceSystem(T=290.0, *, s=1.0, epsilon=0.65, sigma=1.6e-10, albedo=0.5, contrast=0.2, T_ice=263.0, width=4.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The zero-dimensional energy balance of the Earth.

The balance is bistable through the ice-albedo feedback.

In units of the mean insolation, the global temperature follows dT/dt = s (1 - a(T)) - sigma epsilon T^4, with the albedo a(T) = albedo - contrast tanh((T - T_ice) / width), high on an icy planet and low on a warm one. For the default parameters a warm climate near 286 K and a frozen climate near 232 K are both stable. The system has the temperature earth.T.

Parameters:

Name Type Description Default
T float

The initial global mean temperature in kelvin.

290.0
s float

The insolation relative to the present one.

1.0
epsilon float

The effective emissivity, lowered by the greenhouse effect.

0.65
sigma float

The Stefan-Boltzmann constant divided by the mean insolation.

1.6e-10
albedo float

The albedo at the middle of the transition from ice to no ice.

0.5
contrast float

Half the difference between the albedos of a frozen and of a warm planet.

0.2
T_ice float

The temperature of the middle of the transition.

263.0
width float

The width of the transition in kelvin.

4.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import EnergyBalanceSystem
>>> trajectory = EnergyBalanceSystem(T=230.0).prepare().simulate(until=5.0)
>>> float(trajectory.get_values('earth.T')[0])
230.0
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
def __init__(
    self,
    T: float = 290.0,
    *,
    s: float = 1.0,
    epsilon: float = 0.65,
    sigma: float = 1.6e-10,
    albedo: float = 0.5,
    contrast: float = 0.2,
    T_ice: float = 263.0,
    width: float = 4.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.T = T
    self.s = s
    self.epsilon = epsilon
    self.sigma = sigma
    self.albedo = albedo
    self.contrast = contrast
    self.T_ice = T_ice
    self.width = width

EnergyReturnSystem(reserve=1000.0, capacity=0.1, *, initial_eroi=20.0, reinvestment=0.1, birth_rate=0.03, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The extraction of a finite energy reserve.

Its energy return on investment declines as it depletes.

The extraction capacity draws the gross energy from the reserve at a rate that falls with the remaining fraction, since the easy sources go first. Part of the gross energy pays for the extraction work, the gross energy divided by the energy return on investment (EROI), which falls from initial_eroi to one with the cube of the remaining fraction as the reserve empties. The rest is the net energy that society receives. Society reinvests a share of the net energy in extraction capacity, which depreciates, and the population grows exponentially with no feedback from the energy it receives. Energy is conserved, every unit leaving the reserve is either cost or net energy, so the gross energy rises exponentially and peaks, the net energy peaks before it, and the net energy per person peaks earlier still. The structure follows Mobus (2022, Section 9.6) and its figures of peak net energy, with illustrative parameters in energy units, persons, and years. The system has the reserve energy.reserve, the capacity energy.capacity, the population energy.population, and the flows energy.energy_cost, energy.net_energy, energy.births, and energy.deaths per year, over years. The observables of the system are energy.eroi, energy.gross_energy, energy.extraction_cost, and energy.net_per_capita.

Parameters:

Name Type Description Default
reserve float

The initial energy reserve, also its full size.

1000.0
capacity float

The initial extraction capacity, the gross energy per year from a full reserve.

0.1
initial_eroi float

The energy return on investment of a full reserve.

20.0
reinvestment float

The share of the net energy reinvested in extraction capacity.

0.1
birth_rate float

The relative birth rate of the population per year.

0.03
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import EnergyReturnSystem
>>> EnergyReturnSystem(initial_eroi=20.0).prepare().system_.elements[0].initial_eroi
20.0
Source code in src/skcomplex/systems/physics/climate/_net_energy.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
def __init__(
    self,
    reserve: float = 1000.0,
    capacity: float = 0.1,
    *,
    initial_eroi: float = 20.0,
    reinvestment: float = 0.1,
    birth_rate: float = 0.03,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.reserve = reserve
    self.capacity = capacity
    self.initial_eroi = initial_eroi
    self.reinvestment = reinvestment
    self.birth_rate = birth_rate

EnergySectorElement(label, *, reserve=1000.0, capacity=0.1, population=1.0, reserve_size=1000.0, initial_eroi=20.0, decline=3.0, reinvestment=0.1, lifetime=20.0, birth_rate=0.03, death_rate=0.015)

Bases: Element

Energy sector of a society.

The sector holds a finite reserve, the capacity that extracts it, and the population it supplies.

The capacity draws the gross energy capacity reserve / reserve_size from the reserve. Part of it pays for the extraction work, the gross energy divided by the energy return on investment 1 + (initial_eroi - 1) (reserve / reserve_size)^decline, and the rest is the net energy society receives. A share reinvestment of the net energy builds capacity, which depreciates over lifetime, and the population grows at the rate birth_rate - death_rate.

Parameters:

Name Type Description Default
label str

The label of the sector.

required
reserve Annotated[float, closed_open(0, oo), Quantity(energy)]

The initial energy reserve.

1000.0
capacity Annotated[float, closed_open(0, oo)]

The initial extraction capacity, the gross energy per year from a full reserve.

0.1
population Annotated[float, closed_open(0, oo), Quantity(people)]

The initial population.

1.0
reserve_size Annotated[float, open(0, oo)]

The full size of the reserve.

1000.0
initial_eroi Annotated[float, open(0, oo)]

The energy return on investment of a full reserve.

20.0
decline Annotated[float, open(0, oo)]

The power of the remaining fraction of the reserve in the energy return on investment.

3.0
reinvestment Annotated[float, closed_open(0, oo)]

The share of the net energy reinvested in extraction capacity.

0.1
lifetime Annotated[float, open(0, oo)]

The lifetime of the extraction capacity in years.

20.0
birth_rate Annotated[float, closed_open(0, oo)]

The relative birth rate of the population per year.

0.03
death_rate Annotated[float, closed_open(0, oo)]

The relative death rate of the population per year.

0.015

Examples:

>>> from skcomplex.systems.physics.climate import EnergySectorElement
>>> EnergySectorElement('energy').initial_eroi
20.0
Source code in src/skcomplex/systems/physics/climate/_net_energy.py
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
def __init__(
    self,
    label: str,
    *,
    reserve: Annotated[float, RealSet.closed_open(0, oo), Quantity('energy')] = 1000.0,
    capacity: Annotated[float, RealSet.closed_open(0, oo)] = 0.1,
    population: Annotated[float, RealSet.closed_open(0, oo), Quantity('people')] = 1.0,
    reserve_size: Annotated[float, RealSet.open(0, oo)] = 1000.0,
    initial_eroi: Annotated[float, RealSet.open(0, oo)] = 20.0,
    decline: Annotated[float, RealSet.open(0, oo)] = 3.0,
    reinvestment: Annotated[float, RealSet.closed_open(0, oo)] = 0.1,
    lifetime: Annotated[float, RealSet.open(0, oo)] = 20.0,
    birth_rate: Annotated[float, RealSet.closed_open(0, oo)] = 0.03,
    death_rate: Annotated[float, RealSet.closed_open(0, oo)] = 0.015,
) -> None:
    super().__init__(label)
    self.reserve = reserve
    self.capacity = capacity
    self.population = population
    self.reserve_size = reserve_size
    self.initial_eroi = initial_eroi
    self.decline = decline
    self.reinvestment = reinvestment
    self.lifetime = lifetime
    self.birth_rate = birth_rate
    self.death_rate = death_rate

FoldFollowerElement(label, *, y=-1.0)

Bases: Element

Follower of a cascade in the normal form of a fold, its state y.

Parameters:

Name Type Description Default
label str

The label of the follower.

required
y float

The initial state.

-1.0

Examples:

>>> from skcomplex.systems.physics.climate import FoldFollowerElement
>>> FoldFollowerElement('follower').y
-1.0
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
57
58
59
def __init__(self, label: str, *, y: float = -1.0) -> None:
    super().__init__(label)
    self.y = y

FoldFollowerInteraction(label, *, target, leader, c=0.0, coupling=0.4, sigma=0.02)

Bases: Interaction

Stochastic fold dy = (-y³ + y + c + coupling x) dt + sigma dW of a follower forced by a leader.

The fold has a lower and an upper stable branch while |c + coupling x| < 2 / (3 √3), and the state x of the leader shifts its control.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the follower.

required
leader Role

The path of the leader.

required
c float

The control of the fold, without the coupling.

0.0
coupling float

The strength of the linear forcing by the leader.

0.4
sigma Annotated[float, NONNEGATIVE]

The amplitude of the noise.

0.02

Examples:

>>> from skcomplex.systems.physics.climate import FoldFollowerInteraction
>>> FoldFollowerInteraction('fold', target='follower', leader='leader').c
0.0
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
def __init__(
    self,
    label: str,
    *,
    target: Role,
    leader: Role,
    c: float = 0.0,
    coupling: float = 0.4,
    sigma: Annotated[float, NONNEGATIVE] = 0.02,
) -> None:
    super().__init__(label)
    self.target = target
    self.leader = leader
    self.c = c
    self.coupling = coupling
    self.sigma = sigma

ForestCoverElement(label, *, v=0.8, Tv=30.0, a=5.0)

Bases: 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.

Parameters:

Name Type Description Default
label str

The label of the forest.

required
v Annotated[float, closed(0, 1)]

The initial vegetation cover.

0.8
Tv float

The ambient temperature, the temperature under full forest cover, in degrees Celsius.

30.0
a float

The warming of bare soil over forest.

5.0

Examples:

>>> from skcomplex.systems.physics.climate import ForestCoverElement
>>> ForestCoverElement('forest').Tv
30.0
Source code in src/skcomplex/systems/physics/climate/_forests.py
51
52
53
54
55
56
57
58
59
60
61
62
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

ForestDiebackSystem(v=0.8, *, Tv=30.0, g0=2.0, beta=10.0, Topt=28.0, a=5.0, gamma=0.2, label='system', solver='auto', backend='auto')

Bases: 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.

Parameters:

Name Type Description Default
v float

The initial vegetation cover, between 0 and 1.

0.8
Tv float

The ambient temperature under full forest cover, in degrees Celsius.

30.0
g0 float

The largest growth rate.

2.0
beta float

The half width of the growth rate against the temperature.

10.0
Topt float

The optimal temperature of growth.

28.0
a float

The warming of bare soil over forest.

5.0
gamma float

The disturbance rate.

0.2
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import ForestDiebackSystem
>>> ForestDiebackSystem(Tv=33.0).prepare().system_.elements[0].Tv
33.0
Source code in src/skcomplex/systems/physics/climate/_forests.py
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
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

ForestGrowthInteraction(label, *, target, g0=2.0, beta=10.0, Topt=28.0, gamma=0.2)

Bases: 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.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the forest.

required
g0 Annotated[float, closed_open(0, oo)]

The largest growth rate.

2.0
beta Annotated[float, open(0, oo)]

The half width of the growth rate against the temperature.

10.0
Topt float

The optimal temperature of growth.

28.0
gamma Annotated[float, closed_open(0, oo)]

The disturbance rate.

0.2

Examples:

>>> from skcomplex.systems.physics.climate import ForestGrowthInteraction
>>> ForestGrowthInteraction('growth', target='forest').Topt
28.0
Source code in src/skcomplex/systems/physics/climate/_forests.py
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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

GeodynamoInteraction(label, *, target, mu=0.119, nu=0.1, Gamma=0.9)

Bases: Interaction

Growth and damping of the fields of Gissinger's geodynamo and the forcing of its flow.

The quadrupolar field Q, the dipolar field D, and the velocity V of the target follow Q' = mu Q - V D, D' = -nu D + V Q, and V' = Gamma - V + Q D.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the dynamo.

required
mu float

The growth rate of the quadrupole.

0.119
nu float

The damping rate of the dipole.

0.1
Gamma float

The forcing of the flow.

0.9

Examples:

>>> from skcomplex.systems.physics.climate import GeodynamoInteraction
>>> GeodynamoInteraction('dynamics', target='dynamo').mu
0.119
Source code in src/skcomplex/systems/physics/climate/_low_order.py
380
381
382
383
384
385
386
387
388
389
390
391
392
393
def __init__(
    self,
    label: str,
    *,
    target: Role,
    mu: float = 0.119,
    nu: float = 0.1,
    Gamma: float = 0.9,
) -> None:
    super().__init__(label)
    self.target = target
    self.mu = mu
    self.nu = nu
    self.Gamma = Gamma

GeodynamoSystem(Q=0.1, D=0.1, V=0.1, *, mu=0.119, nu=0.1, Gamma=0.9, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Gissinger's geodynamo, whose dipole field reverses at irregular times.

The quadrupolar field Q, the dipolar field D, and the velocity V follow dQ/dt = mu Q - V D, dD/dt = -nu D + V Q, and dV/dt = Gamma - V + Q D. The equations are symmetric under (Q, D) -> (-Q, -D), so the chaotic flow visits both polarities of the dipole. The system has the states dynamo.Q, dynamo.D, and dynamo.V.

Parameters:

Name Type Description Default
Q float

The initial quadrupolar field.

0.1
D float

The initial dipolar field.

0.1
V float

The initial velocity.

0.1
mu float

The growth rate of the quadrupole.

0.119
nu float

The damping rate of the dipole.

0.1
Gamma float

The forcing of the flow.

0.9
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import GeodynamoSystem
>>> GeodynamoSystem(mu=0.12).prepare().system_.interactions[0].mu
0.12
Source code in src/skcomplex/systems/physics/climate/_low_order.py
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
def __init__(
    self,
    Q: float = 0.1,
    D: float = 0.1,
    V: float = 0.1,
    *,
    mu: float = 0.119,
    nu: float = 0.1,
    Gamma: float = 0.9,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.Q = Q
    self.D = D
    self.V = V
    self.mu = mu
    self.nu = nu
    self.Gamma = Gamma

HasselmannSystem(T=0.0, *, lam=0.5, sigma=0.3, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Hasselmann's stochastic climate.

Fast weather noise drives a slow, damped temperature anomaly.

The anomaly follows dT = -lam T dt + sigma dW, an Ornstein-Uhlenbeck process whose red spectrum integrates white weather noise, with the stationary variance sigma^2 / (2 lam). The system runs with EulerMaruyamaSolver(dt=0.01) and has the anomaly ocean.T.

Parameters:

Name Type Description Default
T float

The initial temperature anomaly.

0.0
lam float

The feedback rate that damps the anomaly.

0.5
sigma float

The amplitude of the weather noise.

0.3
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import HasselmannSystem
>>> HasselmannSystem(lam=0.1).prepare().system_.interactions[0].lam
0.1
Source code in src/skcomplex/systems/physics/climate/_variability.py
141
142
143
144
145
146
147
148
149
150
151
152
153
154
def __init__(
    self,
    T: float = 0.0,
    *,
    lam: float = 0.5,
    sigma: float = 0.3,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.T = T
    self.lam = lam
    self.sigma = sigma

HopfFollowerElement(label, *, y=0.1, z=0.0)

Bases: Element

Follower of a cascade in the Hopf normal form, whose complex amplitude is y + i z.

Parameters:

Name Type Description Default
label str

The label of the follower.

required
y float

The initial real part of the amplitude.

0.1
z float

The initial imaginary part of the amplitude.

0.0

Examples:

>>> from skcomplex.systems.physics.climate import HopfFollowerElement
>>> HopfFollowerElement('follower').y
0.1
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
144
145
146
147
def __init__(self, label: str, *, y: float = 0.1, z: float = 0.0) -> None:
    super().__init__(label)
    self.y = y
    self.z = z

HopfFollowerInteraction(label, *, target, leader, mu=0.0, omega=1.0, coupling=0.4, sigma=0.02)

Bases: Interaction

Stochastic Hopf normal form of a follower whose distance from the bifurcation a leader shifts.

The complex amplitude w = y + i z follows dw = ((mu + coupling x + i omega) w - |w|² w) dt + sigma dW, where x is the state of the leader. For mu + coupling x < 0 it decays to a focus at the origin, and for mu + coupling x > 0 it settles on a limit cycle of radius sqrt(mu + coupling x).

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the follower.

required
leader Role

The path of the leader.

required
mu float

The distance from the Hopf bifurcation, without the coupling.

0.0
omega float

The frequency of the oscillation.

1.0
coupling float

The strength of the linear forcing by the leader.

0.4
sigma Annotated[float, NONNEGATIVE]

The amplitude of the noise.

0.02

Examples:

>>> from skcomplex.systems.physics.climate import HopfFollowerInteraction
>>> HopfFollowerInteraction('hopf', target='follower', leader='leader').omega
1.0
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
def __init__(
    self,
    label: str,
    *,
    target: Role,
    leader: Role,
    mu: float = 0.0,
    omega: float = 1.0,
    coupling: float = 0.4,
    sigma: Annotated[float, NONNEGATIVE] = 0.02,
) -> None:
    super().__init__(label)
    self.target = target
    self.leader = leader
    self.mu = mu
    self.omega = omega
    self.coupling = coupling
    self.sigma = sigma

IceAlbedoBalanceInteraction(label, *, target, s=1.0, epsilon=0.65, sigma=1.6e-10, albedo=0.5, contrast=0.2, T_ice=263.0, width=4.0)

Bases: Interaction

Global energy balance of a planet with the ice-albedo feedback.

In units of the mean insolation, the temperature T of the target follows T' = s (1 - a(T)) - sigma epsilon T^4, with the albedo a(T) = albedo - contrast tanh((T - T_ice) / width), high on an icy planet and low on a warm one.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the planet.

required
s float

The insolation relative to the present one.

1.0
epsilon float

The effective emissivity, lowered by the greenhouse effect.

0.65
sigma float

The Stefan-Boltzmann constant divided by the mean insolation.

1.6e-10
albedo float

The albedo at the middle of the transition from ice to no ice.

0.5
contrast float

Half the difference between the albedos of a frozen and of a warm planet.

0.2
T_ice float

The temperature of the middle of the transition.

263.0
width float

The width of the transition in kelvin.

4.0

Examples:

>>> from skcomplex.systems.physics.climate import IceAlbedoBalanceInteraction
>>> IceAlbedoBalanceInteraction('balance', target='earth', epsilon=0.6).epsilon
0.6
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
def __init__(
    self,
    label: str,
    *,
    target: Role,
    s: float = 1.0,
    epsilon: float = 0.65,
    sigma: float = 1.6e-10,
    albedo: float = 0.5,
    contrast: float = 0.2,
    T_ice: float = 263.0,
    width: float = 4.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.s = s
    self.epsilon = epsilon
    self.sigma = sigma
    self.albedo = albedo
    self.contrast = contrast
    self.T_ice = T_ice
    self.width = width

LatitudeBandElement(label, *, T=15.0, x=0.5, space=None)

Bases: Element

Latitude bands of the Budyko-Sellers energy balance, their temperatures and positions.

Every band sits at x = sin(latitude) and holds its temperature T in °C.

Parameters:

Name Type Description Default
label str

The label of the bands.

required
T object

The initial temperature in °C, one value or one per band.

15.0
x object

The sine of the latitude, one value or one per band.

0.5
space BaseSpace | None

The lattice of the bands, or None for one band.

None

Examples:

>>> from skcomplex.systems.physics.climate import LatitudeBandElement
>>> LatitudeBandElement('band', x=0.25).x
0.25
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
54
55
56
57
58
59
60
61
62
63
64
def __init__(
    self,
    label: str,
    *,
    T: object = 15.0,
    x: object = 0.5,
    space: BaseSpace | None = None,
) -> None:
    super().__init__(label, space=space)
    self.T = T
    self.x = x

LatitudeEnergyBalanceInteraction(label, *, target, Q=334.4, s2=-0.482, A=203.3, B=2.09, D=0.649, C=10.0, albedo_ice=0.62, albedo_free=0.319, albedo_slope=0.202, T_ice=-10.0, width=1.0)

Bases: Interaction

Energy balance of latitude bands heated by the sun and exchanging heat with their neighbours.

The temperature of a band at x = sin(latitude) follows C dT/dt = Q s(x) (1 - a(x, T)) - (A + B T) + D d/dx((1 - x^2) dT/dx), with the annual insolation s(x) = 1 + s2 P2(x), where P2(x) = (3x^2 - 1) / 2. The albedo is albedo_free + albedo_slope P2(x) without ice and rises to albedo_ice where the temperature falls below T_ice.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the bands.

required
Q float

The mean insolation in W m⁻².

334.4
s2 float

The coefficient of the second Legendre polynomial of the insolation.

-0.482
A float

The outgoing radiation at 0 °C in W m⁻².

203.3
B float

The increase of outgoing radiation per degree in W m⁻² K⁻¹.

2.09
D float

The coefficient of meridional heat transport in W m⁻² K⁻¹.

0.649
C float

The heat capacity in W yr m⁻² K⁻¹, so time is in years.

10.0
albedo_ice float

The albedo of an icy band.

0.62
albedo_free float

The mean albedo of an ice free band.

0.319
albedo_slope float

The coefficient of the second Legendre polynomial of the albedo of an ice free band.

0.202
T_ice float

The temperature in °C below which the band is icy.

-10.0
width float

The width of the transition to ice in kelvin.

1.0

Examples:

>>> from skcomplex.systems.physics.climate import LatitudeEnergyBalanceInteraction
>>> LatitudeEnergyBalanceInteraction('balance', target='bands').albedo_ice
0.62
Source code in src/skcomplex/systems/physics/climate/_energy_balance.py
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
def __init__(
    self,
    label: str,
    *,
    target: Role,
    Q: float = 334.4,
    s2: float = -0.482,
    A: float = 203.3,
    B: float = 2.09,
    D: float = 0.649,
    C: float = 10.0,
    albedo_ice: float = 0.62,
    albedo_free: float = 0.319,
    albedo_slope: float = 0.202,
    T_ice: float = -10.0,
    width: float = 1.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.Q = Q
    self.s2 = s2
    self.A = A
    self.B = B
    self.D = D
    self.C = C
    self.albedo_ice = albedo_ice
    self.albedo_free = albedo_free
    self.albedo_slope = albedo_slope
    self.T_ice = T_ice
    self.width = width

LeadingFollowingCascadeSystem(follower='fold', *, coupling=0.4, rate=0.004, sigma=0.02, phi0=-1.0, phi1=1.0, c=0.0, mu=0.0, omega=1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

A cascade of two tipping elements.

A leading fold is driven by a ramp and a follower is forced by the leader.

The leading element follows dx = (-x³ + x + phi(t)) dt + sigma dW, whose control rises as phi = phi0 + rate t until phi1, and it tips from its lower to its upper branch when phi passes 2 / (3 √3). The following element is forced linearly by the state of the leader, Eq. 10 of Fang et al. after Dekker et al. A fold follower obeys dy = (-y³ + y + c + coupling x) dt + sigma dW, and it tips too, a domino cascade, when the tipped leader moves its control c + coupling x past 2 / (3 √3). A Hopf follower obeys dw = ((mu + coupling x + i omega) w - |w|² w) dt + sigma dW, and the tipped leader can carry it through its Hopf bifurcation onto an oscillation of radius sqrt(mu + coupling x). The follower can show rising variance and autocorrelation before the leader tips even when it stays far from its own tipping point. The system has the leader leader.x and the follower follower.y, and also follower.z for the Hopf follower.

Parameters:

Name Type Description Default
follower str

The normal form of the following element, 'fold' or 'hopf'.

'fold'
coupling float

The strength of the linear forcing of the follower by the leader.

0.4
rate float

The rate at which the control of the leader rises.

0.004
sigma float

The amplitude of the noise of both elements.

0.02
phi0 float

The initial control of the leader.

-1.0
phi1 float

The final control of the leader.

1.0
c float

The control of a fold follower, without the coupling.

0.0
mu float

The distance of a Hopf follower from its bifurcation, without the coupling.

0.0
omega float

The frequency of a Hopf follower.

1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Raises:

Type Description
ValidationError

The follower is neither 'fold' nor 'hopf'.

Examples:

>>> from skcomplex.systems.physics.climate import LeadingFollowingCascadeSystem
>>> LeadingFollowingCascadeSystem('hopf').prepare().system_.interactions[1].omega
1.0
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
def __init__(
    self,
    follower: str = 'fold',
    *,
    coupling: float = 0.4,
    rate: float = 0.004,
    sigma: float = 0.02,
    phi0: float = -1.0,
    phi1: float = 1.0,
    c: float = 0.0,
    mu: float = 0.0,
    omega: float = 1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.follower = follower
    self.coupling = coupling
    self.rate = rate
    self.sigma = sigma
    self.phi0 = phi0
    self.phi1 = phi1
    self.c = c
    self.mu = mu
    self.omega = omega

Lorenz84Element(label, *, x=1.0, y=1.0, z=1.0)

Bases: Element

Atmosphere of Lorenz-84.

The general circulation is reduced to a westerly jet x and a travelling wave of eddies, whose cosine and sine phases are y and z. Lorenz84Interaction gives their laws.

Parameters:

Name Type Description Default
label str

The label of the atmosphere.

required
x float

The initial strength of the westerly jet.

1.0
y float

The initial cosine phase of the eddies.

1.0
z float

The initial sine phase of the eddies.

1.0

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz84Element
>>> Lorenz84Element('atmosphere', x=2.0).x
2.0
Source code in src/skcomplex/systems/physics/climate/_low_order.py
49
50
51
52
53
def __init__(self, label: str, *, x: float = 1.0, y: float = 1.0, z: float = 1.0) -> None:
    super().__init__(label)
    self.x = x
    self.y = y
    self.z = z

Lorenz84Interaction(label, *, target, a=0.25, b=4.0, F=8.0, G=1.0)

Bases: Interaction

Forcing and damping of the jet of Lorenz-84 and its exchange with the eddies.

The jet x and the phases y and z of the eddies of the target follow x' = -y^2 - z^2 - a x + a F, y' = x y - b x z - y + G, and z' = b x y + x z - z.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the atmosphere.

required
a float

The damping of the jet relative to the eddies.

0.25
b float

The displacement of the eddies by the jet.

4.0
F float

The forcing of the jet by the equator-to-pole temperature contrast.

8.0
G float

The forcing of the eddies by the land-sea contrast.

1.0

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz84Interaction
>>> Lorenz84Interaction('circulation', target='atmosphere').F
8.0
Source code in src/skcomplex/systems/physics/climate/_low_order.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
def __init__(
    self,
    label: str,
    *,
    target: Role,
    a: float = 0.25,
    b: float = 4.0,
    F: float = 8.0,
    G: float = 1.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.a = a
    self.b = b
    self.F = F
    self.G = G

Lorenz84System(x=1.0, y=1.0, z=1.0, *, a=0.25, b=4.0, F=8.0, G=1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Lorenz-84, the general circulation as a westerly jet and a travelling wave.

The system is chaotic for F = 8.

The jet x and the cosine and sine phases y and z of the eddies follow dx/dt = -y^2 - z^2 - a x + a F, dy/dt = x y - b x z - y + G, and dz/dt = b x y + x z - z. The system has the states atmosphere.x, atmosphere.y, and atmosphere.z.

Parameters:

Name Type Description Default
x float

The initial strength of the westerly jet.

1.0
y float

The initial cosine phase of the eddies.

1.0
z float

The initial sine phase of the eddies.

1.0
a float

The damping of the jet relative to the eddies.

0.25
b float

The displacement of the eddies by the jet.

4.0
F float

The forcing of the jet by the equator-to-pole temperature contrast.

8.0
G float

The forcing of the eddies by the land-sea contrast.

1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz84System
>>> Lorenz84System(G=1.25).prepare().system_.interactions[0].G
1.25
Source code in src/skcomplex/systems/physics/climate/_low_order.py
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
def __init__(
    self,
    x: float = 1.0,
    y: float = 1.0,
    z: float = 1.0,
    *,
    a: float = 0.25,
    b: float = 4.0,
    F: float = 8.0,
    G: float = 1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.z = z
    self.a = a
    self.b = b
    self.F = F
    self.G = G

Lorenz96Element(label, *, x=8.0)

Bases: Element

Ring of Lorenz-96 sites around a latitude circle, with the values x of all sites.

Parameters:

Name Type Description Default
label str

The label of the ring.

required
x ArrayLike

The initial values of all sites.

8.0

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz96Element
>>> Lorenz96Element('ring', x=[8.0, 8.0, 8.0, 8.0]).x
[8.0, 8.0, 8.0, 8.0]
Source code in src/skcomplex/systems/physics/climate/_low_order.py
139
140
141
def __init__(self, label: str, *, x: npt.ArrayLike = 8.0) -> None:
    super().__init__(label)
    self.x = x

Lorenz96Interaction(label, *, target, F=8.0)

Bases: Interaction

Advection, damping, and forcing of the sites of a Lorenz-96 ring.

Every site follows dx_i/dt = (x_{i+1} - x_{i-2}) x_{i-1} - x_i + F, with the indices taken around the ring.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the ring, whose value x holds every site.

required
F float

The constant forcing.

8.0

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz96Interaction
>>> Lorenz96Interaction('advection', target='ring').F
8.0
Source code in src/skcomplex/systems/physics/climate/_low_order.py
167
168
169
170
def __init__(self, label: str, *, target: Role, F: float = 8.0) -> None:
    super().__init__(label)
    self.target = target
    self.F = F

Lorenz96System(n_sites=20, *, F=8.0, perturbation=0.01, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Lorenz-96 on a ring of sites around a latitude circle.

Every site follows dx_i/dt = (x_{i+1} - x_{i-2}) x_{i-1} - x_i + F.

The sites start at the steady state F, and the first one is displaced by perturbation. For F = 8 the steady state is unstable and the ring is chaotic. The system has the values ring.x of all sites.

Parameters:

Name Type Description Default
n_sites int

The number of sites, at least 4, the dimension of the state x.

20
F float

The constant forcing.

8.0
perturbation float

The displacement of the first site from the steady state.

0.01
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import Lorenz96System
>>> Lorenz96System(6).prepare().system_.space.n_dim
6
Source code in src/skcomplex/systems/physics/climate/_low_order.py
317
318
319
320
321
322
323
324
325
326
327
328
329
330
def __init__(
    self,
    n_sites: int = 20,
    *,
    F: float = 8.0,
    perturbation: float = 0.01,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.n_sites = n_sites
    self.F = F
    self.perturbation = perturbation

MitigatedForestGrowthInteraction(label, *, target, mitigators, g0=2.0, beta=10.0, Topt=28.0, gamma=0.2)

Bases: ForestGrowthInteraction

Growth of the cover of a forest helped by the share of mitigators of a population.

The growth rate of ForestGrowthInteraction is scaled by 0.2 + 0.4 x, where x is the share of mitigators.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the forest.

required
mitigators Role

The path of the population whose share of mitigators helps the forest.

required
g0 Annotated[float, closed_open(0, oo)]

The largest growth rate.

2.0
beta Annotated[float, open(0, oo)]

The half width of the growth rate against the temperature.

10.0
Topt float

The optimal temperature of growth.

28.0
gamma Annotated[float, closed_open(0, oo)]

The disturbance rate.

0.2

Examples:

>>> from skcomplex.systems.physics.climate import MitigatedForestGrowthInteraction
>>> MitigatedForestGrowthInteraction('growth', target='forest', mitigators='people').mitigators
'people'
Source code in src/skcomplex/systems/physics/climate/_forests.py
195
196
197
198
199
200
201
202
203
204
205
206
207
def __init__(
    self,
    label: str,
    *,
    target: Role,
    mitigators: 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, target=target, g0=g0, beta=beta, Topt=Topt, gamma=gamma)
    self.mitigators = mitigators

MitigationInteraction(label, *, target, forest, alpha=1.0, delta=1.0, fmax=5.0, w=3.0, Tc=1.0, tp=10.0, tf=15.0)

Bases: Interaction

Replicator dynamics of the share of mitigators, who perceive the warming of a forest.

The share x of the target follows x' = x (1 - x) (-alpha + f + delta (2 x - 1)), with the cost of mitigation alpha, the strength delta of the social norm, and the cost of warming f = fmax / (1 + exp(-w (Tf - Tc))). The perceived warming Tf = tf / tp (T(t) - T(t - tp)) projects the warming of the forest over the last tp years over tf years.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the population.

required
forest Role

The path of the forest whose warming the population perceives.

required
alpha float

The cost of mitigation.

1.0
delta float

The strength of the social norm.

1.0
fmax Annotated[float, closed_open(0, oo)]

The largest cost of warming.

5.0
w Annotated[float, closed_open(0, oo)]

The steepness of the cost of warming.

3.0
Tc float

The critical warming.

1.0
tp Annotated[float, open(0, oo)]

The years of past warming that the projection reads.

10.0
tf Annotated[float, closed_open(0, oo)]

The years ahead of the projection.

15.0

Examples:

>>> from skcomplex.systems.physics.climate import MitigationInteraction
>>> MitigationInteraction('mitigation', target='people', forest='forest').tp
10.0
Source code in src/skcomplex/systems/physics/climate/_forests.py
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
def __init__(
    self,
    label: str,
    *,
    target: Role,
    forest: Role,
    alpha: float = 1.0,
    delta: float = 1.0,
    fmax: Annotated[float, RealSet.closed_open(0, oo)] = 5.0,
    w: Annotated[float, RealSet.closed_open(0, oo)] = 3.0,
    Tc: float = 1.0,
    tp: Annotated[float, RealSet.open(0, oo)] = 10.0,
    tf: Annotated[float, RealSet.closed_open(0, oo)] = 15.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.forest = forest
    self.alpha = alpha
    self.delta = delta
    self.fmax = fmax
    self.w = w
    self.Tc = Tc
    self.tp = tp
    self.tf = tf

MitigatorsElement(label, *, x=0.5)

Bases: Element

Share of mitigators in a population.

The share x runs from 0 to 1, and MitigationInteraction gives its replicator dynamics.

Parameters:

Name Type Description Default
label str

The label of the population.

required
x Annotated[float, closed(0, 1)]

The initial share of mitigators.

0.5

Examples:

>>> from skcomplex.systems.physics.climate import MitigatorsElement
>>> MitigatorsElement('people', x=0.3).x
0.3
Source code in src/skcomplex/systems/physics/climate/_forests.py
83
84
85
def __init__(self, label: str, *, x: Annotated[float, RealSet.closed(0, 1)] = 0.5) -> None:
    super().__init__(label)
    self.x = x

PopulationPollutionSystem(population=100000000.0, pollution=10000000.0, *, pollution_normal=0.25, pollution_standard=15000000.0, birth_normal=0.04, death_normal=0.028, label='system', solver='auto', backend='auto')

Bases: DynamicalSystem

The pollution model of Bala, Arshad, and Noh.

A population degrades its environment.

The population generates pollution at pollution_normal per person per year, and the environment absorbs the pollution over a time that lengthens from 0.6 to 20 years as the pollution ratio, pollution over its standard, rises from 0 to 60. This makes the absorption saturate, so a growing population can drive the pollution up steeply. Pollution lowers births, food, and the quality of life, and raises deaths, through table multipliers, while food per capita over the subsistence food raises births and lowers deaths. The cropping intensity rises from 1.75 to 2.5 crops per year over 50 years. The model follows Section 4.11.9 of Bala et al. (2017), with its tables and parameters, and time in years. The system has the stocks region.population and region.pollution, and the observables region.food_per_capita and region.quality_of_life.

Parameters:

Name Type Description Default
population float

The initial population.

100000000.0
pollution float

The initial pollution.

10000000.0
pollution_normal float

The pollution one person generates per year.

0.25
pollution_standard float

The pollution that the pollution ratio divides by.

15000000.0
birth_normal float

The normal birth rate per year.

0.04
death_normal float

The normal death rate per year.

0.028
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import PopulationPollutionSystem
>>> PopulationPollutionSystem(pollution_normal=0.5).prepare().system_.elements[0].values['pollution_normal']
0.5
Source code in src/skcomplex/systems/physics/climate/_pollution.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
def __init__(
    self,
    population: float = 1e8,
    pollution: float = 1e7,
    *,
    pollution_normal: float = 0.25,
    pollution_standard: float = 1.5e7,
    birth_normal: float = 0.04,
    death_normal: float = 0.028,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label=label, solver=solver, backend=backend)
    self.population = population
    self.pollution = pollution
    self.pollution_normal = pollution_normal
    self.pollution_standard = pollution_standard
    self.birth_normal = birth_normal
    self.death_normal = death_normal

RampedFoldElement(label, *, x=-1.3247)

Bases: Element

Element in the normal form of a fold whose control is ramped, its state x.

Parameters:

Name Type Description Default
label str

The label of the element.

required
x float

The initial state.

-1.3247

Examples:

>>> from skcomplex.systems.physics.climate import RampedFoldElement
>>> RampedFoldElement('system').x
-1.3247
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
241
242
243
def __init__(self, label: str, *, x: float = -1.3247) -> None:
    super().__init__(label)
    self.x = x

RampedFoldInteraction(label, *, target, a=-1.0, b=1.0, sigma=0.02, phi0=-1.0, phi1=1.0, rate=0.004)

Bases: Interaction

Stochastic fold dx = (a x^3 + b x + phi(t)) dt + sigma dW whose control rises from phi0 to phi1.

For a < 0 < b the fold has two stable branches for |phi| < phi_c = sqrt(-4 b^3 / (27 a)), and the lower branch vanishes at phi = phi_c. The control rises at the rate rate and stays at phi1 once it reaches it.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the element.

required
a float

The cubic coefficient, negative.

-1.0
b float

The linear coefficient, positive.

1.0
sigma Annotated[float, NONNEGATIVE]

The amplitude of the noise.

0.02
phi0 float

The initial control.

-1.0
phi1 float

The final control.

1.0
rate float

The rate at which the control rises.

0.004

Examples:

>>> from skcomplex.systems.physics.climate import RampedFoldInteraction
>>> RampedFoldInteraction('fold', target='system').rate
0.004
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
def __init__(
    self,
    label: str,
    *,
    target: Role,
    a: float = -1.0,
    b: float = 1.0,
    sigma: Annotated[float, NONNEGATIVE] = 0.02,
    phi0: float = -1.0,
    phi1: float = 1.0,
    rate: float = 0.004,
) -> None:
    super().__init__(label)
    self.target = target
    self.a = a
    self.b = b
    self.sigma = sigma
    self.phi0 = phi0
    self.phi1 = phi1
    self.rate = rate

RampedStochasticFoldSystem(*, rate=0.004, sigma=0.02, a=-1.0, b=1.0, phi0=-1.0, phi1=1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

A stochastic fold whose control is ramped through a tipping point.

The tipping point is that of its lower branch.

The state follows dx = (a x^3 + b x + phi(t)) dt + sigma dW with phi = phi0 + rate t until it reaches phi1, Eq. 4 of Fang et al. with phi = -1 + 0.004 t. It starts on the lower branch, which vanishes at the static fold phi_c = sqrt(-4 b^3 / (27 a)), 2 / (3 sqrt(3)) for a = -1 and b = 1. Near the fold, recovery slows down, so the variance and the lag-1 autocorrelation of the state rise. A ramp faster than the relaxation carries the control past phi_c before the state tips, by a lag that grows with the rate. The system has the state system.x, starting on the lower branch at phi0.

Parameters:

Name Type Description Default
rate float

The rate at which the control rises.

0.004
sigma float

The amplitude of the noise.

0.02
a float

The cubic coefficient, negative.

-1.0
b float

The linear coefficient, positive.

1.0
phi0 float

The initial control.

-1.0
phi1 float

The final control.

1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import RampedStochasticFoldSystem
>>> RampedStochasticFoldSystem(rate=0.01).prepare().system_.interactions[0].rate
0.01
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
def __init__(
    self,
    *,
    rate: float = 0.004,
    sigma: float = 0.02,
    a: float = -1.0,
    b: float = 1.0,
    phi0: float = -1.0,
    phi1: float = 1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.rate = rate
    self.sigma = sigma
    self.a = a
    self.b = b
    self.phi0 = phi0
    self.phi1 = phi1

SaltzmanGlaciationSystem(x=-0.2, y=1.0, z=0.0, *, p=1.0, q=2.5, r=1.3, s=0.6, u=0.2, nu=0.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The glacial cycles of Saltzman and Maasch.

The cycles are a self-sustained oscillation of ice, carbon, and ocean.

The anomalies of global ice volume x, atmospheric carbon dioxide y, and deep ocean temperature z follow dx/dt = -x - y - u z - nu F(t), dy/dt = -p z + r y - s y^2 - y^3, and dz/dt = -q (x + z). The time unit is 10 kyr, and F(t) = cos(2π t / 2.21) - cos(2π t / 4.41) is a quasiperiodic orbital forcing with the periods of precession and obliquity. Without forcing the default parameters give a limit cycle of about 100 kyr. The system has the anomalies climate.x, climate.y, and climate.z.

Parameters:

Name Type Description Default
x float

The initial ice volume anomaly.

-0.2
y float

The initial carbon dioxide anomaly.

1.0
z float

The initial deep ocean temperature anomaly.

0.0
p float

The effect of the deep ocean temperature on carbon dioxide.

1.0
q float

The relaxation rate of the deep ocean temperature to the ice volume.

2.5
r float

The growth rate of carbon dioxide by its own feedback.

1.3
s float

The quadratic saturation of carbon dioxide.

0.6
u float

The effect of the deep ocean temperature on ice volume.

0.2
nu float

The amplitude of the orbital forcing.

0.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import SaltzmanGlaciationSystem
>>> SaltzmanGlaciationSystem(nu=0.5).prepare().system_.interactions[0].nu
0.5
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
def __init__(
    self,
    x: float = -0.2,
    y: float = 1.0,
    z: float = 0.0,
    *,
    p: float = 1.0,
    q: float = 2.5,
    r: float = 1.3,
    s: float = 0.6,
    u: float = 0.2,
    nu: float = 0.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.z = z
    self.p = p
    self.q = q
    self.r = r
    self.s = s
    self.u = u
    self.nu = nu

SaltzmanMaaschElement(label, *, x=-0.2, y=1.0, z=0.0)

Bases: Element

Climate of the Saltzman-Maasch glacial cycles.

The climate holds the anomalies of global ice volume x, atmospheric carbon dioxide y, and deep ocean temperature z.

Parameters:

Name Type Description Default
label str

The label of the climate.

required
x float

The initial ice volume anomaly.

-0.2
y float

The initial carbon dioxide anomaly.

1.0
z float

The initial deep ocean temperature anomaly.

0.0

Examples:

>>> from skcomplex.systems.physics.climate import SaltzmanMaaschElement
>>> SaltzmanMaaschElement('climate').x
-0.2
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
50
51
52
53
54
def __init__(self, label: str, *, x: float = -0.2, y: float = 1.0, z: float = 0.0) -> None:
    super().__init__(label)
    self.x = x
    self.y = y
    self.z = z

SaltzmanMaaschInteraction(label, *, target, p=1.0, q=2.5, r=1.3, s=0.6, u=0.2, nu=0.0, t0=10.0)

Bases: Interaction

Feedbacks of ice volume, carbon dioxide, and deep ocean temperature, with the orbital forcing.

The anomalies of the target follow dx/dt = -x - y - u z - nu F(t), dy/dt = -p z + r y - s y^2 - y^3, and dz/dt = -q (x + z), where F(t) = cos(2π t0 t / 22.1) - cos(2π t0 t / 44.1) is the orbital forcing of precession and obliquity.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the climate.

required
p float

The effect of the deep ocean temperature on carbon dioxide.

1.0
q float

The relaxation rate of the deep ocean temperature to the ice volume.

2.5
r float

The growth rate of carbon dioxide by its own feedback.

1.3
s float

The quadratic saturation of carbon dioxide.

0.6
u float

The effect of the deep ocean temperature on ice volume.

0.2
nu float

The amplitude of the orbital forcing.

0.0
t0 float

The time unit in thousands of years, which scales the orbital periods.

10.0

Examples:

>>> from skcomplex.systems.physics.climate import SaltzmanMaaschInteraction
>>> SaltzmanMaaschInteraction('feedbacks', target='climate').q
2.5
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
def __init__(
    self,
    label: str,
    *,
    target: Role,
    p: float = 1.0,
    q: float = 2.5,
    r: float = 1.3,
    s: float = 0.6,
    u: float = 0.2,
    nu: float = 0.0,
    t0: float = 10.0,
) -> None:
    super().__init__(label)
    self.target = target
    self.p = p
    self.q = q
    self.r = r
    self.s = s
    self.u = u
    self.nu = nu
    self.t0 = t0

SocialForestDiebackSystem(v=0.8, x=0.5, *, Tv=30.0, Tc=1.0, alpha=1.0, delta=1.0, fmax=5.0, w=3.0, tp=10.0, tf=15.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The forest dieback model coupled with the replicator dynamics of mitigators.

The mitigators perceive the warming of the forest.

The forest grows as in ForestDiebackSystem, with its growth rate scaled by 0.2 + 0.4 x, so that mitigation by the share x of the population helps it. The share follows the replicator equation x' = x (1 - x) (-alpha + f(Tf) + delta (2 x - 1)), where the cost of warming f = fmax / (1 + exp(-w (Tf - Tc))) reads the warming Tf = tf / tp (T(t) - T(t - tp)) projected from the last tp years, a delay differential equation. Before the start the cover keeps its initial value. With no warming the shares 0 and 1 are stable and the share x* = 1 - (fmax / 2) / (1 + exp(w Tc)) between them is unstable, for the defaults of alpha, delta, and w. The population converges to all or no mitigators, and the forest to a positive cover or to bare soil, the green, brown, and barren outcomes, with long swings for some temperatures. The system has the vegetation cover forest.v and the share of mitigators people.x.

Parameters:

Name Type Description Default
v float

The initial vegetation cover, and its value before the start.

0.8
x float

The initial share of mitigators.

0.5
Tv float

The ambient temperature under full forest cover, in degrees Celsius.

30.0
Tc float

The critical warming.

1.0
alpha float

The cost of mitigation.

1.0
delta float

The strength of the social norm.

1.0
fmax float

The largest cost of warming.

5.0
w float

The steepness of the cost of warming.

3.0
tp float

The years of past warming that the projection reads.

10.0
tf float

The years ahead of the projection.

15.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import SocialForestDiebackSystem
>>> SocialForestDiebackSystem(Tc=2.5).prepare().system_.interactions[1].Tc
2.5
Source code in src/skcomplex/systems/physics/climate/_forests.py
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
def __init__(
    self,
    v: float = 0.8,
    x: float = 0.5,
    *,
    Tv: float = 30.0,
    Tc: float = 1.0,
    alpha: float = 1.0,
    delta: float = 1.0,
    fmax: float = 5.0,
    w: float = 3.0,
    tp: float = 10.0,
    tf: float = 15.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.v = v
    self.x = x
    self.Tv = Tv
    self.Tc = Tc
    self.alpha = alpha
    self.delta = delta
    self.fmax = fmax
    self.w = w
    self.tp = tp
    self.tf = tf

SoilTemperatureSystem(x=0.3, y=0.1, *, r=3.8, epsilon=0.1, label='system', solver='auto', backend='auto')

Bases: DynamicalSystem

The coupled maps of the surface and deeper temperatures of the soil.

The dimensionless surface temperature x follows the energy balance of the ground, reduced to a logistic map, and the deeper soil temperature y relaxes towards it: x_{n+1} = r x_n (1 - x_n) + epsilon y_n and y_{n+1} = epsilon (x_n + y_n). Apart from the origin, the fixed point is x* = (r + epsilon^2 / (1 - epsilon) - 1) / r and y* = epsilon x* / (1 - epsilon). The system has the temperatures soil.x and soil.y.

Parameters:

Name Type Description Default
x float

The initial dimensionless surface temperature.

0.3
y float

The initial dimensionless deeper soil temperature.

0.1
r float

The logistic parameter of the surface energy balance.

3.8
epsilon float

The coupling between the surface and the deeper soil.

0.1
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import SoilTemperatureSystem
>>> SoilTemperatureSystem(r=2.5).prepare().system_.elements[0].values['r']
2.5
Source code in src/skcomplex/systems/physics/climate/_soil.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
def __init__(
    self,
    x: float = 0.3,
    y: float = 0.1,
    *,
    r: float = 3.8,
    epsilon: float = 0.1,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label=label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.r = r
    self.epsilon = epsilon

StochasticEnergyBalanceInteraction(label, *, target, drift=0.0, rho=0.0, b_ini=1.69e-05, b_fin=1.69e-05, a_ini=0.6927, nu=0.0, c0=C0, c1=C1)

Bases: Interaction

Stochastic energy balance of Sutera and Fraedrich, with a drifting and a ramped control.

The temperature T of the target follows dT = c0 [-T^4 + c1 mu (b2 T^2 - a2)] dt + sqrt(nu) dW, the control mu decreases at the rate drift, and the ramp progress lam grows logistically at the rate rho, with b2 = b_ini + lam (b_fin - b_ini) and a2 = a_ini + c1 mu (b2^2 - b_ini^2) / 4, so the equilibria are kept along the ramp.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the planet.

required
drift float

The rate at which the control mu decreases.

0.0
rho Annotated[float, NONNEGATIVE]

The rate of the logistic ramp.

0.0
b_ini Annotated[float, NONNEGATIVE]

The initial value of b2.

1.69e-05
b_fin Annotated[float, NONNEGATIVE]

The final value of b2.

1.69e-05
a_ini Annotated[float, NONNEGATIVE]

The initial value of a2.

0.6927
nu Annotated[float, NONNEGATIVE]

The variance of the noise per unit of time.

0.0
c0 Annotated[float, open(0, oo)]

The inverse heat capacity.

C0
c1 Annotated[float, open(0, oo)]

The scale of the absorbed radiation.

C1

Examples:

>>> from skcomplex.systems.physics.climate import StochasticEnergyBalanceInteraction
>>> StochasticEnergyBalanceInteraction('balance', target='earth').nu
0.0
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
def __init__(
    self,
    label: str,
    *,
    target: Role,
    drift: float = 0.0,
    rho: Annotated[float, NONNEGATIVE] = 0.0,
    b_ini: Annotated[float, NONNEGATIVE] = 1.69e-5,
    b_fin: Annotated[float, NONNEGATIVE] = 1.69e-5,
    a_ini: Annotated[float, NONNEGATIVE] = 0.6927,
    nu: Annotated[float, NONNEGATIVE] = 0.0,
    c0: Annotated[float, RealSet.open(0, oo)] = C0,
    c1: Annotated[float, RealSet.open(0, oo)] = C1,
) -> None:
    super().__init__(label)
    self.target = target
    self.drift = drift
    self.rho = rho
    self.b_ini = b_ini
    self.b_fin = b_fin
    self.a_ini = a_ini
    self.nu = nu
    self.c0 = c0
    self.c1 = c1

SuteraFraedrichTippingSystem(tipping='noise', *, rho=0.18, nu=None, label='system', solver='auto', backend='auto')

Bases: BaseSystem

The Sutera-Fraedrich stochastic energy balance set up for tipping.

The tipping is bifurcation-, noise-, or rate-induced.

The temperature follows dT = c0 [-T^4 + c1 mu (b2 T^2 - a2)] dt + sqrt(nu) dW with the parameters of Table 1 of Fang et al. and starts at its warm stable equilibrium. In bifurcation-induced tipping, mu decreases at 4e-4 per year until the warm equilibrium meets the unstable one in a fold near mu = 0.76. In noise-induced tipping, the controls are fixed and noise of variance nu = 1 carries the state over the unstable equilibrium. In rate-induced tipping, b2 and a2 ramp logistically at the rate rho with the equilibria preserved, and the state fails to track the moving warm equilibrium when rho exceeds about 0.175. A tipped state leaves the warm branch and falls to the other stable root of the quartic. The system has the temperature earth.T, the control earth.mu, and the ramp progress earth.lam.

Parameters:

Name Type Description Default
tipping str

The type of tipping, 'bifurcation', 'noise', or 'rate'.

'noise'
rho float

The rate of the logistic ramp of rate-induced tipping, per year.

0.18
nu float | None

The variance of the noise per year, or None for the value of the type, 1 for noise-induced tipping and 0 otherwise.

None
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Raises:

Type Description
ValidationError

The type of tipping is unknown.

Examples:

>>> from skcomplex.systems.physics.climate import SuteraFraedrichTippingSystem
>>> round(SuteraFraedrichTippingSystem('rate').prepare().system_.elements[0].values['T'], 1)
291.6
Source code in src/skcomplex/systems/physics/climate/_tipping_types.py
459
460
461
462
463
464
465
466
467
468
469
470
471
472
def __init__(
    self,
    tipping: str = 'noise',
    *,
    rho: float = 0.18,
    nu: float | None = None,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.tipping = tipping
    self.rho = rho
    self.nu = nu

TippingCascadeInteraction(label, *, target, d=0.2)

Bases: Interaction

Fold of every tipping element, pushed by its tipped neighbours.

The state follows dx_i/dt = -x_i^3 + x_i + sqrt(4/27) c_i + d Σ_j A_ij (x_j + 1). A neighbour in its lower state x_j ≈ -1 adds almost nothing, while a tipped neighbour at x_j ≈ 1 adds about 2 d.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the elements on a network.

required
d Annotated[float, closed_open(0, oo)]

The coupling strength of every link.

0.2

Examples:

>>> from skcomplex.systems.physics.climate import TippingCascadeInteraction
>>> TippingCascadeInteraction('cascade', target='elements', d=0.1).d
0.1
Source code in src/skcomplex/systems/physics/climate/_tipping.py
 95
 96
 97
 98
 99
100
101
102
103
104
def __init__(
    self,
    label: str,
    *,
    target: Role,
    d: Annotated[float, RealSet.closed_open(0, oo)] = 0.2,
) -> None:
    super().__init__(label)
    self.target = target
    self.d = d

TippingCascadeNetworkSystem(graph=None, *, c=0.0, d=0.2, x=-1.0, label='system', solver='auto', backend='auto')

Bases: BaseSystem

A network of tipping elements.

One element pushed past its tipping point can tip its neighbours.

Every node is a fold dx_i/dt = -x_i^3 + x_i + sqrt(4/27) c_i + d Σ_j A_ij (x_j + 1) that starts in its lower state. An element whose control passes the critical value 1 tips to its upper state, and its coupling then raises the effective control of each neighbour by 2 d / sqrt(4/27), which can tip neighbours that would not tip alone. The system has the states elements.x, one value per node.

Parameters:

Name Type Description Default
graph Graph | None

The NetworkX graph of the interactions, or None for a path of four elements.

None
c float | Sequence[float]

The control of every element, one value or one per node in node order.

0.0
d float

The coupling strength of every link.

0.2
x float | Sequence[float]

The initial states, one value or one per node in node order.

-1.0
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> import networkx as nx
>>> from skcomplex.systems.physics.climate import TippingCascadeNetworkSystem
>>> system = TippingCascadeNetworkSystem(nx.cycle_graph(5), c=[1.2, 0, 0, 0, 0]).prepare()
>>> system.simulate(until=1.0).get_values('elements.x').shape
(11, 5)
Source code in src/skcomplex/systems/physics/climate/_tipping.py
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
def __init__(
    self,
    graph: nx.Graph | None = None,
    *,
    c: float | Sequence[float] = 0.0,
    d: float = 0.2,
    x: float | Sequence[float] = -1.0,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.graph = graph
    self.c = c
    self.d = d
    self.x = x

TippingElementElement(label, *, x=-1.0, c=0.0, space=None)

Bases: Element

Tipping elements in the normal form of a fold, their states and controls.

Alone, an element has a lower and an upper stable state for |c| < 1 and only the upper one beyond the critical value c = 1. TippingCascadeInteraction gives the fold and the pushes of the neighbours.

Parameters:

Name Type Description Default
label str

The label of the elements.

required
x object

The initial state, near -1 for an element in its lower state, one value or one per element.

-1.0
c object

The control parameter, critical at 1, one value or one per element.

0.0
space BaseSpace | None

The network of the elements, or None for one element.

None

Examples:

>>> from skcomplex.systems.physics.climate import TippingElementElement
>>> TippingElementElement('ice sheet').x
-1.0
Source code in src/skcomplex/systems/physics/climate/_tipping.py
58
59
60
61
62
63
64
65
66
67
68
def __init__(
    self,
    label: str,
    *,
    x: object = -1.0,
    c: object = 0.0,
    space: BaseSpace | None = None,
) -> None:
    super().__init__(label, space=space)
    self.x = x
    self.c = c

VanDerPolIceAgesInteraction(label, *, target, alpha=30.0, beta=0.75, gamma=0.0, tau=35.09)

Bases: Interaction

Van der Pol relaxation of the ice volume and the climate, paced by the orbital forcing.

The slow ice volume x and the fast climate state y of the target follow tau x' = -(y + beta + gamma F(t)) and tau y' = -alpha (y^3/3 - y - x), where F(t) = cos(2 pi t/23) + cos(2 pi t/41) stands for precession and obliquity, with time in thousands of years.

Parameters:

Name Type Description Default
label str

The label of the interaction.

required
target Role

The path of the climate.

required
alpha float

The time-scale separation of the fast climate state.

30.0
beta float

The asymmetry of the cycle, between build-up and termination.

0.75
gamma float

The strength of the orbital forcing.

0.0
tau float

The time scale, in thousands of years.

35.09

Examples:

>>> from skcomplex.systems.physics.climate import VanDerPolIceAgesInteraction
>>> VanDerPolIceAgesInteraction('relaxation', target='climate', gamma=0.4).gamma
0.4
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
def __init__(
    self,
    label: str,
    *,
    target: Role,
    alpha: float = 30.0,
    beta: float = 0.75,
    gamma: float = 0.0,
    tau: float = 35.09,
) -> None:
    super().__init__(label)
    self.target = target
    self.alpha = alpha
    self.beta = beta
    self.gamma = gamma
    self.tau = tau

VanDerPolIceAgesSystem(x=0.0, y=1.0, *, alpha=30.0, beta=0.75, gamma=0.0, tau=35.09, label='system', solver='auto', backend='auto')

Bases: BaseSystem

Glacial cycles as a Van der Pol relaxation oscillator.

The oscillator is optionally paced by orbital forcing.

Time is in thousands of years. The slow variable x stands for ice volume and the fast variable y for the climate state, with tau x' = -(y + beta + gamma F(t)) and tau y' = -alpha (y^3/3 - y - x), where F(t) = cos(2 pi t/23) + cos(2 pi t/41) stands for precession and obliquity. For |beta| < 1 the unforced oscillator has a relaxation limit cycle of slow ice build-up and fast terminations, and gamma sets how strongly the orbit paces it. The system has the states climate.x and climate.y.

Parameters:

Name Type Description Default
x float

The initial ice volume.

0.0
y float

The initial climate state.

1.0
alpha float

The time-scale separation of the fast climate state.

30.0
beta float

The asymmetry of the cycle, between build-up and termination.

0.75
gamma float

The strength of the orbital forcing.

0.0
tau float

The time scale, in thousands of years.

35.09
label str

The label of the system, which names it when it is nested in another one.

'system'
solver BaseSolver | str

The solver of the problem, or 'auto' for the one the system chooses.

'auto'
backend BaseBackend | str

The backend that evaluates the compiled functions, or 'auto' for the one the system chooses.

'auto'

Examples:

>>> from skcomplex.systems.physics.climate import VanDerPolIceAgesSystem
>>> VanDerPolIceAgesSystem(gamma=0.4).prepare().system_.interactions[0].gamma
0.4
Source code in src/skcomplex/systems/physics/climate/_ice_ages.py
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
def __init__(
    self,
    x: float = 0.0,
    y: float = 1.0,
    *,
    alpha: float = 30.0,
    beta: float = 0.75,
    gamma: float = 0.0,
    tau: float = 35.09,
    label: str = 'system',
    solver: BaseSolver | str = 'auto',
    backend: BaseBackend | str = 'auto',
) -> None:
    super().__init__(label, solver=solver, backend=backend)
    self.x = x
    self.y = y
    self.alpha = alpha
    self.beta = beta
    self.gamma = gamma
    self.tau = tau

early_warning(source, *, variables=None, window=None, detrend=True)

Return the rolling indicators of critical slowing down before a tipping point.

The indicators are computed for every series of a source.

The main indicator is the rolling lag-one autocorrelation of detrended windows, and the others of Dakos et al. (2012) follow: the rolling variance and skewness, and the reddening, the ratio of the mean power of the lowest eighth of frequencies to that of the highest half, which rises as fluctuations slow down. The trend of every indicator is Kendall's tau against time.

Parameters:

Name Type Description Default
source DataSource

The trajectory, or an array with one row per time and one column per series.

required
variables Sequence[str] | None

The variables of a trajectory to read, or None for every scalar series.

None
window int | None

The number of values in every rolling window.

None
detrend bool

Whether to remove a linear trend in every window first.

True

Returns:

Name Type Description
result EarlyWarningResult

The rolling indicators of every series and their trends.

Raises:

Type Description
AnalysisError

The window is missing or does not fit the series.

Examples:

>>> import numpy as np
>>> from skcomplex.systems.physics.climate import early_warning
>>> rng = np.random.default_rng(0)
>>> x = np.zeros(2000)
>>> for t in range(1, 2000):
...     x[t] = (0.2 + 0.79 * t / 2000) * x[t - 1] + rng.standard_normal()
>>> bool(early_warning(x, window=200).autocorrelation_trend[0] > 0.5)
True
Source code in src/skcomplex/systems/physics/climate/_early_warning.py
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
def early_warning(
    source: DataSource,
    *,
    variables: Sequence[str] | None = None,
    window: int | None = None,
    detrend: bool = True,
) -> EarlyWarningResult:
    """Return the rolling indicators of critical slowing down before a tipping point.

    The indicators are computed for every series of a source.

    The main indicator is the rolling lag-one autocorrelation of detrended windows, and the others of Dakos et al.
    (2012) follow: the rolling variance and skewness, and the reddening, the ratio of the mean power of the lowest
    eighth of frequencies to that of the highest half, which rises as fluctuations slow down. The trend of every
    indicator is Kendall's tau against time.

    Args:
        source:
            The trajectory, or an array with one row per time and one column per series.

        variables:
            The variables of a trajectory to read, or `None` for every scalar series.

        window:
            The number of values in every rolling window.

        detrend:
            Whether to remove a linear trend in every window first.

    Returns:
        result:
            The rolling indicators of every series and their trends.

    Raises:
        AnalysisError:
            The window is missing or does not fit the series.

    Examples:
        >>> import numpy as np
        >>> from skcomplex.systems.physics.climate import early_warning
        >>> rng = np.random.default_rng(0)
        >>> x = np.zeros(2000)
        >>> for t in range(1, 2000):
        ...     x[t] = (0.2 + 0.79 * t / 2000) * x[t - 1] + rng.standard_normal()
        >>> bool(early_warning(x, window=200).autocorrelation_trend[0] > 0.5)
        True
    """
    autocorrelation = rolling(source, kind='autocorrelation', variables=variables, window=window, detrend=detrend)
    variance = rolling(source, kind='variance', variables=variables, window=window, detrend=detrend)
    skewness = rolling(source, kind='skewness', variables=variables, window=window, detrend=detrend)
    size = int(window or 0)
    reddening = np.asarray([_reddening_of(column, size, detrend=detrend) for column in autocorrelation.values.T])
    return EarlyWarningResult(
        values=autocorrelation.values,
        labels=autocorrelation.labels,
        statistic=autocorrelation.statistic,
        trend=autocorrelation.trend,
        variance=variance.statistic,
        autocorrelation=autocorrelation.statistic,
        skewness=skewness.statistic,
        reddening=reddening,
        variance_trend=variance.trend,
        autocorrelation_trend=autocorrelation.trend,
        skewness_trend=skewness.trend,
        reddening_trend=np.asarray([_trend(row) for row in reddening]),
    )