<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0" article-type="research-article"><?xmltex \bartext{Development and technical paper}?>
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><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/gmd-16-2719-2023</article-id><title-group><article-title>Pace v0.2: a Python-based performance-portable <?xmltex \hack{\break}?>atmospheric model</article-title><alt-title>Pace</alt-title>
      </title-group><?xmltex \runningtitle{Pace}?><?xmltex \runningauthor{J.~Dahm~et~al.}?>
      <contrib-group>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>Dahm</surname><given-names>Johann</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>Davis</surname><given-names>Eddie</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>Deconinck</surname><given-names>Florian</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1 aff4">
          <name><surname>Elbert</surname><given-names>Oliver</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-5464-6366</ext-link></contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>George</surname><given-names>Rhea</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>McGibbon</surname><given-names>Jeremy</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>Wicky</surname><given-names>Tobias</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" equal-contrib="yes" corresp="no" rid="aff1">
          <name><surname>Wu</surname><given-names>Elynn</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Kung</surname><given-names>Christopher</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Ben-Nun</surname><given-names>Tal</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-3657-6568</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Harris</surname><given-names>Lucas</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-6072-8624</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Groner</surname><given-names>Linus</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff6">
          <name><surname>Fuhrer</surname><given-names>Oliver</given-names></name>
          <email>oliver.fuhrer@meteoswiss.ch</email>
        <ext-link>https://orcid.org/0000-0002-0682-1374</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Climate Modeling, Allen Institute for Artificial Intelligence, Seattle, WA, USA</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Global Modeling and Assimilation Office, Goddard Space Flight Center, NASA, Greenbelt, MD, USA</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Department of Computer Science, ETH Zurich, Zurich, Switzerland</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Weather and Climate Dynamics Division, Geophysical Fluid Dynamics Laboratory, NOAA, Princeton, NJ, USA</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>Swiss National Supercomputing Centre (CSCS), ETH Zurich, Lugano, Switzerland</institution>
        </aff>
        <aff id="aff6"><label>6</label><institution>Numerical Prediction, Federal Office of Meteorology and Climatology MeteoSwiss, Zurich, Switzerland</institution>
        </aff><author-comment content-type="econtrib"><p>These authors contributed equally to this work.</p></author-comment>
      </contrib-group>
      <author-notes><corresp id="corr1">Oliver Fuhrer (oliver.fuhrer@meteoswiss.ch)</corresp></author-notes><pub-date><day>17</day><month>May</month><year>2023</year></pub-date>
      
      <volume>16</volume>
      <issue>9</issue>
      <fpage>2719</fpage><lpage>2736</lpage>
      <history>
        <date date-type="received"><day>16</day><month>September</month><year>2022</year></date>
           <date date-type="accepted"><day>9</day><month>February</month><year>2023</year></date>
           <date date-type="rev-recd"><day>21</day><month>December</month><year>2022</year></date>
           <date date-type="rev-request"><day>28</day><month>September</month><year>2022</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2023 </copyright-statement>
        <copyright-year>2023</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://gmd.copernicus.org/articles/.html">This article is available from https://gmd.copernicus.org/articles/.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d1e230">Progress in leveraging current and emerging high-performance computing infrastructures using traditional weather and climate models has been
slow. This has become known more broadly as the software productivity gap.  With the end of Moore's law driving forward rapid specialization of
hardware architectures, building simulation codes on a low-level language with hardware-specific optimizations is a significant risk.  As a
solution, we present Pace, an implementation of the nonhydrostatic FV3 dynamical core and GFDL cloud microphysics scheme which is entirely
Python-based. In order to achieve high performance on a diverse set of hardware architectures, Pace is written using the GT4Py domain-specific
language.  We demonstrate that with this approach we can achieve portability and performance, while significantly improving the readability and
maintainability of the code as compared to the Fortran reference implementation. We show that Pace can run at scale on leadership-class
supercomputers and achieve performance speeds 3.5–4 times faster than the Fortran code on GPU-accelerated supercomputers.  Furthermore, we
demonstrate how a Python-based simulation code facilitates existing or enables entirely new use cases and workflows.  Pace demonstrates how a
high-level language can insulate us from disruptive changes, provide a more productive development environment, and facilitate the integration with
new technologies such as machine learning.</p>
  </abstract>
    
<funding-group>
<award-group id="gs1">
<funding-source>Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung</funding-source>
<award-id>185778</award-id>
</award-group>
</funding-group>
</article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e242">Current weather and climate models are written in low-level compiled languages such as Fortran for performance <xref ref-type="bibr" rid="bib1.bibx32" id="paren.1"/> and typically run
on high-performance computing (HPC) systems with CPUs. With the end of Moore's law <xref ref-type="bibr" rid="bib1.bibx39" id="paren.2"><named-content content-type="pre">e.g.,</named-content></xref>, HPC systems are increasingly relying on
specialized hardware architectures such as graphics processing units (GPUs) to increase throughput while maintaining a reasonable power envelope
<xref ref-type="bibr" rid="bib1.bibx38" id="paren.3"/>. This has led to a number of efforts to port existing weather and climate models to run on such heterogeneous architectures, for
example by adding OpenACC directives <xref ref-type="bibr" rid="bib1.bibx27 bib1.bibx14 bib1.bibx19" id="paren.4"/>. Today, there are a handful of successful productive deployments of
weather and climate models (e.g., COSMO, <xref ref-type="bibr" rid="bib1.bibx17" id="altparen.5"/>, and Model for Prediction Across Scales, MPAS) on GPU-accelerated supercomputers. But porting large code bases using compiler directives comes at a
price: the maintenance cost increases significantly due<?pagebreak page2720?> to more hardware-specific details being explicitly exposed in the user code and due to the
fact that conditional compilation increases code complexity and the likelihood of introducing errors. Also, optimizations often need to be tailored to a
hardware target, which may lead to code duplication and specialized implementations. As a result, community codes have been slow in their adoption of
novel and emerging hardware architectures, and increasingly complex code bases hinder their further development. The term <italic>software productivity gap</italic> has been coined to describe this situation <xref ref-type="bibr" rid="bib1.bibx28" id="paren.6"/>.</p>
      <p id="d1e269">Alternative approaches are being explored: the Simple Cloud-Resolving E3SM Atmosphere Model <xref ref-type="bibr" rid="bib1.bibx16" id="paren.7"/> is a global atmosphere model implemented in
C++ using the Kokkos library <xref ref-type="bibr" rid="bib1.bibx40" id="paren.8"/>, which provides abstractions for parallel execution and data management for a wide range of programming
models and target architectures using a technique called template meta-programming. LFRic, the next-generation weather and climate modeling system
being developed by the UK Met Office <xref ref-type="bibr" rid="bib1.bibx2" id="paren.9"/>, is implemented using a domain-specific language (DSL) embedded in Fortran and leverages a
domain-specific compiler named PSyclone to generate executable parallel code. While these approaches are very promising, they have currently not been
adopted more widely in the field of weather and climate science.</p>
      <p id="d1e281">A compelling alternative approach has been extremely successful in the trending field of machine learning: frameworks such as PyTorch <xref ref-type="bibr" rid="bib1.bibx36" id="paren.10"/>
and TensorFlow <xref ref-type="bibr" rid="bib1.bibx1" id="paren.11"/> have accelerated the rapid and broad adoption of machine learning methods. These frameworks allow
users to implement algorithms with an abstract high-level implementation in Python using a syntax which is reminiscent of doing computation using the
NumPy library <xref ref-type="bibr" rid="bib1.bibx20" id="paren.12"/>. Different back ends allow users to target a diverse set of hardware
architectures for efficient execution while retaining a high degree of programmer productivity. The approach has been shown to scale, and the
computational effort to train such models <xref ref-type="bibr" rid="bib1.bibx10" id="paren.13"><named-content content-type="pre">e.g.,</named-content></xref> is comparable in size to high-resolution weather and climate simulations.</p>
      <p id="d1e298">Aside from the model code itself, scientists developing and using compiled models have increasing needs to interface model code with scripting
languages online. The drastic increase in model resolution over the past decades has increased the need for online diagnostic calculations to avoid
slow I/O operations. It can also simplify development of machine learning parameterizations to be able to interface Python code with a compiled
model. This has motivated scientists to interface Python code with models online, for example by calling Python from Fortran
<xref ref-type="bibr" rid="bib1.bibx9 bib1.bibx34 bib1.bibx35" id="paren.14"/> and by wrapping Fortran models to be driven by Python
<xref ref-type="bibr" rid="bib1.bibx33 bib1.bibx41 bib1.bibx31" id="paren.15"/>.</p>
      <p id="d1e308">We present Pace, an open-source performance-portable implementation of the FV3 dynamical core <xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx22" id="paren.16"/> and GFDL microphysics
<xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx43" id="paren.17"/> written entirely in Python. Pace uses the GridTools for Python (GT4Py) DSL, which separates the definition of numerical
algorithms from the specific implementation for a given hardware architecture. Optimization details such as storage order, execution schedule,
placement of data in memory hierarchy, and loop bounds are not the responsibility of the domain scientist. This allows the use of a single unified and
concise code base across hardware back ends, which clearly presents numerical operators and executes efficiently. The same model code can be used for
applications in the classroom inside a Jupyter Notebook as well as deployment at scale on large high-performance computing systems. Using Python as
the host language enables highly productive model development, testing, and validation workflows. By having access to a large ecosystem of
well-maintained Python packages, entirely new workflows are enabled (see Sect. <xref ref-type="sec" rid="Ch1.S6.SS2"/>).</p>
      <p id="d1e319">The outline of the paper is as follows. We start in Sect. <xref ref-type="sec" rid="Ch1.S2"/> with an overview of the DSL structure before moving on to Pace itself
in Sect. <xref ref-type="sec" rid="Ch1.S3"/>. In Sect. <xref ref-type="sec" rid="Ch1.S4"/> we discuss the process of porting and validating the code from Fortran to Python in
detail. Section <xref ref-type="sec" rid="Ch1.S5"/> highlights the performance of Pace, and Sect. <xref ref-type="sec" rid="Ch1.S6"/> showcases important features of Pace,
especially use cases and the benefits of developing in Python. Section <xref ref-type="sec" rid="Ch1.S7"/> documents the limitation of Pace, and finally we
summarize in Sect. <xref ref-type="sec" rid="Ch1.S8"/>.</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Python-based DSL: separation of concerns</title>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>A modern DSL: requirements</title>
      <p id="d1e352">The software productivity gap problem can be described as an issue with the diverse set of skills required by climate modelers to implement a
production-grade climate and weather model, from discretizing the underlying physical equations all the way to the optimization details of a given
hardware architecture. This process can be roughly split in two:
<list list-type="order"><list-item>
      <p id="d1e357">climate and weather modeling – scientific motivation, algorithmic design, and numerical implementation;</p></list-item><list-item>
      <p id="d1e361">performance development – adapting the implementation to a set of given hardware architecture and optimization to reach a useful simulation time.</p></list-item></list></p>
      <p id="d1e364">There is overlap between these; some algorithmic designs are better suited to certain hardware architectures, and implementation details can be changed to
improve model speed, but this breakdown is a useful heuristic for the development of weather and climate models.</p>
      <p id="d1e367">The design of a modern domain-specific language needs to respond to both classes of users.  For climate modelers a DSL should
<list list-type="bullet"><list-item>
      <p id="d1e372">be easy to use, complete with debugging tools and simple methods to extracting scientific results;</p></list-item><list-item>
      <p id="d1e376">allow easy ways to implement new features and or ways to escape the DSL as new methods are developed;</p></list-item><list-item>
      <p id="d1e380">enable quick development round-trip;</p></list-item><list-item>
      <p id="d1e384">run with optimal performance;</p></list-item><list-item>
      <p id="d1e388">improve development by simplifying the implementation of common code patterns.</p></list-item></list></p>
      <p id="d1e391">For the performance developers it should
<list list-type="bullet"><list-item>
      <p id="d1e396">leverage a proven host language to strengthen basic development of a compiler tool chain and work on solid ground;</p></list-item><list-item>
      <p id="d1e400">build a maintainable and extensible set of compiler elements in order to keep up with novel and emerging hardware architectures;</p></list-item><list-item>
      <p id="d1e404">ensure the presence of a lower-level interface to perform generic or custom optimizations.</p></list-item></list></p>
      <p id="d1e408">Python stands as a good candidate language to host a DSL given its robustness, ease of use, wide adoption across a range of research and industry
groups, large ecosystem of pre-existing tools and packages, and capacity for introspection as an interpreted language. Furthermore, in the weather and
climate community Python has established itself as the lingua franca for analysis, visualization, and post-processing. But Python has serious
limitations in terms of execution performance: designed primarily as a scripting language, Python alone cannot achieve the performance required by
workloads running on large HPC systems.</p>
      <p id="d1e411">The solution is to escape Python at runtime and leverage compiled code. This is a technique already heavily used by frameworks such as Cython
<xref ref-type="bibr" rid="bib1.bibx5" id="paren.18"/> and Numba <xref ref-type="bibr" rid="bib1.bibx26" id="paren.19"/> <xref ref-type="bibr" rid="bib1.bibx4" id="paren.20"><named-content content-type="pre">see, e.g.,</named-content></xref>. The DSL compiler is responsible for translating and compiling (transpiling) code
written in Python into another, more performance-oriented language. The generated code can be tailored and optimized to a specified hardware target
via hardware-specific compiler back ends.</p>
</sec>
<?pagebreak page2721?><sec id="Ch1.S2.SS2">
  <label>2.2</label><title>Related work</title>
      <p id="d1e433">For this work we use the GT4Py DSL compiler because the DSL provides a single-source solution for portable performance with the correct abstractions
for weather and climate models. There are, however, other approaches using Python at different levels of abstraction that are worth discussing.</p>
      <p id="d1e436">Cython <xref ref-type="bibr" rid="bib1.bibx5" id="paren.21"/> is an optimizing static compiler based on Python and the Pyrex language. It is a powerful tool for accelerating Python code, but
it lacks the portability and high-level abstractions we seek.  Other packages provide portability but still lack the domain-level abstractions to
simplify the language for climate scientists. An example of such a package is Numba <xref ref-type="bibr" rid="bib1.bibx26" id="paren.22"/>, which is a just-in-time (JIT) compiler for Python
and NumPy code. JAX <xref ref-type="bibr" rid="bib1.bibx8" id="paren.23"/> similarly lacks the weather and climate abstractions we desire in the front-end DSL language but brings with
it convenient features such as adjoint capability. Other application-building frameworks such as Exasim <xref ref-type="bibr" rid="bib1.bibx42" id="paren.24"/>, FEniCS
<xref ref-type="bibr" rid="bib1.bibx3" id="paren.25"/>, and Dedalus <xref ref-type="bibr" rid="bib1.bibx11" id="paren.26"/> mostly operate on the partial-differential-equation (PDE) level, which allows for
more automated model development at the expense of flexibility in the discretization. In order to faithfully reproduce all aspects of the FV3
dynamical core and GFDL cloud microphysics, we required greater flexibility than these frameworks provided. Thus, the DSL we are targeting works at a
lower level on the mathematical representation after the PDE has been discretized.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1" specific-use="star"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Figure}?><label>Figure 1</label><caption><p id="d1e460">Workflow pipeline of GT4Py (left) and GT4Py combined with DaCe (right). User code is analyzed, optimized, and translated into hardware-target-specific optimized code. In the case of DaCe, the Python code in between GT4Py stencils (control flow) is also included in the translation. This can lead to significant performance improvements.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f01.png"/>

        </fig>

</sec>
<sec id="Ch1.S2.SS3">
  <label>2.3</label><title>GT4Py: a Python-based DSL</title>
      <p id="d1e477">Our implementation of the domain-specific language described above is called GridTools for Python, or GT4Py. Developed in partnership with the Swiss
