When tested with Claude, GPT, Gemini and Qwen on a microphysics model, the LAFT agent-based framework produces accurate translations up to 357 times faster than serial Fortran.
Atmospheric and climate models such as CESM, WRF or E3SM are based on old physics modules written in Fortran, which are difficult to port to a GPU without specialized expertise. Researchers present LAFT (LLM-Assisted Fortran Translation), an agentic framework that converts these parameterizations into accelerated JAX code by combining source code analysis, translation, repair, runtime validation and performance profiling.
Accurate, but not all fast
Evaluated on Kessler's hot rain microphysics scheme with four language models — Claude, GPT, Gemini and Qwen — LAFT obtained four validated translations reproducing Fortran outputs almost to machine precision. However, their performance on GPUs differs markedly depending on how the code is organized: the version generated by Gemini reaches up to 357 times the speed of the Fortran series on a million atmospheric columns, excluding compilation and transfers.
The authors draw a lesson from this: numerical accuracy does not guarantee efficiency, hence the interest in coupling validation and material analysis to modernize the code of climate models.
Read the full article on the original source
Go to the source →