Climate Modelling in Low-Precision: Effects of both Deterministic & Stochastic Rounding

E. Adam Paxton, Matthew Chantry, Milan Klöwer, Leo Saffin, T. N. PalmerarXiv 2021 · DOI · arXiv

Abstract

Motivated by recent advances in operational weather forecasting, we study the efficacy of low-precision arithmetic for climate simulations. We develop a framework to measure rounding error in a climate model which provides a stress-test for a low-precision version of the model, and we apply our method to a variety of models including the Lorenz system; a shallow water approximation for flow over a ridge; and a coarse resolution global atmospheric model with simplified parameterisations (SPEEDY). Although double precision (52 significant bits) is standard across operational climate models, in our experiments we find that single precision (23 sbits) is more than enough and that as low as half precision (10 sbits) is often sufficient. Our test is based on the Wasserstein metric and this provides stringent non-parametric bounds on rounding error accounting for annual means as well as extreme weather events. In addition, by testing models using both round-to-nearest (RN) and stochastic rounding (SR) we find that SR can mitigate rounding error across a range of applications.

Introduction

Climate models traditionally rely on 64-bit "double precision" (Float64) arithmetic, consuming massive computational resources. While the weather forecasting community has begun adopting 32-bit (single precision) to speed up short-term forecasts, the climate community has been hesitant. The core challenge is that climate modeling aims to capture the "climatology"—the long-term statistical distribution of weather—rather than exact states. There is a persistent fear that tiny rounding errors might accumulate over decades, causing the model to "drift" into an unrealistic state. Furthermore, in low precision, small physical signals can be "rounded to zero," a phenomenon known as stagnation.

Methodology: Measuring and Mitigating Error

To address these concerns, we propose a framework to stress-test climate models using two key tools:

  1. The Wasserstein Distance (WD): This metric measures the "work" required to transform one probability distribution into another. Unlike standard error metrics, WD respects the geometry of the data, making it ideal for comparing the multi-dimensional attractors of chaotic climate systems.
  2. Stochastic Rounding (SR): Instead of standard Round-to-Nearest (RN), SR rounds values up or down probabilistically. For instance, a value of 10.1 would round to 11 with a 10% probability. This ensures rounding error is zero on average, effectively preventing stagnation.
Wasserstein distance over time for various precision levels, showing how stochastic rounding (SR) helps low-precision models converge toward high-precision benchmarks.

Experimental Setup

The study utilizes a hierarchy of models:

  • Lorenz '63 System: A classic 3-variable chaotic system for proof-of-concept.
  • Shallow Water Model: A 2D simulation of turbulent flow over a ridge.
  • SPEEDY: A global atmospheric model of intermediate complexity (48x96 grid) forced by ERA Reanalysis data to ensure a stable control climate.

Results and Discussion

Our experiments reveal that double precision is largely overkill for climate modeling. For the Lorenz system, standard 16-bit precision (Float16) fails to capture the attractor's structure, but the addition of stochastic rounding (Float16sr) restores it remarkably well.

Lorenz attractor density plots across different floating-point formats. Note how Float16 (c) degrades, while stochastic rounding in Float16sr (e) and BFloat16sr (f) preserves the attractor's geometry.

In the more complex SPEEDY model, we found that 12 significant bits (less than half-precision) were sufficient for negligible error. Even at 10 bits, the error in average grid-point precipitation was less than 0.1 mm per 6 hours. Furthermore, the model’s response to simulated El Niño events showed a Pearson correlation of >0.98 between double and half-precision runs, suggesting that low-precision models can accurately capture major climatic shifts.

Conclusion

This research provides the first evidence that low-precision arithmetic, specifically when paired with stochastic rounding, is suitable for long-term climate simulations. While hardware support for SR is currently limited, its potential to slash computational costs without sacrificing statistical accuracy makes it a compelling candidate for next-generation climate models. Future work will involve testing these findings on high-resolution, flagship climate models used for international assessments.

Summary updated

Abstract

Motivated by recent advances in operational weather forecasting, we study the efficacy of low-precision arithmetic for climate simulations. We develop a framework to measure rounding error in a climate model which provides a stress-test for a low-precision version of the model, and we apply our method to a variety of models including the Lorenz system; a shallow water approximation for flow over a ridge; and a coarse resolution global atmospheric model with simplified parameterisations (SPEEDY). Although double precision (52 significant bits) is standard across operational climate models, in our experiments we find that single precision (23 sbits) is more than enough and that as low as half precision (10 sbits) is often sufficient. For example, SPEEDY can be run with 12 sbits across the entire code with negligible rounding error and this can be lowered to 10 sbits if very minor errors are accepted, amounting to less than 0.1 mm/6hr for the average grid-point precipitation, for example. Our test is based on the Wasserstein metric and this provides stringent non-parametric bounds on rounding error accounting for annual means as well as extreme weather events. In addition, by testing models using both round-to-nearest (RN) and stochastic rounding (SR) we find that SR can mitigate rounding error across a range of applications. Thus our results also provide evidence that SR could be relevant to next-generation climate models. While many studies have shown that low-precision arithmetic can be suitable on short-term weather forecasting timescales, our results give the first evidence that a similar low precision level can be suitable for climate.
BibTeX
@misc{paxton2021climate,
  author = {E. Adam Paxton and Matthew Chantry and Milan Klöwer and Leo Saffin and T. N. Palmer},
  title = {{Climate Modelling in Low-Precision: Effects of both Deterministic \& Stochastic Rounding}},
  year = {2021},
  eprint = {2104.15076},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.15076},
}
Figure