National Supercomputing Centre (CSCS), it defines a DSL on top of Python. The code is analyzed and compiled into a C++ or CUDA executable that is
bound back to the original Python, creating a seamless experience for the modelers but enabling fast and optimized execution (Fig. <xref ref-type="fig" rid="Ch1.F1"/>). On
top of those performance back ends, GT4Py also provides a back end to generate NumPy code, which is useful for debugging and quick development as no
compilation is required. One GT4Py back end leverages the DaCe <xref ref-type="bibr" rid="bib1.bibx6" id="paren.27"/> framework to be able to also include regular Python code in between DSL
code in the translation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Figure}?><label>Figure 2</label><caption><p id="d1e487">Two typical computational patterns in weather and climate models: on the left is a horizontal stencil, and on the right is a vertical solver. Figure from <xref ref-type="bibr" rid="bib1.bibx7" id="text.28"/>.</p></caption>
          <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f02.png"/>

        </fig>

      <p id="d1e499">GT4Py operates through the use of stencils: inside a GT4Py stencil each grid cell in an array is modified according to neighboring cells based on a
fixed pattern. In numerical modeling of weather and climate two major computational patterns emerge due to the reliance on three-dimensional
structured or unstructured grids: computations with dependencies on the local horizontal neighborhood of a grid cell and vertical solvers with column
dependencies as shown in Fig. <xref ref-type="fig" rid="Ch1.F2"/>. These two stencil computational patterns therefore form the basis of GT4Py's design.</p><?xmltex \setfigures?><?xmltex \setlistings?><?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Listing}?><label>Listing 1</label><caption><p id="d1e508">An example stencil definition function that computes the kinetic energy on cell corners. The functions <monospace>advect_v_along_y</monospace>, <monospace>advect_u_along_x</monospace>, and <monospace>all_corners_ke</monospace> are defined  outside the stencil and the DSL compiler inlines the relevant code. FloatField and FloatFieldIJ are GT4Py-specific data types for three-dimensional and two-dimensional fields, respectively. FloatField is a type which is used to declare three-dimensional fields of configurable floating-point precision.</p></caption>
          <?xmltex \igopts{width=455.244094pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-l01.png"/>

        </fig>

      <?pagebreak page2722?><p id="d1e526">GT4Py stencils treat the horizontal dimensions differently from the vertical: they always execute in parallel over the entire horizontal domain. In
the vertical dimension the order of execution may be specified with the <monospace>computation</monospace> keyword, and the vertical range is set with
<monospace>interval</monospace>. A horizontal stencil can be written <monospace>with computation(PARALLEL)</monospace> to parallelize over the vertical domain as well if there
are no vertical loop-carried dependencies. A column-based stencil that calculates up or down the <inline-formula><mml:math id="M1" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> dimension, on the other hand, can be implemented
sequentially in <inline-formula><mml:math id="M2" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> <monospace>with computation(FORWARD)</monospace> or <monospace>BACKWARD</monospace>, respectively. Each stencil can also have multiple <monospace>computation</monospace> and
<monospace>interval</monospace> blocks for flow control. Because stencils are applied to each point in a 3D grid, all indexation within a stencil is relative to the
current computed grid point; i.e., <monospace>Array[0,0,0] - Array[1,0,0]</monospace> takes each array element and subtracts the array element immediately to its
right along the <inline-formula><mml:math id="M3" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. This method of indexing three-dimensional arrays allows the modelers to use the same indexing convention (I, J, K),
irrespective of the actual storage layout in memory.</p>
      <p id="d1e575">GT4Py also allows zero-cost function calls, enabling more readable and reusable code within models. Extents of the computation are automatically
determined by the DSL, including through these function calls. Figure <xref ref-type="fig" rid="Ch1.F3"/> shows an example stencil function that executes in parallel
over the entire vertical dimension. The domain of dependence for intermediate variables (<monospace>advected_u</monospace> and <monospace>advected_v</monospace>) is
automatically determined by GT4Py. In this example, the advection helper functions take a horizontal difference of the <monospace>u</monospace> and
<monospace>v</monospace> contravariant velocity components <monospace>ub_contra</monospace> and <monospace>vb_contra</monospace>, respectively. As a result, the interpolation function which
computes these values is applied on a larger domain than the final operation in the stencil.</p>
      <p id="d1e599">In order to implement the FV3 dynamical core we had to extend the stencil concept multiple times, enabling four- and two-dimensional arrays, loops over the
<inline-formula><mml:math id="M4" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> axis, and specialized handling of horizontal subdomains. Because GT4Py is written in Python, those extensions were easy to develop and they will
be discussed further in Sects. <xref ref-type="sec" rid="Ch1.S4"/> and <xref ref-type="sec" rid="Ch1.S5"/>.</p>
      <p id="d1e613">GT4Py is able to optimize the performance of stencils; however, some Python overhead remains in the code linking the stencil operations together. In
order to resolve this and optimize the entire Pace model we have incorporated DaCe <xref ref-type="bibr" rid="bib1.bibx6" id="paren.29"/> as a back end for Pace. Using this framework both GT4Py
stencils and raw Python code are exposed to optimization and transpilation to high-performance C++ or CUDA executables, removing all Python overhead
seamlessly for the modelers. Section <xref ref-type="sec" rid="Ch1.S5"/> contains more information on code optimizations, while <xref ref-type="bibr" rid="bib1.bibx7" id="text.30"/> details the performance
optimizations more thoroughly.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Pace</title>
      <p id="d1e633">Pace is a GT4Py implementation of the nonhydrostatic FV3 dynamical core and GFDL microphysics <xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx22 bib1.bibx12 bib1.bibx43" id="paren.31"/>. It is
based on the same version of the National<?pagebreak page2723?> Oceanic and Atmospheric Administration (NOAA) Unified Forecast System (UFS) model as <xref ref-type="bibr" rid="bib1.bibx31" id="text.32"/>, forked
from the UFS repository v1 in December 2019 <xref ref-type="bibr" rid="bib1.bibx43" id="paren.33"/>, and is nearly identical to the dynamical core used in SHiELD
<xref ref-type="bibr" rid="bib1.bibx21" id="paren.34"/>. At present Pace only supports nonhydrostatic, uniform-resolution simulations, with a
restricted set of subgrid reconstruction schemes (<monospace>hord</monospace> and <monospace>kord</monospace> values). Pace has the ability to read initial conditions generated
by the Fortran model and other saved outputs and can also generate initial conditions for analytic test cases. Currently Pace supports six-tile
gnomonic cubed-sphere grids and single-tile orthogonal, doubly periodic grids, though only at uniform resolution. Future development will enable
nested and stretched grids as described in <xref ref-type="bibr" rid="bib1.bibx23" id="text.35"/> and will integrate the rest of the physics parameterizations <xref ref-type="bibr" rid="bib1.bibx43" id="paren.36"/>. Pace is
MPI-enabled, allowing it to run in parallel, but can also run using a serial communicator, running each rank in serial and saving data files to
mock MPI communication.</p><?xmltex \setfigures?><?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Figure}?><label>Figure 3</label><caption><p id="d1e663">Internal structure of the Pace dynamical core. To reduce instabilities from the Lagrangian vertical coordinate the acoustic dynamics, tracer advection, and vertical remapping are sub-stepped, executing <inline-formula><mml:math id="M5" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> times during a model time step. The acoustic dynamics are additionally sub-stepped to ensure numerical stability with respect to sound waves.</p></caption>
        <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f03.png"/>

      </fig>

<sec id="Ch1.S3.SS1">
  <label>3.1</label><title>A modular model</title>
      <p id="d1e686">Pace is designed to be modular; each model component of Pace (e.g., dynamics, microphysics, utilities, DSL integration) exists as a separate
package. Computationally focused packages like the dynamics contain hierarchies of component modules (Fig. <xref ref-type="fig" rid="Ch1.F4"/>). These
components provide clear boundaries to document and change model behavior. For example, the horizontal transport scheme used by FV3
<xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx30" id="paren.37"/> takes any one-dimensional finite-volume subgrid reconstruction scheme satisfying certain numerical conditions and can
extend it to two dimensions. Within Pace, one-dimensional subgrid reconstruction code is contained in the XPPM and YPPM modules (X and Y piecewise
parabolic methods, respectively). These modules take in scalar grid-cell-mean values and Courant numbers (speed as a fraction of grid-cell width)
defined on transport interfaces and return the average value of the scalar within the section of grid cell to be advected through the cell
interface. The FiniteVolumeTransport class extends these one-dimensional subgrid reconstruction schemes to produce two-dimensional horizontal
fluxes. This allows a scientist to modify the behavior of the dynamics by replacing only the XPPM and YPPM components, for example with a cubic
reconstruction scheme or a subgrid reconstruction scheme based on machine learning.</p>
      <p id="d1e694">To maintain simplicity of the code and facilitate the separation of compile time and runtime, Pace uses a simple object-oriented framework that expresses
nearly all of the internal computational components as initializable functions, as shown in Listing <xref ref-type="fig" rid="Ch1.F5"/>. Each of these
functions is defined as a Python class with an initialization method and a call method. Initialization performs the necessary setup including memory
allocation and compilation of DSL code. Each component's initialization code defines the component's temporary variables, compiles or loads its
stencils, and recursively<?pagebreak page2724?> initializes subcomponents. Once initialized, the component may be called the same as any other Python function. This is
similar to Fortran model structures where computational code is paired with initialize and finalize subroutines.</p><?xmltex \setfigures?><?xmltex \setlistings?><?xmltex \floatpos{t}?><fig id="Ch1.F5" specific-use="star"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Listing}?><label>Listing 2</label><caption><p id="d1e702">A class that compiles and runs the stencil defined in Fig. <xref ref-type="fig" rid="Ch1.F3"/>. The <monospace>__init__</monospace> method initializes the <monospace>compute_kinetic_energy</monospace> stencil using the stencil definition function defined in Fig. <xref ref-type="fig" rid="Ch1.F3"/>, an output domain, and the constants used by the stencil, and the <monospace>__call__</monospace> method executes the stencil when the resulting object is invoked at runtime.</p></caption>
          <?xmltex \igopts{width=455.244094pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-l02.png"/>

        </fig>

      <p id="d1e725">Stencils are compiled when components are initialized, using only explicitly passed configuration data. Pace uses the factory pattern (through the
<monospace>stencil_factory</monospace> argument) to reduce compilation-specific logic as much as possible within computational components. The stencil factory
class implements the code responsible for allocating and compiling stencils, allowing model code to instead focus on computational motifs. In lines
8–18 of Listing <xref ref-type="fig" rid="Ch1.F5"/> we can see this factory at work compiling the <monospace>compute_kinetic_energy</monospace> stencil shown in
Fig. <xref ref-type="fig" rid="Ch1.F3"/>. The <monospace>from_dims_halo</monospace> method takes a stencil function and a set of dimensions (either cell centers or cell interfaces)
to execute over and returns a compiled stencil that writes its outputs over the compute domain, in this case on cell corners (x and y
interfaces). Output can be extended into the computational halos with an optional <monospace>compute_halos</monospace> argument indicating how many halo points to
write (not shown). We also see how compile-time constants are passed as <monospace>externals</monospace> to the compilation method. These constants can be set by
the model configuration, extracted from the domain decomposition, or passed as arguments to the initialization method, and they have the benefit of being
treated as compile-time constants. Because configuration settings such as domain-decomposition and namelist settings are now known at compile time,
they also provide further avenues for the DSL back end to optimize performance.</p>
      <p id="d1e748">The factory pattern used here is incredibly powerful when debugging the model. For example, if a model developer finds that at some point a variable
<monospace>air_pressure</monospace> used by many routines has gone negative in the model, that developer<?pagebreak page2725?> can temporarily insert code to immediately raise an
exception if <italic>any</italic> stencil writes a negative value to a variable named <monospace>air_pressure</monospace>. Or that model developer could alter every
stencil to write its inputs and outputs to a netCDF file when executed, while only having to modify the code used for the stencil factory.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title>Powerful testing</title>
      <p id="d1e769">The introspection power of Python is used to great effect in the testing code for Pace. For example, we would like to ensure that Python array
allocation only happens when initializing our model and not at all when it is called. To do this, we write a test which initializes the model and then
replaces the storage allocation routines of GT4Py with routines which raise an exception if called before finally calling the model. If any arrays
were allocated at call time, an exception would be raised and the test would fail.</p>
      <p id="d1e772">We also want to ensure that the Pace model components are not stateful. The dynamical core, for example, has many temporary storage arrays assigned to
it whose initial value should not matter when calling the model. However, a user could easily fail to initialize an array with zeros when they mean
to, causing a bug in the model. We have a test which calls the dynamical core with the same state either once or twice and compares the value of all
temporary data in the model between these two cases. It does this by dynamically crawling the Python object structure and comparing all array data. If
any data differ between those two cases, it not only tells us that there is a bug but also exactly which temporary field has a bug – the one which is
accessed first out of the ones which differ. Without such a test, it could take days, weeks, or months for a scientist to find the source of such an
error, assuming they notice the presence of the bug.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Porting the model</title>
      <p id="d1e784">Atmospheric models are large computational codes, making it difficult to determine the source of a bug given errors in model outputs. In order to port
FV3 and the physics parameterizations we first segment the Fortran code into smaller units of code which can be ported and tested
independently. Typically each unit encompasses a particular Fortran subroutine, but larger or more complicated subroutines may be broken down further
to ease validation. We use the Serialbox<?pagebreak page2726?> library to extract the inputs and outputs from each of these Fortran units. We place Serialbox compiler
directives before each unit of code to serialize the inputs to that unit, and we similarly insert directives after each unit to extract its outputs. For
a given test case we can then run the Fortran model to generate test data for that case and model configuration.</p><?xmltex \setfigures?><?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Figure}?><label>Figure 4</label><caption><p id="d1e789">Schematic of our porting strategy: we port small units of code, test that they validate against the original Fortran, and then assemble them into larger model components we then validate, building up to a full model port.</p></caption>
        <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f04.png"/>

      </fig>

      <p id="d1e798">GT4Py stencils calculate over 3D volumes, so in our porting process we initially wrote each individual stencil to replicate a Fortran “do loop” over the
