The little sister of a big weather forecast model
256 Stars
Updated Last
11 Months Ago
Started In
April 2020



SpeedyWeather.jl is a global atmospheric model with simple physics which is developed as a computational playground with an everything-flexible attitude as long as it is speedy. With minimal code redundancies it supports

  • any number format and precision (32 and 64 bits, 16 bits in development)
  • different architectures (x86 and arm, GPUs in development)
  • different physical models (barotropic vorticity, shallow water, primitive equations dry core; wet core in development)
  • different spatial grids (full and octahedral grids, Gaussian and Clenshaw-Curtis, HEALPix, OctaHEALPix)
  • different horizontal resolutions (T31 to T1023 and higher, i.e. 400km to 10km using linear, quadratic or cubic truncation)
  • multi-threading, layer-wise for dynamics, grid point-wise for physics (multi-processing in development)

and Julia will compile to these choices just-in-time.

For an overview of the functionality and explanation see the (always somehow incomplete) documentation.


Here is video of some relative vorticity in the shallow water model, simulated at T1023 spectral resolution (about 10km) on an octahedral Clenshaw-Curtis grid with more than 4 million grid points


The primitive equation core (wet or dry) is in development, this is temperature at the surface and at the tropopause at T511 (~20km resolution) and 31 vertical levels. The simulation was multi-threaded in Float32 (single precision). The orography is visible at the tropopause level because we currently use sigma coordinates


Example use

SpeedyWeather.jl is currently developed. Some things work, some don't. Stay tuned. The main interface to SpeedyWeather.jl is

julia> using SpeedyWeather
julia> run_speedy(ShallowWater, n_days=30, trunc=63, Grid=OctahedralGaussianGrid, output=true)
Weather is speedy run 1: 100%|███████████████████████████████████| Time: 0:00:04 (1498.70 years/day)

Hurray! In 4 seconds we just simulated 30 days of the Earth's atmosphere at a speed of 1500 years per day. This simulation used a T63 spectral resolution on an octahedral Gaussian grid (~165km resolution) solving the shallow water equations. The arguments for run_speedy are described in src/default_parameters.jl.

To run the primitive equation dry core you can for example do

julia> run_speedy(Float32, PrimitiveDryCore, physics=true, diffusion=HyperDiffusion(power=2))
Weather is speedy: 100%|███████████████████████████████████| Time: 0:00:03 (753.71 years/day)

The arguments here use single precision (Float32), enable physics (Held-Suarez forcing and boundary layer drag) and use biharmonic diffusion (default power=4).


SpeedyWeather.jl is a reinvention of the atmospheric general circulation model SPEEDY in Julia. While conceptually a similar model, it is entirely restructured, features have been added, changed and removed, such that only the numerical schemes share similarities (but we start to diverge here too). Speedy's dynamical core has an obscure history: Large parts were written by Isaac Held at GFDL in/before the 90ies with an unknown amount of contributions/modifications from Steve Jewson (Oxford) in the 90ies. The physical parametrizations were then added by Franco Molteni, Fred Kucharski, and Martin P. King afterwards while the model was still written in Fortran77. Around 2018-19, SPEEDY was then translated to Fortran90 by Sam Hatfield in speedy.f90. SpeedyWeather.jl is then adopted from first translations to Julia by Sam Hatfield.


SpeedyWeather.jl defines several submodules that are technically stand-alone (with dependencies) but aren't separated out to their own packages for now

  • LowerTriangularMatrices, a module that defines LowerTriangularMatrix (among others) used for the spherical harmonic coefficients
  • RingGrids, a module that defines several iso-latitude ring-based spherical grids (like the FullGaussianGrid or the HEALPixGrid) and interpolations between them
  • SpeedyTransforms, a module that defines the spherical harmonic transform between spectral space (for which LowerTriangularMatrices is used) and grid-point space (as defined by RingGrids).

These modules can also be used independently of SpeedyWeather like so

julia> import SpeedyWeather: LowerTriangularMatrices, RingGrids, SpeedyTransforms


SpeedyWeather.jl is registered in Julia's registry, so open the package manager with ] and

(@v1.8) pkg> add SpeedyWeather

which will install the latest release and all dependencies automatically. The very latest version is installed with

(@v1.8) pkg> add https://github.com/SpeedyWeather/SpeedyWeather.jl#main

which pulls directly from the #main branch. Please use the current minor version of Julia, compatibilities with older versions are not guaranteed.

Copyright and license

Copyright (c) 2020 Milan Kloewer for SpeedyWeather.jl Copyright (c) 2021 The SpeedyWeather.jl Contributors for SpeedyWeather.jl Copyright (c) 2022 Fred Kucharski and Franco Molteni for SPEEDY parametrization schemes

Software licensed under the MIT License.