Evaluating LLMs for Translating Legacy Fortran Atmospheric Physics to GPU-Accelerated JAX
Iris Linck, John Dennis, John Schreck, Karen Stengel, David John Gagne II
Key points
From the paper's conclusion- We present LAFT (LLM-Assisted Fortran Translation), an agentic framework for converting Fortran atmospheric physics parameterizations into GPU-accelerated JAX while preserving numerical agreement with the Fortran reference.
Abstract
Legacy Fortran physics packages in atmospheric models such as CESM, WRF, and E3SM pose a barrier to GPU modernization, while manual porting requires accelerator-programming expertise. We present LAFT (LLM-Assisted Fortran Translation), an agentic framework for converting Fortran atmospheric physics parameterizations into GPU-accelerated JAX while preserving numerical agreement with the Fortran reference. LAFT coordinates source-code analysis, translation, repair, runtime validation, and performance profiling. It combines a deterministic front end for metadata extraction and bridge generation, structured translation prompts, numerical validation, and profiling-guided feedback to identify inefficient execution patterns. The bridge handles array-layout conversion separately from scientific computation. We evaluate LAFT using the Kessler warm-rain microphysics scheme and four LLMs: Claude, GPT, Gemini, and Qwen. All four validated translations reproduce the Fortran reference outputs to near floating-point precision for the evaluated case, but their GPU performance differs substantially with execution design. The Gemini-generated implementation achieves up to a 357-fold speedup over serial Fortran in cached execution at 1,000,000 atmospheric columns, excluding compilation and host-device transfers. The results demonstrate that numerical agreement alone does not ensure efficient GPU execution and motivate combining numerical validation with hardware-aware performance analysis. LAFT provides a practical workflow for modernizing legacy atmospheric physics code through LLM-assisted translation, deterministic interface generation, automated validation and repair, and reproducible profiling.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Operational numerical weather prediction with ICON on GPUs (version 2024.10)Geoscientific model development · 2026
- ForTress: Bringing Assurance and Determinism for LLM-Driven Fortran-to-Python TranslationarXiv · 2026
- GPU-accelerated atmospheric chemical kinetics using single precision in the ECHAM/MESSy (EMAC) model v2.55 with MEDINA v2.0Geoscientific Model Development · 2026
- An exact and differentiable rewrite of a coupled weather and fire modelarXiv · 2026
- More with Less: Efficient Parallel Scientific Code Translation via an Agent-Skill WorkflowarXiv · 2026
- Validating LLM-Modernized Scientific Software Through Differential Fault InjectionarXiv · 2026