<inline-formula><mml:math id="M6" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M7" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M8" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> spatial dimensions. A ported unit of code may use multiple stencils if there are computations over different horizontal domains or
to increase readability of the code. In order to minimize GPU kernel launches we subsequently merged stencils that executed over the same spatial
extents where possible.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7" specific-use="star"><?xmltex \currentcnt{5}?><?xmltex \def\figurename{Figure}?><label>Figure 5</label><caption><p id="d1e825">Example illustration of how horizontal regions in GT4Py can be used to specialize computations in certain sections of the computational domain: the first region assigns 1.0 to the first row of the array, the second region assigns 2.0 to the second row, and the third assigns 3.0 to the third row.</p></caption>
        <?xmltex \igopts{width=284.527559pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f05.png"/>

      </fig>

<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Extending the DSL</title>
      <p id="d1e841">In the process of writing Pace we needed to extend GT4Py in order to express the Fortran code in the DSL. FV3 discretizes the Earth into a gnomonic
cubed sphere <xref ref-type="bibr" rid="bib1.bibx37" id="paren.38"/>. GT4Py could only apply the same operations uniformly across the horizontal domain of a stencil. We added the ability
to execute code on stencil subdomains to the GT4Py DSL language in order to perform special handling required near the corners and edges of the
cubed-sphere tiles. Specifically, we included <monospace>horizontal</monospace> and <monospace>region</monospace> as stencil control keywords (similar to <monospace>computation</monospace> and
<monospace>interval</monospace>) as shown in Fig. <xref ref-type="fig" rid="Ch1.F7"/>. <monospace>with horizontal</monospace> specifies a horizontally restricted block of code, and <monospace>region</monospace>
specifies the extent of that subdomain through NumPy-like array slicing in the <inline-formula><mml:math id="M9" display="inline"><mml:mi>I</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M10" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula> dimensions. Though it does violate the GridTools concept of
a stencil, this allows us to fully port the dynamical core and combine stencils to reproduce a natural amount of Fortran code. This also has the
benefit of increasing the readability of the code: in Fortran the corner and edge computations are handled by the common pattern of if-conditionals
inside of nested “for loops”, while in Pace the horizontal regions are used almost exclusively for this purpose.</p>
      <p id="d1e882">Another example is in the vertical remapping component of the model. The FV3 dynamical core uses a Lagrangian vertical coordinate which is regularly
remapped to its original Eulerian grid using the piecewise parabolic method <xref ref-type="bibr" rid="bib1.bibx29" id="paren.39"/>. The remapping process requires a double <inline-formula><mml:math id="M11" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> loop over the
vertical dimension: an inner loop over the deformed vertical levels to sum their contributions to an Eulerian level and an outer loop over those
Eulerian levels. When we initially ported the remapping code GT4Py did not support “for loops” or “while loops” inside of stencils, so we
wrote the inner loop as a stencil over the deformed <inline-formula><mml:math id="M12" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> levels and the outer loop in plain Python. While this implementation worked algorithmically,
calling a stencil inside of a “for loop” has a large penalty in model speed due to the repeated kernel launches and the removal of the loop structure
from the DSL optimization path. To resolve this we added “while loops” to GT4Py stencils. This allows us to consolidate the remapping code into one
stencil over the Eulerian <inline-formula><mml:math id="M13" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> levels, remove the Python “for loop”, and expose the entire remapping scheme to the DSL compiler. This reduced the
runtime of the remapping step by over an order of magnitude.</p>
      <p id="d1e909">GT4Py is able to cover a large number of algorithmic motifs used in weather and climate models. This section illustrated two examples where the DSL has
been extended in order to express motifs which were present in FV3GFS. There is also an ongoing effort to extend GT4Py to unstructured grid
computations. Nevertheless, any DSL will naturally be restricted from covering some algorithmic motifs. For GT4Py these include reductions
(e.g., computing horizonal integrals over a field), interpolation (e.g., for multi-grid), and search patterns (e.g., looking for a neighboring grid cell
with certain properties). Whether these patterns should fall into the scope of the GT4Py DSL or another framework is a design decision, which can be
weighed for example against compiling these patterns with DaCe.</p>
</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Model validation</title>
      <p id="d1e920">Each unit of code is validated by running it with the input data serialized from runs of the Fortran model, and comparing the outputs of our code to
the serialized Fortran outputs. If a ported unit is particularly large (e.g., vertical remapping, grid generation) we serialize data from components of
the larger unit and test the equivalent Pace components to reduce the complexity of each test. We use two sets of initial atmospheric conditions as
our test cases, each with a corresponding configuration namelist. Our “standard” test case is generated from NCEP reanalysis data from
00:00:00Z on 1 August 2016 <xref ref-type="bibr" rid="bib1.bibx31" id="paren.40"><named-content content-type="pre">as in</named-content></xref>, and the other is the baroclinic
instability test case described in <xref ref-type="bibr" rid="bib1.bibx25" id="text.41"/>. Initial versions of the DSL code were tested on the standard case run on six MPI ranks (one per tile)
and a 12 by 12 horizontal grid on each tile face with 79 vertical levels. We also test with a 54-rank domain decomposition, as this gives each tile
face a rank for each corner and edge as well as a central rank with no edges. Our tests thus cover the range of edge and corner handling required of a
given rank from no corners or edges to all eight corners and edges.</p>
      <p id="d1e931">In many cases the Pace outputs can be brought near roundoff error to the Fortran outputs. However, there are some instances where changes to the order
of operations or the use of transcendental functions makes such reproducibility impossible, so we must choose a validation threshold for our code. We
do this by perturbing the inputs to the Fortran code by small, floating-point differences and comparing the outputs. This leads us to adopt relative
differences of <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">14</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> as our default validation threshold. If we find validation errors greater than our default, we test the components of the
offending code to see what operations introduce discrepancies between Pace and Fortran. Often these differences are due to errors<?pagebreak page2727?> introduced during
porting and we can reconcile Pace with the Fortran code. If these differences are instead due to algorithmic changes (reordering, etc.) we set the
error tolerance for that piece of code based on the underlying Fortran–Python difference. For example, in the vertical remapping scheme FV3 makes use
of multiple <monospace>goto</monospace> statements for its control flow. These are not available in GT4Py, and so some code has been rearranged to replicate the
original algorithm, introducing small deviations from the Fortran outputs.</p>
      <p id="d1e951">When we are confident that each component of the model accurately reproduces the Fortran version, we test larger combinations of these units to ensure
the implementation of these larger modules also matches Fortran, as illustrated in Fig. <xref ref-type="fig" rid="Ch1.F6"/>. For example, after validating the
cubic-spline vertical interpolation code and the code that calculates the contributions from deformed, Lagrangian pressure levels to the remapped
Eulerian levels, we then validate the code to vertically remap a single variable from Lagrangian to Eulerian pressure levels. When this code
validates, along with the tracer remapping, saturation adjustment, and moist potential temperature adjustment code, we can then validate the entire
vertical remapping scheme. In this way we hierarchically assemble and validate Pace against the Fortran code. These validation tests are incorporated
into our suite of continuous integration tests to ensure that future developments and code changes do not affect model validity.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8"><?xmltex \currentcnt{6}?><?xmltex \def\figurename{Figure}?><label>Figure 6</label><caption><p id="d1e959">Detail of 850 <inline-formula><mml:math id="M15" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">mbar</mml:mi></mml:mrow></mml:math></inline-formula> temperature of the baroclinic instability simulated with the Pace <bold>(a)</bold> and Fortran <bold>(b)</bold> dynamical cores on day 9 at 10 <inline-formula><mml:math id="M16" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> resolution. These results can be compared to Fig. 6 of <xref ref-type="bibr" rid="bib1.bibx25" id="text.42"/> and show how well our model replicates the original Fortran.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f06.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9" specific-use="star"><?xmltex \currentcnt{7}?><?xmltex \def\figurename{Figure}?><label>Figure 7</label><caption><p id="d1e995">The 850 <inline-formula><mml:math id="M17" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">mbar</mml:mi></mml:mrow></mml:math></inline-formula> temperature difference between Pace and baseline Fortran simulations of a baroclinic instability at 200 <inline-formula><mml:math id="M18" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> resolution after 1, 3, 6, and 9 model days, showing a good match between the two models.</p></caption>
          <?xmltex \igopts{width=426.791339pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f07.png"/>

        </fig>

      <?pagebreak page2728?><p id="d1e1020">Once the full Pace dynamical core passes these unit tests, we run the <xref ref-type="bibr" rid="bib1.bibx25" id="text.43"/> baroclinic instability test case for 9 model days and compare the
results against the same test run in Fortran. In this test case, the dynamical core is initialized with zonally symmetric steady-state winds, on top
of which a Gaussian perturbation of the zonal wind is superimposed in the northern mid-latitudes, triggering the evolution of a baroclinic wave. In
Fig. <xref ref-type="fig" rid="Ch1.F8"/> we show the region of interest in a 10 <inline-formula><mml:math id="M19" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> resolution simulation (960 <inline-formula><mml:math id="M20" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 960 <inline-formula><mml:math id="M21" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 80 grid cells
per tile, run on 150 MPI ranks) of the same instability from Pace and the reference Fortran model. We see that the model behavior is consistent with
the reference Fortran model and replicates the results from the highest horizontal resolution in <xref ref-type="bibr" rid="bib1.bibx25" id="text.44"/> well. Figure <xref ref-type="fig" rid="Ch1.F9"/> shows
the difference in 850 <inline-formula><mml:math id="M22" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">mbar</mml:mi></mml:mrow></mml:math></inline-formula> temperature between Pace and Fortran running the test case at 200 <inline-formula><mml:math id="M23" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> (48 <inline-formula><mml:math id="M24" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 48 <inline-formula><mml:math id="M25" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 80 grid
cells per tile) resolution. Both models were run with six MPI ranks. The Pace dycore matches the Fortran code closely early on, with random errors on
the order of <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">11</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> after 3 model days of integration. Due to the nature of the baroclinic instability these small errors do eventually grow
to the order of <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> after 9 simulation days (3888 time steps), but even on day 6 the errors are only on the order of <inline-formula><mml:math id="M28" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. Based on these
results we are confident that Pace accurately reproduces the Fortran model code.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10"><?xmltex \currentcnt{8}?><?xmltex \def\figurename{Figure}?><label>Figure 8</label><caption><p id="d1e1131">Weak-scaling analysis from <xref ref-type="bibr" rid="bib1.bibx7" id="text.45"/>: execution time for one invocation of the dynamical core (see Fig. <xref ref-type="fig" rid="Ch1.F4"/>) is shown as a function of an increasing number of compute nodes (each with one GPU). In this setup Pace is run with one MPI rank per node, while the Fortran code is run with six MPI ranks per node and four threads per rank. In this weak-scaling experiment, the number of grid points per GPU are kept constant at 192 <inline-formula><mml:math id="M29" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 192 <inline-formula><mml:math id="M30" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 79. As more nodes are added, the resolution of these global simulations increases. The average grid spacing is indicated in text, and a maximum of 4 <inline-formula><mml:math id="M31" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> is achieved when running on 864 nodes.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f08.png"/>

        </fig>

      <p id="d1e1167">Pace has only been validated using double-precision floating-point arithmetic and values. All performance results shown in the next section have been
measured using double precision.</p>
</sec>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Model performance</title>
      <p id="d1e1180">All experiments were conducted on the Piz Daint supercomputer at CSCS.  Piz Daint contains 5704 Cray XC50 nodes, with an Intel Xeon E5-2690 v3 12-core
CPU, one NVIDIA Tesla P100 GPU (16 <inline-formula><mml:math id="M32" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">GB</mml:mi></mml:mrow></mml:math></inline-formula> RAM), and 64 <inline-formula><mml:math id="M33" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">GB</mml:mi></mml:mrow></mml:math></inline-formula> of host RAM on each node.  The nodes are connected via the Cray Aries
interconnect.  We are using Python 3.8.2 with Pace revision 0.2.  The generated code was compiled with CUDA 11.2 and GCC 9.3.0.  To expose the full
node architecture to the DSL optimization scheme we run Pace with one MPI rank per node for both CPU and GPU back ends.  The reference Fortran model
was compiled with Intel IFORT version 19.1.3.304.  We run the Fortran code in its optimal configuration of six ranks per node and four threads per rank,
fully utilizing all 24 virtual cores available with hyperthreading.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11"><?xmltex \currentcnt{9}?><?xmltex \def\figurename{Figure}?><label>Figure 9</label><caption><p id="d1e1201">Dynamical core runtime for varying domain sizes, expanded from Table <xref ref-type="table" rid="Ch1.T1"/>. The time measurements indicate the execution time of one invocation of the dynamical core (see Fig. <xref ref-type="fig" rid="Ch1.F4"/>).</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f09.png"/>

      </fig>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><?xmltex \currentcnt{1}?><label>Table 1</label><caption><p id="d1e1217">Performance metrics comparing the Pace dynamical core with the Fortran reference code. The size (in number of grid points) of each face (tile) of the cubed sphere grid is increased from row to row. Each of the configurations is run on six compute nodes, one compute node per face of the cubed-sphere grid. Essentially this corresponds to global simulations of decreasing grid spacing of 96, 72, and 48 <inline-formula><mml:math id="M34" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula>, respectively. The time measurements are the execution time of one invocation of the dynamical core (see Fig. <xref ref-type="fig" rid="Ch1.F4"/>).</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="10">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right" colsep="1"/>
     <oasis:colspec colnum="5" colname="col5" align="center"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:colspec colnum="7" colname="col7" align="center" colsep="1"/>
     <oasis:colspec colnum="8" colname="col8" align="center"/>
     <oasis:colspec colnum="9" colname="col9" align="right"/>
     <oasis:colspec colnum="10" colname="col10" align="center"/>
     <oasis:thead>
       <oasis:row>
         <oasis:entry colname="col1">Tile size</oasis:entry>
         <oasis:entry colname="col2">Scaling</oasis:entry>
         <oasis:entry rowsep="1" namest="col3" nameend="col4" align="center" colsep="1">Fortran </oasis:entry>
         <oasis:entry rowsep="1" namest="col5" nameend="col7" colsep="1">Pace CPU </oasis:entry>
         <oasis:entry rowsep="1" namest="col8" nameend="col10">Pace GPU </oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3">Time [<inline-formula><mml:math id="M35" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:math></inline-formula>]</oasis:entry>
         <oasis:entry colname="col4">Scaling</oasis:entry>
         <oasis:entry colname="col5">Time [<inline-formula><mml:math id="M36" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:math></inline-formula>]</oasis:entry>
         <oasis:entry colname="col6">Scaling</oasis:entry>
         <oasis:entry colname="col7">Speedup</oasis:entry>
         <oasis:entry colname="col8">Time [<inline-formula><mml:math id="M37" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:math></inline-formula>]</oasis:entry>
         <oasis:entry colname="col9">Scaling</oasis:entry>
         <oasis:entry colname="col10">Speedup</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">108 <inline-formula><mml:math id="M38" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 108 <inline-formula><mml:math id="M39" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 80</oasis:entry>
         <oasis:entry colname="col2">–</oasis:entry>
         <oasis:entry colname="col3">3.58</oasis:entry>
         <oasis:entry colname="col4">–</oasis:entry>
         <oasis:entry colname="col5">16.00</oasis:entry>
         <oasis:entry colname="col6">–</oasis:entry>
         <oasis:entry colname="col7">0.22</oasis:entry>
         <oasis:entry colname="col8">1.98</oasis:entry>
         <oasis:entry colname="col9">–</oasis:entry>
         <oasis:entry colname="col10">1.81</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">128 <inline-formula><mml:math id="M40" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 128 <inline-formula><mml:math id="M41" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 80</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M42" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 1.40</oasis:entry>
         <oasis:entry colname="col3">4.66</oasis:entry>
         <oasis:entry colname="col4">1.30</oasis:entry>
         <oasis:entry colname="col5">22.25</oasis:entry>
         <oasis:entry colname="col6">1.39</oasis:entry>
         <oasis:entry colname="col7">0.21</oasis:entry>
         <oasis:entry colname="col8">2.34</oasis:entry>
         <oasis:entry colname="col9">1.18</oasis:entry>
         <oasis:entry colname="col10">1.99</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">192 <inline-formula><mml:math id="M43" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 192 <inline-formula><mml:math id="M44" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 80</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M45" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 2.25</oasis:entry>
         <oasis:entry colname="col3">12.74</oasis:entry>
         <oasis:entry colname="col4">3.56</oasis:entry>
         <oasis:entry colname="col5">48.07</oasis:entry>
         <oasis:entry colname="col6">3.00</oasis:entry>
         <oasis:entry colname="col7">0.27</oasis:entry>
         <oasis:entry colname="col8">3.98</oasis:entry>
         <oasis:entry colname="col9">2.01</oasis:entry>
         <oasis:entry colname="col10">3.20</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{1}?></table-wrap>

      <p id="d1e1494">Table <xref ref-type="table" rid="Ch1.T1"/> shows our model performance and strong scaling results, comparing the absolute runtime of the Pace dynamical core on both
CPU and GPU architectures with the original Fortran implementation. Figure <xref ref-type="fig" rid="Ch1.F11"/> presents these data graphically. We show our weak-scaling results in Fig. <xref ref-type="fig" rid="Ch1.F10"/>. The microphysics implementation in Pace takes a negligible amount of time (<inline-formula><mml:math id="M46" display="inline"><mml:mo lspace="0mm">≲</mml:mo></mml:math></inline-formula> 1 %), so we
focus our discussion on the dynamical core.</p>
      <p id="d1e1510">Our weak-scaling results (Fig. <xref ref-type="fig" rid="Ch1.F10"/>) demonstrate a speedup of 3.6<inline-formula><mml:math id="M47" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> against Fortran that is nearly constant across simulation
scales. The slight decrease in runtime at higher scales is due to the heavier computational load on the limited case of six MPI ranks; when running on
six MPI ranks (one rank per tile face) FV3's corner and edge handling has to be computed on every rank, while at higher scales that computational load
is better spread across MPI ranks. Section <xref ref-type="sec" rid="Ch1.S5.SS3"/> discusses this in more detail.  Overall we see that Pace exhibits perfect weak scaling,
which validates the capacity of a GPU-running model to simulate at kilometer-scale resolutions in an efficient way.</p>
      <p id="d1e1524">Since we observe perfect weak scalability, meaning an increase in compute nodes working on a problem does not affect the total time, we can determine
that the total time only scales with the work per node.  Since the work is increasing linearly with the number of grid points per node, we show a
detailed analysis of the scalability of Pace with varying work per node.</p>
      <p id="d1e1527">The domain size scaling experiments shown in Fig. <xref ref-type="fig" rid="Ch1.F11"/> show increasing performance gains on GPU as larger domains are simulated on
each compute node. This is expected, as GPUs are well fitted to high domain sizes since they are capable of higher throughput than CPUs when optimized
accordingly.  As is well known and described for example in <xref ref-type="bibr" rid="bib1.bibx17" id="text.46"/>, offloading computation to GPUs comes with a non-insignificant startup cost
that only starts to pay off if enough work is done on accelerators. Pace is no exception to this rule. We can see a regime where not enough work is
done to justify the startup cost.</p>
      <p id="d1e1535">A detailed view of the scaling numbers for the most relevant region is summarized in Table <xref ref-type="table" rid="Ch1.T1"/>.  When we maximize the amount of data
on each node – shortly before we run out of memory on the GPU – Pace achieves a speedup of 3.2<inline-formula><mml:math id="M48" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> in comparison to Fortran. The CPU version, on
the other hand, is 0.2<inline-formula><mml:math id="M49" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> the speed of the Fortran code. This is due to a combination of two factors:
<list list-type="bullet"><list-item>
      <?pagebreak page2729?><p id="d1e1556">the Fortran model we ported is itself highly optimized for CPU;</p></list-item><list-item>
      <p id="d1e1560">the optimization effort was geared toward demonstrating the viability of the Python DSL for GPU usage.</p></list-item></list></p>
      <p id="d1e1563">Despite focusing on GPU optimization, some of the optimization methods also improved CPU performance, and the functional CPU back end does demonstrate
portability. While outside the scope of this paper, work to improve CPU performance is now underway.</p>
      <p id="d1e1567">Model performance is a core motivation for GPU acceleration and for adopting a DSL, and it is encouraging to see a significant speedup between
Pace GPU and Fortran versions. While the CPU performance has not been our focus to date, it is the next priority for Pace development.  We discuss our
optimization strategies and explain how model performance influenced our decision process in porting the model in the following subsections.  More
detailed performance results and a thorough analysis are available in <xref ref-type="bibr" rid="bib1.bibx7" id="text.47"/>. The version of the model code and supporting framework for
<xref ref-type="bibr" rid="bib1.bibx7" id="text.48"/> is slightly earlier, hence a slight difference in absolute numbers, but the methodology remains the same.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>Optimizations</title>
      <p id="d1e1583">Because GT4Py has multiple back ends for various target architectures there is no one performance number that captures the entirety of our
approach. Nonetheless, the aggregate<?pagebreak page2730?> performance across back ends indicates the power of the DSL paradigm through performance portability.  With the
capability of code generating for specific hardware targets, we are not limited to single, catch-all solutions in our user-facing code. Instead we can
generate optimized code for each type of hardware individually through back-end logic, allowing user code to focus on numerical details.  As an
example, on CPU architectures it usually pays off to use coarse-grained parallelism such that threads are assigned to different subdomains, while on
GPUs the parallelization strategy involves having blocks of threads execute subdomains.</p>
      <p id="d1e1586">Weather and climate models are written with large configuration files, namelists, to allow for flexible use.  In order to support all the possible
configurations, standard models use many conditionals that can not be resolved at compile time, such as which subgrid reconstruction to use for tracer
advection. This limits how aggressively the low-level compiler can optimize the model.  Code generation from a DSL allows us to generate code and
compile the model for a specific namelist configuration to circumvent this problem.</p>
      <p id="d1e1589">Furthermore the DSL compiler is able to apply domain-specific optimizations under certain conditions on a per-stencil level before generating code at
all. These include the following.
<list list-type="order"><list-item>
      <p id="d1e1594"><italic>Reduce main memory accesses.</italic> Replace 3D temporary fields used for intermediate results that are stored in global memory with smaller
buffers that allow for more reuse and faster access.</p></list-item><list-item>
      <p id="d1e1600"><italic>Inlining.</italic> Fully inline both function calls as well as nested conditionals, replacing function calls and branching conditionals with the
relevant code at compile time and removing the performance overhead of these code patterns.</p></list-item><list-item>
      <p id="d1e1606"><italic>Pruning.</italic> Analyze the code based on all the compile-time constants provided and prune unreachable branches of code.</p></list-item><list-item>
      <p id="d1e1612"><italic>Fusion.</italic> Fuse numerical operators defined in separate functions and contexts into single kernel calls, as long as that does not create
race conditions. This optimizes performance by reducing the amount of synchronization needed as well as giving the underlying general purpose
compiler more flexibility.</p></list-item></list></p>
</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>DaCe</title>
      <p id="d1e1625">In order to achieve good performance in a Python-driven environment it is crucial to minimize the overhead moving from the driver language to the
compiled language executable.  Since our implementation of the model is a series of compiled stencils called from Python, the performance overhead
linked to calling the compiled stencils from Python scales with the number of stencils called.  A secondary issue is that with the fragmentation into
individual stencils we limit the optimization potential of the DSL, as it is limited to the scope of a single stencil for the optimizations described
above.</p>
      <p id="d1e1628">We leverage DaCe <xref ref-type="bibr" rid="bib1.bibx6" id="paren.49"/> to address those shortcomings, providing a full-program optimization framework.  With our DaCe back end in GT4Py we are
able to compile the entire loop over time steps into a single executable called from Python, thus completely removing all Python to C call overhead
during our simulation.  With DaCe as our back end we are able to leverage custom optimization for our code, including improving the computational
layout, improving where and how memory allocation happens,<?pagebreak page2731?> scheduling computation to improve parallelism as well as increasing data locality, and
improving the pressure on global memory.  A detailed explanation of our approach and how it affected performance can be found in <xref ref-type="bibr" rid="bib1.bibx7" id="text.50"/>.</p>
</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Corner and edge handling</title>
      <p id="d1e1645">As discussed in Sect. <xref ref-type="sec" rid="Ch1.S4.SS1"/>, the cubed-sphere discretization of FV3 <xref ref-type="bibr" rid="bib1.bibx37" id="paren.51"/> requires special finite-difference stencils
applied near edges and corners to account for the grid geometry. We added the ability to execute stencils on horizontal subdomains to enable these
motifs in GT4Py, which unfortunately has negative performance implications for Pace.</p>
      <p id="d1e1653">FV3 parallelized the vertical plane K instead of the horizontal IJ ones. Flipping this order of parallelization increases the parallelism manyfold,
which is necessary for high throughput on GPUs and other massively parallel architectures.  FV3 parallelizes in this way because it is advantageous
for their target architectures, which are CPUs with branch prediction and large caches.  On CPU architectures instruction divergence inside the tight
loops due to FV3's corner and edge handling is not an issue, but there is a limit to what can be done in a single-instruction, multiple-data (SIMD) GPU
kernel.  Because of their data dependencies these corner and edge operations cannot be executed in parallel with the rest of the code, requiring a
separate kernel launch for each of them. This breaks what could be one large and optimized stencil into separate stencils separated by such corner
calculations, though there are certain conditions under which we can fuse these operations into the same kernel.</p>
      <p id="d1e1656">This example shows how algorithmic choices have large impacts on performance.  The choice of specialized corner and edge handling made for FV3 fits a
CPU architecture well but is suboptimal for GPU architectures.  Changes to the algorithm can be made to alleviate this problem, such as a duo-grid
approach demonstrated in <xref ref-type="bibr" rid="bib1.bibx13" id="text.52"/>.  Since Pace is intended to be a one-to-one port of FV3 in its current state, this is not a development we are
focused on at the moment, though it could be a fruitful direction for other DSL models.</p>
</sec>
</sec>
<sec id="Ch1.S6">
  <label>6</label><title>Pace in action</title>
<sec id="Ch1.S6.SS1">
  <label>6.1</label><title>Driving the model</title>
      <p id="d1e1678">The driver code in Listing <xref ref-type="fig" rid="Ch1.F12"/> showcases the power of Python as an API language for configuring, compiling, and running computational
codes. The <monospace>command_line</monospace> entry function reads all information needed to run the model from disk and directly defines the behavior of the
driver class. Within the driver class (not shown), the dynamical core and physics components only have access to the configuration and variables they use,
which makes it much easier for a new developer of the model to understand what the code does. This is true all the way down through its components, as
described in Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>.</p><?xmltex \setfigures?><?xmltex \setlistings?><?xmltex \floatpos{t}?><fig id="Ch1.F12" specific-use="star"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Listing}?><label>Listing 3</label><caption><p id="d1e1691">The driver function to run Pace from the command line. The <monospace>command_line</monospace> function is able to gather the configuration and set logging behavior and run the model.</p></caption>
          <?xmltex \igopts{width=455.244094pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-l03.png"/>

        </fig>

      <p id="d1e1703">This example also showcases the advantage of working in a widely used language with a vibrant open-source package ecosystem. Python has powerful tools
available for defining command-line interfaces. Taking a yaml configuration file and mapping it onto a nested configuration class is as simple as
using pyyaml and dacite, which provide this functionality. Python's built-in datetime and timedelta types make it easy to manage model execution time,
and external packages such as cftime provide support for a wide range of calendars. Diagnostics storage makes use of the xarray and zarr packages to
greatly simplify the code we need to write. This well-established ecosystem of tools maintained by scientists and engineers from a range of
disciplines and sectors is incredibly helpful when developing an atmospheric model.</p>
      <p id="d1e1707">And in turn, having a model written in Python means the tools we have written can be used by anyone who uses the language. This is particularly
important given the popularity of Python as a language for scientific analysis. When processing the output of Pace, a scientist has direct access to
the tools and numerical code used by the model itself.</p>
</sec>
<sec id="Ch1.S6.SS2">
  <label>6.2</label><title>Use cases</title>
      <p id="d1e1718">One of the advantages of Python is the ecosystem surrounding it. For example, packages such as NumPy and SciPy make it easy to perform common
mathematical and numerical operations and manipulate data; Matplotlib enables interactive visualization and creates static or animated images; a Jupyter
Notebook allows users to create and share their computational documents; TensorFlow provides end-to-end libraries for machine learning and artificial
intelligence applications. With Pace, we can leverage all these tools to make running, processing, and visualizing climate model output all in one
Python script.</p>
      <p id="d1e1721">Pace also enables novel workflows through the use of Jupyter Notebooks.  The Pace repository contains an example notebook running one component of
Pace.  We first initialize a cubed-sphere grid and an idealized atmospheric state, and then we run the tracer advection operation and visualize the
results. In this case the analytic zonal wind profile should advect the tracer mass once around the Earth in 12 model days, and any deviation from
this indicates a problem with the advection code. This workflow is meant to mimic how a model developer could develop, implement, and debug a new
advection scheme. We take advantage of the fact that each component in Pace is modular and skip over running the entire model, which enables rapid
prototyping without leaving the Python ecosystem. Beyond development, this capability is useful for teaching, allowing students to inspect elements of
the model individually.</p><?xmltex \setfigures?><?xmltex \setlistings?><?xmltex \floatpos{t}?><fig id="Ch1.F13" specific-use="star"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Listing}?><label>Listing 4</label><caption><p id="d1e1727">Pseudo-code outlining how a machine-learned microphysics emulation scheme could be incorporated as a model component in Pace.</p></caption>
          <?xmltex \igopts{width=455.244094pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-l04.png"/>

        </fig>

      <p id="d1e1737">Another benefit of Pace is that it facilitates incorporating novel applications and approaches into the model, such as machine learning
emulation. Oftentimes machine learning in<?pagebreak page2732?> climate models requires complicated workflows such as calling Fortran from Python <xref ref-type="bibr" rid="bib1.bibx31" id="paren.53"/> or calling
Python from Fortran. Because Pace is written in Python, we can train and execute an machine learning (ML) model directly, bypassing difficult infrastructure to pass
variables between languages. In Listing <xref ref-type="fig" rid="Ch1.F13"/> we show Pace's ability to replace a stencil-based microphysics scheme with a
pre-trained TensorFlow-based microphysics emulator. Taking advantage of the modularity and separation of initialization and call time of the
individual module, we simply load the TensorFlow model during the initialization of the Physics class and replace the call signature of
microphysics. Figure <xref ref-type="fig" rid="Ch1.F14"/> shows an example of the emulator applied to the baroclinic instability test case.</p><?xmltex \setfigures?><?xmltex \floatpos{t}?><fig id="Ch1.F14"><?xmltex \currentcnt{10}?><?xmltex \def\figurename{Figure}?><label>Figure 10</label><caption><p id="d1e1749">Microphysics emulation results: liquid water column sum of a baroclinic instability simulation on day 10 at 200 <inline-formula><mml:math id="M50" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> resolution.</p></caption>
          <?xmltex \igopts{width=170.716535pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/2719/2023/gmd-16-2719-2023-f10.png"/>

        </fig>

</sec>
</sec>
<?pagebreak page2733?><sec id="Ch1.S7">
  <label>7</label><title>Limitations</title>
      <p id="d1e1775">Our research has focused on porting a subset of NOAA's FV3GFS model so as to limit the porting effort and focus on framework development. In
particular, the nesting capabilities of FV3 were not ported. Likewise, we forked the model code early in the project and did not pull any updates
added to the original Fortran code by NOAA's team. Despite this limiting choice, we believe the two namelist configurations we ported cover a wide
range of applications to show that any model code can be effectively ported.</p>
      <p id="d1e1778">While this paper presents our port of the dynamical core and microphysics, we are actively working on integrating and validating GT4Py ports of the
full GFS physics suite. Our results integrating the GFDL microphysics scheme <xref ref-type="bibr" rid="bib1.bibx12" id="paren.54"/> into Pace not only show validation and
competitive performance, but also demonstrate the feasibility of implementing physics parameterizations using the same strategy deployed for the
dynamical core. We have written GT4Py implementations of the remaining physics schemes (PBL, turbulence, shallow convection, sea ice, land surface,
and radiation), and work is ongoing to optimize and integrate them into the Pace model.</p>
      <p id="d1e1784">Only the baroclinic wave test case was tested at the larger 150-rank configuration described in Sect. <xref ref-type="sec" rid="Ch1.S4.SS2"/>. A subset of an earlier
version of the code was run on 2400 GPU nodes <xref ref-type="bibr" rid="bib1.bibx7" id="paren.55"/> before achieving full validation, alleviating concerns about distributed performance.</p>
      <p id="d1e1792">Lastly, as explained in Sect. <xref ref-type="sec" rid="Ch1.S5"/>, we have only focused on GPU performance optimization thus far, leaving CPU performance
suboptimal. We are confident that CPU optimization is achievable within the boundary of the current framework and only requires careful engineering.</p>
</sec>
<sec id="Ch1.S8" sec-type="conclusions">
  <label>8</label><title>Conclusions</title>
      <p id="d1e1805">We have presented Pace, an open-source performance-portable implementation of the FV3 dynamical core and GFDL cloud microphysics written in Python
using the GT4Py domain-specific language. The DSL implementation allows Pace to run on both CPU and GPU architectures, where it achieves high
performance. The use of Python as a front-end language lets us write Pace in a modular, productive style and gives us access to Python's powerful
testing tools, which allows us to debug and validate Pace.</p>
      <p id="d1e1808">We have demonstrated our method of porting code from Fortran to Python, building Pace hierarchically from small units of ported code that validate
regularly against their Fortran equivalents.  Fully porting Pace was a combination of porting the code to the DSL and extending the DSL to cover new
algorithmic motifs required by the model, such as “while loops” inside stencils and allowing computations to occur on horizontal subdomains. Our testing
strategy ensures that our code remains equivalent to the Fortran model throughout our development, including front-end and back-end changes. Our
approach can be adopted to reimplementing other model codes and provides a good template for porting weather and climate models between languages.</p>
      <p id="d1e1811">We have shown the performance implications of the DSL design and implementation, leading to a <inline-formula><mml:math id="M51" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">3.3</mml:mn><mml:mo>×</mml:mo></mml:mrow></mml:math></inline-formula> speedup for Pace's GPU back end over the
Fortran reference. One advantage of Python is the blending of compile time and runtime allows us to compile the model for a specific runtime
configuration. Increasing the amount of code exposed to the DSL compiler had a strong impact on our model performance and drove us to adopt DaCe to
leverage full-program optimizations. Algorithmic changes such as the duo-grid implementation can drive further optimization.</p>
      <p id="d1e1826">Pace takes great advantage of the Python ecosystem. Pace has full access to Python packages such as NumPy <xref ref-type="bibr" rid="bib1.bibx20" id="paren.56"/> and Matplotlib <xref ref-type="bibr" rid="bib1.bibx24" id="paren.57"/>. We can run the model, or just a model component, in a Jupyter Notebook, opening new avenues
for model exploration and debugging. The Python front end also allows Pace to easily incorporate and couple to machine-learned model components, such
as physics parameterizations. We have also illustrated the relative ease of debugging Pace, both through Python's developer tools and through the
ability to implement novel tests like subtracting two dycores to determine whether temporary variables are properly reset between time steps.</p>
      <p id="d1e1836">As supercomputer heterogeneity increases, Pace stands as both a useful atmospheric model and a strong proof of concept for the DSL approach to
performance portability. We have shown the advantages of an atmospheric model written in a high-level language such as Python, with further
development still to come. We hope to see this approach adopted more broadly in the modeling community.</p>
</sec>

      
      </body>
    <back><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d1e1843">Code releases for Pace <xref ref-type="bibr" rid="bib1.bibx18" id="paren.58"><named-content content-type="post"><ext-link xlink:href="https://doi.org/10.5281/zenodo.7464843" ext-link-type="DOI">10.5281/zenodo.7464843</ext-link></named-content></xref> and GT4Py <xref ref-type="bibr" rid="bib1.bibx15" id="paren.59"><named-content content-type="post"><ext-link xlink:href="https://doi.org/10.5281/zenodo.7080260" ext-link-type="DOI">10.5281/zenodo.7080260</ext-link></named-content></xref> are available on Zenodo.</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e1861">JD, ED, FD, OE, RG, JM, TW, and EW: equal contributions to methodology, software, validation, and writing. CK: software and validation. TBN and LG: methodology, software, and validation. LH: validation, writing, and supervision. OF: conceptualization, methodology, writing, project administration, supervision, and funding acquisition.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e1867">The contact author has declared that none of the authors has any competing interests.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <?pagebreak page2734?><p id="d1e1874">Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e1880">We acknowledge the contributions of Mark Cheeseman, Yannick Niedermayr, and Mikael Stellio to the Pace code base, domain partitioning code, and the port of the microphysics, respectively. We thank Rusty Benson (NOAA/GFDL) for insightful discussions. Further, we acknowledge contributions from the whole GT4Py team, specifically Hannes Vogt (CSCS) and Enrique Gonzalez (CSCS), for their help in implementing a validating version of FV3 using GT4Py. We also thank two anonymous reviewers for their constructive suggestions.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e1885">This work was supported by a grant from the Swiss National Supercomputing Centre (CSCS) under project ID s1053. We thank Vulcan Inc., the Allen Institute for Artificial Intelligence (AI2), the Geophysical Fluid Dynamics Laboratory (GFDL) of NOAA, and the Global Modeling and Assimilation Office (GMAO) of NASA for supporting this work. Tal Ben-Nun is supported by the Swiss National Science Foundation (Ambizione project no. 185778).</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e1891">This paper was edited by Travis O'Brien and reviewed by two anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><?xmltex \def\ref@label{{Abadi et~al.(2015)Abadi, Agarwal, Barham, Brevdo, Chen, Citro, Corrado, Davis, Dean, Devin, Ghemawat, Goodfellow, Harp, Irving, Isard, Jia, Jozefowicz, Kaiser, Kudlur, Levenberg, Man\'{e}, Monga, Moore, Murray, Olah, Schuster, Shlens, Steiner, Sutskever, Talwar, Tucker, Vanhoucke, Vasudevan, Vi\'{e}gas, Vinyals, Warden, Wattenberg, Wicke, Yu, and Zheng}}?><label>Abadi et al.(2015)Abadi, Agarwal, Barham, Brevdo, Chen, Citro, Corrado, Davis, Dean, Devin, Ghemawat, Goodfellow, Harp, Irving, Isard, Jia, Jozefowicz, Kaiser, Kudlur, Levenberg, Mané, Monga, Moore, Murray, Olah, Schuster, Shlens, Steiner, Sutskever, Talwar, Tucker, Vanhoucke, Vasudevan, Viégas, Vinyals, Warden, Wattenberg, Wicke, Yu, and Zheng</label><?label tensorflow2015-whitepaper?><mixed-citation>Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., and Zheng, X.:
TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems, Zenodo [software], <ext-link xlink:href="https://doi.org/10.5281/zenodo.4724125" ext-link-type="DOI">10.5281/zenodo.4724125</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Adams et~al.(2019)Adams, Ford, Hambley, Hobson, Kav\v{c}i\v{c}, Maynard, Melvin, M\"{u}ller, Mullerworth, Porter, Rezny, Shipway, and Wong}}?><label>Adams et al.(2019)Adams, Ford, Hambley, Hobson, Kavčič, Maynard, Melvin, Müller, Mullerworth, Porter, Rezny, Shipway, and Wong</label><?label LFRIC?><mixed-citation>Adams, S., Ford, R., Hambley, M., Hobson, J., Kavčič, I., Maynard, C., Melvin, T., Müller, E., Mullerworth, S., Porter, A., Rezny, M., Shipway, B., and Wong, R.:
LFRic: Meeting the challenges of scalability and performance portability in Weather and Climate models, J. Parallel Distr. Com., 132, 383–396, <ext-link xlink:href="https://doi.org/10.1016/j.jpdc.2019.02.007" ext-link-type="DOI">10.1016/j.jpdc.2019.02.007</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx3"><?xmltex \def\ref@label{{Alnaes et~al.(2015)Alnaes, Blechta, Hake, Johansson, Kehlet, Logg, Richardson, Ring, and Rognes}}?><label>Alnaes et al.(2015)Alnaes, Blechta, Hake, Johansson, Kehlet, Logg, Richardson, Ring, and Rognes</label><?label Fenics2015?><mixed-citation>Alnaes, M. S., Blechta, J., Hake, J., Johansson, A., Kehlet, B., Logg, A., Richardson, C., Ring, J., and Rognes, M. E., and Wells, G. N.:
The FEniCS Project Version 1.5, Archive of Numerical Software [software], <ext-link xlink:href="https://doi.org/10.11588/ans.2015.100.20553" ext-link-type="DOI">10.11588/ans.2015.100.20553</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx4"><?xmltex \def\ref@label{{Augier et~al.(2021)Augier, Bolz-Tereick, Guelton, and Mohanan}}?><label>Augier et al.(2021)Augier, Bolz-Tereick, Guelton, and Mohanan</label><?label Augier21?><mixed-citation>Augier, P., Bolz-Tereick, C. F., Guelton, S., and Mohanan, A. V.:
Reducing the ecological impact of computing through education and Python compilers, Nature Astronomy, 5, 334–335, <ext-link xlink:href="https://doi.org/10.1038/s41550-021-01342-y" ext-link-type="DOI">10.1038/s41550-021-01342-y</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx5"><?xmltex \def\ref@label{{Behnel et~al.(2011)Behnel, Bradshaw, Citro, Dalcin, Seljebotn, and Smith}}?><label>Behnel et al.(2011)Behnel, Bradshaw, Citro, Dalcin, Seljebotn, and Smith</label><?label Cython?><mixed-citation>Behnel, S., Bradshaw, R., Citro, C., Dalcin, L., Seljebotn, D. S., and Smith, K.:
Cython: The Best of Both Worlds, Comput. Sci. Eng., 13, 31–39, <ext-link xlink:href="https://doi.org/10.1109/MCSE.2010.118" ext-link-type="DOI">10.1109/MCSE.2010.118</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx6"><?xmltex \def\ref@label{{Ben-Nun et~al.(2019)Ben-Nun, de~Fine~Licht, Ziogas, Schneider, and Hoefler}}?><label>Ben-Nun et al.(2019)Ben-Nun, de Fine Licht, Ziogas, Schneider, and Hoefler</label><?label DaCe?><mixed-citation>Ben-Nun, T., de Fine Licht, J., Ziogas, A. N., Schneider, T., and Hoefler, T.:
Stateful Dataflow Multigraphs: A Data-Centric Model for Performance Portability on Heterogeneous Architectures, in: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC '19, Association for Computing Machinery, New York, NY, USA, November 2019, 81, 1–14, <ext-link xlink:href="https://doi.org/10.1145/3295500.3356173" ext-link-type="DOI">10.1145/3295500.3356173</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx7"><?xmltex \def\ref@label{{Ben-Nun et~al.(2022)Ben-Nun, Groner, Deconinck, Wicky, Davis, Dahm, Elbert, George, McGibbon, Tr\"{u}mper, Wu, Fuhrer, Schulthess, and Hoefler}}?><label>Ben-Nun et al.(2022)Ben-Nun, Groner, Deconinck, Wicky, Davis, Dahm, Elbert, George, McGibbon, Trümper, Wu, Fuhrer, Schulthess, and Hoefler</label><?label SC22?><mixed-citation>Ben-Nun, T., Groner, L., Deconinck, F., Wicky, T., Davis, E., Dahm, J., Elbert, O. D., George, R., McGibbon, J., Trümper, L., Wu, E., Fuhrer, O., Schulthess, T., and Hoefler, T.:
Productive Performance Engineering for Weather and Climate Modeling with Python, arXiv, <ext-link xlink:href="https://doi.org/10.48550/ARXIV.2205.04148" ext-link-type="DOI">10.48550/ARXIV.2205.04148</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx8"><?xmltex \def\ref@label{{Bradbury et~al.(2018)Bradbury, Frostig, Hawkins, Johnson, Leary, Maclaurin, Necula, Paszke, Vander{P}las, Wanderman-{M}ilne, and Zhang}}?><label>Bradbury et al.(2018)Bradbury, Frostig, Hawkins, Johnson, Leary, Maclaurin, Necula, Paszke, VanderPlas, Wanderman-Milne, and Zhang</label><?label jax2018github?><mixed-citation>Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q.:
JAX: composable transformations of Python+NumPy programs, <uri>http://github.com/google/jax</uri> (last access: September 2022), 2018.</mixed-citation></ref>
      <ref id="bib1.bibx9"><?xmltex \def\ref@label{{Brenowitz and Bretherton(2019)}}?><label>Brenowitz and Bretherton(2019)</label><?label Brenowitz2019-js?><mixed-citation>
Brenowitz, N. D. and Bretherton, C. S.:
Spatially extended tests of a neural network parametrization trained by coarse-graining, J. Adv. Model. Earth Sy., 11, 2728–2744, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx10"><?xmltex \def\ref@label{{Brown et~al.(2020)Brown, Mann, Ryder, Subbiah, Kaplan, Dhariwal, Neelakantan, Shyam, Sastry, Askell, Agarwal, Herbert-Voss, Krueger, Henighan, Child, Ramesh, Ziegler, Wu, Winter, Hesse, Chen, Sigler, Litwin, Gray, Chess, Clark, Berner, McCandlish, Radford, Sutskever, and Amodei}}?><label>Brown et al.(2020)Brown, Mann, Ryder, Subbiah, Kaplan, Dhariwal, Neelakantan, Shyam, Sastry, Askell, Agarwal, Herbert-Voss, Krueger, Henighan, Child, Ramesh, Ziegler, Wu, Winter, Hesse, Chen, Sigler, Litwin, Gray, Chess, Clark, Berner, McCandlish, Radford, Sutskever, and Amodei</label><?label GPT3?><mixed-citation>Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D.:
Language Models are Few-Shot Learners, in: Advances in Neural Information Processing Systems, edited by: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H., vol. 33, pp. 1877–1901, Curran Associates, Inc., <ext-link xlink:href="https://doi.org/10.48550/arXiv.2005.14165" ext-link-type="DOI">10.48550/arXiv.2005.14165</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx11"><?xmltex \def\ref@label{{Burns et~al.(2020)Burns, Vasil, Oishi, Lecoanet, and Brown}}?><label>Burns et al.(2020)Burns, Vasil, Oishi, Lecoanet, and Brown</label><?label PhysRevResearch.2.023068?><mixed-citation>Burns, K. J., Vasil, G. M., Oishi, J. S., Lecoanet, D., and Brown, B. P.:
Dedalus: A flexible framework for numerical simulations with spectral methods, Phys. Rev. Research, 2, 023068, <ext-link xlink:href="https://doi.org/10.1103/PhysRevResearch.2.023068" ext-link-type="DOI">10.1103/PhysRevResearch.2.023068</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx12"><?xmltex \def\ref@label{{Chen and Lin(2013)}}?><label>Chen and Lin(2013)</label><?label Chen2013-ip?><mixed-citation>Chen, J.-H. and Lin, S.-J.:
Seasonal predictions of tropical cyclones using a 25-<inline-formula><mml:math id="M52" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula>-resolution general circulation model, J. Climate, 26, 380–398, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx13"><?xmltex \def\ref@label{{Chen(2021)}}?><label>Chen(2021)</label><?label Chen21?><mixed-citation>Chen, X.:
The LMARS Based Shallow-Water Dynamical Core on Generic Gnomonic Cubed-Sphere Geometry, J. Adv. Model. Earth Sy., 13, e2020MS002280, <ext-link xlink:href="https://doi.org/10.1029/2020MS002280" ext-link-type="DOI">10.1029/2020MS002280</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx14"><?xmltex \def\ref@label{{Clement et~al.(2019)Clement, Marti, Lapillonne, Fuhrer, and Sawyer}}?><label>Clement et al.(2019)Clement, Marti, Lapillonne, Fuhrer, and Sawyer</label><?label Clement19?><mixed-citation>Clement, V., Marti, P., Lapillonne, X., Fuhrer, O., and Sawyer, W.:
Automatic Port to OpenACC/OpenMP for Physical Parameterization in Climate and Weather Code Using the CLAW Compiler, Supercomputing Frontiers and Innovations, 6, 51–63, <ext-link xlink:href="https://doi.org/10.14529/jsfi190303" ext-link-type="DOI">10.14529/jsfi190303</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx15"><?xmltex \def\ref@label{{Dahm et~al.(2022)Dahm, Groner, Paredes, Thaler, Vogt, Davis, Haeuselmann, Ehrengruber, Ubbiali, Wicky, Deconinck, Ben-Nun, and George}}?><label>Dahm et al.(2022)Dahm, Groner, Paredes, Thaler, Vogt, Davis, Haeuselmann, Ehrengruber, Ubbiali, Wicky, Deconinck, Ben-Nun, and George</label><?label gt4py_zenodo?><mixed-citation>Dahm, J., Groner, L., Paredes, E. G., Thaler, F., Vogt, H., Davis, E., Haeuselmann, R., Ehrengruber, T., Ubbiali, S., Wicky, T., Deconinck, F., Ben-Nun, T., and George, R.:
ai2cm/gt4py: v0.1.0 GMD release, Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/zenodo.7080260" ext-link-type="DOI">10.5281/zenodo.7080260</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx16"><?xmltex \def\ref@label{{E3SM~Project(2021)}}?><label>E3SM Project(2021)</label><?label SCREAM?><mixed-citation>E3SM Project, DOE:
Energy Exascale Earth System Model v2.0, Computer Software, GitHub [software], <ext-link xlink:href="https://doi.org/10.11578/E3SM/dc.20210927.1" ext-link-type="DOI">10.11578/E3SM/dc.20210927.1</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx17"><?xmltex \def\ref@label{{Fuhrer et~al.(2018)Fuhrer, Chadha, Hoefler, Kwasniewski, Lapillonne, Leutwyler, L\"{u}thi, Osuna, Sch\"{a}r, Schulthess, and Vogt}}?><label>Fuhrer et al.(2018)Fuhrer, Chadha, Hoefler, Kwasniewski, Lapillonne, Leutwyler, Lüthi, Osun<?pagebreak page2735?>a, Schär, Schulthess, and Vogt</label><?label COSMO?><mixed-citation>Fuhrer, O., Chadha, T., Hoefler, T., Kwasniewski, G., Lapillonne, X., Leutwyler, D., Lüthi, D., Osuna, C., Schär, C., Schulthess, T. C., and Vogt, H.:
Near-global climate simulation at 1 <inline-formula><mml:math id="M53" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula> resolution: establishing a performance baseline on 4888 GPUs with COSMO 5.0, Geosci. Model Dev., 11, 1665–1681, <ext-link xlink:href="https://doi.org/10.5194/gmd-11-1665-2018" ext-link-type="DOI">10.5194/gmd-11-1665-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx18"><?xmltex \def\ref@label{{George et~al.(2022)George, Wu, McGibbon, Dahm, Davis, Wicky, Deconinck, Kung, Fuhrer, Elbert, Savarin, Brenowitz, Cheeseman, Henn, Clark, and Niedermayr}}?><label>George et al.(2022)George, Wu, McGibbon, Dahm, Davis, Wicky, Deconinck, Kung, Fuhrer, Elbert, Savarin, Brenowitz, Cheeseman, Henn, Clark, and Niedermayr</label><?label pace_zenodo?><mixed-citation>George, R., Wu, E., McGibbon, J., Dahm, J., Davis, E., Wicky, T., Deconinck, F., Kung, C., Fuhrer, O., Elbert, O., Savarin, A., Brenowitz, N. D., Cheeseman, M., Henn, B., Clark, S., and Niedermayr, Y.:
ai2cm/pace: v0.2.0, Zenodo [code and data set], <ext-link xlink:href="https://doi.org/10.5281/zenodo.7464843" ext-link-type="DOI">10.5281/zenodo.7464843</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{{Giorgetta et~al.(2022)Giorgetta, Sawyer, Lapillonne, Adamidis, Alexeev, Cl\'{e}ment, Dietlicher, Engels, Esch, Franke, Frauen, Hannah, Hillman, Kornblueh, Marti, Norman, Pincus, Rast, Reinert, Schnur, Schulzweida, and Stevens}}?><label>Giorgetta et al.(2022)Giorgetta, Sawyer, Lapillonne, Adamidis, Alexeev, Clément, Dietlicher, Engels, Esch, Franke, Frauen, Hannah, Hillman, Kornblueh, Marti, Norman, Pincus, Rast, Reinert, Schnur, Schulzweida, and Stevens</label><?label Giorgetta22?><mixed-citation>Giorgetta, M. A., Sawyer, W., Lapillonne, X., Adamidis, P., Alexeev, D., Clément, V., Dietlicher, R., Engels, J. F., Esch, M., Franke, H., Frauen, C., Hannah, W. M., Hillman, B. R., Kornblueh, L., Marti, P., Norman, M. R., Pincus, R., Rast, S., Reinert, D., Schnur, R., Schulzweida, U., and Stevens, B.: The ICON-A model for direct QBO simulations on GPUs (version icon-cscs:baf28a514), Geosci. Model Dev., 15, 6985–7016, <ext-link xlink:href="https://doi.org/10.5194/gmd-15-6985-2022" ext-link-type="DOI">10.5194/gmd-15-6985-2022</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx20"><?xmltex \def\ref@label{{C.~R.~Harris et~al.(2020)Harris, Millman, van~der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del R{\'{i}}o, Wiebe, Peterson, G{\'{e}}rard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant}}?><label>C. R. Harris et al.(2020)Harris, Millman, van der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del Río, Wiebe, Peterson, Gérard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant</label><?label Numpy?><mixed-citation>Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M. H., Brett, M., Haldane, A., del Río, J. F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.:
Array programming with NumPy, Nature, 585, 357–362, <ext-link xlink:href="https://doi.org/10.1038/s41586-020-2649-2" ext-link-type="DOI">10.1038/s41586-020-2649-2</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx21"><?xmltex \def\ref@label{{L.~Harris et~al.(2020)Harris, Zhou, Lin, Chen, Chen, Gao, Morin, Rees, Sun, Tong, Xiang, Bender, Benson, Cheng, Clark, Elbert, Hazelton, Huff, Kaltenbaugh, Liang, Marchok, Shin, and Stern}}?><label>L. Harris et al.(2020)Harris, Zhou, Lin, Chen, Chen, Gao, Morin, Rees, Sun, Tong, Xiang, Bender, Benson, Cheng, Clark, Elbert, Hazelton, Huff, Kaltenbaugh, Liang, Marchok, Shin, and Stern</label><?label SHiELD?><mixed-citation>Harris, L., Zhou, L., Lin, S.-J., Chen, J.-H., Chen, X., Gao, K., Morin, M., Rees, S., Sun, Y., Tong, M., Xiang, B., Bender, M., Benson, R., Cheng, K.-Y., Clark, S., Elbert, O. D., Hazelton, A., Huff, J. J., Kaltenbaugh, A., Liang, Z., Marchok, T., Shin, H. H., and Stern, W.:
GFDL SHiELD: A Unified System for Weather-to-Seasonal Prediction, J. Adv. Model. Earth Sy., 12, e2020MS002223, <ext-link xlink:href="https://doi.org/10.1029/2020MS002223" ext-link-type="DOI">10.1029/2020MS002223</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx22"><?xmltex \def\ref@label{{Harris et~al.(2021)Harris, Chen, Putman, Zhou, and Chen}}?><label>Harris et al.(2021)Harris, Chen, Putman, Zhou, and Chen</label><?label FV3doc?><mixed-citation>Harris, L., Chen, X., Putman, W., Zhou, L., and Chen, J.-H.:
A Scientific Description of the GFDL Finite-Volume Cubed-Sphere Dynamical Core, technical Memorandum, <uri>https://repository.library.noaa.gov/view/noaa/30725</uri> (last access: September 2022), 2021.</mixed-citation></ref>
      <ref id="bib1.bibx23"><?xmltex \def\ref@label{{Harris and Lin(2013)}}?><label>Harris and Lin(2013)</label><?label Harris13?><mixed-citation>Harris, L. M. and Lin, S.-J.:
A Two-Way Nested Global-Regional Dynamical Core on the Cubed-Sphere Grid, Mon. Weather Rev., 141, 283–306, <ext-link xlink:href="https://doi.org/10.1175/MWR-D-11-00201.1" ext-link-type="DOI">10.1175/MWR-D-11-00201.1</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx24"><?xmltex \def\ref@label{{Hunter(2007)}}?><label>Hunter(2007)</label><?label Matplotlib?><mixed-citation>Hunter, J. D.:
Matplotlib: A 2D graphics environment, Comput. Sci. Eng., 9, 90–95, <ext-link xlink:href="https://doi.org/10.1109/MCSE.2007.55" ext-link-type="DOI">10.1109/MCSE.2007.55</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx25"><?xmltex \def\ref@label{{Jablonowski and Williamson(2006)}}?><label>Jablonowski and Williamson(2006)</label><?label JW06?><mixed-citation>Jablonowski, C. and Williamson, D. L.:
A baroclinic instability test case for atmospheric model dynamical cores, Q. J. Roy. Meteor. Soc., 132, 2943–2975, <ext-link xlink:href="https://doi.org/10.1256/qj.06.12" ext-link-type="DOI">10.1256/qj.06.12</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx26"><?xmltex \def\ref@label{{Lam et~al.(2015)Lam, Pitrou, and Seibert}}?><label>Lam et al.(2015)Lam, Pitrou, and Seibert</label><?label Numba?><mixed-citation>Lam, S. K., Pitrou, A., and Seibert, S.:
Numba: A LLVM-Based Python JIT Compiler, in: Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, LLVM '15, Association for Computing Machinery, New York, NY, USA, November 2015, 7, 1–6,  <ext-link xlink:href="https://doi.org/10.1145/2833157.2833162" ext-link-type="DOI">10.1145/2833157.2833162</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx27"><?xmltex \def\ref@label{{Lapillonne et~al.(2017)Lapillonne, Osterried, and Fuhrer}}?><label>Lapillonne et al.(2017)Lapillonne, Osterried, and Fuhrer</label><?label Lapillonne17?><mixed-citation>Lapillonne, X., Osterried, K., and Fuhrer, O.:
Chapter 13 – Using OpenACC to port large legacy climate and weather modeling code to GPUs, in: Parallel Programming with OpenACC, edited by: Farber, R., pp. 267–290, Morgan Kaufmann, Boston, <ext-link xlink:href="https://doi.org/10.1016/B978-0-12-410397-9.00013-5" ext-link-type="DOI">10.1016/B978-0-12-410397-9.00013-5</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx28"><?xmltex \def\ref@label{{Lawrence et~al.(2018)Lawrence, Rezny, Budich, Bauer, Behrens, Carter, Deconinck, Ford, Maynard, Mullerworth, Osuna, Porter, Serradell, Valcke, Wedi, and Wilson}}?><label>Lawrence et al.(2018)Lawrence, Rezny, Budich, Bauer, Behrens, Carter, Deconinck, Ford, Maynard, Mullerworth, Osuna, Porter, Serradell, Valcke, Wedi, and Wilson</label><?label gmd-11-1799-2018?><mixed-citation>Lawrence, B. N., Rezny, M., Budich, R., Bauer, P., Behrens, J., Carter, M., Deconinck, W., Ford, R., Maynard, C., Mullerworth, S., Osuna, C., Porter, A., Serradell, K., Valcke, S., Wedi, N., and Wilson, S.:
Crossing the chasm: how to develop weather and climate models for next generation computers?, Geosci. Model Dev., 11, 1799–1821, <ext-link xlink:href="https://doi.org/10.5194/gmd-11-1799-2018" ext-link-type="DOI">10.5194/gmd-11-1799-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx29"><?xmltex \def\ref@label{{Lin(2004)}}?><label>Lin(2004)</label><?label Lin04?><mixed-citation>Lin, S.-J.:
A “Vertically Lagrangian” Finite-Volume Dynamical Core for Global Models, Mon. Weather Rev., 132, 2293–2307, <ext-link xlink:href="https://doi.org/10.1175/1520-0493(2004)132&lt;2293:AVLFDC&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0493(2004)132&lt;2293:AVLFDC&gt;2.0.CO;2</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx30"><?xmltex \def\ref@label{{Lin and Rood(1996)}}?><label>Lin and Rood(1996)</label><?label Lin1996?><mixed-citation>Lin, S.-J. and Rood, R. B.:
Multidimensional Flux-Form Semi-Lagrangian Transport Schemes, Mon. Weather Rev., 124, 2046–2070, <ext-link xlink:href="https://doi.org/10.1175/1520-0493(1996)124&lt;2046:mffslt&gt;2.0.co;2" ext-link-type="DOI">10.1175/1520-0493(1996)124&lt;2046:mffslt&gt;2.0.co;2</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx31"><?xmltex \def\ref@label{{McGibbon et~al.(2021)McGibbon, Brenowitz, Cheeseman, Clark, Dahm, Davis, Elbert, George, Harris, Henn, Kwa, Perkins, Watt-Meyer, Wicky, Bretherton, and Fuhrer}}?><label>McGibbon et al.(2021)McGibbon, Brenowitz, Cheeseman, Clark, Dahm, Davis, Elbert, George, Harris, Henn, Kwa, Perkins, Watt-Meyer, Wicky, Bretherton, and Fuhrer</label><?label wrapper?><mixed-citation>McGibbon, J., Brenowitz, N. D., Cheeseman, M., Clark, S. K., Dahm, J. P. S., Davis, E. C., Elbert, O. D., George, R. C., Harris, L. M., Henn, B., Kwa, A., Perkins, W. A., Watt-Meyer, O., Wicky, T. F., Bretherton, C. S., and Fuhrer, O.:
fv3gfs-wrapper: a Python wrapper of the FV3GFS atmospheric model, Geosci. Model Dev., 14, 4401–4409, <ext-link xlink:href="https://doi.org/10.5194/gmd-14-4401-2021" ext-link-type="DOI">10.5194/gmd-14-4401-2021</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx32"><?xmltex \def\ref@label{{M\'{e}ndez et~al.(2014)M\'{e}ndez, Tinetti, and Overbey}}?><label>Méndez et al.(2014)Méndez, Tinetti, and Overbey</label><?label Mendez2014?><mixed-citation>Méndez, M., Tinetti, F. G., and Overbey, J. L.:
Climate Models: Challenges for Fortran Development Tools, in: 2014 Second International Workshop on Software Engineering for High Performance Computing in Computational Science and Engineering, New Orleans, LA, USA, 21 November 2014,  6–12, <ext-link xlink:href="https://doi.org/10.1109/SE-HPCCSE.2014.7" ext-link-type="DOI">10.1109/SE-HPCCSE.2014.7</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx33"><?xmltex \def\ref@label{{Monteiro et~al.(2018)Monteiro, McGibbon, and Caballero}}?><label>Monteiro et al.(2018)Monteiro, McGibbon, and Caballero</label><?label Monteiro2018-ot?><mixed-citation>Monteiro, J. M., McGibbon, J., and Caballero, R.:
sympl (v. 0.4.0) and climt (v. 0.15.3) – towards a flexible framework for building model hierarchies in Python, Geosci. Model Dev., 11, 3781–3794, <ext-link xlink:href="https://doi.org/10.5194/gmd-11-3781-2018" ext-link-type="DOI">10.5194/gmd-11-3781-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{{Partee et~al.(2021{\natexlab{a}})Partee, Ellis, Rigazzi, Bachman, Marques, and Shao}}?><label>Partee et al.(2021a)Partee, Ellis, Rigazzi, Bachman, Marques, and Shao</label><?label Partee2021-ia?><mixed-citation>Partee, S., Ellis, M., Rigazzi, A., Bachman, S., Marques, G., and Shao, A.: SmartSim: Online Analytics and Machine Learning for HPC Simulations, Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/zenodo.4986182" ext-link-type="DOI">10.5281/zenodo.4986182</ext-link>, 2021a.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{Partee et~al.(2021{\natexlab{b}})Partee, Ellis, Rigazzi, Bachman, Marques, Shao, and Robbins}}?><label>Partee et al.(2021b)Partee, Ellis, Rigazzi, Bachman, Marques, Shao, and Robbins</label><?label Partee2021-ar?><mixed-citation>Partee, S., Ellis, M., Rigazzi, A., Bachman, S., Marques, G., Shao, A., and Robbins, B.:
Using Machine Learning at Scale in HPC Simulations with SmartSim: An Application to Ocean Climate Modeling, arXiv, <ext-link xlink:href="https://doi.org/10.48550/ARXIV.2104.09355" ext-link-type="DOI">10.48550/ARXIV.2104.09355</ext-link>, 2021b.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{{Paszke et~al.(2019)Paszke, Gross, Massa, Lerer, Bradbury, Chanan, Killeen, Lin, Gimelshein, Antiga, Desmaison, Kopf, Yang, DeVito, Raison, Tejani, Chilamkurthy, Steiner, Fang, Bai, and Chintala}}?><label>Paszke et al.(2019)Paszke, Gross, Massa, Lerer, Bradbury, Chanan, Killeen, Lin, Gimelshein, Antiga, Desmaison, Kopf, Yang, DeVito, Raison, Tejani, Chilamkurthy, Steiner, Fang, Bai, and Chintala</label><?label PyTorch?><mixed-citation>Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S.:
PyTorch: An Imperative Style, High-Performance Deep Learning Library, in: Advances in Neural Information Processing Systems 32, edited by: Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., Curran Associates, Inc., <ext-link xlink:href="https://doi.org/10.48550/arXiv.1912.01703" ext-link-type="DOI">10.48550/arXiv.1912.01703</ext-link>, pp. 8024–8035, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx37"><?xmltex \def\ref@label{{Putman and Lin(2007)}}?><label>Putman and Lin(2007)</label><?label Putman2007?><mixed-citation>Putman, W. M. and Lin, S.-J.:
Finite-volume transport on various cubed-sphere grids, J. Comput. Phys., 227, 55–78, <ext-link xlink:href="https://doi.org/10.1016/j.jcp.2007.07.022" ext-link-type="DOI">10.1016/j.jcp.2007.07.022</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx38"><?xmltex \def\ref@label{{Strohmaier et~al.(2015)Strohmaier, Meuer, Dongarra, and Simon}}?><label>Strohmaier et al.(2015)Strohmaier, Meuer, Dongarra, and Simon</label><?label Strohmaier15?><mixed-citation>Strohmaier, E., Meuer, H. W., Dongarra, J., and Simon, H. D.:
The TOP500 List and Progress in High-Performance Computing, Computer, 48, 42–49, <ext-link xlink:href="https://doi.org/10.1109/MC.2015.338" ext-link-type="DOI">10.1109/MC.2015.338</ext-link>, 2015.</mixed-citation></ref>
      <?pagebreak page2736?><ref id="bib1.bibx39"><?xmltex \def\ref@label{{Theis and Wong(2017)}}?><label>Theis and Wong(2017)</label><?label Theis17?><mixed-citation>Theis, T. N. and Wong, H.-S. P.:
The End of Moore's Law: A New Beginning for Information Technology, Comput. Sci. Eng., 19, 41–50, <ext-link xlink:href="https://doi.org/10.1109/MCSE.2017.29" ext-link-type="DOI">10.1109/MCSE.2017.29</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx40"><?xmltex \def\ref@label{{Trott et~al.(2022)Trott, Lebrun-Grandi\'{e}, Arndt, Ciesko, Dang, Ellingwood, Gayatri, Harvey, Hollman, Ibanez, Liber, Madsen, Miles, Poliakoff, Powell, Rajamanickam, Simberg, Sunderland, Turcksin, and Wilke}}?><label>Trott et al.(2022)Trott, Lebrun-Grandié, Arndt, Ciesko, Dang, Ellingwood, Gayatri, Harvey, Hollman, Ibanez, Liber, Madsen, Miles, Poliakoff, Powell, Rajamanickam, Simberg, Sunderland, Turcksin, and Wilke</label><?label Kokkos?><mixed-citation>Trott, C. R., Lebrun-Grandié, D., Arndt, D., Ciesko, J., Dang, V., Ellingwood, N., Gayatri, R., Harvey, E., Hollman, D. S., Ibanez, D., Liber, N., Madsen, J., Miles, J., Poliakoff, D., Powell, A., Rajamanickam, S., Simberg, M., Sunderland, D., Turcksin, B., and Wilke, J.:
Kokkos 3: Programming Model Extensions for the Exascale Era, IEEE T. Parall. Distr., 33, 805–817, <ext-link xlink:href="https://doi.org/10.1109/TPDS.2021.3097283" ext-link-type="DOI">10.1109/TPDS.2021.3097283</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{{van~den Oord et~al.(2020)van~den Oord, Jansson, Pelupessy, Chertova, Gr{\"{o}}nqvist, Siebesma, and Crommelin}}?><label>van den Oord et al.(2020)van den Oord, Jansson, Pelupessy, Chertova, Grönqvist, Siebesma, and Crommelin</label><?label Van_den_Oord2020-wb?><mixed-citation>van den Oord, G., Jansson, F., Pelupessy, I., Chertova, M., Grönqvist, J. H., Siebesma, P., and Crommelin, D.:
A Python interface to the Dutch atmospheric large-eddy simulation, SoftwareX, 12, 100608, <ext-link xlink:href="https://doi.org/10.1016/j.softx.2020.100608" ext-link-type="DOI">10.1016/j.softx.2020.100608</ext-link>, 2020.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx42"><?xmltex \def\ref@label{{Vila-P\'{e}rez et~al.(2022)Vila-P\'{e}rez, {Van Heyningen}, Nguyen, and Peraire}}?><label>Vila-Pérez et al.(2022)Vila-Pérez, Van Heyningen, Nguyen, and Peraire</label><?label VILAPEREZ2022101212?><mixed-citation>Vila-Pérez, J., Van Heyningen, R. L., Nguyen, N.-C., and Peraire, J.:
Exasim: Generating discontinuous Galerkin codes for numerical solutions of partial differential equations on graphics processors, SoftwareX, 20, 101212, <ext-link xlink:href="https://doi.org/10.1016/j.softx.2022.101212" ext-link-type="DOI">10.1016/j.softx.2022.101212</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx43"><?xmltex \def\ref@label{{Zhou et~al.(2019)Zhou, Lin, Chen, Harris, Chen, and Rees}}?><label>Zhou et al.(2019)Zhou, Lin, Chen, Harris, Chen, and Rees</label><?label Zhou19?><mixed-citation>Zhou, L., Lin, S.-J., Chen, J.-H., Harris, L. M., Chen, X., and Rees, S. L.:
Toward Convective-Scale Prediction within the Next Generation Global Prediction System, B. Am. Meteorol. Soc., 100, 1225–1243, <ext-link xlink:href="https://doi.org/10.1175/BAMS-D-17-0246.1" ext-link-type="DOI">10.1175/BAMS-D-17-0246.1</ext-link>, 2019.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Pace v0.2: a Python-based performance-portable atmospheric model</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Abadi et al.(2015)Abadi, Agarwal, Barham, Brevdo, Chen, Citro, Corrado, Davis, Dean, Devin, Ghemawat, Goodfellow, Harp, Irving, Isard, Jia, Jozefowicz, Kaiser, Kudlur, Levenberg, Mané, Monga, Moore, Murray, Olah, Schuster, Shlens, Steiner, Sutskever, Talwar, Tucker, Vanhoucke, Vasudevan, Viégas, Vinyals, Warden, Wattenberg, Wicke, Yu, and Zheng</label><mixed-citation>
      
Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mané, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viégas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., and Zheng, X.:
TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems, Zenodo [software], <a href="https://doi.org/10.5281/zenodo.4724125" target="_blank">https://doi.org/10.5281/zenodo.4724125</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Adams et al.(2019)Adams, Ford, Hambley, Hobson, Kavčič, Maynard, Melvin, Müller, Mullerworth, Porter, Rezny, Shipway, and Wong</label><mixed-citation>
      
Adams, S., Ford, R., Hambley, M., Hobson, J., Kavčič, I., Maynard, C., Melvin, T., Müller, E., Mullerworth, S., Porter, A., Rezny, M., Shipway, B., and Wong, R.:
LFRic: Meeting the challenges of scalability and performance portability in Weather and Climate models, J. Parallel Distr. Com., 132, 383–396, <a href="https://doi.org/10.1016/j.jpdc.2019.02.007" target="_blank">https://doi.org/10.1016/j.jpdc.2019.02.007</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Alnaes et al.(2015)Alnaes, Blechta, Hake, Johansson, Kehlet, Logg, Richardson, Ring, and Rognes</label><mixed-citation>
      
Alnaes, M. S., Blechta, J., Hake, J., Johansson, A., Kehlet, B., Logg, A., Richardson, C., Ring, J., and Rognes, M. E., and Wells, G. N.:
The FEniCS Project Version 1.5, Archive of Numerical Software [software], <a href="https://doi.org/10.11588/ans.2015.100.20553" target="_blank">https://doi.org/10.11588/ans.2015.100.20553</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Augier et al.(2021)Augier, Bolz-Tereick, Guelton, and Mohanan</label><mixed-citation>
      
Augier, P., Bolz-Tereick, C. F., Guelton, S., and Mohanan, A. V.:
Reducing the ecological impact of computing through education and Python compilers, Nature Astronomy, 5, 334–335, <a href="https://doi.org/10.1038/s41550-021-01342-y" target="_blank">https://doi.org/10.1038/s41550-021-01342-y</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Behnel et al.(2011)Behnel, Bradshaw, Citro, Dalcin, Seljebotn, and Smith</label><mixed-citation>
      
Behnel, S., Bradshaw, R., Citro, C., Dalcin, L., Seljebotn, D. S., and Smith, K.:
Cython: The Best of Both Worlds, Comput. Sci. Eng., 13, 31–39, <a href="https://doi.org/10.1109/MCSE.2010.118" target="_blank">https://doi.org/10.1109/MCSE.2010.118</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Ben-Nun et al.(2019)Ben-Nun, de Fine Licht, Ziogas, Schneider, and Hoefler</label><mixed-citation>
      
Ben-Nun, T., de Fine Licht, J., Ziogas, A. N., Schneider, T., and Hoefler, T.:
Stateful Dataflow Multigraphs: A Data-Centric Model for Performance Portability on Heterogeneous Architectures, in: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC '19, Association for Computing Machinery, New York, NY, USA, November 2019, 81, 1–14, <a href="https://doi.org/10.1145/3295500.3356173" target="_blank">https://doi.org/10.1145/3295500.3356173</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Ben-Nun et al.(2022)Ben-Nun, Groner, Deconinck, Wicky, Davis, Dahm, Elbert, George, McGibbon, Trümper, Wu, Fuhrer, Schulthess, and Hoefler</label><mixed-citation>
      
Ben-Nun, T., Groner, L., Deconinck, F., Wicky, T., Davis, E., Dahm, J., Elbert, O. D., George, R., McGibbon, J., Trümper, L., Wu, E., Fuhrer, O., Schulthess, T., and Hoefler, T.:
Productive Performance Engineering for Weather and Climate Modeling with Python, arXiv, <a href="https://doi.org/10.48550/ARXIV.2205.04148" target="_blank">https://doi.org/10.48550/ARXIV.2205.04148</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Bradbury et al.(2018)Bradbury, Frostig, Hawkins, Johnson, Leary, Maclaurin, Necula, Paszke, VanderPlas, Wanderman-Milne, and Zhang</label><mixed-citation>
      
Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q.:
JAX: composable transformations of Python+NumPy programs, <a href="http://github.com/google/jax" target="_blank"/> (last access: September 2022), 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Brenowitz and Bretherton(2019)</label><mixed-citation>
      
Brenowitz, N. D. and Bretherton, C. S.:
Spatially extended tests of a neural network parametrization trained by coarse-graining, J. Adv. Model. Earth Sy., 11, 2728–2744, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Brown et al.(2020)Brown, Mann, Ryder, Subbiah, Kaplan, Dhariwal, Neelakantan, Shyam, Sastry, Askell, Agarwal, Herbert-Voss, Krueger, Henighan, Child, Ramesh, Ziegler, Wu, Winter, Hesse, Chen, Sigler, Litwin, Gray, Chess, Clark, Berner, McCandlish, Radford, Sutskever, and Amodei</label><mixed-citation>
      
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D.:
Language Models are Few-Shot Learners, in: Advances in Neural Information Processing Systems, edited by: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H., vol. 33, pp. 1877–1901, Curran Associates, Inc., <a href="https://doi.org/10.48550/arXiv.2005.14165" target="_blank">https://doi.org/10.48550/arXiv.2005.14165</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Burns et al.(2020)Burns, Vasil, Oishi, Lecoanet, and Brown</label><mixed-citation>
      
Burns, K. J., Vasil, G. M., Oishi, J. S., Lecoanet, D., and Brown, B. P.:
Dedalus: A flexible framework for numerical simulations with spectral methods, Phys. Rev. Research, 2, 023068, <a href="https://doi.org/10.1103/PhysRevResearch.2.023068" target="_blank">https://doi.org/10.1103/PhysRevResearch.2.023068</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Chen and Lin(2013)</label><mixed-citation>
      
Chen, J.-H. and Lin, S.-J.:
Seasonal predictions of tropical cyclones using a 25-km-resolution general circulation model, J. Climate, 26, 380–398, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Chen(2021)</label><mixed-citation>
      
Chen, X.:
The LMARS Based Shallow-Water Dynamical Core on Generic Gnomonic Cubed-Sphere Geometry, J. Adv. Model. Earth Sy., 13, e2020MS002280, <a href="https://doi.org/10.1029/2020MS002280" target="_blank">https://doi.org/10.1029/2020MS002280</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Clement et al.(2019)Clement, Marti, Lapillonne, Fuhrer, and Sawyer</label><mixed-citation>
      
Clement, V., Marti, P., Lapillonne, X., Fuhrer, O., and Sawyer, W.:
Automatic Port to OpenACC/OpenMP for Physical Parameterization in Climate and Weather Code Using the CLAW Compiler, Supercomputing Frontiers and Innovations, 6, 51–63, <a href="https://doi.org/10.14529/jsfi190303" target="_blank">https://doi.org/10.14529/jsfi190303</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Dahm et al.(2022)Dahm, Groner, Paredes, Thaler, Vogt, Davis, Haeuselmann, Ehrengruber, Ubbiali, Wicky, Deconinck, Ben-Nun, and George</label><mixed-citation>
      
Dahm, J., Groner, L., Paredes, E. G., Thaler, F., Vogt, H., Davis, E., Haeuselmann, R., Ehrengruber, T., Ubbiali, S., Wicky, T., Deconinck, F., Ben-Nun, T., and George, R.:
ai2cm/gt4py: v0.1.0 GMD release, Zenodo [code], <a href="https://doi.org/10.5281/zenodo.7080260" target="_blank">https://doi.org/10.5281/zenodo.7080260</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>E3SM Project(2021)</label><mixed-citation>
      
E3SM Project, DOE:
Energy Exascale Earth System Model v2.0, Computer Software, GitHub [software], <a href="https://doi.org/10.11578/E3SM/dc.20210927.1" target="_blank">https://doi.org/10.11578/E3SM/dc.20210927.1</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Fuhrer et al.(2018)Fuhrer, Chadha, Hoefler, Kwasniewski, Lapillonne, Leutwyler, Lüthi, Osuna, Schär, Schulthess, and Vogt</label><mixed-citation>
      
Fuhrer, O., Chadha, T., Hoefler, T., Kwasniewski, G., Lapillonne, X., Leutwyler, D., Lüthi, D., Osuna, C., Schär, C., Schulthess, T. C., and Vogt, H.:
Near-global climate simulation at 1&thinsp;km resolution: establishing a performance baseline on 4888&thinsp;GPUs with COSMO 5.0, Geosci. Model Dev., 11, 1665–1681, <a href="https://doi.org/10.5194/gmd-11-1665-2018" target="_blank">https://doi.org/10.5194/gmd-11-1665-2018</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>George et al.(2022)George, Wu, McGibbon, Dahm, Davis, Wicky, Deconinck, Kung, Fuhrer, Elbert, Savarin, Brenowitz, Cheeseman, Henn, Clark, and Niedermayr</label><mixed-citation>
      
George, R., Wu, E., McGibbon, J., Dahm, J., Davis, E., Wicky, T., Deconinck, F., Kung, C., Fuhrer, O., Elbert, O., Savarin, A., Brenowitz, N. D., Cheeseman, M., Henn, B., Clark, S., and Niedermayr, Y.:
ai2cm/pace: v0.2.0, Zenodo [code and data set], <a href="https://doi.org/10.5281/zenodo.7464843" target="_blank">https://doi.org/10.5281/zenodo.7464843</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Giorgetta et al.(2022)Giorgetta, Sawyer, Lapillonne, Adamidis, Alexeev, Clément, Dietlicher, Engels, Esch, Franke, Frauen, Hannah, Hillman, Kornblueh, Marti, Norman, Pincus, Rast, Reinert, Schnur, Schulzweida, and Stevens</label><mixed-citation>
      
Giorgetta, M. A., Sawyer, W., Lapillonne, X., Adamidis, P., Alexeev, D., Clément, V., Dietlicher, R., Engels, J. F., Esch, M., Franke, H., Frauen, C., Hannah, W. M., Hillman, B. R., Kornblueh, L., Marti, P., Norman, M. R., Pincus, R., Rast, S., Reinert, D., Schnur, R., Schulzweida, U., and Stevens, B.: The ICON-A model for direct QBO simulations on GPUs (version icon-cscs:baf28a514), Geosci. Model Dev., 15, 6985–7016, <a href="https://doi.org/10.5194/gmd-15-6985-2022" target="_blank">https://doi.org/10.5194/gmd-15-6985-2022</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>C. R. Harris et al.(2020)Harris, Millman, van der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del Río, Wiebe, Peterson, Gérard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant</label><mixed-citation>
      
Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M. H., Brett, M., Haldane, A., del Río, J. F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.:
Array programming with NumPy, Nature, 585, 357–362, <a href="https://doi.org/10.1038/s41586-020-2649-2" target="_blank">https://doi.org/10.1038/s41586-020-2649-2</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>L. Harris et al.(2020)Harris, Zhou, Lin, Chen, Chen, Gao, Morin, Rees, Sun, Tong, Xiang, Bender, Benson, Cheng, Clark, Elbert, Hazelton, Huff, Kaltenbaugh, Liang, Marchok, Shin, and Stern</label><mixed-citation>
      
Harris, L., Zhou, L., Lin, S.-J., Chen, J.-H., Chen, X., Gao, K., Morin, M., Rees, S., Sun, Y., Tong, M., Xiang, B., Bender, M., Benson, R., Cheng, K.-Y., Clark, S., Elbert, O. D., Hazelton, A., Huff, J. J., Kaltenbaugh, A., Liang, Z., Marchok, T., Shin, H. H., and Stern, W.:
GFDL SHiELD: A Unified System for Weather-to-Seasonal Prediction, J. Adv. Model. Earth Sy., 12, e2020MS002223, <a href="https://doi.org/10.1029/2020MS002223" target="_blank">https://doi.org/10.1029/2020MS002223</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Harris et al.(2021)Harris, Chen, Putman, Zhou, and Chen</label><mixed-citation>
      
Harris, L., Chen, X., Putman, W., Zhou, L., and Chen, J.-H.:
A Scientific Description of the GFDL Finite-Volume Cubed-Sphere Dynamical Core, technical Memorandum, <a href="https://repository.library.noaa.gov/view/noaa/30725" target="_blank"/> (last access: September 2022), 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Harris and Lin(2013)</label><mixed-citation>
      
Harris, L. M. and Lin, S.-J.:
A Two-Way Nested Global-Regional Dynamical Core on the Cubed-Sphere Grid, Mon. Weather Rev., 141, 283–306, <a href="https://doi.org/10.1175/MWR-D-11-00201.1" target="_blank">https://doi.org/10.1175/MWR-D-11-00201.1</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Hunter(2007)</label><mixed-citation>
      
Hunter, J. D.:
Matplotlib: A 2D graphics environment, Comput. Sci. Eng., 9, 90–95, <a href="https://doi.org/10.1109/MCSE.2007.55" target="_blank">https://doi.org/10.1109/MCSE.2007.55</a>, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Jablonowski and Williamson(2006)</label><mixed-citation>
      
Jablonowski, C. and Williamson, D. L.:
A baroclinic instability test case for atmospheric model dynamical cores, Q. J. Roy. Meteor. Soc., 132, 2943–2975, <a href="https://doi.org/10.1256/qj.06.12" target="_blank">https://doi.org/10.1256/qj.06.12</a>, 2006.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Lam et al.(2015)Lam, Pitrou, and Seibert</label><mixed-citation>
      
Lam, S. K., Pitrou, A., and Seibert, S.:
Numba: A LLVM-Based Python JIT Compiler, in: Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, LLVM '15, Association for Computing Machinery, New York, NY, USA, November 2015, 7, 1–6,  <a href="https://doi.org/10.1145/2833157.2833162" target="_blank">https://doi.org/10.1145/2833157.2833162</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Lapillonne et al.(2017)Lapillonne, Osterried, and Fuhrer</label><mixed-citation>
      
Lapillonne, X., Osterried, K., and Fuhrer, O.:
Chapter 13 – Using OpenACC to port large legacy climate and weather modeling code to GPUs, in: Parallel Programming with OpenACC, edited by: Farber, R., pp. 267–290, Morgan Kaufmann, Boston, <a href="https://doi.org/10.1016/B978-0-12-410397-9.00013-5" target="_blank">https://doi.org/10.1016/B978-0-12-410397-9.00013-5</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Lawrence et al.(2018)Lawrence, Rezny, Budich, Bauer, Behrens, Carter, Deconinck, Ford, Maynard, Mullerworth, Osuna, Porter, Serradell, Valcke, Wedi, and Wilson</label><mixed-citation>
      
Lawrence, B. N., Rezny, M., Budich, R., Bauer, P., Behrens, J., Carter, M., Deconinck, W., Ford, R., Maynard, C., Mullerworth, S., Osuna, C., Porter, A., Serradell, K., Valcke, S., Wedi, N., and Wilson, S.:
Crossing the chasm: how to develop weather and climate models for next generation computers?, Geosci. Model Dev., 11, 1799–1821, <a href="https://doi.org/10.5194/gmd-11-1799-2018" target="_blank">https://doi.org/10.5194/gmd-11-1799-2018</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Lin(2004)</label><mixed-citation>
      
Lin, S.-J.:
A “Vertically Lagrangian” Finite-Volume Dynamical Core for Global Models, Mon. Weather Rev., 132, 2293–2307, <a href="https://doi.org/10.1175/1520-0493(2004)132&lt;2293:AVLFDC&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0493(2004)132&lt;2293:AVLFDC&gt;2.0.CO;2</a>, 2004.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Lin and Rood(1996)</label><mixed-citation>
      
Lin, S.-J. and Rood, R. B.:
Multidimensional Flux-Form Semi-Lagrangian Transport Schemes, Mon. Weather Rev., 124, 2046–2070, <a href="https://doi.org/10.1175/1520-0493(1996)124&lt;2046:mffslt&gt;2.0.co;2" target="_blank">https://doi.org/10.1175/1520-0493(1996)124&lt;2046:mffslt&gt;2.0.co;2</a>, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>McGibbon et al.(2021)McGibbon, Brenowitz, Cheeseman, Clark, Dahm, Davis, Elbert, George, Harris, Henn, Kwa, Perkins, Watt-Meyer, Wicky, Bretherton, and Fuhrer</label><mixed-citation>
      
McGibbon, J., Brenowitz, N. D., Cheeseman, M., Clark, S. K., Dahm, J. P. S., Davis, E. C., Elbert, O. D., George, R. C., Harris, L. M., Henn, B., Kwa, A., Perkins, W. A., Watt-Meyer, O., Wicky, T. F., Bretherton, C. S., and Fuhrer, O.:
fv3gfs-wrapper: a Python wrapper of the FV3GFS atmospheric model, Geosci. Model Dev., 14, 4401–4409, <a href="https://doi.org/10.5194/gmd-14-4401-2021" target="_blank">https://doi.org/10.5194/gmd-14-4401-2021</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Méndez et al.(2014)Méndez, Tinetti, and Overbey</label><mixed-citation>
      
Méndez, M., Tinetti, F. G., and Overbey, J. L.:
Climate Models: Challenges for Fortran Development Tools, in: 2014 Second International Workshop on Software Engineering for High Performance Computing in Computational Science and Engineering, New Orleans, LA, USA, 21 November 2014,  6–12, <a href="https://doi.org/10.1109/SE-HPCCSE.2014.7" target="_blank">https://doi.org/10.1109/SE-HPCCSE.2014.7</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Monteiro et al.(2018)Monteiro, McGibbon, and Caballero</label><mixed-citation>
      
Monteiro, J. M., McGibbon, J., and Caballero, R.:
sympl (v. 0.4.0) and climt (v. 0.15.3) – towards a flexible framework for building model hierarchies in Python, Geosci. Model Dev., 11, 3781–3794, <a href="https://doi.org/10.5194/gmd-11-3781-2018" target="_blank">https://doi.org/10.5194/gmd-11-3781-2018</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Partee et al.(2021a)Partee, Ellis, Rigazzi, Bachman, Marques, and Shao</label><mixed-citation>
      
Partee, S., Ellis, M., Rigazzi, A., Bachman, S., Marques, G., and Shao, A.: SmartSim: Online Analytics and Machine Learning for HPC Simulations, Zenodo [code], <a href="https://doi.org/10.5281/zenodo.4986182" target="_blank">https://doi.org/10.5281/zenodo.4986182</a>, 2021a.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Partee et al.(2021b)Partee, Ellis, Rigazzi, Bachman, Marques, Shao, and Robbins</label><mixed-citation>
      
Partee, S., Ellis, M., Rigazzi, A., Bachman, S., Marques, G., Shao, A., and Robbins, B.:
Using Machine Learning at Scale in HPC Simulations with SmartSim: An Application to Ocean Climate Modeling, arXiv, <a href="https://doi.org/10.48550/ARXIV.2104.09355" target="_blank">https://doi.org/10.48550/ARXIV.2104.09355</a>, 2021b.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Paszke et al.(2019)Paszke, Gross, Massa, Lerer, Bradbury, Chanan, Killeen, Lin, Gimelshein, Antiga, Desmaison, Kopf, Yang, DeVito, Raison, Tejani, Chilamkurthy, Steiner, Fang, Bai, and Chintala</label><mixed-citation>
      
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S.:
PyTorch: An Imperative Style, High-Performance Deep Learning Library, in: Advances in Neural Information Processing Systems 32, edited by: Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., Curran Associates, Inc., <a href="https://doi.org/10.48550/arXiv.1912.01703" target="_blank">https://doi.org/10.48550/arXiv.1912.01703</a>, pp. 8024–8035, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Putman and Lin(2007)</label><mixed-citation>
      
Putman, W. M. and Lin, S.-J.:
Finite-volume transport on various cubed-sphere grids, J. Comput. Phys., 227, 55–78, <a href="https://doi.org/10.1016/j.jcp.2007.07.022" target="_blank">https://doi.org/10.1016/j.jcp.2007.07.022</a>, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Strohmaier et al.(2015)Strohmaier, Meuer, Dongarra, and Simon</label><mixed-citation>
      
Strohmaier, E., Meuer, H. W., Dongarra, J., and Simon, H. D.:
The TOP500 List and Progress in High-Performance Computing, Computer, 48, 42–49, <a href="https://doi.org/10.1109/MC.2015.338" target="_blank">https://doi.org/10.1109/MC.2015.338</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Theis and Wong(2017)</label><mixed-citation>
      
Theis, T. N. and Wong, H.-S. P.:
The End of Moore's Law: A New Beginning for Information Technology, Comput. Sci. Eng., 19, 41–50, <a href="https://doi.org/10.1109/MCSE.2017.29" target="_blank">https://doi.org/10.1109/MCSE.2017.29</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Trott et al.(2022)Trott, Lebrun-Grandié, Arndt, Ciesko, Dang, Ellingwood, Gayatri, Harvey, Hollman, Ibanez, Liber, Madsen, Miles, Poliakoff, Powell, Rajamanickam, Simberg, Sunderland, Turcksin, and Wilke</label><mixed-citation>
      
Trott, C. R., Lebrun-Grandié, D., Arndt, D., Ciesko, J., Dang, V., Ellingwood, N., Gayatri, R., Harvey, E., Hollman, D. S., Ibanez, D., Liber, N., Madsen, J., Miles, J., Poliakoff, D., Powell, A., Rajamanickam, S., Simberg, M., Sunderland, D., Turcksin, B., and Wilke, J.:
Kokkos 3: Programming Model Extensions for the Exascale Era, IEEE T. Parall. Distr., 33, 805–817, <a href="https://doi.org/10.1109/TPDS.2021.3097283" target="_blank">https://doi.org/10.1109/TPDS.2021.3097283</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>van den Oord et al.(2020)van den Oord, Jansson, Pelupessy, Chertova, Grönqvist, Siebesma, and Crommelin</label><mixed-citation>
      
van den Oord, G., Jansson, F., Pelupessy, I., Chertova, M., Grönqvist, J. H., Siebesma, P., and Crommelin, D.:
A Python interface to the Dutch atmospheric large-eddy simulation, SoftwareX, 12, 100608, <a href="https://doi.org/10.1016/j.softx.2020.100608" target="_blank">https://doi.org/10.1016/j.softx.2020.100608</a>, 2020.


    </mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Vila-Pérez et al.(2022)Vila-Pérez, Van Heyningen, Nguyen, and Peraire</label><mixed-citation>
      
Vila-Pérez, J., Van Heyningen, R. L., Nguyen, N.-C., and Peraire, J.:
Exasim: Generating discontinuous Galerkin codes for numerical solutions of partial differential equations on graphics processors, SoftwareX, 20, 101212, <a href="https://doi.org/10.1016/j.softx.2022.101212" target="_blank">https://doi.org/10.1016/j.softx.2022.101212</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Zhou et al.(2019)Zhou, Lin, Chen, Harris, Chen, and Rees</label><mixed-citation>
      
Zhou, L., Lin, S.-J., Chen, J.-H., Harris, L. M., Chen, X., and Rees, S. L.:
Toward Convective-Scale Prediction within the Next Generation Global Prediction System, B. Am. Meteorol. Soc., 100, 1225–1243, <a href="https://doi.org/10.1175/BAMS-D-17-0246.1" target="_blank">https://doi.org/10.1175/BAMS-D-17-0246.1</a>, 2019.

    </mixed-citation></ref-html>--></article>
