<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "https://jats.nlm.nih.gov/nlm-dtd/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" specific-use="SMUR" dtd-version="3.0" xml:lang="en">
<front>
<journal-meta>
<journal-id journal-id-type="publisher">EGUsphere</journal-id>
<journal-title-group>
<journal-title>EGUsphere</journal-title>
<abbrev-journal-title abbrev-type="publisher">EGUsphere</abbrev-journal-title>
<abbrev-journal-title abbrev-type="nlm-ta">EGUsphere</abbrev-journal-title>
</journal-title-group>
<publisher><publisher-name>Copernicus Publications</publisher-name>
<publisher-loc>Göttingen, Germany</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.5194/egusphere-2026-7116</article-id>
<title-group>
<article-title>TerraFlow (version 1.0): a differentiable multi-backend nonhydrostatic atmospheric dynamical core on unstructured spherical meshes</article-title>
</title-group>
<contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Huang</surname>
<given-names>Tiange</given-names>
<ext-link>https://orcid.org/0009-0005-7527-7068</ext-link>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Dong</surname>
<given-names>Li</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Xiao</surname>
<given-names>Ziniu</given-names>
<ext-link>https://orcid.org/0000-0003-0509-5267</ext-link>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Pan</surname>
<given-names>Baoxiang</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Lu</surname>
<given-names>Gaopeng</given-names>
<ext-link>https://orcid.org/0000-0003-4523-0144</ext-link>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
</contrib>
</contrib-group><aff id="aff1">
<label>1</label>
<addr-line>School of Earth and Space Sciences, University of Science and Technology of China, Hefei 230026, China</addr-line>
</aff>
<aff id="aff2">
<label>2</label>
<addr-line>State Key Laboratory of Earth System Numerical Modelling and Application, Institute of Atmospheric Physics, Chinese Academy of Sciences, Beijing 100029, China</addr-line>
</aff>
<pub-date pub-type="epub">
<day>24</day>
<month>11</month>
<year>2026</year>
</pub-date>
<volume>2026</volume>
<fpage>1</fpage>
<lpage>40</lpage>
<permissions>
<copyright-statement>Copyright: &#x000a9; 2026 Tiange Huang et al.</copyright-statement>
<copyright-year>2026</copyright-year>
<license license-type="open-access">
<license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri"  xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p>
</license>
</permissions>
<self-uri xlink:href="https://egusphere.copernicus.org/preprints/2026/egusphere-2026-7116/">This article is available from https://egusphere.copernicus.org/preprints/2026/egusphere-2026-7116/</self-uri>
<self-uri xlink:href="https://egusphere.copernicus.org/preprints/2026/egusphere-2026-7116/egusphere-2026-7116.pdf">The full text article is available as a PDF file from https://egusphere.copernicus.org/preprints/2026/egusphere-2026-7116/egusphere-2026-7116.pdf</self-uri>
<abstract>
<p>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&apos;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&lt;sup&gt;&amp;minus;4&lt;/sup&gt; 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&amp;ndash;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.</p>
</abstract>
<counts><page-count count="40"/></counts>
</article-meta>
</front>
<body/>
<back>
</back>
</article>