Skip to content

Saltzman-Maasch glaciation

The glacial cycles of Saltzman and Maasch.

  • Class: SaltzmanGlaciationSystem
  • Import: from skcomplex.systems.physics.climate import SaltzmanGlaciationSystem
  • Field: physics/climate
  • Topics: ode, limit cycle, ice ages, paleoclimate
  • References:
    • Saltzman and Maasch 1991
    • Datseris and Parlitz 2022

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.physics.climate import SaltzmanGlaciationSystem

trajectory = SaltzmanGlaciationSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
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
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class SaltzmanGlaciationSystem(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`.

    Args:
        x:
            The initial ice volume anomaly.

        y:
            The initial carbon dioxide anomaly.

        z:
            The initial deep ocean temperature anomaly.

        p:
            The effect of the deep ocean temperature on carbon dioxide.

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

        r:
            The growth rate of carbon dioxide by its own feedback.

        s:
            The quadratic saturation of carbon dioxide.

        u:
            The effect of the deep ocean temperature on ice volume.

        nu:
            The amplitude of the orbital forcing.

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

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

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

    Examples:
        >>> from skcomplex.systems.physics.climate import SaltzmanGlaciationSystem
        >>> SaltzmanGlaciationSystem(nu=0.5).prepare().system_.interactions[0].nu
        0.5
    """

    field = 'physics/climate'
    topics = ('ode', 'limit cycle', 'ice ages', 'paleoclimate')
    references = ('Saltzman and Maasch 1991', 'Datseris and Parlitz 2022')
    until = 50.0
    dt = 0.05

    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

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of the climate and its feedbacks.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        feedbacks = SaltzmanMaaschInteraction(
            'feedbacks',
            target='climate',
            p=self.p,
            q=self.q,
            r=self.r,
            s=self.s,
            u=self.u,
            nu=self.nu,
        )
        self.system_ = System(
            self.label,
            elements=[SaltzmanMaaschElement('climate', x=self.x, y=self.y, z=self.z)],
            interactions=[feedbacks],
        )

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

  • SaltzmanMaaschElement, from Element

Interactions:

  • SaltzmanMaaschInteraction, from Interaction
class SaltzmanMaaschElement(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`.

    Args:
        label:
            The label of the climate.

        x:
            The initial ice volume anomaly.

        y:
            The initial carbon dioxide anomaly.

        z:
            The initial deep ocean temperature anomaly.

    Examples:
        >>> from skcomplex.systems.physics.climate import SaltzmanMaaschElement
        >>> SaltzmanMaaschElement('climate').x
        -0.2
    """

    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

class SaltzmanMaaschInteraction(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.

    Args:
        label:
            The label of the interaction.

        target:
            The path of the climate.

        p:
            The effect of the deep ocean temperature on carbon dioxide.

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

        r:
            The growth rate of carbon dioxide by its own feedback.

        s:
            The quadratic saturation of carbon dioxide.

        u:
            The effect of the deep ocean temperature on ice volume.

        nu:
            The amplitude of the orbital forcing.

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

    Examples:
        >>> from skcomplex.systems.physics.climate import SaltzmanMaaschInteraction
        >>> SaltzmanMaaschInteraction('feedbacks', target='climate').q
        2.5
    """

    law_classes = (RateLaw,)

    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

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the rates of the three anomalies.

        Args:
            context:
                The namespace of the climate, the time `t`, and the parameters.
        """
        super()._prepare(context)
        x, y, z, t = context.target.x, context.target.y, context.target.z, context.t
        forcing = cos(2 * pi * context.t0 * t / 22.1) - cos(2 * pi * context.t0 * t / 44.1)
        self.laws_ = [
            RateLaw(x.diff(t), -x - y - context.u * z - context.nu * forcing),
            RateLaw(y.diff(t), -context.p * z + context.r * y - context.s * y**2 - y**3),
            RateLaw(z.diff(t), -context.q * (x + z)),
        ]

Equations

The equations are those that symbolic returns for the system with its default parameters.

climate.x: diff(x_climate(t), t) == -nu_feedbacks*(cos(0.09049773755656108*pi*t*t0_feedbacks) - cos(0.045351473922902494*pi*t*t0_feedbacks)) - u_feedbacks*z_climate(t) - x_climate(t) - y_climate(t)
climate.y: diff(y_climate(t), t) == -s_feedbacks*y_climate(t)^2 - y_climate(t)^3 + r_feedbacks*y_climate(t) - p_feedbacks*z_climate(t)
climate.z: diff(z_climate(t), t) == -q_feedbacks*(x_climate(t) + z_climate(t))