Preprints
https://doi.org/10.5194/egusphere-2026-7568
https://doi.org/10.5194/egusphere-2026-7568
02 Dec 2026
 | 02 Dec 2026
Status: this preprint is open for discussion.

Porting WRF v4.8.0 to GPUs with OpenACC: strategy, verification, and lessons

Fanghe Zhao, Stefan Rahimi, Melissa Bukovsky, Lei Huang, Cenlin He, Tzu-Shun Lin, Jimy Dudhia, Changhai Liu, Karandeep Singh, Chad Thackeray, Jesse Norris, Weichen Liu, Bart Geerts, Kristen L. Rasmussen, and Alex Hall

Abstract. Kilometer-scale simulations with the Weather Research and Forecasting (WRF) model run on CPU clusters are computationally intensive. GPUs offer higher peak arithmetic throughput per node. Earlier work on GPU-accelerated WRF either ported single physics schemes, built a proprietary code from an older WRF version, or re-implemented the model in another language. This leaves the question of how the community code with a complete real-case physics suite can run on GPUs and produce results physically consistent with CPU-based WRF. Here we port WRF v4.8.0 to NVIDIA GPUs with OpenACC directives and CUDA managed memory. The port covers the dynamical core, halo exchange, five microphysics schemes, four cumulus schemes, RRTMG radiation, three boundary layer schemes, two surface layer schemes, three land-surface models including Noah-MP version 5.0, the CLM lake model, spectral and analysis nudging, the HAILCAST hail diagnostic, and the WRF-Solar, WRF-Fire and WRF-Hydro components. Every change passed three gates: a per-call comparison with the previous code, byte identity of repeated runs, and a 7-day run compared with CPU-based WRF. On NSF NCAR Derecho, one node with four A100 GPUs ran 3.4 to 3.5 times faster than one 128-core CPU node at 5 km grid spacing and 6.1 times faster in a 7-day regional simulation at 9 km. Two GPU nodes ran two times faster than eight CPU nodes at 1 km, and in regional applications at 45 and 6 km one GPU node did the work of 3.8 and 9.0 CPU nodes, respectively. Across all cases, one GPU node replaced 3 to 9 CPU nodes. Differences from CPU WRF grew from round-off without systematic drift, and over a 30-day 45 km simulation daily-mean differences were significant at the 5 % level for 0 to 6.5 % of grid points, close to the rate expected by chance. The gates, the porting patterns, and the results we report give a route for routine GPU porting of numerical weather prediction models.

Competing interests: Some authors are members of the editorial board of Geoscientific Model Development.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.
Share
Fanghe Zhao, Stefan Rahimi, Melissa Bukovsky, Lei Huang, Cenlin He, Tzu-Shun Lin, Jimy Dudhia, Changhai Liu, Karandeep Singh, Chad Thackeray, Jesse Norris, Weichen Liu, Bart Geerts, Kristen L. Rasmussen, and Alex Hall

Status: open

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
Fanghe Zhao, Stefan Rahimi, Melissa Bukovsky, Lei Huang, Cenlin He, Tzu-Shun Lin, Jimy Dudhia, Changhai Liu, Karandeep Singh, Chad Thackeray, Jesse Norris, Weichen Liu, Bart Geerts, Kristen L. Rasmussen, and Alex Hall
Fanghe Zhao, Stefan Rahimi, Melissa Bukovsky, Lei Huang, Cenlin He, Tzu-Shun Lin, Jimy Dudhia, Changhai Liu, Karandeep Singh, Chad Thackeray, Jesse Norris, Weichen Liu, Bart Geerts, Kristen L. Rasmussen, and Alex Hall
Metrics will be available soon.
Latest update: 02 Dec 2026
Download
Short summary
Weather simulations at kilometer scale need large supercomputers. We adapted the Weather Research and Forecasting model, a widely used community model, to run on graphics processing units by adding compiler instructions to its existing code. One computer node with four graphics processing units did the work of three to nine conventional nodes. Its results differed from the original only as much as tiny rounding differences grow in a chaotic atmosphere, so it can be used in place of the original.
Share