Skip to content

Budyko-Sellers latitude system

The Budyko-Sellers energy balance of one hemisphere.

  • Class: BudykoSellersSystem
  • Import: from skcomplex.systems.physics.climate import BudykoSellersSystem
  • Field: physics/climate
  • Topics: field, pde, energy balance, ice-albedo feedback, snowball
  • References:
    • Budyko 1969
    • Sellers 1969
    • North 1975
    • Ghil and Lucarini 2020

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 BudykoSellersSystem

trajectory = BudykoSellersSystem().prepare().simulate()

Parameters

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

Parameter Default
n_bands 30
T 15.0
Q 334.4
A 203.3
B 2.09
D 0.649
C 10.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 lattice
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 BudykoSellersSystem(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.

    Args:
        n_bands:
            The number of latitude bands.

        T:
            The initial temperature of every band in °C.

        Q:
            The mean insolation in W m⁻².

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

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

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

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

        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 BudykoSellersSystem
        >>> trajectory = BudykoSellersSystem(10).prepare().simulate(until=2.0)
        >>> trajectory.get_values('bands.T').shape
        (2, 10)
    """

    field = 'physics/climate'
    topics = ('field', 'pde', 'energy balance', 'ice-albedo feedback', 'snowball')
    references = ('Budyko 1969', 'Sellers 1969', 'North 1975', 'Ghil and Lucarini 2020')
    until = 100.0
    dt = 2.0

    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

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of the latitude bands of one hemisphere and their energy balance.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        bands = LatitudeBandElement(
            'bands',
            T=np.full(self.n_bands, float(self.T)),
            x=(np.arange(self.n_bands) + 0.5) / self.n_bands,
            space=LatticeSpace(self.n_bands, spacing=1 / self.n_bands, boundary='reflecting'),
        )
        balance = LatitudeEnergyBalanceInteraction(
            'balance',
            target='bands',
            Q=self.Q,
            A=self.A,
            B=self.B,
            D=self.D,
            C=self.C,
        )
        self.system_ = System(self.label, elements=[bands], interactions=[balance])

Components

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

Elements:

  • LatitudeBandElement, from Element

Interactions:

  • LatitudeEnergyBalanceInteraction, from Interaction
class LatitudeBandElement(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.

    Args:
        label:
            The label of the bands.

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

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

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

    Examples:
        >>> from skcomplex.systems.physics.climate import LatitudeBandElement
        >>> LatitudeBandElement('band', x=0.25).x
        0.25
    """

    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

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

    Args:
        label:
            The label of the interaction.

        target:
            The path of the bands.

        Q:
            The mean insolation in W m⁻².

        s2:
            The coefficient of the second Legendre polynomial of the insolation.

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

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

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

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

        albedo_ice:
            The albedo of an icy band.

        albedo_free:
            The mean albedo of an ice free band.

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

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

        width:
            The width of the transition to ice in kelvin.

    Examples:
        >>> from skcomplex.systems.physics.climate import LatitudeEnergyBalanceInteraction
        >>> LatitudeEnergyBalanceInteraction('balance', target='bands').albedo_ice
        0.62
    """

    law_classes = (RateLaw,)

    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

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the absorbed insolation, the outgoing radiation, and the meridional diffusion of heat.

        Args:
            context:
                The namespace of the bands, the time `t`, and the parameters.
        """
        super()._prepare(context)
        T, x = context.target.T, context.target.x
        legendre = (3 * x**2 - 1) / 2
        insolation = context.Q * (1 + context.s2 * legendre)
        free = context.albedo_free + context.albedo_slope * legendre
        ice = context.albedo_ice
        albedo = (ice + free) / 2 - (ice - free) / 2 * tanh((T - context.T_ice) / context.width)
        transport = context.D * ((1 - x**2) * laplacian(T) - 2 * x * gradient(T, 1)[0])
        balance = (insolation * (1 - albedo) - (context.A + context.B * T) + transport) / context.C
        self.laws_ = [RateLaw(T.diff(context.t), balance)]