Singular-vector perturbations in SpeedyWeather.jl using automatic differentiation
Singular vectors of dynamical systems identify the directions in which uncertainty in the initial conditions grows fastest. They are used in ensemble weather forecasting to explore the distribution of possible future weather, and in particular to better sample unlikely but possible extremes [1, 4, 5]. This project will implement initial-condition perturbations along singular vectors in the atmospheric general circulation model SpeedyWeather, see speedyweather.github.io [2]. Operational weather forecasting models use a handwritten tangent linear and adjoint model to compute singular vectors. SpeedyWeather, however, is automatically differentiable [3]: the tangent linear and adjoint models can be generated automatically by modern compiler technology, here using the automatic differentiation framework Enzyme.
Method
For a model dx/dt = f(x) denote the flow map, i.e. integrating the model forward from initial conditions x₀ over an optimisation time T, as x(T) = Φ(x₀). A small initial perturbation δx₀ then evolves approximately linearly as δx(T) = M δx₀, where the propagator M = ∂Φ/∂x₀ is the Jacobian of the flow map, i.e. the tangent linear model integrated along the trajectory. The initial perturbation that grows most over [0, T], measured in a chosen norm, maximises ‖M δx₀‖ / ‖δx₀‖. It is the leading right singular vector of M = UΣVᵀ; the singular values σᵢ are the respective amplification factors and the left singular vectors are the structures these perturbations evolve into at time T. Unlike eigenvectors of the (generally non-normal) linearised dynamics, singular vectors capture transient, finite-time growth [6], and in the limit T → ∞ the growth rates log(σᵢ)/T converge to the Lyapunov exponents [7].
The project proceeds in steps of increasing efficiency:
- Explicit Jacobian. Compute M column by column with forward-mode automatic differentiation via Enzyme (one Jacobian-vector product, i.e. one tangent linear integration, per degree of freedom), then take a dense SVD. This is exact for the discretised model and feasible at low resolution.
- Matrix-free singular vectors. At higher resolution M cannot be stored. Instead, Jacobian-vector products (Mv, forward mode) and vector-Jacobian products (Mᵀu, reverse mode, i.e. the adjoint model) are passed to an iterative Lanczos or randomised SVD algorithm to obtain only the leading few singular vectors, as done operationally [1, 4]. Reverse mode requires storing the trajectory, so checkpointing will be explored for longer optimisation times.
- Norms and ensembles. Singular vectors depend on the chosen norm, e.g. kinetic or total energy [4, 8]. Ensemble members are created as the unperturbed initial conditions plus and minus scaled (and randomly combined) leading singular vectors, following the ECMWF ensemble design [5].
Experiments
The student will simulate ensembles of 2D turbulent flows on a rotating sphere (SpeedyWeather’s barotropic vorticity model) as a simpler alternative to the vastly more complex 3D equations used in weather forecasting. Depending on progress the complexity can be increased to the shallow water model or to the 3D primitive equation models. The analysis of idealised forecasts will compare the ensemble spread from singular-vector perturbations against random perturbations, assess its sensitivity to optimisation time and norm, and test how long perturbations remain in the linear regime. The student will develop the necessary algorithms, implement them in Julia and interact with other SpeedyWeather developers on GitHub to guarantee correctness and performance, and write tests and documentation.
Skills required: Programming in either Python, Matlab, R, Fortran, C, or similar. Experience with Julia is not required, but beneficial. Experience with data analysis and visualisation. Some background in linear algebra and dynamical systems is helpful.
References
- Leutbecher, M and TN Palmer, 2008. Ensemble forecasting, Journal of Computational Physics, 10.1016/j.jcp.2007.02.014
- Klöwer, M et al., 2024. SpeedyWeather.jl: Reinventing atmospheric general circulation models towards interactivity and extensibility, Journal of Open Source Software, 9(98), 6323, 10.21105/joss.06323
- Moses, WS et al., 2026. Journal of Advances in Modeling Earth Systems, 10.1029/2025MS005615
- Buizza, R and TN Palmer, 1995. The singular-vector structure of the atmospheric global circulation, Journal of the Atmospheric Sciences, 52, 1434-1456
- Molteni, F, R Buizza, TN Palmer and T Petroliagis, 1996. The ECMWF Ensemble Prediction System: Methodology and validation, Quarterly Journal of the Royal Meteorological Society, 122, 73-119
- Farrell, BF and PJ Ioannou, 1996. Generalized stability theory. Part I: Autonomous operators, Journal of the Atmospheric Sciences, 53, 2025-2040
- Legras, B and R Vautard, 1996. A guide to Liapunov vectors, ECMWF Seminar on Predictability, Vol. I, 143-156
- Palmer, TN, R Gelaro, J Barkmeijer and R Buizza, 1998. Singular vectors, metrics, and adaptive observations, Journal of the Atmospheric Sciences, 55, 633-653