Skip to content

Lorenz96

Systems / ODEs / Chaotic attractors

A ring of advectively coupled sites — the standard testbed for atmospheric data assimilation and spatiotemporal chaos.

continuous · ODE20 dimensionsspatiotemporal

Start here

Python
import tsdynamics as ts

system = ts.systems.Lorenz96()
traj = system.run(final_time=60.0, dt=0.1, seed=0)
ts.plot(traj)

traj.t contains the sample times and traj.y the state array; system.info shows the defaults. In a notebook the last line displays the plot. In a Python script, call .show() on it to open a window, or .save("trajectory.svg") to export it.

With an adaptive ODE solver, dt sets the output spacing; rtol and atol control local integration error. For a fixed-step solver, reduce dt to check numerical convergence.

Illustration: N=20 · simulation window: 0–60 · forward playback

Evolving spatial field — press play to follow the snapshots

This finite simulation illustrates one initial condition and view. The diagnostics below report their own inputs and observation windows.

Dynamics at the default parameters

Lyapunov exponents measure separation rates along an orbit. The Kaplan–Yorke dimension is derived from those rates, not a direct geometric measurement. Finite runs depend on the initial condition, transient and observation window; a value near zero needs a convergence check.

Lyapunov spectrum
Finite-time / numerical estimate
$+1.531,\; +1.191,\; +0.9632,\; +0.6715,\; +0.364,\; +0.155,\; -0.001073,\; -0.05879,\; -0.3524,\; -0.547,\; -0.7945,\; -1.036,\; -1.283,\; -1.553,\; -1.855,\; -2.239,\; -2.683,\; -3.449,\; -4.211,\; -4.815$
per time unit
Method and evidence

Benettin QR tangent dynamics

Finite-time estimate, not a convergence certificate. All state-space directions were computed.

Settings

{
  "backend": "jit",
  "k": 20,
  "final_time": 400.0,
  "transient": 100.0,
  "dt": 0.1,
  "ic": [
    0.09176949259154116,
    -0.09748175543019155,
    0.029487671727752063,
    -0.05036235606923725,
    -0.031139717545727575,
    0.06567613564014455,
    0.08111320187764692,
    0.005842999053308363,
    0.07568048040166538,
    -0.04203702425855485,
    0.062324723018605324,
    -0.0554887001697022,
    -0.08588311604627741,
    -0.05452020163084013,
    -0.09320472402525166,
    0.029053538539351133,
    0.02814187943346638,
    -0.07584630666437145,
    -0.052055028625779154,
    0.07887693785362469
  ],
  "rtol": 1e-09,
  "atol": 1e-12,
  "solver": "rk45"
}

Preparation

{
  "seed": 846665125,
  "ic_policy": "declared/in-basin start, else seeded small ball"
}

Estimator runtime in the recorded environment: 1.5808 s.

Kaplan–Yorke dimension
Finite-time / numerical estimate
$D_{KY} = 13.52$
Method and evidence

Kaplan–Yorke interpolation of the recorded spectrum

Lyapunov dimension estimate; equality with a fractal or information dimension requires additional dynamical assumptions.

Settings

{
  "backend": "jit",
  "k": 20,
  "final_time": 400.0,
  "transient": 100.0,
  "dt": 0.1,
  "ic": [
    0.09176949259154116,
    -0.09748175543019155,
    0.029487671727752063,
    -0.05036235606923725,
    -0.031139717545727575,
    0.06567613564014455,
    0.08111320187764692,
    0.005842999053308363,
    0.07568048040166538,
    -0.04203702425855485,
    0.062324723018605324,
    -0.0554887001697022,
    -0.08588311604627741,
    -0.05452020163084013,
    -0.09320472402525166,
    0.029053538539351133,
    0.02814187943346638,
    -0.07584630666437145,
    -0.052055028625779154,
    0.07887693785362469
  ],
  "rtol": 1e-09,
  "atol": 1e-12,
  "solver": "rk45"
}
Divergence ∇·f
Symbolic summary
$\nabla\!\cdot f = -20$
uniform over 20 nodes
Method and evidence

uniform over 20 nodes

Equilibria / fixed points
Finite-time / numerical estimate
1 equilibria found
0 stable · 1 unstable · 0 marginal / undetermined
Method and evidence

A seeded numerical search, not a completeness proof. Stability means linear asymptotic stability. Marginal/nonhyperbolic roots have no nonlinear stability verdict from this linearisation.

max Re(eigenvalue) for flows; max |multiplier| - 1 for maps. Boundary band: 1e-7 * max(1, max |eigenvalue|).

Settings

{
  "method": "newton",
  "n_seeds": 80,
  "seed": 0
}

Estimator runtime in the recorded environment: 0.1763 s.

Recorded parameters and software
{
  "parameters": {
    "f": 8.0,
    "N": 20
  },
  "parameter_expressions": {},
  "state_dimension": 20,
  "explicit_time": false,
  "library_version": "6.0.3",
  "python": "3.14.8",
  "numpy": "2.4.4",
  "scipy": "1.17.1",
  "protocol_version": 1
}

Definition

Python
@staticmethod
def _equations(y_sym, t_sym, *, f, N):
    return [
        (y_sym((i + 1) % N) - y_sym((i - 2) % N)) * y_sym((i - 1) % N) - y_sym(i) + f
        for i in range(N)
    ]

Parameters

Symbol Default Role
f 8 forcing (drives the chaos onset)
N 20 number of lattice sites

Explore further

Reference

Lorenz (1996), Proc. ECMWF Seminar on Predictability 1, 1-18

BibTeX
BibTeX
@misc{lorenz96,
  title = {Lorenz96 system},
  note = {Lorenz (1996), Proc. ECMWF Seminar on Predictability 1, 1-18}
}