TerraFlow (version 1.0): a differentiable multi-backend nonhydrostatic atmospheric dynamical core on unstructured spherical meshes

Atmospheric modeling increasingly requires dynamical cores that combine efficient simulation with gradient computation for sensitivity analysis and parameter estimation. To address these needs, we present TerraFlow (version 1.0), a differentiable, multi-backend nonhydrostatic atmospheric dynamical core that supports both JAX and PyTorch on unstructured spherical meshes. Built on a layer-averaged finite-volume formulation in a dry-mass vertical coordinate, TerraFlow uses a common array and state-update interface to execute the same numerical operators with either backend. This design brings automatic differentiation, just-in-time compilation, and graphics processing unit (GPU) acceleration across both backends together with distributed forward integration through the Message Passing Interface in a unified framework. Five idealized tests evaluate the model's numerical performance, demonstrating that it reproduces the principal features of passive-tracer transport, large-scale rotational flow, and nonhydrostatic gravity waves. To assess local derivative accuracy, we use finite-difference comparisons and Taylor remainder tests in short nonhydrostatic integrations. For both backends, directional derivatives computed by automatic differentiation agree with centered finite-difference estimates to relative errors below 10−4 for all tested output fields over suitable perturbation ranges, and the loss Taylor remainders exhibit second-order convergence. The resulting gradients support a successful inversion that recovers two prescribed initial potential-temperature perturbation amplitudes from noise-free synthetic observations in six updates. Computational efficiency is assessed separately through double-precision hydrostatic benchmarks, in which one NVIDIA RTX 4090 achieves forward-integration speedups of approximately 2.3–7.0 relative to corresponding runs on 10 central processing unit (CPU) nodes with 2560 cores in total, excluding compilation, model construction, and output. By bringing efficient forward simulation and verified local differentiation into a shared numerical implementation, TerraFlow provides a common framework for atmospheric sensitivity analysis and gradient-based parameter estimation across two computational backends.

Authors

Institutions

Publication Details

Published
2026-11-24
DOI
https://doi.org/10.5194/egusphere-2026-7116
Primary Topic
Meteorological Phenomena and Simulations
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

TerraFlow (version 1.0): a differentiable multi-backend nonhydrostatic atmospheric dynamical core on unstructured spherical meshes

Baoxiang Pan, Ziniu Xiao, Gaopeng Lu, Tiange Huang et al.
3 links
Meteorological Phenomena and Simulations
preprint

TerraFlow (version 1.0): a differentiable multi-backend nonhydrostatic atmospheric dynamical core on unstructured spherical meshes

Baoxiang Pan, Ziniu Xiao, Gaopeng Lu, Tiange Huang, Li Dong
preprint en

Abstract

Atmospheric modeling increasingly requires dynamical cores that combine efficient simulation with gradient computation for sensitivity analysis and parameter estimation. To address these needs, we present TerraFlow (version 1.0), a differentiable, multi-backend nonhydrostatic atmospheric dynamical core that supports both JAX and PyTorch on unstructured spherical meshes. Built on a layer-averaged finite-volume formulation in a dry-mass vertical coordinate, TerraFlow uses a common array and state-update interface to execute the same numerical operators with either backend. This design brings automatic differentiation, just-in-time compilation, and graphics processing unit (GPU) acceleration across both backends together with distributed forward integration through the Message Passing Interface in a unified framework. Five idealized tests evaluate the model's numerical performance, demonstrating that it reproduces the principal features of passive-tracer transport, large-scale rotational flow, and nonhydrostatic gravity waves. To assess local derivative accuracy, we use finite-difference comparisons and Taylor remainder tests in short nonhydrostatic integrations. For both backends, directional derivatives computed by automatic differentiation agree with centered finite-difference estimates to relative errors below 10−4 for all tested output fields over suitable perturbation ranges, and the loss Taylor remainders exhibit second-order convergence. The resulting gradients support a successful inversion that recovers two prescribed initial potential-temperature perturbation amplitudes from noise-free synthetic observations in six updates. Computational efficiency is assessed separately through double-precision hydrostatic benchmarks, in which one NVIDIA RTX 4090 achieves forward-integration speedups of approximately 2.3–7.0 relative to corresponding runs on 10 central processing unit (CPU) nodes with 2560 cores in total, excluding compilation, model construction, and output. By bringing efficient forward simulation and verified local differentiation into a shared numerical implementation, TerraFlow provides a common framework for atmospheric sensitivity analysis and gradient-based parameter estimation across two computational backends.

University of Science and Technology of China (CN), Chinese Academy of Sciences (CN), Institute of Atmospheric Physics (CN)
Meteorological Phenomena and Simulations
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon