Lorenz96
The Lorenz (1996) system extends the same idea to a lattice of \(N_x\) variables, coupled quadratically to their two upstream neighbours, damped linearly, and driven by a constant forcing \(F\),
with indices taken cyclically modulo \(N_x\). It was designed as a minimal
model of atmospheric predictability: the forcing \(F\) injects energy at large
scales, the quadratic term transfers it downscale, and dissipation removes it,
so the same instability that limits weather forecasts appears here in a
system small enough to integrate on a laptop. The classical parameters
(\(N_x=40\), \(F=8\)) are chaotic; Nx is a structural parameter fixed at
construction, not one of the estimable params.

Space-time diagram of the 40-variable lattice at \(F=8\), past the transient: colour encodes \(x_i(t)\), with red and blue the positive and negative extremes. The travelling, roughly periodic wave packets are the model's analogue of synoptic-scale weather systems.
Quickstart
from dynamodels.physical import Lorenz96
model = Lorenz96(Nx=40, F=8., dt=0.01)
psi, t = model.time_integrate(Nt=6000)
model.update_history(psi, t)
model.visualize_spatiotemporal_hist()
model.close()
Three components are observable by default (observed_idx=[0, Nx//2, Nx-1]);
pass observed_idx to choose others.
Nonlinear diagnostics

Diagnostics from ntsa.characterize on a single lattice
site, left to right: the observable time series with a zoomed inset; power
spectral density; the 3-D delay-embedded portrait; the first-return map of
the maxima; a plane-crossing Poincare section; a recurrence plot; a 3-D
classical-MDS embedding of the full 40-variable state; and the Lyapunov
spectrum (analytic Jacobian, since time_derivative is available).
Reference
Lorenz, E. N. (1996). Predictability: a problem partly solved. Proceedings of the Seminar on Predictability, Vol. 1, ECMWF, Reading, UK, 1-18.
API
dynamodels.physical.lorenz96.Lorenz96
Bases: Model
Lorenz (1996) system — chaotic model of \(N_x\) variables on a periodic lattice.
with indices taken cyclically modulo \(N_x\) (i.e. \(x_{-1} = x_{N_x - 1}\), \(x_{-2} = x_{N_x - 2}\) and \(x_{N_x} = x_0\)). Each variable is coupled quadratically to its two upstream neighbours, damped linearly (\(-x_i\)) and driven by a constant forcing \(F\). With the classical parameters (\(N_x = 40\), \(F = 8\)) the system is chaotic.
References
Lorenz (1996). Predictability: a problem partly solved. Proc. Seminar on Predictability, Vol. 1, ECMWF, Reading, UK, 1-18.
Source code in dynamodels/physical/lorenz96.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
time_derivative(t, psi, Nx, F)
staticmethod
Calculates the time derivative of the Lorenz 96 system (see class docstring).
Source code in dynamodels/physical/lorenz96.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |