Skip to content

Lorenz-84

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

  • Class: Lorenz84System
  • Import: from skcomplex.systems.physics.climate import Lorenz84System
  • Field: physics/climate
  • Topics: chaos, ode, atmosphere, general circulation
  • References: Lorenz 1984; Datseris and Parlitz 2022

Use this system

from skcomplex.core.engine.runtime import simulate
from skcomplex.systems.physics.climate import Lorenz84System

trajectory = simulate(Lorenz84System())

Parameters

Parameter Default
x 1.0
y 1.0
z 1.0
a 0.25
b 4.0
F 8.0
G 1.0

Tags

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

Class

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

    Args:
        x:
            The initial strength of the westerly jet.

        y:
            The initial cosine phase of the eddies.

        z:
            The initial sine phase of the eddies.

        a:
            The damping of the jet relative to the eddies.

        b:
            The displacement of the eddies by the jet.

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

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

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

    Examples:
        >>> from skcomplex.systems.physics.climate import Lorenz84System
        >>> Lorenz84System(G=1.25).prepare().system_.elements[0].G
        1.25
    """

    field = 'physics/climate'
    topics = ('chaos', 'ode', 'atmosphere', 'general circulation')
    references = ('Lorenz 1984', 'Datseris and Parlitz 2022')
    until = 100.0
    dt = 0.05

    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',
    ) -> None:
        super().__init__(label)
        self.x = x
        self.y = y
        self.z = z
        self.a = a
        self.b = b
        self.F = F
        self.G = G

    def _build_system(self) -> System:
        """Return the parts of the system, built from its model parameters."""
        return System(
            self.label,
            elements=[
                Lorenz84Element('atmosphere', x=self.x, y=self.y, z=self.z, a=self.a, b=self.b, F=self.F, G=self.G),
            ],
        )

Components

Elements:

  • Lorenz84Element, from Element
class Lorenz84Element(Element):
    """Atmosphere of Lorenz-84.

    The general circulation is reduced to a westerly jet and a travelling wave of eddies.

    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`.

    Args:
        label:
            The label of the atmosphere.

        visual:
            How the element is drawn, or `None` for `default_visual_`.

        x:
            The initial strength of the westerly jet.

        y:
            The initial cosine phase of the eddies.

        z:
            The initial sine phase of the eddies.

        a:
            The damping of the jet relative to the eddies.

        b:
            The displacement of the eddies by the jet.

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

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

    Examples:
        >>> from skcomplex.systems.physics.climate import Lorenz84Element
        >>> Lorenz84Element('atmosphere').F
        8.0
    """

    law_classes = (RateLaw,)

    def __init__(
        self,
        label: str,
        visual: VisualSpec | None = None,
        *,
        x: Annotated[float, StateSpec()] = 1.0,
        y: Annotated[float, StateSpec()] = 1.0,
        z: Annotated[float, StateSpec()] = 1.0,
        a: Annotated[float, ParameterSpec()] = 0.25,
        b: Annotated[float, ParameterSpec()] = 4.0,
        F: Annotated[float, ParameterSpec()] = 8.0,
        G: Annotated[float, ParameterSpec()] = 1.0,
    ) -> None:
        super().__init__(label, visual=visual)
        self.x = x
        self.y = y
        self.z = z
        self.a = a
        self.b = b
        self.F = F
        self.G = G

    def _get_laws(self, s: SimpleNamespace) -> list[BaseLaw]:
        """Return the forcing and damping of the jet and its exchange with the eddies.

        Args:
            s:
                The namespace of the symbols the laws can use.

        Returns:
            laws:
                The rate laws of the jet and of both phases of the eddies.
        """
        return [
            RateLaw(s.x, -(s.y**2) - s.z**2 - s.a * s.x + s.a * s.F),
            RateLaw(s.y, s.x * s.y - s.b * s.x * s.z - s.y + s.G),
            RateLaw(s.z, s.b * s.x * s.y + s.x * s.z - s.z),
        ]

Equations

atmosphere.x: diff(x_atmosphere(t), t) == F_atmosphere*a_atmosphere - a_atmosphere*x_atmosphere(t) - y_atmosphere(t)^2 - z_atmosphere(t)^2
atmosphere.y: diff(y_atmosphere(t), t) == -b_atmosphere*x_atmosphere(t)*z_atmosphere(t) + x_atmosphere(t)*y_atmosphere(t) + G_atmosphere - y_atmosphere(t)
atmosphere.z: diff(z_atmosphere(t), t) == b_atmosphere*x_atmosphere(t)*y_atmosphere(t) + x_atmosphere(t)*z_atmosphere(t) - z_atmosphere(t)