Lorenz96 package

Version 1.0.1 by Lawrence Murray

Lorenz '96 differential equation model.



This samples from the prior and posterior distributions, and performs a posterior prediction. The oct/ directory contains a few functions for plotting these results (GNU Octave and OctBi required). In particular, after ./, the plot_and_print function will produce SVG figures in the figs/ directory.


This can be used to reproduce the timing results in Murray (2013).

A synthetic data set is provided, but a new one may be generated with (GNU Octave and OctBi required). A number of qsub_*.sh scripts are also provided that may assist with setting up the package to run on a cluster.


The original, deterministic Lorenz ‘96 model (Lorenz 2006) is given by


where $\mathbf{x}$ is the state vector, of length 8 in this package, with subscripts indexing its components in a circular fashion. $F$ is a forcing parameter. This form of the model is given in the file.

A stochastic extension of the model adds an additional $\sigma$ parameter and rewrites the above ordinary differential equation as a stochastic differential equation:

\[dx_{n}=\left(x_{n-1}(x_{n+1}-x_{n-2})-x_{n}+F\right)\, dt+\sigma\, dW_{n}.\]

This form is specified in and used for inference in LibBi.

The interest in the Lorenz ‘96 model is that its dimensionality can be scaled arbitrarily, and that, according to this number of dimensions and $F$, the deterministic model exhibits varying behaviours from convergence, to periodicity, to chaos. The stochastic model exhibits similar behaviours.

The model is one of the examples given in the LibBi introductory paper (Murray 2013). The package may be used to reproduce the results in that paper.


E. N. Lorenz. Chapter 3: Predictability – a problem partly solved. In Predictability of Weather and Climate, Cambridge University Press, 2006, 40-58.

L. M. Murray. Bayesian state-space modelling on high-performance hardware using LibBi. 2013.