WorksPhysics and Astronomy
legoESM: a modular, differentiable, multiscale, AI-ready Earth system model built with AI agents
Abstract
Earth system models (ESMs) have grown tremendously in realism, yet key uncertainties persist in the climate response to greenhouse-gas forcing, particularly due to cloud radiative feedbacks. In addition, their software architecture was not designed for accelerator hardware or modern artificial intelligence (AI). Here we present legoESM, a composable, differentiable, multiscale ESM written in JAX. It builds on decades of community-developed parameterizations and numerical methods, recast in a unified framework by AI coding agents under a human-specified scientific contract and verified through benchmarking. Dynamical cores, physics schemes, grids, complexity levels and components are swappable like building blocks, and can use conventional physics or machine-learned emulators. A single code base spans metre-scale large-eddy simulation to global simulations and weather to climate. End-to-end differentiability enables gradient-based calibration, variational data assimilation and online training. legoESM modular architecture enables systematic evaluation of diverse model variants to explore structural uncertainty and test hypotheses. legoESM produces realistic simulations across scales, reduces land-surface temperature bias through gradient-based calibration, and scales efficiently on GPUs to kilometer-scale simulations. It offers an open, community infrastructure for hypothesis testing, research and teaching in Earth sciences and a template for multiscale physical systems.
main.pdf
Introduction
Earth system models (ESMs) have improved substantially over recent decades, both in their fidelity with respect to the observed climate and in the breadth of processes they represent [1, 2, 3, 4, 5, 6]. Yet, important biases persist [7, 8], and the uncertainty in the response of the climate system to greenhouse-gas forcing remains large, with equilibrium climate sensitivity still being uncertain at the ∼50% level[9]. Projections of rainfall extremes[10], of ocean heat uptake, and of the strength of the land carbon sink[11, 12] differ substantially between models and are often inconsistent across different regions of the world. Further, ESMs have to a large extent not embraced the data revolution: only a fraction of the wealth of observations and observational products (satellite retrievals, reanalyses) is currently being used for model calibration, largely because of limitation in the capability of those models to tune parameters with current sampling methods.
Three developments could, in principle, reduce these uncertainties. First, machine learning (ML) has been used to emulate or replace empirical parameterizations such as deep convection[13, 14, 15, 16] or ocean mesoscale eddies[17, 18, 19, 20], improving key processes such as rainfall extremes and ocean eddy fluxes, and demonstrably reducing systematic errors, such as in cloud cover, precipitation and circulation[21, 22, 23]. Yet, because ESMs are typically written in Fortran or C, ML components are coupled through one-way bridges that feed a neural-network prediction into the physics model[24]. As a result, online training, that is, learning through the model’s own evolution, is generally impossible, and the resulting hybrid systems are prone to instability[15] and cannot be further tuned against observations. Second, as models have grown in complexity, many modeling centers have adopted automated methods to tune and calibrate uncertain parameters[22, 25, 26]. However, conventional physics-based models generally do not provide an adjoint: that is, the gradient of model outputs with respect to these parameters is not available. Calibration must therefore rely on derivative-free approaches, such as Monte Carlo or ensemble methods[27, 28, 29]. Because these methods require many model evaluations, their computational cost grows rapidly as the number of parameters increases. Third, only a handful of models or components have been ported to modern hardware, such as graphics processing units (GPUs)[30, 31], and this remains the exception rather than the norm. This has limited the ability to go to higher resolution to better resolve key processes such as deep convection[32, 33] or to run models on other platforms, such as the cloud, further limiting ESM accessibility.
In parallel, weather forecasting has recently witnessed a (second) revolution (after the first: data assimilation): data-driven models trained on decades of reanalysis now rival or surpass physics-based forecasts and run at a fraction of the computational cost of physics-based models[34, 35, 36, 37, 38]. Yet, purely learned AI weather models tend to drift and can lose physical realism at long lead times[39], and on their own they do not provide the conservative, multi-component interpretable system that climate projection requires. More fundamentally, machine-learning emulators, even if skillful and fast, mainly reproduce input–output relationships without representing the physical mechanisms that generate them. This data-driven revolution has, moreover, so far largely been confined to the atmosphere, where decades of reanalysis provide abundant training data. Yet, the sparser ocean and land records make comparable data-driven fidelity much harder to achieve, although AI ocean emulators are now emerging[40, 41]. More broadly, ESMs are not merely predictive tools but also research tools: their capacity for hypothesis testing and mechanistic attribution is central to scientific progress. Preserving that capability while gaining the computational and optimization advantages of differentiable, ML-enhanced methods is a central motivation for process-based, differentiable ESMs.
In addition, and related to hypothesis testing, climate science has had a long tradition of using a hierarchy of models, spanning idealized to complex configurations[42, 43, 44]. Such a hierarchy has been fundamental to building physical understanding of the climate system. Modern ESMs can themselves span a wide range of resolutions, timescales, and configurations, yet moving systematically across levels of complexity often requires substantial changes in model configuration or even the use of different modeling systems. A more modular framework could make these transitions easier and more controlled, enabling hypotheses and counterfactuals to be tested consistently across scales and levels of complexity.
Finally, most current ESMs are written in compiled languages (Fortran, C/C++) that are less widely used across the broader scientific community than Python, which can limit adoption by researchers from other disciplines and by downstream users, leading to slow model evolution. The recent weather AI revolution has demonstrated that it is not only model performance that drives widespread adoption, but also ease of use [45].
The confluence of large-scale datasets, GPU-accelerated computing, and differentiable programming frameworks capable of scaling gradient-based optimization enabled the machine-learning revolution. Earth system science is now positioned to leverage the same convergence, but doing so requires ESMs written in modern, automatically differentiable languages that can natively use GPUs and other emerging architectures, support gradient-based optimization, and interface directly with machine learning.
As such, we argue that a modern ESM should be (i) easy to use, and ideally written in Python, the lingua franca of modern data science, yet with high performance; (ii) hardware-agnostic, running on any of central processing units (CPUs), graphics processing units (GPUs) and tensor processing units (TPUs) as accelerators keep evolving; (iii) composable, so that different numerical methods, physical parameterizations or entire modules (for example the whole atmosphere) can be swapped, combined and trained jointly for controlled experiments and hypothesis testing; (iv) able to integrate ML seamlessly, whether by replacing a single parameterization or an entire component (for example swapping the whole atmosphere for a neural network, as in recent AI weather models [34, 35, 36, 37, 38, 46]), which requires the code to be end-to-end differentiable; (v) solvable on many or adaptive grids tailored to the problem at hand; and (vi) able to run across spatial and temporal scales.
A growing ecosystem of differentiable models has begun to demonstrate the benefits of parts of these ideas, though so far this has been for one component or one spatial or temporal scale at a time. For the atmosphere, differentiable dynamical cores and intermediate-complexity models such as the JAX Circulation Model [47], the neural general circulation model NeuralGCM [46] and SpeedyWeather.jl [48] have demonstrated the use of gradients for calibration or online learning. For the ocean, JAX and automatic-differentiation efforts, from Veros [49, 50] to FESOM-JAX [51], are bringing the same capability to state estimation, e.g., for data assimilation. More broadly, DJ4Earth [52] uses compiler-level program transformations to make several Julia models (ShallowWaters.jl, SpeedyWeather.jl, Oceananigans.jl and DJUICE.jl) differentiable and performance-portable, although these components are not yet coupled and differentiability has been demonstrated for each component individually. For the land surface and hydrology, differentiable models such as Differ-Land [53], JAX-CanVeg [54] and differentiable process-based hydrology models [55] have demonstrated that they can be used to train physical parameters or neural components end to end against observations, building on the broader concept of differentiable programming in the geosciences [55, 56, 57]. Yet, at present, no unifying infrastructure exists that addresses all of those needs for the entire Earth system, rather than a targeted treatment of one piece in isolation.
Here, we present legoESM, a novel differentiable and composable modeling infrastructure for weather and climate science. Rather than a single ESM, it is an open, modular framework in which differentiable bricks of individual processes or full Earth components can be assembled, coupled and benchmarked to address diverse scientific questions or hypotheses. This modeling ecosystem is conceived as an evolving, agile, community-based infrastructure to test ideas and hypotheses, with clear ML-inspired metrics, across weather and climate (Figure 1a). Distinctively, legoESM was developed almost entirely from the ground up using AI coding agents—autonomous software agents that implement, test, and revise code in response to a human-authored scientific specification and based on clear benchmarks. To ensure that agent-generated code remains physically consistent and scientifically faithful, development is constrained by explicit contracts, which specify the required interfaces, physical invariants, units, and expected behaviour of individual components. Implementations were further evaluated using faithfulness oracles (trusted reference solutions) for physical processes and systematic benchmarks against analytical solutions, established test cases and reference datasets. This approach allowed AI agents considerable autonomy in software implementation while keeping the scientific requirements and criteria for correctness under human control. legoESM is intended to change how we conduct research and teach weather and climate science through its ease of use, flexibility, and agility.
Figure 1. legoESM: one differentiable code base, composable across scales. a, The same code runs from metre-scale large-eddy simulation, through cloud-resolving and regional configurations, to the global Earth system, spanning weather to centennial timescales. High-resolution configurations supply training targets for machine-learned components, which are then deployed in the global model (red dashed arrow). b, Any configuration is assembled by choosing independently along three axes: the numerical grid, the level of complexity, and the set of physics schemes or machine-learned emulators. Complexity runs along a ladder of increasing realism, while physics tendencies are additive to machine precision, so processes can be switched on and off freely. c, The selected components assemble into one model, a federation of independently installable packages that share the legoesm-core substrate and depend on it rather than on each other. Because the whole stack is a single differentiable program, exact gradients propagate through the assembled model and identical code runs on CPU, GPU and TPU. Package contents and the full scheme inventory are given in Methods and Extended Data Tables 1–10.
A model assembled from interchangeable bricks
Conventional ESMs remain relatively rigid. Although components such as dynamical cores and grids can often be exchanged within established modelling frameworks [58, 59], parameterizations and their interactions have evolved together over decades, making it difficult to modify or replace individual components without substantial effort elsewhere in the model. Moreover, obtaining a well-calibrated and physically credible simulation after such changes can be costly and time-consuming [25, 26, 28]. legoESM aims to reduce these barriers through a modular, differentiable architecture in which alternative schemes and hypotheses can be exchanged and tested, and new model configurations could potentially be rapidly calibrated and evaluated.
Written in Python with JAX[60] (a differentiable machine-learning library) mostly by AI coding agents, legoESM is assembled from interchangeable bricks (Figure 1c) at levels ranging from individual parameterizations to entire model components. For example, the atmosphere can range from a fully physical to a fully machine-learned (emulated) component, as in recent AI weather models[34, 35, 36, 46]. Differentiability allows access to the model gradients (with respect to parameters or variables) at numerical precision and seamless interoperability and training between physics and ML, with end-to-end optimization[55, 56]. The atmosphere, ocean, land, and sea ice are independent and composable packages. Each package can run on its own, so a single command yields a working ocean or atmosphere model, and the same code allows composing components as a fully coupled system (e.g., ocean-atmosphere) without modification through a differentiable coupler. All of those packages build on one shared foundation (the core) composed of grids, differentiable operators, thermodynamics and time integration, and depend on that substrate but not on each other. A scheme, a grid or an entire component can therefore be swapped seamlessly (Methods), and the composed model can be optimized end-to-end in any configuration, unlike standard ESMs.
Writing the model in JAX enables two key properties: the same code runs natively on any current hardware (CPUs, GPUs and TPUs), and will be able to compile to accelerators that do not yet exist without any rewriting, sidestepping the multi-year multi-person effort of porting a legacy model to new hardware. Second, the entire model is differentiable: the gradient of any output with respect to any parameter or variable is obtained automatically, with no hand-written adjoint. This enables efficient gradient-based optimization of any set of variables or parameters, as well as native data assimilation (shipped for the atmosphere in this first version, see below).
The model configuration is defined through three axes that can vary independently: (i) the numerical grid; (ii) the model complexity; and (iii) the set of physics schemes or machine-learning emulation (Figure 1b). A grid is first chosen: legoESM supports cubed-sphere (FV3-style, with a duo-grid treatment of panel edges)[61, 62, 63], latitude–longitude[64], Gaussian/spectral[65, 66], unstructured Voronoi (Model for Prediction Across Scales, MPAS)[67, 68, 69] and NEMO-style tripolar[70, 71] grids, as well as doubly periodic Cartesian planes for large-eddy and cloud-resolving simulations. The model complexity is flexible, spanning a ladder of physical complexity, from shallow-water to hydrostatic to nonhydrostatic atmospheres, and from a prescribed sea surface temperature (SST) to a slab to a full three-dimensional ocean, and a single framework ranges from metre-scale turbulence to the entire Earth circulation (Supplementary Figs. S1–S3 and S5 for shallow water, S4 for a hydrostatic baroclinic wave, S9–S11 for nonhydrostatic large-eddy and cloud-resolving simulations, S13 for an atmosphere over prescribed SST and S14–S18 for the three-dimensional ocean). The physics are additive and composable: each process computes its tendency from the same model state and the tendencies are summed, so a parameterization can be added or removed cleanly (Supplementary Information §3). Mass is conserved by construction, and energy and momentum are tracked with explicit budget closure. legoESM currently offers more than 160 selectable parameterizations, with tens of convection, turbulence and microphysics choices (Extended Data Table S1–10), and any module or Earth component can be exchanged for a machine-learned alternative (e.g., a spherical Fourier neural operator (SFNO) emulation of the entire atmosphere), giving a continuous ladder from fully physical to fully AI based instantiation of the model. Full equations and numerics are presented in Supplementary Information §1, and the source is openly available at https://github.com/climate-federation/legoESM.
| Discretization | Shallow water | Hydrostatic PE | Nonhydrostatic |
| Cubed-sphere C-D (FV3) | ✓ | ✓ | ✓ |
| Lat–lon C-grid (FV) | ✓ | ✓ | – |
| Gaussian/spectral | ✓ | ✓ | ✓ |
| Voronoi/MPAS (TRiSK) | ✓ | ✓ | ✓ |
| SFNO (learned) | ✓ | ✓ | – |
| Plane (LES/CRM) | – | – | ✓ |
Table S1. Dynamical cores by equation set and discretization family. The discretizations follow FV3-style cubed-sphere finite volume with PPM transport [2, 12] and a duo-grid panel-edge treatment[3], lat–lon C-grid finite volume [4], semi-implicit spectral transforms [5, 13], and mimetic TRiSK operators on Voronoi/MPAS meshes[6, 7, 8].
Development by AI agents under a scientific contract. legoESM was built through a human–agent workflow that we summarize here (details in Methods). We, human scientists, first wrote, with an agentic coding environment, a global plan and a specification (a project “constitution”) stating the vision of the model (composable, swappable, differentiable) and the model requirements (e.g., conserved quantities and unit consistency). Throughout, we, humans, dictated the scientific logic and the agents implemented and reviewed the code. We used coding agents built on independent large-language-model (LLM) families (Claude, Anthropic; Codex, OpenAI; and GLM, Zhipu AI), with clear rules to limit duplication. Shared physical constants and core routines (for example, thermodynamics) were centralized in the core package (the model substrate) and never re-derived elsewhere. For the hardest problems, such as multi-node scaling, grid-imprint artifacts at cubed-sphere panel edges, and faithful high-resolution ocean and atmosphere-only simulations, we used a persistent-iteration (“Ralph”) loop[72], which re-ran an agent on the same task and fed test and diagnostic results back at each cycle until a target criterion was met, so that the agent did not stop prematurely. We note also that agents not only coded but also leveraged a vast array of benchmarks, from the published literature to open-source datasets and codes, and were used to assess visual and physical realism (based on the published literature) and to relate biases to physical processes. This use of the multi-modal capabilities of LLMs therefore went well beyond code generation, to building, testing and validating a new model.
The AI agents rapidly produced code of good quality, yet also generated hallucinations, which were at times subtle. Because credible climate simulation requires accurate code, every component was validated along a ladder of increasing complexity. First, every substantial piece of code was reviewed by at least one adversarial code-review agent built on an LLM family (Codex, OpenAI) trained separately from that of the main coding agent (Claude). The review often found subtle errors or incorrect judgments, or challenged the choices made by the coding agent, which accelerated convergence and reduced defects. Second, the agents wrote unit tests covering most of the code, testing the accuracy and physical realism of small portions of code (several of them are available in the code repository). Third, physical equations were tested in asymptotic single-physics cases against well-known theoretical behaviour, such as convergence at the design order under Courant–Friedrichs–Lewy (CFL)-controlled refinement (Supplementary Figs. S24 and S25). Finally, components were tested with several interacting processes switched on, against increasingly stringent, larger-scale benchmarks, from dynamical-core tests of rising complexity (detailed below) to full atmosphere-only and ocean-only integrations compared against established models such as
the ICON ESM[58], the Nucleus for European Modelling of the Ocean (NEMO) model[70] and the GFDL FV3 dynamical core[61, 62]. When available, a code “oracle”, i.e., a trusted reference implementation (typically the original Fortran or C/C++ code), was used as the target, with agreement required within numerical tolerances rather than bit for bit, because differentiability and hardware portability imposed a different code structure and, in places, smoother formulations.
For the atmosphere, large-eddy simulations were validated, and the code corrected, against oracles based on the MicroHH[73] large-eddy simulation code in the canonical GABLS1 stable boundary layer[74], neutral Ekman layer[75], Wangara diurnal cycle[76], and DYCOMS-II[77] and RICO[78] cloud-topped boundary-layer cases, swapping all subgrid-scale turbulence options (the constant-coefficient Smagorinsky closure79 and its scale-dependent dynamic variant80,81) and all microphysics options82 (Supplementary Figs. S9–S12). The cloud-resolving configuration followed the design of the System for Atmospheric Modeling (SAM) cloud-resolving model (CRM)83, and tested against this model and validated on multiple cases, including the RCEMIP84 protocol, with our different microphysics schemes. The global atmospheric model and its various grids were validated through a suite of dycore benchmarks of increasing complexity: first shallow-water cases (Williamson cases 1, 2, 5 and 685, Supplementary Figs. S1–S3 and S5; the Galewsky barotropic instability86; and colliding modons87), then three-dimensional hydrostatic and non-hydrostatic cases (including the Jablonowski–Williamson baroclinic wave88, Supplementary Fig. S4, and the Held–Suarez test89), and finally radiative–convective equilibrium (RCE; Supplementary Figs. S7, S8 and S11) and AMIP (Supplementary Fig. S13) experiments. For these benchmarks, the model had to be faithful to the known reference solution and give consistent results across grid types. This was generally reached within a few persistent-iteration cycles, except for the cubed sphere (aimed to replicate the FV3 duo-grid[61, 62, 63]), on which subtle edge gradient defects produced artifacts along the cube-panel boundaries. Removing them was challenging even with the original FV3 code as an oracle, but a newer generation of coding agent, combined with adversarial review and persistent-iteration (Ralph) loops, ultimately removed these artifacts (Supplementary Fig. S4c).
The ocean followed a different validation strategy, as fewer clear benchmarks existed than for the atmosphere. Beyond unit tests and adversarial review, idealized asymptotic tests verified, for both the ocean and the atmosphere, that the operators (many of which were shared between the two) reproduced their analytic targets: vector-invariant (Burgers) advection (Supplementary Fig. S24a), Laplacian viscous decay with the expected scaling (Supplementary Fig. S24b), the Coriolis tendency (Supplementary Fig. S24c), and undamped and damped inertial oscillations (Supplementary Fig. S24d,e), while finite-volume transport and gravity-wave terms converged at their design orders under CFL-controlled refinement in both the atmosphere (Supplementary Fig. S25a) and the ocean (Supplementary Fig. S25b). Idealized and then realistic ocean cases were then run against ocean-model oracles (NEMO[70], MITgcm90 and Oceananigans91) on latitude–longitude, cubed-sphere, unstructured (MPAS/Voronoi92 and Finite-volume Sea ice–Ocean Model (FESOM)-type93) and NEMO-style tripolar grids (Supplementary Figs. S14–S17). In an idealized basin twin experiment, legoESM stayed within (r.m.s.) of NEMO 5.0.2 in sea-surface temperature after one year (Supplementary Fig. S15). Even with an oracle’s source in hand, validation did not reduce to line-by-line comparison: the codebases decomposed the equations differently, and tendencies matching the oracle to 3–4 digits over the interior could still hide order-one errors in a few critical cells (e.g., topography-adjacent faces controlling the form stress that sets circumpolar transport). These residuals were instead exposed by comparing term-by-term budgets, integrated over dynamically relevant regions at identical model states, against the oracle’s native trend diagnostics, which amplified what pointwise metrics hid and localized the responsible discretization. This iteration revealed missing processes (freshwater runoff), stability-motivated coefficient substitutions, and boundary-adjacent stencil differences that were successively corrected to obtain faithful simulations.
Validation of the land component was less direct, as many of its processes are biological and represented by empirical relationships rather than first-principles equations, and hence lacked benchmark cases. Soil water flow (Richards’ equation) and soil heat diffusion were checked for mass and energy conservation and physically consistent behavior, using agent-based diagnostics and visual inspection. Simulated fluxes were then evaluated against eddy-covariance measurements at several flux-tower sites and at the global scale, including the seasonality of the turbulent heat fluxes by biome, the global pattern of latent heat flux, and the zonal distribution of gross primary productivity (Supplementary Figs. S19–S22). Evaluation criteria were met within only a few iterations, with the exception of soil evaporation where high biases desiccated soil. Therefore, a modernized soil-evaporation parameterization was implemented. The surface parameters were then calibrated by gradient descent at eddy-covariance sites (Figure 2; described in the section on composability and differentiable calibration below). Finally, the initial pools of the dynamic carbon model, based on DifferLand[53], were estimated either through an analytical linearized solution or by differentiable optimization, with comparable results (Supplementary Fig. S23). Comparing the pools with observational estimates revealed, for example, too little soil carbon in northern high-latitude soils 94, and the agents iterated on the parameters and structure of the carbon model until the initial pools were realistic.

Figure 2. Differentiability: gradient-based calibration of the land surface. Per-plant-functional-type surface parameters are tuned by gradient descent through the differentiable land model against ERA599 mean-annual fields, with physical bounds imposed by differentiable (sigmoid) transforms. Top: skin temperature. Starting from CLM5105 default parameters (b), the global mean warm bias against ERA5 (a) falls from +1.09 to +0.30 K after tuning (c), with the largest gains over arid and semi-arid land. Bottom: surface albedo (d–f) stays essentially unbiased through the calibration (+0.002 to +0.004), confirming that the temperature fit is not bought at the cost of the radiative surface state. Gradients are obtained by reverse-mode differentiation of the land model at the global scale, per plant functional type; experimental set-up is in Methods and Supplementary Information §6.
The resulting modeling infrastructure, developed over 9 months, comprised about 620,000 lines of model code in the packages, about 824,000 lines of tests, through which automated continuous integration enforced the physical contracts (Methods), and about 555,000 lines of simulation and analysis scripts.
Two features of this workflow mattered as much as the end result. First, code generation was fast: with agents handling implementation and testing, adding a new parameterization or dynamical core (historically a months-to-a-year undertaking in an established model) shrank to days, compressing the development cycle between a scientific idea or hypothesis and a tested, benchmarked implementation. Second, human experts in the loop were critical. They set the scope and strategy at all stages of the project, and without supervision the agents tended to diverge, coding unneeded or even unintended features or spending compute on irrelevant items, and often losing track of the ultimate objective. Human input was needed for physical choices and for setting main project directions, for example deciding which reference solution or oracle a component should reproduce, which parameterizations to include, the overall architecture of the model, or whether to keep or replace a simple parameterization with a more complex one based on human-defined objective, or requesting denial experiments that remove a single process to assess its effect on the result. This back-and-forth between the agents’ questions and the scientists’ responses or hypotheses reduced the overall speed, but in our opinion largely improved the quality and clarified the scope of the end software. Our workflow was therefore closer to recent multi-agent “co-scientist” systems, in which scientists specify goals and steer agents that generate and test hypotheses 95, than to a fully autonomous research pipeline.
Many grids, one set of equations
A central design choice in legoESM is that the governing equations can be solved on different grids tailored to best suit the problem. In the atmosphere, legoESM provides shallow-water, hydrostatic primitive-equation and nonhydrostatic compressible-Euler dynamics on four global grid families: the cubed sphere [61, 62, 63], latitude–longitude finite-volume grids [64], Gaussian/spectral transforms [65, 66] and unstructured Voronoi (MPAS) meshes [67, 68, 69], together with a doubly periodic Cartesian plane on which the nonhydrostatic core runs large-eddy and cloud-resolving simulations. The same physics therefore runs through a controlled hierarchy of dynamical cores and grids. The ocean solves the Boussinesq hydrostatic primitive equations 96; nonhydrostatic effects are negligible at basin-to-global scales, so no nonhydrostatic ocean core has been included yet. The ocean equations run on the latitude–longitude, cubed-sphere, MPAS/Voronoi and tripolar grids. Production simulations use the latitude–longitude C-grid, in its curvilinear form on the eORCA1 tripole mesh [70, 71]. The MPAS, cubed-sphere and spectral ocean configurations serve idealized and benchmark experiments. The specific discretizations, transport operators and their community lineages are listed in Supplementary Table S1. As an illustration, the same shallow-water equations solved on the cubed-sphere, lat–lon, icosahedral and spectral grids give near-identical (within numerical bounds) solutions across all four discretizations, including flow over an isolated mountain (Williamson 5) and the propagating Rossby–Haurwitz wave (Williamson 6) 85 (Supplementary Figs. S1, S3 and S5), and the cubed-sphere C-D core reproduces the Jablonowski–Williamson baroclinic wave 88 (Supplementary Fig. S4). Removing a residual grid imprint at cube-panel boundaries, visible only on the meridional wind and not in error norms, was one of the problems for which the persistent-iteration (Ralph) loop described above proved essential, leading to the implementation of the duo-grid treatment [63] that eliminates it (Supplementary Fig. S4c). Our advection schemes across all grids (dycores) were validated against a substantial suite of dycore benchmarks, given in Supplementary Information §2, ensuring that the formulations were numerically sound across all cases.
While many of the grids, numerical schemes and parameterizations can be used as composable elements, legoESM’s ocean component builds on the community’s knowledge and provides recipes that closely shadow the combinations in existing production models, reproducing their numerical schemes and, where verified against the reference model’s own output, their trajectories. A NEMO shadow recipe is certified statement by statement against NEMO 5.0.2 on its idealized test cases, and shadow recipes exist for Veros and Oceananigans, so that a legoESM configuration can be pinned to a trusted production model before its components are swapped.
Composability and differentiable multiscale calibration
Swapping physical schemes or model components to assess their impact has been a long-standing scientific need. Although many contemporary ESMs have adopted increasingly modular software architectures, most process representations remain tightly coupled to other model components, reflecting in part technical debt accumulated over decades of development. Exchanging such components therefore still requires source-code modifications and careful bookkeeping. In legoESM, all model components follow a common tensor-in/tendency-out interface, taking the model state as input and returning a tendency. This standardized interface allows individual process representations, or larger parts of the system (e.g., the entire atmosphere), to be exchanged without modifying the rest of the model.
We illustrate this capability along with legoESM multiscale capability with atmospheric turbulence and deep-convection parameterizations (Supplementary Figs. S6–S8), which govern turbulent exchange in the lower atmosphere and much of tropical rainfall, respectively, and remain important sources of uncertainty and error in climate models. Nine turbulence and ten convection schemes (Extended Data Table S4 and Table S2) are first run unchanged in single-column configurations: the turbulence schemes are evaluated against reference turbulent cases in legoESM large-eddy simulation mode, while the convection schemes are evaluated in radiative–convective equilibrium (RCE) at three sea-surface temperatures (295, 300 and 305 K) against legoESM cloud-resolving simulations of the same cases. All experiments therefore use the same model infrastructure, which can itself operate in large-eddy or cloud-resolving configurations, conserving other exactly similar components. (e.g., radiation scheme or microphysics). The schemes exhibit clear differences in skill (Supplementary Information §3), enabling controlled comparisons of their off-the-shelf performance. All ten convection schemes reach a statistically steady equilibrium, but their errors against the cloud-resolving temperature and humidity profiles differ by up to a factor of about seven, from the eddy-diffusivity/mass-flux (EDMF) scheme, which is closest to the reference, to the Kuo and deep-convective-adjustment schemes (Supplementary Figs. S7 and S8). Once implemented, switching among schemes requires only a one-line configuration change. We then calibrate the parameters of each turbulence and convection scheme against the corresponding large-eddy and cloud-resolving reference high-resolution simulations; a single parameter set per scheme is optimized jointly across all cases for generality. Comparing default and calibrated performance (Supplementary Fig. S6 for the turbulence closures against LES and Supplementary Figs. S7 and S8 for the convection schemes before and after calibration) demonstrates how legoESM’s differentiable infrastructure complements its modular design: process representations can not only be interchanged and compared under consistent conditions, but also systematically optimized against reference data. Because differentiability is built into legoESM, parameter or initial-condition calibration becomes a gradient-based optimization problem[55, 56]. Gradients propagated through the model via jax.grad allow parameters to be optimized directly against data using modern gradient-based methods97,98, rather than derivative-free searches[25, 27], which are nonetheless still available. The benefit of calibration differs strongly between convection schemes (Supplementary Fig. S7a). The Tiedtke scheme improves about threefold (joint score from about 8.2 to 2.8), rising from the lower half of the ranking to third, whereas most schemes change little; for the mass-flux and Zhang–McFarlane schemes the jointly tuned parameters even score slightly worse than the defaults and differ between optimization seeds, a reminder that fitting one parameter set to several climates is a non-convex compromise (see below). Even after calibration, skill depends on the climate: the Kuo, Zhang–McFarlane and deep-convective-adjustment schemes degrade markedly as the surface warms from 295 to 305 K, whereas EDMF improves (Supplementary Fig. S7b). A scheme that performs well in the present-day tropics therefore need not remain skillful in a warmer climate, which is precisely the regime that matters for projections, and legoESM makes such cross-climate tests a routine part of scheme evaluation.
| Process | Schemes |
| Radiation | gray (Frierson), RRTMGP correlated- (LW+SW), ML emulator |
| Convection | Bechtold, Tiedtke, Kain–Fritsch, Zhang–McFarlane, Emanuel, Kuo, unified mass-flux, EDMF, simplified Betts–Miller (SBM), deep convective adjustment (DCA) |
| Microphysics | Kessler, Sundqvist, Morrison, Seifert–Beheng, Thompson, P3, super-droplet, ML |
| Cloud fraction | Sundqvist, Xu–Randall |
| Boundary layer | Louis, Holtslag–Boville, YSU, EDMF, TKE 1.5, MYNN 2.5, CLUBB, CLUBB-lite, Smagorinsky |
| Gravity-wave drag | Lindzen, Hines, McFarlane, Rayleigh, prognostic spectral, ML |
Table S2. Atmospheric physics processes and representative schemes (each composable; set to none to disable).
Table S4. Eddy-covariance sites used for the land-surface validation. is the canopy height and the flux-measurement (tower) height, which sets the reference level of the modelled surface-layer profile.
We further extend this approach to the global land surface by tuning per-plant-functional-type surface parameters globally by gradient descent against ERA5{citep}99 mean-annual skin temperature and MODIS albedo (see Figure 2). We reduce the global mean warm temperature bias from +1.09 to +0.30 K while keeping the surface albedo essentially unbiased (+0.002 to +0.004), with the largest improvements over the previously too-warm arid and semi-arid land. This is the same machinery that was used to calibrate turbulent- and convection-scheme parameters against the high-resolution references, and that we also used to adjust a cloud-fraction critical-relative-humidity threshold using gradients of the top-of-atmosphere shortwave and longwave fluxes so that the planetary albedo falls in its observed 30% range, and to estimate the initial land-carbon pools (Supplementary Figure S23; see the development section above). The same gradient-based strategy can also replace an entire component: a classical physics suite, a column neural network, or a full AI emulation, such as spherical neural operator{citep}100 for the atmosphere (a learned dynamical core) can be swapped, which is demonstrated for the WeatherBench AI-weather model intercomparison (Supplementary Information §3), and the ocean can run as a prescribed sea surface, a simple single or multi-layer slab, or a full three-dimensional model, all from one driver. The differentiable parallelization layer makes this workable at scale. Exact reverse-mode gradients flow through distributed halo exchange (via a custom adjoint that swaps send/receive ranks) and through the global reductions used by the mass-conservation fixers (Methods).

Figure S23. Initial land-carbon state. Soil organic carbon, live biomass and permafrost index (annual frozen fraction) of the equilibrated land-carbon initial condition under ERA5 climate, and the zonal-mean soil organic carbon against an observational estimate (, dashed); the shaded band marks the Arctic deficit north of .
The same adjoint capability also underpins variational data assimilation, which is natively enabled in the model through differentiability. A three-dimensional variational (3D-Var) analysis is implemented for the atmosphere: the analysis increment is obtained by differentiating the observation operator and the background term through the model, and it extends to 4D-Var through the differentiable time-stepping kernel, with no separately coded adjoint model. Single-observation experiments for both 3D-Var and 4D-Var, including the upstream propagation of the analysis increment that only 4D-Var recovers, are shown in Supplementary Figs. S26 and S27 (Supplementary Information §10), demonstrating faithful 3D- and 4D-Var capability of the model for weather to climate data assimilation.
Accessibility to gradients is also useful for diagnostics and process understanding, legoESM makes it natural to pose questions that are challenging in conventional models, for example one can ask which processes a given bias is most sensitive to. The gradient of any scalar diagnostic (a global-mean radiative imbalance, a regional precipitation bias, a measure of tropical variability) with respect to every internal parameter and boundary input is obtained in a single reverse pass, at a cost essentially independent of the number of parameters; ranking those sensitivities attributes the diagnostic to the processes that control it, where the brute-force equivalent would demand thousands of perturbed parameter integrations 101–103. This shifts the emphasis from solely using the model for predictive skill to also using the model as a tool for understanding.
We note that these gradients are exact for the discretized model, but they are not always useful for calibration. For chaotic, autoregressive dynamics, gradients through long integrations can vanish or explode104, and implicit solvers, iterative fixers and threshold-like physics can make them noisy or ill-conditioned, although probabilistic or ensemble formulations can mitigate many of these issues. There can also be a trade-off between forward accuracy and the stability of the reverse pass; NeuralGCM, for instance, builds on a comparatively simple spectral dynamical core [46]. legoESM does not remove these limitations, but it lets users check gradients (for example, against finite differences) and choose, for each application, the grid, dynamical core, rollout length and loss (for example, time-averaged or ensemble statistics) that best balance forward fidelity against gradient quality.
Bridging scales and the model hierarchy
Weather and climate processes span an enormous range of scales, from turbulent eddies at metre scale to circulations spanning the entire planet. Traditionally, different scales and regimes have often required distinct model configurations and representations of unresolved processes. legoESM instead provides a modular, swappable framework designed to facilitate experimentation across a range of spatial scales and resolutions. At sufficiently high resolution, the framework can support large-eddy and cloud-resolving configurations79, while retaining the flexibility to reuse, adapt, or replace physical parameterizations as appropriate. This enables systematic investigation of which parameterizations and process representations remain applicable across scales, which require retuning, and which must be reformulated or replaced as processes become explicitly resolved82.
The model is validated across scales: first as large-eddy simulation against reference cases and against reference codes (MicroHH[73]), reproducing the expected mean profiles and turbulence structure (Supplementary Figs. S9 and S10). Enlarging the domain and adding moist physics turns the model into a cloud-resolving model tested in radiative–convective equilibrium84 and against the SAM model83, and the model can spontaneously organize convection into clusters (“self-aggregation”; Supplementary Fig. S11). The warm-rain microphysics closely matches a particle-based (super-droplet) reference106,107 (Supplementary Fig. S12). Microphysics schemes were additionally checked against their original Fortran or C implementations, used as oracles for the
code translation, following a systematic LLM-based translation and verification strategy 108 and a systematic approach to microphysics-scheme development 82. At the global scale, the atmosphere runs idealized cases ranging from shallow water (Supplementary Figs. S1–S3 and S5), 3D RCEs coupled to ocean or land, Held–Suarez 89 or prescribed-ocean (Atmospheric Model Intercomparison Project, AMIP-style) simulations on any grid (Supplementary Fig. S13), and is evaluated with ClimateEval, which builds on ESMValTool 109,110, along with agents investigating the physical realism of the model (e.g., stability, mean annual precipitation, mean top of the atmosphere radiation fluxes...), and forced three-dimensional ocean integrations (Ocean Model Intercomparison Project, OMIP-style; Figure 3 and Supplementary Figs. S14–S18) and offline land integrations (Supplementary Figs. S19–S22) were compared to reference models (next section). Some established frameworks already span large-eddy to global scales [59]; spanning a metre-scale eddy to a global simulation within one differentiable code base is, to our knowledge, not available in existing frameworks, and allows systematic hypothesis testing and facilitates model parameter tuning using more realistic fine-scale models as training data for the coarser-resolution parameterized or learned scheme 82.

(a) Sea-surface temperature: tripolar, MPAS/Voronoi and NEMO, and differences from NEMO

(b) Zonal means (top) and zonal-mean differences (bottom) of SST, SSS and mixed-layer depth
Figure 3. A global ocean validated against NEMO on complex grids. (a) Sea-surface temperature from forced legoESM ocean integrations on the NEMO-style tripolar (eORCA) grid and on the unstructured MPAS/Voronoi icosahedral grid, from NEMO, and the differences tripolar−NEMO and MPAS−NEMO (colour limits: 1st–99th percentiles of the cells common to all three grids). (b) Zonal means of sea-surface temperature, sea-surface salinity and mixed-layer depth (top) and their differences (bottom; tripolar−NEMO, MPAS−NEMO and tripolar−MPAS), computed on the common cells. The two legoESM grids agree with each other much more closely than either does with NEMO. Maps of salinity and mixed-layer depth, the idealized benchmark suite, a NEMO twin experiment and eddy-permitting configurations are in Supplementary Figs. S14–S17.
Global simulations against established models
A stringent test of the framework is whether its component, built from the same composable elements, can reproduce a mature model on a complex grid, such as an operational ocean model. For this case, the three-dimensional Boussinesq ocean uses a split-explicit baroclinic/barotropic solver 96 with K-profile parameterization (KPP) vertical mixing 111 and Gent–McWilliams/Redi (GM–Redi) eddy parameterization 112,113, and runs on all supported grids. Figure 3 compares forced legoESM ocean integrations against NEMO [70] on two of the most demanding meshes: the NEMO-style tripolar (eORCA) grid, whose folded northern boundary is a classic source of numerical artifacts, and the unstructured MPAS/Voronoi icosahedral grid. On both grids the simulated sea-surface temperature closely tracks NEMO (Figure 3a): zonal-mean differences stay within about between and , and the largest departures (up to ) are confined to the Antarctic margin (Figure 3b). Zonal-mean sea-surface salinity agrees to within a few hundredths of a psu outside the polar regions, and the mixed layer is somewhat deeper than in NEMO at northern mid-latitudes. The two legoESM configurations differ from each other far less than either differs from NEMO, so the residual differences reflect model formulation, relative to NEMO, rather than the choice of grid (Supplementary Fig. S16). A centennial spin-up library, an Atlantic meridional overturning circulation (AMOC) tracker, conservation diagnostics, and a peer-comparison fidelity harness support quantitative model intercomparison (Supplementary Information §5), and the same code runs eddy-permitting global configurations on 15-km MPAS and FESOM2 93 meshes (Supplementary Fig. S17). That an agent-built ocean reproduces a mature community model on geometrically awkward grids is a strong test of the framework. Similar comparative tests have also been done on simpler configurations that are representative of different aspects of the global circulation at different resolution, e.g. the DINO 114.
The same drivers run the standard uncoupled CMIP6 protocols [1] end to end. In atmosphere-only (AMIP) mode, the atmosphere with an interactive land surface are integrated over the CMIP6 historical period (1979–2014) with sea-surface temperatures and sea ice concentrations prescribed from observations and with transient CMIP6 solar, greenhouse-gas, ozone, tropospheric aerosol and volcanic forcing. The AMIP simulation is initialized from ERA5 99 and written as CMOR-compliant output that ESMValTool 109,110 ingests with the recipes used for CMIP6 models. The simulation is evaluated with ClimateEval 115: it reproduces the observed large-scale patterns of near-surface temperature, precipitation, water vapour and cloud cover, with a global-mean cold bias and a too-weak shortwave cloud radiative effect as the main biases (Supplementary Fig. S13) without calibration. We leave the full calibration of AMIP runs for future work as it is bound to computing availability. In ocean-only (OMIP) mode, the three-dimensional ocean is driven by prescribed surface fluxes and tracks NEMO, as shown above. In land-only mode (LMIP-style, following the land-only experiments of the Land Surface, Snow and Soil Moisture Model Intercomparison Project), the land model is forced offline by CRU-JRA v2.5 reanalysis meteorology on a grid at an hourly timestep over 1985–2014, in a two-leaf canopy biophysics-only configuration. It demonstrates comparable fidelity to a CLM5 satellite-phenology simulation 105 driven by identical forcing, surface data and leaf-area index (Supplementary Figs. S20–S22). All three are described, with their forcing and evaluation metrics, in Supplementary Information §§4–6. They all demonstrate physically realistic behaviour, with the remaining biases documented there.
Performance and scalability
Writing legoESM in JAX enabled flexible portability; identical code runs unmodified on a laptop and on distributed multi-node high-performance computing systems, at single or double precision. A configuration can therefore be developed and tested on a laptop and run at production scale, and prototyping is fast enough to be scientifically useful: a dry Held–Suarez integration completes four simulated years in under an hour on an eight-core laptop, and in under six minutes on a single A100 GPU. At production scale, a single A100 GPU runs the 20-km lat–lon atmosphere faster than a full 128-core CPU node. Because the two architectures differ, such comparisons are best normalized by energy or allocation cost; using nominal thermal design powers (400 W for one A100 and W for the two CPUs of a node), this corresponds to roughly a tenfold advantage per unit of nominal processor power. Laptop-GPU speed-ups are given in Supplementary Information §7.
To further improve the scaling on CPUs and GPUs, we used agents to tune distributed scaling on MPI and multi GPUs for all grids, for the atmosphere and ocean. As much as possible, operators were shared between the ocean and atmosphere. Two algorithmic changes found with agentic optimization dominated the gains: parallelizing the correlated- radiation over its -points led to a speed up on the radiation kernel and a split-explicit barotropic ocean solver was iterated on to avoid the global-reduction latency wall of the implicit solver, being up to faster at 64 ranks. At production resolutions on the DKRZ Levante system the model uses added hardware efficiently (Figure 4): the 5-km lat–lon atmosphere retains roughly 75% parallel efficiency from 4 to 128 A100 GPUs at single precision, and the ORCA12-class tripolar ocean scales close to ideal up to 64 GPUs. Node for node (four A100 GPUs versus 128 CPU cores), the GPU partition is roughly an order of magnitude faster for the atmosphere, although, as noted above, such node-to-node comparisons do not account for differences in cost or energy use. Strong scaling is limited by the work available per device, not by total problem size, and a GPU needs a much larger subdomain than a CPU core to stay saturated: on the unstructured MPAS and FESOM2 meshes, speed-up flattens once the per-GPU subdomain becomes small and halo exchange can no longer be hidden behind computation (Figure 4b,Figure 4d,Figure 4e). Documented limits remain (Supplementary Information §7): spectral transforms are communication-bound and admit no domain-decomposed path, and the structured grids outperform the unstructured MPAS core in per-cell throughput, as expected from their memory-access patterns. For context, a GPU-optimized hydrostatic ocean dynamical core (Oceananigans) simulates about a decade of near-global ocean per wall-clock day at 8-km resolution on 64 A100 GPUs116; a like-for-like comparison with the legoESM ocean, at matched resolution, time step and hardware, is left for future work.

Figure 4. Strong scaling of the atmosphere and ocean at production resolution. Wall-clock time per model step as a function of the number of devices on the DKRZ Levante system (A100-80GB GPUs, four per node, NCCL communication, blue; AMD EPYC 7763 Milan CPU ranks, 128 per node, gloo communication, orange) at single (thick lines) and double (thin lines) precision; dashed lines show ideal scaling anchored at the first point. Atmosphere: a, lat–lon grid at ( km) and , 26 levels; b, MPAS icosahedral mesh (subdivision levels 9 and 10, 26 levels). Ocean: c, ORCA12-class tripolar grid (, 75 levels; GPU only); d, MPAS Voronoi mesh (2.6 million cells, 40 levels); e, FESOM2 FORCA20 mesh (2.1 million nodes, 70 levels; double precision). Structured grids follow the ideal line to large device counts, whereas the unstructured meshes roll off once per-device work is too small to amortize the halo exchange. Single-device throughput and laptop-GPU speed-ups are in Supplementary Information §7.
The throughput reported in Figure 4 is for forward model steps only; critically, reverse-mode differentiability is preserved: gradients flow correctly through MPI halo exchange and global sum reductions, verified against single-rank references to machine precision (Methods). A full gradient step for a dry dynamical core costs only 5.4x a forward step on a single GPU, and gradient checkpointing cuts peak memory effectively (from 8.0 to 0.73 GB) at no measurable wall-clock cost, making end-to-end gradients practical for short rollouts on a single device.
Accessibility, reproducibility and physical consistency
legoESM is written in Python so that it can reach the broadest group of users, as Python is the language most widely used by students, early-career researchers and scientists in adjacent disciplines. The model is modular and composable by construction, so that specific parameterizations or
hypotheses can be tested in isolation or coupled to specific components, and an entire experiment is typically defined in a few lines of readable code (selecting a grid, a complexity rung, a set of physics schemes and a forcing; Supplementary Information §8). The model runs without modification or manual compilation on hardware ranging from laptops to supercomputers, which is essential for a genuine community model with global reach, for both research and education. It is also designed for fast prototyping of new ideas or hypotheses, whether by coding directly or by delegating the implementation to agents, which greatly shortens the model development cycle. As coding agents mature, we expect writing model code by hand to become increasingly the exception, shifting the scientist’s role towards specifying, testing and interpreting. Finally, to make results reproducible, every run automatically records a manifest of everything needed to repeat it (the fully resolved configuration, a checksum of the model state, the git commit and the library versions), so that a simulation can be re-run with a single command and reproduced bit for bit on the same hardware and software stack.
Conclusion
We present legoESM, a novel modelling framework for the Earth system made of composable, differentiable building blocks. legoESM shows that a single, high-level, differentiable code base can span the ESM hierarchy, from large-eddy and cloud-resolving simulation to global atmosphere and ocean simulations, while remaining composable enough to swap dynamical cores, grids, physics schemes and complexity levels as interchangeable bricks, and differentiable end-to-end to calibrate variables, physical parameters, and train embedded neural networks by gradient descent through the model. Concretely, the architecture makes practical several things that are challenging or impossible in a conventional model: differentiating a whole-model back to the parameter or input that controls it (end-to-end sensitivity and attribution); training an embedded neural component online, through the model’s own evolution rather than on offline single-step tendencies; and, although not new in itself, running models across scales from a large-eddy column to a global simulation within the same differentiable code, which facilitates clean cross-scale comparison. These capabilities, rather than any single simulation, are the novelty we wish to demonstrate.
Two points deserve attention. First, treating differentiability and composability as architectural building blocks, rather than features added onto an existing model, makes the hierarchy continuous and the model flexible. Any of the parameterizations or component can be coupled to other parts of the system based on either physics or AI and, importantly, trained in tandem. Second, the model was built largely by AI agents, but its trustworthiness rested on a human-authored scientific definition, choices and validation. We found adversarial agent review and persistent iteration loops essential precisely for the problems where physical intuition is hard to encode, such as resolving grid-imprint artifacts at cubed-sphere edges (Supplementary Fig. S4c). A key aspect of the model concerns the role of benchmarks. Agentic development of legoESM was possible only because the community has, over decades, distilled its understanding into open, well-posed benchmark cases and datasets, from the standard dynamical-core tests to intercomparison projects. These were used to give the agents unambiguous targets against which the model could be checked, and iteratively corrected. Such benchmarks remain sparse for some components, notably the land surface, sea ice, biogeochemistry and the coupled system, where fewer well-posed, openly shared reference cases exist. Community efforts to create and share such baselines would directly benefit agent-assisted model development.
We believe that legoESM represents a shift in computational science: while a model’s source code was once the primary repository of physical understanding, in an agentic workflow the code becomes comparatively inexpensive to regenerate, and it is the tests, benchmarks and reference datasets, the accumulated work of the whole community, as well as the methodology to reach the final model, that increasingly encode what we know and that must be curated and preserved most carefully. This is an important point for the weather and climate community in the future and likely requires a community effort to fully exploit the potential. Finally, legoESM builds on the immense body of physical understanding encoded in community models developed over decades (from the parameterizations of the Community Earth System Model [3], the ocean physics of NEMO[70], the dynamical cores pioneered at GFDL, and many others), repackaged in a modern, differentiable composable and swappable infrastructure. This paper is a demonstration of the potential of this new type of architecture rather than a finished ESM. The model as of now is not as complex as established operational models. The framework is not meant to be finished but rather to be an agile, evolving infrastructure for and by the community. This raises governance questions for a federated framework: a core team can curate, test and integrate contributions into a common reference version, or users can fork the code and adapt it for their own purposes, which requires less long-term maintenance but makes it harder to integrate and evaluate improvements across the framework. A combination, in which contributions that pass the shared benchmark and contract tests are merged into a reference version, seems most promising.
Two caveats apply. Gradient-based calibration allows data assimilation, initial state estimation and optimal parameter tuning to reduce model bias and errors, but it does not remove structural error in physics-based parameterizations. A well-tuned simulation can therefore still carry substantial biases due to its inherent model structure. The flexibility of the model nonetheless allows replacing defaulting structures with pure machine learning models with many degrees of freedom and see whether those can address the biases. Moreover, gradients through long rollouts of chaotic dynamics can become noisy or explode 104, so calibration windows, time-averaged losses or ensemble statistics must be chosen with care to address those issues. Further, the model capability to swap parameterization and to use gradients for sensitivity can be used to pinpoint sources of biases. We expect that this will become an important strategy in the future to refine parameterizations. While the differentiable coupler makes assembling components straightforward, we anticipate the same hard coupled-system problems that challenge established models, such as spurious deep-water formation in the Labrador Sea, drift in the Atlantic meridional overturning circulation 117, or biases in tropical interannual variability[8] [118] that are likely to remain difficult to resolve. However, the capacity to calibrate parts of the model much faster should enable more rapid testing of solutions for coupled model problems. Such differentiable, AI-ready infrastructure is a concrete step toward the hybrid ESMs that are increasingly seen as a route to sharper, more actionable climate projections[32]. By making the full coupled system transparent, with common coding and inline-documentation standards set from the outset, easy to differentiate and easy to run on modern hardware, we hope to lower the barrier to experimentation and to invite the community to build on and contribute to it.
To make the modelling framework usable and verifiable by the community, we include a set of curated reference configurations, idealized dynamical-core tests, radiative-convective equilibrium, and test cases (from large-eddy simulations to single column models) as well as AMIP, OMIP and LMIP and cross-reference, so that a student or a new group can reproduce a well known baseline before modifying it. As such, legoESM is intended as an open, evolving research and educational tool, for theoretical insight, hypothesis testing and clean counterfactual experiments, and, in time and with sustained community contributions, potentially evolving towards a full-fledged weather and climate model.
Finally, our modelling strategy aims to be a template that can extend beyond weather and climate. The design choices underlying legoESM (composability, differentiability, hardware portability, and agent-assisted development under a human-defined scientific contract) are responses to structural challenges shared by many multiscale physical systems: astrophysics, materials science, plasma physics, fluid dynamics, and neurosciences. Those systems all couple processes across vastly different scales, all benefit from gradient-based inverse methods, and all face the same tension between legacy code and modern accelerators. A composable, differentiable, agent-built framework in which domain scientists specify the governing logic, conserved quantities and criteria while AI agents write and mechanically verify the implementation offers a template for simulation-based science more broadly, wherever physical models are complex and data are abundant.
Methods
The complete governing equations and numerical methods of all components are given in Supplementary Information §1; this section summarises the computational implementation. End-to-end differentiability, conservation and stable-shape (non-retracing) JAX execution are treated throughout as hard constraints.
Agentic development methodology
legoESM was implemented by large-language-model coding agents in an agentic coding environment under a human-authored specification. Most of the code was written by Claude (Anthropic; the Fable, Opus and Sonnet model families) driving edits, test execution and debugging, and a second agent based on Codex (OpenAI), a separately trained LLM family, performed adversarial review of every substantial change; GLM (Zhipu AI) was used for part of the implementation. A human-maintained specification fixed the conserved quantities, sign and unit conventions, valid scheme sets, reference literature and per-component acceptance criteria, and domain scientists reviewed and adjudicated the scientific choices at each step (expert-in-the-loop). For hard, slowly-converging problems (multi-node scaling; cube-edge grid artifacts) the persistent-iteration loop described in the main text [72] was used; community agent-skill libraries (agent-skills 119, superpowers 120) were used in the final hardening stages to reach production-level code quality and to surface subtle bugs. Agents also iteratively improved weak and strong CPU and GPU scaling, including multi-node MPI and multi-GPU performance, on the NSF NCAR Derecho and DKRZ Levante supercomputers. Physical contracts were enforced mechanically throughout development by continuous-integration tripwires (see Verification harness below).
Use-case configurations. The convection sweep (Supplementary Information §3) ran each scheme, unchanged, in the 40-level single-column model to a statistically steady radiative–convective equilibrium at sea-surface temperatures of 295, 300 and 305 K and scored the equilibrated temperature and water-vapour profiles against cloud-resolving simulations of the same cases, aggregated into a joint score over the three cases. One parameter set per scheme was then calibrated jointly across the three cases by gradient descent, repeated with two random seeds. The land calibration (Figure 2) optimized per-plant-functional-type soil-water and surface parameters by gradient descent (Adam 97) against ERA5 99 annual-mean skin temperature, with physical bounds imposed by sigmoid transforms and gradients taken through the differentiable land integration. Ocean comparisons (Figure 3) integrated the three-dimensional ocean on MPAS/Voronoi and tripolar grids against NEMO [70].
JAX implementation and differentiability. All components are pure-functional JAX, integrated in time with lax.scan and using jnp.where/lax.cond for data-dependent branching so that the program is differentiable and JIT-compilable. State objects and fields are registered as pytrees, so jit, grad, vmap and scan apply through the whole coupled model. Implementation details that preserve differentiability and avoid recompilation (for example, static feature gates, a non-donating time-stepping kernel for use inside gradient computations, and time-varying forcings passed as explicit traced arguments) are documented with the code.
Differentiable distributed execution. Distributed runs use initialize_distributed to build the MPI topology, then scatter to rank-local tiles, step, and gather only for I/O. Halo exchange uses a four-dimensional path that sends all vertical levels in one message per neighbour. Reverse-mode gradients flow through communication: every sendrecv is wrapped in a custom vector–Jacobian product that swaps source and destination ranks in the backward pass, and the mass-conservation fixers differentiate through allreduce(SUM). Only summation reductions are AD-safe; max/min/allgather are restricted to diagnostics. Multi-rank results are verified against single-rank references to , and gradients are checked the same way.
Verification harness. The human-authored specification was enforced by mechanical tripwires in continuous integration: physical constants could come only from a central registry; saturation curves could come only from the shared thermodynamics module; every scheme factory had to raise on an unknown selection rather than silently default; and additive physics composition was asserted to machine precision. Each physics module declared a contract (units, signs, conserved quantities, differentiability, reference, idealized test), and a self-test proved each tripwire to be non-vacuous. Dynamical cores were gated on the standard sphere test set 85,88,89; spatial/grid artifacts additionally required visual regression because error norms are necessary but not sufficient. Substantial changes additionally passed an adversarial code-review agent.
Configurations for the figures. Shallow-water tests used cubed-sphere C36, lat–lon , icosahedral level-5 and spectral T21 grids (Supplementary Information §2). RCE convection sweeps (Supplementary Information §3) used the single-column model with shared physics at sea-surface temperatures of 295, 300 and 305 K. LES and CRM cases used the nonhydrostatic plane core, the latter following the RCEMIP RCE300 protocol 84 (Supplementary Information §4). Ocean comparisons (Figure 3) used MPAS/Voronoi (icosahedral) and tripolar (eORCA) grids against NEMO[70]. Single-device throughput and speed-ups were measured on a consumer-class RTX GPU, and strong scaling (Figure 4) on the DKRZ Levante system with four NVIDIA A100-80GB GPUs or two 64-core AMD EPYC 7763 CPUs per node (Supplementary Information §7). Full settings are in Supplementary Information §1–§10.
Data availability
The ERA5 reanalysis is available from the Copernicus Climate Data Store. NEMO reference output and the idealized-test, LES, CRM and OMIP datasets used for the figures are available from the authors and via the model repository.
Code availability
legoESM is open source (MIT licence) and under active development at https://github.com/climate-federation/legoESM. A separate, version-frozen companion repository (legoESM v1.0), archived on Zenodo with a citable DOI on acceptance, contains the notebooks, configurations and reference data needed to reproduce every figure and experiment in this paper, so that the results remain reproducible independently of the evolving model code.
Acknowledgements
We thank Owen Hughes and Christiane Jablonowski for valuable discussions and Owen Hughes for pointing us to several atmospheric dycore benchmarks we did not have. legoESM builds on parameterizations and numerical methods developed over decades by the broader climate modelling community, including contributions from the CESM, GFDL, ECMWF, NCAR, CICE and NEMO development teams, and we gratefully acknowledge that heritage (Extended Data Table S1–10). We also thank the CMIP community for the forcing datasets used in the atmosphere-, ocean- and land-only simulations. This work was supported in part by the U.S. National Science Foundation Science and Technology Center “Learning the Earth with Artificial Intelligence and Physics” (LEAP) award #2019625-STC, and by the European Research Council (ERC) Synergy Grant “Understanding and Modelling the Earth System with Machine Learning” (USMILE) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 855187). V.E. and A.P. were supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) through the Gottfried Wilhelm Leibniz Prize awarded to Veronika Eyring (reference no. EY 22/2-1). legoESM was developed with the assistance of AI coding agents (Claude, Codex and GLM) operating under a human-authored scientific specification, and made use of the open-source agent-skills (https://github.com/addyosmani/agent-skills) and superpowers (https://github.com/obra/superpowers) libraries. This work used resources of the Deutsches Klimarechenzentrum (DKRZ), granted by its Scientific Steering Committee (WLA) under project ID no. 1596. D.M.L. is supported by the NSF National Center for Atmospheric Research, which is a major facility sponsored by the U.S. National Science Foundation under Cooperative Agreement No. 1852977.
Author contributions
P.G. conceived the scientific vision, led the project, specified the scientific contract and wrote the paper. V.E. co-shaped the scientific vision and helped guide the modelling and evaluation approach. D.B., L.H. and A.P. led the OMIP, LMIP and AMIP developments and simulations, respectively. P.G., D.B., L.H., A.P., A.A., J.F., A.L., K.D.L., D.M.L., J.L.S., J.M., D.W.-P. and V.E. contributed to model design, component development, validation and analysis across the atmosphere, ocean, land, sea ice, coupler, machine-learning and high-performance-computing subsystems. All authors discussed the results and edited the manuscript.
Competing interests
The authors declare no competing interests.
Extended Data
legoESM re-implements, within a single differentiable framework, numerical methods and parameterizations developed by the weather, climate, ocean and machine-learning communities over many decades. Extended Data Table 1–10 credit the principal schemes available in each component together with their community lineage; the lists are representative rather than exhaustive.
Table 1. Extended Data Table 1 | Radiation schemes and community lineage.
Extended Data tbl:2 | Convection schemes and community lineage.
| Scheme | Description | Community lineage |
| Simplified Betts–Miller | Relaxation to reference profile with CAPE trigger | Betts & Miller (1986, QJRMS); Frierson (2007, JAS) |
| Bechtold | Mass-flux deep/shallow with CAPE closure | Bechtold et al. (2001, QJRMS); ECMWF IFS lineage |
| Tiedtke | Mass-flux with moisture-convergence closure | Tiedtke (1989, MWR); ECHAM lineage |
| Kain–Fritsch | Mass-flux with dilute CAPE closure | Kain & Fritsch (1990/1993, JAS); WRF/NCAR |
| Zhang–McFarlane | CAPE-based mass-flux with downdrafts | Zhang & McFarlane (1995, Atmos.–Ocean); CESM/CAM |
| Emanuel | Spectral mass-flux with sub-cloud quasi-equilibrium | Emanuel (1991, JAS); MIT lineage |
| Kuo | Moisture-convergence closure | Kuo (1965/1974, JAS) |
| Deep convective adjustment | Column instability removal by mixing | Manabe et al. (1965, MWR) |
| Unified mass-flux | Entraining–detraining bulk plume sharing the updraft core of the mass-flux family | Tiedtke (1989, MWR); Bechtold et al. (2001, QJRMS) lineage |
| EDMF | Eddy-diffusivity/mass-flux unified BL–shallow | Siebesma et al. (2007, JAS); ECMWF/Siebesma lineage |
Table 2.
| Scheme | Description | Community lineage |
| Kessler | Warm-rain autoconversion, accretion, evaporation | Kessler (1969) |
| Sundqvist large-scale condensation | Prognostic cloud water with diagnostic precipitation | Sundqvist et al. (1989, MWR); ECMWF/ECHAM lineage |
| Morrison double-moment | Two-moment ice–liquid with five hydrometeor categories | Morrison et al. (2005, JAS); NCAR/WRF |
| Seifert–Beheng | Two-moment warm + ice microphysics | Seifert & Beheng (2006, Meteorol. Atmos. Phys.) |
| Thompson | Mixed-phase with aerosol-aware option | Thompson et al. (2008, MWR); WRF/NOAA |
| Predicted Particle Properties (P3) | Two-moment ice–liquid with predicted particle properties for ice phase | Morrison & Milbrandt (2015); NCAR/WRF |
| Fast Spectral Bin Microphysics (SBM) | Fast SBM scheme | Hebrew University Cloud Model (HUCM); WRF fast-SBM (Khain et al. 2010); Shpund et al. (2019) |
| Lagrangian super-droplet microphysics | Monte-Carlo super-droplet microphysics | Shima et al. (2009, QJRMS); PySDM [41]; ERF |
Table 3. Microphysics schemes and community lineage.
Table 4. Boundary-layer turbulence schemes.
| Scheme | Description | Community lineage |
| Louis | First-order stability-dependent | Louis (1979, Boundary-Layer Meteorol.) |
| Holtslag–Boville | Nonlocal countergradient transport | Holtslag & Boville (1993, J. Climate); NCAR/CESM |
| YSU | Nonlocal -profile with explicit entrainment | Hong et al. (2006, MWR); WRF/Yonsei |
| TKE 1.5-order | Prognostic TKE with diagnostic length scale | Mellor & Yamada (1982, Rev. Geophys.) |
| EDMF | Eddy-diffusivity/mass-flux unified boundary layer–shallow convection | Siebesma et al. (2007, JAS); ECMWF/Siebesma lineage |
| MYNN 2.5 | Level-2.5 TKE closure with improved mixing length | Nakanishi & Niino (2009, J. Meteorol. Soc. Jpn); WRF/NOAA |
| CLUBB | Assumed-PDF higher-order closure | Golaz et al. (2002, JAS); CESM/E3SM |
| CLUBB-lite | Higher-order closure (simplified) | Golaz et al. (2002, JAS); CESM/E3SM |
| Smagorinsky | Diagnostic eddy viscosity for LES/CRM (constant-coefficient and scale-dependent dynamic) | Smagorinsky (1963, MWR); Germano et al. (1991); Porté-Agel et al. (2000) |
Table 8.
| Scheme | Description | Community lineage |
| Lindzen | Orographic and convective gravity-wave breaking | Lindzen (1981, JGR) |
| Hines | Doppler-spread non-orographic GWD | Hines (1997, JAS); ECHAM/DLR |
| McFarlane | Orographic wave breaking with saturation | McFarlane (1987, JAS); CESM/CCCma |
| Rayleigh | Sponge-layer damping | Standard implementation |
Table 5. Gravity-wave drag schemes.
| Scheme | Description | Community lineage |
| KPP | -profile parameterization for the surface boundary layer | Large et al. (1994, Rev. Geophys.); NCAR/CESM/MOM |
| Gent–McWilliams | Isopycnal eddy transport with skew flux | Gent & McWilliams (1990, JPO) |
| Redi diffusion | Along-isopycnal tracer diffusion | Redi (1982, JPO) |
| Visbeck adaptive GM | Flow-dependent GM coefficient | Visbeck et al. (1997, JPO) |
| Jayne–St Laurent tidal mixing | Abyssal tidal dissipation parameterization | Jayne & St Laurent (2001, GRL) |
| Split-explicit barotropic | Free-surface sub-cycling | Shchepetkin & McWilliams (2005, Ocean Model.) |
Table 6. Ocean physics parameterizations.
| Scheme | Description | Community lineage |
| Slab energy balance | Single-layer energy balance with bucket hydrology | Manabe (1969, MWR) |
| Multi-layer Richards | Mixed-form Picard solver with six retention curves | van Genuchten (1980, SSSAJ); CLM/CESM lineage |
| DALEC carbon | Six-pool carbon cycle (labile/foliage/root/wood/litter/SOM) | Williams et al. (2005, Global Change Biol.) |
| Farquhar photosynthesis | C3 biochemical model with stomatal conductance | Farquhar et al. (1980, Planta); Medlyn et al. (2011, Global Change Biol.) |
Table 7. Land-surface and carbon-cycle schemes.
Sea-ice schemes
| Scheme | Description | Community lineage |
| Zero-layer thermodynamics | Semtner zero-layer ice–ocean heat balance | Semtner (1976, JPO) |
| EVP/mEVP rheology | Elastic–viscous–plastic ice dynamics | Hunke & Dukowicz (1997, JPO); Bouillon et al. (2013); CICE lineage |
| Multi-category ITD | Ice-thickness distribution with linear remapping | Lipscomb (2001, JGR); CICE/CESM |
Table 11.
| Scheme | Description | Community lineage |
| COARE 3.0 bulk fluxes | State-of-the-art air–sea bulk-flux algorithm | Fairall et al. (2003, J. Climate) |
| Large & Yeager bulk fluxes | Alternative bulk flux for climate-model coupling | Large & Yeager (2004, NCAR Tech. Note); CESM |
| Briegleb ocean albedo | Zenith-angle-dependent ocean surface albedo | Briegleb et al. (1986); Briegleb (1992) |
Table 9. Coupler and surface-flux schemes.
| Scheme | Description | Community lineage |
| SFNO (spherical FNO) | Spherical Fourier neural operator for learned dynamics on the sphere | Bonev et al. (2023, ICML); Pathak et al. (2022), FourCastNet |
| NeuralGCM coupling | Learned atmospheric emulator coupled to legoESM physics and ocean | Kochkov et al. (2024, Nature) |
| 4D-Var DA | Incremental variational assimilation with exact adjoint from reverse-mode AD | Courtier et al. (1994, QJRMS) |
Table 10. Machine learning and data assimilation.
Supplementary Information for legoESM: a modular, differentiable, multiscale, AI-ready Earth system model built with AI agents
supplementary.pdf
This Supplement provides (§S1) a self-contained description of the main governing equations and numerical methods; (§S2) the dynamical-core verification; (§S3) the composability details; (§S4) the large-eddy, cloud-resolving and atmosphere-only (AMIP) simulations; (§S6) ocean validation; (§S7) land-surface validation; (§S8) performance and scaling; (§S9) accessibility and a code example; (§S10) operator-level physical-consistency tests; and (§S11) variational data assimilation. A complete description is in the legoESM Scientific Guide that ships with the source code on GitHub.
Model description: governing equations and numerics
Our strategy is to have a modular, brick-like structure for our Earth System Model (ESM). As such, legoESM is developed as a federation of packages sharing one namespace under a one-way dependency graph (core {\text{atmosphere, ocean, land, ice}} {\text{coupler, ml, tools}}; main-text Figure 1). All code is written in pure-functional JAX, with 32- or 64-bit floating-point precision.
Horizontal grids
Because the equation set and the spatial discretization are independent choices in legoESM, each component may be integrated on any of several horizontal meshes. The atmosphere and the ocean draw on a common operator library, so that a mesh implemented for one component is in principle available to the other.
Atmospheric horizontal grids Five families are currently supported.
(i) Cubed sphere Six faces are mapped to the sphere by an equiangular gnomonic projection[1, 2] and discretized in the FV3-style C-D arrangement with piecewise-parabolic transport. With equiangular coordinates , the cell area on a face is
so that integration over the six faces recovers to round-off and area is conserved discretely. Vector halo exchange rotates to geographic components across panel seams, and a duo-grid treatment of the edges suppresses the residual differential-operator imprint[3]. The duo-grid treatment was implemented following the published formulation, with the original FV3 code as the reference implementation, and was verified iteratively: after each code revision the shallow-water and baroclinic-wave tests (§2) were rerun and assessed with error norms, global mass and momentum budgets, and visual inspection of the meridional wind on the native mesh for panel-edge artifacts, and the cycle was repeated until no panel-edge imprint was visible (Figure S4).
Figure S4. Jablonowski–Williamson baroclinic-wave test, hydrostatic cubed-sphere C36, days 0–10. The instability grows at the expected rate and in the expected location. The meridional wind is additionally shown on the native cubed-sphere mesh, where any residual imprint of the panel edges would be most apparent.
(ii) Latitude–longitude A regular spherical mesh is discretized on the Arakawa C grid with finite-volume operators[4]; a polar filter relaxes the severe time-step restriction that would otherwise be imposed by the convergence of the meridians.
(iii) Gaussian (spectral). Fields are represented by spherical-harmonic coefficients under triangular truncation at total wavenumber [5]. The transform consists of a fast Fourier transform in longitude followed by Gaussian quadrature in latitude using the fully normalized associated Legendre functions . Because the Laplacian is diagonal in this basis, , the linear operators are exact within the truncated spectral representation and free of grid imprint, and hyperdiffusion takes the form .
(iv) Unstructured Voronoi (MPAS). A centroidal Voronoi tessellation is combined with mimetic TRiSK operators[6, 7, 8], with scalars at cell centres, normal velocities at edges and vorticity at vertices,
(v) Doubly periodic Cartesian plane A planar mesh with periodic lateral boundaries is used for the large-eddy and cloud-resolving configurations, for which the spherical metric terms reduce to their Cartesian limits.
Oceanic horizontal grids We distinguish grid families (a discretization and its operator set) from the specific meshes and configurations built on them. Four families are supported. (i) The structured Arakawa C grid provides the reference configuration; it is used on regular latitude–longitude and Mercator meshes and, in curvilinear form, on the NEMO-style tripolar mesh (eORCA), which displaces two northern poles over land in order to remove the polar singularity from the ocean domain; its folded northern boundary is treated by a dedicated halo exchange that enforces the correct parity of scalar and vector fields across the fold. (ii) The cubed sphere is available in the same C-D arrangement used by the atmosphere. (iii) The unstructured Voronoi (MPAS) mesh supports variable-resolution configurations. (iv) Unstructured triangular meshes of the FESOM type [9] are used for the idealized benchmarks (Figure S14) and the eddy-permitting FESOM2 FORCA20 configuration (Figure S17).

Figure S14. Ocean benchmark suite on four meshes. Each row is one idealized case and each column one mesh (lat–lon, MPAS/Voronoi, FESOM-type unstructured and tripolar); sea-surface height is shown for the wave and adjustment cases and sea-surface temperature for the tracer cases, with one shared colour scale per row (range printed beside the case name). Cases without land are not defined on the realistic-coastline FESOM and tripolar meshes. Every applicable case passes on each grid on which it is defined.

Figure S17. Eddy-permitting global ocean configurations on unstructured meshes. (a) Sea-surface temperature, salinity and height, temperature at 108 and 1023 m and sea-floor depth on the native 15-km MPAS icosahedral mesh, three days after initialization with JRA55-do forcing (1958). (b) Instantaneous surface speed, sea-surface height, temperature and salinity, vertical velocity at level 5 and temperature at level 30 on the native FESOM2 FORCA20 mesh (1958, day of year 244).
Vertical coordinates
Atmosphere Three vertical coordinates are implemented. The first is a terrain-following sigma coordinate, . The second is a hybrid sigma–pressure coordinate, , which is terrain-following near the surface and becomes pressure-like aloft. The third is a terrain-following height coordinate, used by the nonhydrostatic core in cloud-resolving and large-eddy configurations. Geopotential is evaluated with the energy-conserving Simmons–Burridge discretization [10],
Ocean The ocean employs a dynamic coordinate in which the free surface is distributed over the water column through the layer Jacobian , so that layer thicknesses vary smoothly with the free surface rather than being absorbed entirely by the uppermost cell. Level spacing may be uniform, prescribed from a table of thicknesses, or generated by an analytic stretching function that refines the near-surface resolution. The bottom boundary is represented either by full steps or by partial cells, the latter allowing the deepest cell of each column to be thinned so as to follow the bathymetry more faithfully.
Atmospheric dynamics
Shallow water (vector-invariant)
with Bernoulli function and relative vorticity . On the cubed sphere the FV3-style C-D grid carries momentum on the D-grid and diagnoses C-grid mass fluxes, with PPM transport [2, 11, 12]; the circulation-based corner vorticity removes the Hollingsworth–Källberg instability.
Hydrostatic primitive equations ()
with and diabatic heating from physics. The spectral core advances the vorticity–divergence form with the fast gravity-wave terms treated semi-implicitly [13], yielding a per-wavenumber Helmholtz solve pre-factored at initialization. The nonhydrostatic core integrates the fully compressible Euler equations on a terrain-following height coordinate for CRM/LES use.
Coupling legoESM uses time-split coupling between dynamics and physics: the dynamical core updates the state, then the physics pipeline evaluates the parameterizations in the order radiation deep convection shallow convection/large-scale condensation microphysics boundary-layer turbulence gravity-wave drag surface fluxes, followed by conservation fixers and diagnostics. By default, each parameterization is evaluated from the same post-dynamics state and the resulting tendencies are summed (process splitting), so that the evaluation order does not affect the result (see §S3). A grid-agnostic column adapter reshapes any grid’s 3D state to for physics.
Atmospheric physics (selected closures)
Radiation is either gray (Frierson-style [14]) or correlated- RRTMGP [15]. Convection schemes include mass-flux closures (Tiedtke [16], Zhang–McFarlane [17], Bechtold, Kain–Fritsch, Emanuel, EDMF), which share a unified updraft core, as well as Kuo, simplified Betts–Miller (SBM) and deep convective adjustment (DCA). Surface exchange uses Monin–Obukhov similarity; boundary-layer mixing offers Louis, Holtslag–Boville, YSU, EDMF, TKE and Smagorinsky [18] options. Warm-rain microphysics ranges from Kessler to two-moment schemes and a super-droplet method [19]. Each scheme is a factory returning physics_fn(state, grid, coord) tendencies, and the combined tendency equals the sum of the enabled process tendencies to floating-point round-off (§3).
Ocean
The ocean solves the hydrostatic Boussinesq primitive equations with a split-explicit free-surface barotropic solver [20], KPP vertical mixing [21], GM–Redi isopycnal/eddy mixing [22], and a TEOS-10-style polynomial equation of state. Tracers obey , with the layer thickness and the (rotated) diffusivity tensor. The barotropic subsystem is advanced either implicitly (Crank–Nicolson) or by split-explicit barotropic sub-cycling [20], with the barotropic sub-step limited by a local CFL criterion; both conserve volume and tracers to within the tolerances specified in the ocean component’s physical contract and enforced by the continuous-integration tests (main-text Methods, Verification harness). The ocean offers more options (vertical coordinates, mixing schemes, equation-of-state variants and boundary treatments) than are described here; the complete, up-to-date list is maintained in the model documentation (Scientific Guide) distributed with the source code.
Land, sea ice, coupler, ML
The multi-layer land model solves the mixed-form Richards equation1 for soil moisture, Johansen thermal diffusion for soil temperature [23], Farquhar photosynthesis [24] with Ball–Berry stomatal conductance, and a DALEC-style carbon cycle. Sea ice uses EVP/mEVP rheology [25] with a multi-category thickness distribution and energy-conserving thermodynamics. The coupler exchanges area-weighted surface fluxes over sub-grid tiles with a Monin–Obukhov surface layer. The ml package provides spherical Fourier neural operators [26] (built on Fourier neural operators [27]), conservation-aware losses, differentiable training drivers, and variational (4DVar) data assimilation that differentiates through the compiled time-stepping kernel.
Dynamical-core verification
legoESM is gated on the standard sphere test set [28, 29, 30]. Figure S2 shows cosine-bell solid-body advection (Williamson case 1) on the cubed sphere; the bell traverses panel edges without visible distortion. Figure S3 shows the Williamson 5 (flow over an isolated mountain) and Williamson 6 (Rossby–Haurwitz wave) tests on the cubed sphere. The Jablonowski–Williamson baroclinic wave is shown for surface pressure and near-surface wind speed in Figure S4. Because the equation set and the numerical discretization are independent choices in legoESM, the same shallow-water problem can be solved on every grid: in Figure S1, the cubed-sphere, lat–lon, icosahedral and spectral cores show close visual agreement for cosine-bell advection, steady zonal geostrophic flow (Williamson 2), flow over a mountain (Williamson 5) and the Rossby–Haurwitz wave (Williamson 6); the only visible difference is the expected Gibbs ringing of the truncated spectral (T21) transform around the sharp-edged cosine bell. Global mass is conserved to floating-point round-off, as checked by the test suite; energy and potential-enstrophy budgets close to within scheme-dependent tolerances, which are specified for each dynamical core in the acceptance tests distributed with the code (main-text Methods).

Figure S1. The same shallow-water equations solved on four grids. Height field after one day for (a) cosine-bell advection, (b) steady zonal geostrophic flow, (c) flow over an isolated mountain and (d) the Rossby–Haurwitz wave, and (e) wind speed for the mountain case, each integrated on the cubed-sphere (C36), lat–lon (), icosahedral (level 5) and spectral (T21) discretizations. The solutions show close visual agreement across grids, apart from the Gibbs ringing of the T21 spectral transform around the cosine bell; the physical equation set and the numerical method are selected independently [28].

Figure S2. Cosine-bell advection (Williamson case 1) on the cubed sphere (C36), shown in the lat–lon projection at successive times. The tracer shows no visible change in shape or amplitude as it crosses cube-panel edges.

Figure S3. (a) Williamson 5 (flow over a mountain) (b) Williamson 6 (Rossby–Haurwitz wave). Shallow-water test cases on the cubed sphere (C36). Height field for (a) flow over an isolated mountain (Williamson case 5) and (b) the Rossby–Haurwitz wave (Williamson case 6)[28].
Composability
Composability operates on three orthogonal axes (main-text Figure 1): grid, complexity and physics. Physics composition is additive: because each process tendency is evaluated from the same input state (process splitting, §S1), holds to floating-point round-off (up to the order of summation), which is asserted by tests. This is a property of the parallel process-split discretization, not of numerical models in general: under sequential (time-split) application of processes, or when a scheme adjusts the state seen by the next one within a time step, the result depends on the order of operations and exact additivity is lost. A process is disabled by setting its scheme to "none", and every factory raises on an unknown scheme rather than silently defaulting. An entire component can be swapped the same way: in a short atmospheric integration the same slot accepts (i) the classical physics suite, (ii) a column neural network, or (iii) a full SFNO dynamical core; and the ocean can be run as prescribed SST, a slab mixed layer, or a full three-dimensional model from one driver. Table S1 lists the dynamical cores; Table S2 and Table S3 list the physics and ocean/land/ice schemes.
| Component | Schemes |
| Ocean vertical mixing | KPP, Richardson, constant; Jayne–St-Laurent tidal |
| Ocean lateral mixing | harmonic, biharmonic, GM–Redi, Visbeck, Leith, backscatter |
| Ocean grid families (meshes) | C grid (lat–lon, Mercator, tripolar eORCA); cubed-sphere C-D; MPAS Voronoi; FESOM-type triangular |
| Land | slab (bucket); multi-layer Richards + Johansen thermal; DALEC carbon; snow |
| Sea ice | thermodynamic slab; EVP/mEVP dynamic; multi-category ITD; ridging, ponds, brine |
Table S3. Ocean, land and sea-ice schemes.
The same configuration-level swap is used to compare process representations under identical conditions. Figure S6 runs nine boundary-layer turbulence closures, unchanged, in a single column for the BOMEX trade-wind shallow-cumulus case and compares their mean profiles with a large-eddy simulation performed with the same model infrastructure. Figure S7 and Figure S8 do the same

Figure S6. Boundary-layer turbulence closures against large-eddy simulation (BOMEX). Mean profiles of potential temperature , water-vapour mixing ratio and the horizontal wind components and , averaged over hours 4–6, from nine single-column turbulence closures (coloured) and from the legoESM large-eddy simulation (black), together with the LES turbulent fluxes of heat () and moisture (). All closures reproduce the cloud-layer and inversion structure; they differ mainly in the sub-cloud mixed layer and in the near-surface momentum and moisture profiles.

Figure S7. Composability and gradient-based calibration of convection schemes in radiative–convective equilibrium. Each of ten convection parameterizations is run, unchanged, in a single atmospheric column to radiative–convective equilibrium (RCE) at sea-surface temperatures (SSTs) of 295, 300 and 305 K and scored against a cloud-resolving RCE simulation of the same case that uses the same microphysics (Morrison[32]) and radiation (RRTMGP[15]); lower scores are closer to the cloud-resolving reference. a, Joint thermodynamic score over the three cases with default parameters (grey) and after gradient-based calibration, optimized using Muon[31], of a single parameter set per scheme across all three cases (blue; mean ± s.d. over two optimization seeds), ranked by tuned score. All ten schemes reach an equilibrium and are scored. EDMF is closest to the reference; calibration improves the Tiedtke scheme about threefold, changes most other schemes little, and slightly degrades the mass-flux and Zhang–McFarlane schemes, whose tuned parameters also vary between seeds. b, Tuned score of each scheme at each SST: skill depends on the climate, with Kuo, Zhang–McFarlane and deep convective adjustment degrading with warming and EDMF improving. The blank cell (mass-flux at 295 K) is missing. The corresponding profiles are shown in Figure S8, and the complete scheme inventory is in Extended Data Table S2.

Figure S8. Jointly calibrated convection schemes against the cloud-resolving reference. Equilibrated temperature (top) and water-vapour mixing ratio (bottom) over the lowest 15 km in RCE at SSTs of 295, 300 and 305 K (columns), from the ten single-column convection schemes after joint calibration (coloured) and from the cloud-resolving reference (SAM configuration; thick black). Temperature spread is largest in the upper troposphere, where Kain–Fritsch and the simplified Betts–Miller scheme are too warm and Kuo and deep convective adjustment too cold. Humidity errors are proportionally larger and concentrated below about 6 km, where, for example, Emanuel and Bechtold are too dry and Zhang–McFarlane and Kain–Fritsch too moist, so that schemes with similar temperature skill can differ markedly in their moisture structure. Figure S7 reduces these profiles to one score per scheme and case.
for the ten convection schemes in radiative–convective equilibrium at three sea-surface temperatures, before and after gradient-based calibration (optimized using Muon[31]) against cloud-resolving references.
Multiscale: large-eddy and cloud-resolving suites
On a doubly periodic plane with the nonhydrostatic core and a scale-dependent dynamic Smagorinsky closure[18, 33, 34], legoESM reproduces the canonical LES cases: GABLS1[35], the neutral Ekman layer[36], the Wangara diurnal cycle[37], and the DYCOMS-II[38] and RICO[39] cloud-topped boundary layers (Figure S9). Cloud-resolving RCEMIP[40] runs (Figure S11) self-aggregate convection; warm-rain microphysics matches a super-droplet Golovin coalescence benchmark[19, 41] (Figure S12). The Lagrangian super-droplet method (SDM) is supplied here as a non-differentiable reference scheme rather than as a trainable component. Its particle-based formulation is closely connected to what is measured in laboratory and field observations of individual droplets, quantities that are otherwise very difficult to integrate at the global modelling scale because of the scale mismatch, which makes it a valuable reference for calibrating the bulk schemes used in coarser configurations[42].

Figure S9. Large-eddy simulation of canonical boundary layers. Evolution of the simulated profiles for (a) the Ekman layer, (b) the Wangara diurnal cycle, (c) DYCOMS-II stratocumulus and (d) RICO trade cumulus. Together with the GABLS1 stable boundary layer (Figure S10), these cases span the stable, neutral, diurnal, stratocumulus and shallow-cumulus regimes.

Figure S10. GABLS1 stable boundary layer. Instantaneous snapshot from the large-eddy configuration, showing the shallow, strongly stratified boundary layer that develops under prescribed surface cooling [35].

Figure S11. (a) RCEMIP surface/level fields (b) 3D condensate. Cloud-resolving radiative–convective equilibrium (RCEMIP RCE300). (a) Surface and level fields, in which convection has spontaneously self-aggregated, and (b) a three-dimensional snapshot of the condensate field [40].

Figure S12. Warm-rain collision–coalescence: legoESM super-droplet microphysics vs. the PySDM super-droplet reference on the Golovin analytic benchmark.
Atmosphere-only (AMIP) simulations
The atmosphere-only configuration follows the AMIP protocol of the CMIP6 DECK[43]: the ocean surface is prescribed from observations and the atmosphere and land surface are the only components free to evolve. Because the sea surface is prescribed, AMIP isolates the behaviour of the atmosphere and land surface from drift in a prognostic ocean: errors in the simulated climate arise from the atmosphere, the land, the forcing or the prescribed boundary conditions rather than from sea-surface temperature drift. It is also the configuration in which a model can be compared directly with observations over the satellite era, since the simulated year corresponds to the observed year. We integrate the standard DECK window, 1 January 1979 to 31 December 2014 (36 years), as a single continuous simulation.
Ocean and sea-ice boundary conditions Sea surface temperature (SST) and sea-ice concentration (SIC) are prescribed from the PCMDI AMIP boundary-condition dataset distributed through input4MIPs, the same product used by the CMIP models submitting the DECK amip experiment. These fields are not raw monthly means: they are the mid-month “boundary condition” values of Taylor et al. [44], constructed so that linear interpolation between adjacent mid-month values recovers the observed monthly means. The model therefore uses them as intended, interpolating linearly in time between the two bracketing mid-month anchors, and the interpolated value is evaluated once per simulated day and re-applied at every model step, so that the surface the physics sees is always current rather than lagged. Because the mid-month anchors deliberately overshoot the physical range in order to reproduce the monthly means, the physical limits (sea-ice fraction to , SST to the seawater freezing point) are imposed after interpolation and never on the anchors themselves; imposing them earlier would distort the monthly means that the dataset is built to reproduce. Spatially, the fields are interpolated bilinearly from the observational mesh to the model mesh, and ocean values are extended into land cells by nearest-neighbour fill, so that no coastal cell can be handed a missing value.

Figure S5. Shallow-water Williamson case 5 (flow over an isolated mountain) on the cubed sphere: the balanced height field and its error metrics, with no visible grid imprint at panel edges.
There is no ocean model and no prognostic sea ice in this configuration. The sea-ice concentration instead re-partitions each ocean cell: the surface temperature presented to the atmosphere is the area-weighted blend of the prescribed SST over open water and an ice-surface temperature over the ice fraction, and the surface albedo and emissivity are blended the same way, with the open-water albedo evaluated as a function of solar zenith angle rather than held constant. Turbulent and radiative surface fluxes are then computed from this prescribed surface with the same bulk and surface-layer schemes used in coupled mode. As a consequence, the ocean acts as an infinite heat and moisture reservoir: surface fluxes are diagnosed from the prescribed surface but cannot alter it, so atmospheric errors cannot be offset by changes in sea-surface temperature, and biases that may be partly compensated by SST drift in a coupled model remain visible.
External forcing All external forcings are transient over the full simulation period and are taken from the CMIP6 forcing datasets, so that the simulation is driven by the same imposed history as the CMIP6 historical and amip experiments. Solar forcing uses the CMIP6 solar dataset [45] in its spectrally resolved form: the total solar irradiance carries the 11-year cycle, and the accompanying band-resolved spectral irradiance is mapped onto the shortwave -points of the correlated- radiation scheme[15], so that the spectral distribution of the solar variation reaches the gas optics rather than only its integral. Insolation is computed for a realistic orbit [46], including the solar declination and the eccentricity-driven Earth–Sun distance factor, and the diurnal cycle is resolved explicitly, with radiation called every 15 simulated minutes. Greenhouse gases (CO, CH, NO, CFC-11, CFC-12) are prescribed as globally uniform, annually resolved concentrations from the CMIP6 historical concentration dataset [47], interpolated to model time. Ozone is prescribed from the CMIP6 monthly, zonally averaged, interannually varying ozone dataset [48], interpolated in time, in latitude, and onto each column’s own pressure levels at every radiation call, so that the stratospheric ozone trend and the seasonal Antarctic ozone hole are represented rather than replaced by a fixed climatology. Tropospheric aerosols are prescribed as optical properties rather than emissions, using
the monthly aerosol optical-property climatology of Kinne et al. [49] resolved across the 14 shortwave bands; this is the prescribed-aerosol option of the CMIP6 protocol and it represents the aerosol direct effect only, with no interactive aerosol, chemistry or aerosol–cloud indirect effect. Stratospheric volcanic aerosol is prescribed from the CMIP6 volcanic dataset, which is height resolved and carries both the extinction and the single-scattering albedo in 14 shortwave and 16 longwave bands. Both channels are used: the shortwave extinction and the longwave absorption optical depth are placed at the pressure corresponding to the true altitude of each aerosol layer, so that El Chichón (1982) and Pinatubo (1991) produce not only the surface dimming but also the stratospheric warming that accompanies it.
Because the model runs on a 365-day (no-leap) calendar while several forcing files are dated on a Gregorian calendar, forcing time is mapped by calendar date rather than by elapsed days. Over 36 years this matters: mapping linearly would accumulate a nine-day phase error between the forcing channels and the model’s own seasonal cycle.
Land surface The land is fully interactive and is run in the same configuration as in coupled simulations, rather than being reduced to a simpler surface for the atmosphere-only case. Soil moisture is advanced by the mass-conservative mixed-form Richards equation50? ,51 on a multi-layer column, soil temperature by heat diffusion with Johansen conductivity [23], and snow is prognostic with an albedo feedback. Surface properties (plant functional type, soil texture, glacier fraction) and the land–sea mask are taken from a single consistent surface dataset, so that the fraction of a cell treated as land by the flux calculation is the same fraction the land model integrates; deriving the mask independently, for example from bathymetry, misclassifies endorheic basins such as the Caspian and Aral seas as ocean and hands them a prescribed SST with unlimited moisture supply. Surface exchange uses a Monin–Obukhov surface layer over land and a bulk-flux algorithm (Extended Data Table 9) over the ocean. Land surface temperature, soil moisture, soil temperature and snow are hence prognostic and, together with the atmosphere, form the freely evolving part of the system; land hydrology may therefore develop biases relative to observations. Land use and land cover are held fixed at present-day values; this is a documented simplification relative to the CMIP6 protocol, which asks for transient land use in amip.
Initialization and spin-up The atmosphere is initialized directly from ERA5[52] at 00:00 UTC on 1 January 1979: temperature, horizontal winds, specific humidity and surface pressure are interpolated onto the model mesh and vertical coordinate. Because the initial state comes from a reanalysis rather than from a previous model integration, it is not in balance with the model’s own climate, and the model adjusts rapidly during the first days of the simulation. The land is cold-started from a uniform soil moisture and temperature profile with no snow, and no separate spin-up cycle is performed. The components adjust on different timescales: the atmosphere loses memory of its initial state within days to weeks, the seasonal snowpack and the upper soil within a season, whereas the deep soil column equilibrates only over years. We therefore discard the first simulated year from all evaluation, and we do not interpret deep-soil temperature or moisture trends over the early record. The spin-up strategy is stated explicitly here because, under the CMIP6 protocol, how quasi-equilibrium was established is part of the experiment definition.
A single realization is integrated. Since AMIP climate is largely, but not entirely, set by the imposed boundary conditions, unforced atmospheric variability contributes to any individual year; with one member we therefore evaluate multi-year statistics and do not attribute year-to-year differences to the forcing.
Integration protocol The 36 years are integrated as one continuous simulation on a single GPU. The run is chained across scheduler allocations: the model writes a complete restart checkpoint every 30 simulated days and, on reaching a wall-clock limit, checkpoints and exits cleanly, after which the next allocation resumes from that checkpoint. Restarts carry the full prognostic state, including the land column, the snow and the diagnostic accumulators, so the chain is a single restart-continuous integration rather than a sequence of independent segments, and monthly means computed across a restart boundary are not affected by the restart. Diagnostics (global-mean temperature, water vapour, precipitation and the top-of-atmosphere budget) are printed once per simulated day, which is fine enough that any instability can be localized to the day on which it began.
The experiment is defined by one machine-independent configuration file that fixes the model configuration, the physics selection, the forcing selectors and the output request; only the data paths are supplied at run time. Reproducing the experiment on another machine therefore requires changing paths and nothing else, and every run additionally emits a reproducibility manifest recording the resolved configuration, the git commit and the library versions.
Output Output is written as CF-1.8/CMOR-compliant NetCDF following the CMIP6 data reference syntax, one variable per file, regridded from the model’s native mesh to a regular latitude–longitude grid. The monthly atmospheric stream follows the CMIP6 Amon table and includes the near-surface and surface state (tas, ts, ps, psl, hurs), the hydrological cycle (pr, prw, evspsbl), the cloud fields (clt, clwvi, clivi), the full top-of-atmosphere and surface radiation budget, the turbulent heat fluxes and surface stresses, and the three-dimensional fields (ta, ua, va, hus, hur, zg, wap, clw, cli) interpolated onto the 19 standard CMIP6 pressure levels. A land monthly stream (Lmon) carries gross primary production, net ecosystem exchange, leaf area index, total and surface soil moisture and soil temperature, and a daily stream carries tas, tasmin, tasmax, pr, psl, rsut, rlut and 850 hPa winds for variability and extremes diagnostics. Clear-sky radiation is diagnosed alongside all-sky radiation at both the top of the atmosphere and the surface, so that the cloud radiative effect is obtained by differencing and a radiation error can be separated into a clear-sky (gas, ozone, aerosol, surface albedo) and a cloud contribution.
Evaluation Figure S13 compares simulated monthly-mean fields (December 2001) with observations, using the ESMValTool-based ClimateEval recipes[53] applied to CMIP6 models. The large-scale patterns of near-surface air temperature, water-vapour path, precipitation and cloud cover are reproduced (pattern of 0.93 for near-surface temperature and 0.91 for water-vapour path). The main biases are a global-mean cold bias of −2.5 K in near-surface air temperature, a precipitation deficit of about 10% (2.8 versus 3.1 mm d in GPCP), and too little reflected shortwave radiation at the top of the atmosphere (90.7 versus 108.8 W m in CERES-EBAF), consistent with too little total cloud cover (60.3 versus 65.5%), particularly over the subtropical stratocumulus decks and the Southern Ocean. These are typical targets for the gradient-based calibration described in the main text.

Figure S13. AMIP simulation against observations. December 2001 monthly means of top-of-atmosphere reflected shortwave and outgoing longwave radiation (CERES-EBAF), total cloud cover (ESA-CCI Cloud), precipitation (GPCP), water-vapour path (ERA5) and near-surface air temperature (HadCRUT5) from the legoESM atmosphere-only simulation (left; CAM6-like physics configuration), the observational reference (centre) and their difference (right). Global means are printed at the top left of each map; the root-mean-square error and the pattern at the top right of each difference map.
Ocean validation
The ocean is validated in three stages of increasing realism. First, a benchmark suite of idealized cases (states of rest with and without land and stratification, barotropic and inertia–gravity waves, geostrophic adjustment, a two-layer Phillips problem and a lock exchange) is run on four meshes spanning three of the grid families of §1.1 (the lat–lon and tripolar C-grid meshes, the MPAS/Voronoi mesh and a FESOM-type triangular mesh). Every applicable case passes on each grid on which it is defined; cases without land are not defined on the realistic-coastline FESOM and tripolar meshes (Figure S14). Second, legoESM is run as a twin of NEMO 5.0.2 in the idealized DINO basin configuration: after 360 days the two models agree to 5 × 10 °C (r.m.s.) in sea-surface temperature, 4 × 10 psu in sea-surface salinity and 10 m in sea-surface height (Figure S15). Third, realistic global configurations are compared with NEMO[54]. Beyond the sea-surface temperature and zonal means of the main text (main-text Figure 3), Figure S16 shows sea-surface salinity and mixed-layer depth on the tripolar and MPAS/Voronoi grids against NEMO. Figure S17 shows eddy-permitting global configurations on an MPAS icosahedral mesh at 15 km (2.6 million columns) and on the FESOM2 FORCA20 mesh (2.1 million nodes), the latter being the configuration used in the scaling experiments of main-text Figure 4. Finally, Figure S18 shows a multi-decadal Drake Passage spin-up: the zonal transport and zonal-mean zonal-velocity structure equilibrate, consistent with a stable Antarctic Circumpolar Current under the split-explicit solver.

Figure S15. Twin experiment against NEMO 5.0.2 in the idealized DINO basin. Sea-surface height (top), temperature (middle) and salinity (bottom) after 360 days from legoESM (left) and NEMO (centre), and their difference (right; maximum absolute and r.m.s. differences in the panel titles).
Figure S16. Additional global ocean diagnostics against NEMO. (a) Sea-surface salinity and (b) mixed-layer depth from the legoESM ocean on the tripolar and MPAS/Voronoi grids and from NEMO[54], with the differences tripolar−NEMO and MPAS−NEMO (right), on the cells common to all three grids. Zonal means are shown in main-text Figure 3b.
Figure S18. Multi-decadal Drake Passage spin-up. (a) Zonal transport and (b) zonal-mean zonal velocity, both of which equilibrate, indicating a stable Antarctic Circumpolar Current under the implicit solver.
Land-surface validation at eddy-covariance flux towers
The land component is evaluated offline against point-scale eddy-covariance measurements, which constrain the coupled water, energy and carbon fluxes at the sub-daily to seasonal timescales that a coupled simulation cannot isolate. This section documents the sites, the forcing data, the model configuration, and the experimental and evaluation protocols.
Sites Four FLUXNET towers were selected to span the temperate and Mediterranean regimes (Table S4): two temperate deciduous forests differing in climate and soil (US-MMS, DE-Hai), a montane evergreen needleleaf forest (DE-Obe), and a water-limited oak savanna (US-Ton). Peak leaf area index ranges from 2.9 m m at the savanna to 6.2 m m at the closed forests, and soil texture spans clay to loam, so the four sites exercise contrasting water-limitation, phenology and surface-roughness regimes.
Forcing data Each site is driven by a per-site forcing file combining tower meteorology (downwelling shortwave and longwave radiation, air temperature, vapour-pressure deficit, wind speed, surface pressure, precipitation and CO mole fraction) with MODIS leaf area index [59] and albedo[60], the diffuse fraction of photosynthetically active radiation from the BESS radiation product[61], and site parameters. The foliage clumping index, which enters the canopy radiative transfer through the effective leaf area index , is taken from the global 0.05° monthly CAS-CI product[62] derived from the MODIS BRDF-based clumping index[63], and is applied as a per-site monthly climatology (0.51–0.81 across the four sites). The tower data are the FULLSET products generated by the ONEFlux processing pipeline [64]: the AmeriFlux FLUXNET-1F releases at US-MMS (v3-5)[55] and US-Ton (v4-6)[57], and the corresponding FLUXNET archive products at DE-Obe[56] and DE-Hai[58]. The forcing is half-hourly except at US-MMS, which is hourly.
As prognostic soil integration cannot tolerate a missing forcing step, the meteorological variables gap-filled by marginal distribution sampling (MDS)[65] within the ONEFlux pipeline[64] are used. The remaining interior gaps shorter than 24 h are filled by linear interpolation, and gaps of at least 24 h, together with any gap touching the start or end of the record, are filled with a month-of-year by time-of-day climatology computed from the observed samples alone. Only observed fluxes are used as evaluation targets; filled values do not enter any skill metric.
Model configuration The land column is run in its multi-layer configuration. Soil moisture follows the mass-conservative mixed-form Richards equation[51] with van Genuchten retention? whose parameters are derived from the site soil texture, solved by Picard iteration on a tridiagonal system. Soil temperature is advanced by backward-Euler heat diffusion with Johansen thermal conductivity[23]. The column is discretized into eight geometrically spaced layers reaching approximately 6.4 m (extended to 10 m at the deep-rooted savanna), with free drainage at the base.
Surface exchange uses the two-big-leaf canopy scheme. Shortwave transfer follows a two-stream partition into sunlit and shaded leaves[66, 67], each of which carries Farquhar–von Caemmerer–Berry C photosynthesis[24] with Kattge–Knorr thermal acclimation[68], or C photosynthesis following Collatz[69], coupled to Ball–Berry stomatal conductance[70]. The resulting six-variable system in sunlit and shaded leaf temperature, the two intercellular CO concentrations, and canopy-air temperature and humidity is closed by Newton–Raphson iteration; an outer Picard loop reconciles the canopy solution with the soil thermal solver. Aerodynamic exchange is referenced to the measured tower height at each site, with roughness length and displacement height scaled from the site canopy height by plant-functional-type ratios, with an LAI dependence. The Ball–Berry cuticular intercept is not down-regulated by soil-moisture stress, so a live canopy retains a baseline conductance while a dormant canopy self-limits as its leaf area declines.
Rooting depth and soil-column depth are prescribed modelling choices rather than measurements: rooting depth is the -folding depth of an exponential root-density profile, set between 1 and 5 m according to the plant functional type and soil profile, deepest at the phreatophytic savanna.
Experimental protocol Each site is integrated as an independent offline single column at the native forcing timestep over the full analysis window, with soil moisture and soil temperature carried prognostically. The column is initialized to a vertically uniform profile: every layer takes the first available prescribed soil temperature and volumetric water content at the start of the window, the matric potential is then derived from that water content through the van Genuchten retention curve, and the snow, ponding and runoff stores start empty. The initial water content is clipped to the hydraulic range of the site soil, which binds only at US-MMS, where the measured water content () exceeds the porosity implied by its clay texture (). No separate spin-up cycle is performed, so the earliest part of each record reflects adjustment away from this initial state; all four windows begin on 1 January, so that adjustment falls in the dormant season.
Evaluation protocol A timestep enters the evaluation only if every required forcing field was observed (not gap-filled), which retains 63, 83, 96 and 60 % of timesteps at US-MMS, DE-Obe, US-Ton and DE-Hai respectively. Model and observations are additionally co-sampled, that is, compared only on timesteps at which both are available, so that a model–observation difference cannot arise from the two being averaged over different samples. Sub-daily values are aggregated to daily means wherever at least 30 % of a day is present, and skill is summarized by the Nash–Sutcliffe efficiency, the coefficient of determination and the mean bias.
Raw eddy-covariance fluxes under-close the surface energy budget by 22–34 % at these sites, whereas the model closes it by construction. Skill is therefore reported against both the raw and the energy-balance-closure-corrected observations, which bracket the true flux. Pooled across sites, the modelled turbulent fluxes are biased +17 % against the raw observations and −17 % against the corrected observations, and so lie near the centre of the closure-uncertainty envelope (Figure S19). GPP achieved overall values of 0.73–0.84 at the four sites, although there is a positive bias in peak season carbon uptake.

Figure S19. Land-surface validation against eddy-covariance flux towers. The offline land model with the two-big-leaf canopy scheme at four FLUXNET sites: US-MMS (mesic deciduous forest), DE-Obe (montane needleleaf forest), US-Ton (oak savanna) and DE-Hai (humid deciduous forest). One row per site (a–t): the mean summer diurnal cycle and the seasonal cycle of latent (orange) and sensible (blue) heat; the GPP seasonal cycle; the modelled latent-heat partition into transpiration (green) and soil evaporation (orange) with the observed total; and observed soil moisture at the sensor depth with modelled soil moisture at three depths. Lines are modelled, markers are raw eddy-covariance observations, and shaded bands span up to the energy-balance-closure-corrected value; model and observations are compared only on matched timesteps. Pooled daily Nash–Sutcliffe efficiency against raw observations is 0.60 (latent heat), 0.57 (sensible heat) and 0.73 (GPP), and 0.69 (latent heat) and 0.68 (sensible heat) against the closure-corrected observations. Raw fluxes under-close the energy budget by 22–34 % here, so the modelled turbulent fluxes sit near the centre of the closure-uncertainty envelope.
Beyond the tower sites, the land component is evaluated globally against CLM5-SP and against data-driven products (Figure S20, Figure S21 and Figure S22): the seasonal cycle of the turbulent heat fluxes by biome, the spatial pattern of the mean latent heat flux, and the zonal distribution of gross primary productivity. The energy fluxes and the latitudinal structure of productivity are well reproduced, whereas the global productivity total is overestimated.
Figure S20. Seasonality of the turbulent heat fluxes by biome. Monthly latent (a–g) and sensible (h–n) heat fluxes from legoESM and from CLM5-SP, against FLUXCOM observational estimates, aggregated over seven biomes. Shading spans the spread within each biome. The phase of the seasonal cycle is captured across contrasting vegetation types, with the largest departures in the arid and tundra classes, where the two models also differ most from each other.
Figure S21. Global latent heat flux. Mean annual latent heat flux from (a) CLM5-SP and (b) legoESM. The large-scale pattern of evapotranspiration, with maxima over the wet tropics and minima over the arid subtropics and high latitudes, is reproduced.
Figure S22. Zonal distribution of gross primary productivity. Zonal-mean gross primary productivity from legoESM and CLM5-SP against the CEDAR and FLUXCOM data-driven products, with global totals given in the legend. The latitudinal structure, in particular the tropical maximum and the northern mid-latitude peak, is reproduced, but legoESM overestimates the global total (199 PgC yr) relative to both CLM5-SP (157 PgC yr) and the data-driven estimates (120–146 PgC yr), a bias that remains to be addressed.
Initial carbon pools The initial carbon pools of the DALEC-based carbon model [71] are obtained under ERA5 climate either from the analytical linearized steady state or by differentiable optimization, which give very similar results, with a residual drift of 0.025 % yr (Figure S23). Live biomass peaks in the tropical forests and soil organic carbon in the boreal zone. In this configuration soil carbon north of 60°N is strongly underestimated relative to observations; this comparison is what exposed the northern high-latitude deficit that motivated the refinements of the soil-carbon structure described in the main text.
Performance and scaling
The single-GPU acceleration numbers below were measured on one consumer-class laptop GPU (NVIDIA RTX, thermally limited) plus a 24-core CPU. Single-GPU throughput (Mcells , fp32) is 678 (lat–lon atmosphere), 404 (cubed-sphere), 298 (icosahedral), 400 (lat–lon ocean), 313 (tripolar) and 252 (MPAS ocean); GPU acceleration over the CPU is 16–21× (atmosphere) and 33–99× (ocean) at fp32.
Strong scaling at production resolution (main-text Figure 4) was measured on the DKRZ Levante system, whose GPU nodes carry four NVIDIA A100-80GB GPUs (NCCL communication) and whose CPU nodes carry two 64-core AMD EPYC 7763 (Milan) processors (gloo communication). For the 5-km (4096 8192, 26 levels) lat–lon atmosphere, the time per step falls from about 220 ms on 4 GPUs to about 9 ms on 128 GPUs at single precision, a parallel efficiency of roughly 75%, and at equal node count (four GPUs versus 128 CPU cores) the GPU partition is roughly an order of magnitude faster. The ORCA12-class tripolar ocean (3072 × 4352, 75 levels) scales close to ideal up to 64 GPUs. The unstructured MPAS atmosphere and ocean depart from ideal scaling once the per-device subdomain becomes small, and the FESOM2 FORCA20 ocean saturates beyond 32 GPUs, where halo exchange on the unstructured mesh dominates. Throughput keeps rising with device count until the per-device tile becomes communication-bound.
Reverse-mode differentiability is preserved across distributed execution: gradients through MPI halo exchange (sendrecv with a custom adjoint) and allreduce(SUM) match single-rank references to . Documented limits: spectral transforms are communication-bound on multi-GPU, and cross-node cubed-sphere panel exchange anti-scales on a commodity TCP fabric (these are capability rather than speed-up results).
Accessibility: a worked example
Because the model is idiomatic Python, configuring an experiment (here a single column with gray radiation and a Louis boundary-layer scheme) is a few readable lines, and the same physics object can be wrapped by a neural network or differentiated. This low barrier is a core design goal for teaching and rapid prototyping.
from legoesm.atmosphere.scm import SingleColumnModel
from legoesm.atmosphere.physics import PhysicsConfig, RadiationConfig, TurbulenceConfig
import jax.numpy as jnp
scm = SingleColumnModel.create(
physics_config=PhysicsConfig(
radiation=RadiationConfig(scheme="gray"),
turbulence=TurbulenceConfig(scheme="louis")),
nlev=40, dt=300.0,
T_profile=jnp.linspace(220.0, 295.0, 40), latitude_deg=0.0)
final_state, history = scm.run(nsteps=288, save_every=12) # 24 h at dt=300 s
Swapping scheme="gray" for "rrtmgp", or turbulence for an "edmf" or ML scheme, requires changing only the configuration; differentiating the run with respect to any parameter requires wrapping scm.run in jax.grad.
Physical consistency: operator-level tests
Individual operators are verified against closed-form solutions before being combined (Figure S24). The vector-invariant advection reproduces the Burgers tendency ; the Laplacian viscous term reproduces and its spectral scaling and exponential decay rate; the Coriolis term gives , ; and free inertial oscillations trace the analytic hodograph. Under CFL-controlled refinement, finite-volume transport converges at its design order and the semi-implicit gravity-wave solver at second order (Figure S25); documented gaps (e.g. a parabolic-CFL regime where ) are reported rather than masked.

Figure S24. (a) Vector-invariant (Burgers) advection; (b) Laplacian viscous, scaling; (c) Coriolis tendency; (d) Inertial oscillation hodograph; (e) Damped inertial oscillation. Operator-level verification against analytic solutions. Simulated tendencies (solid) are compared with the corresponding closed-form solutions (dashed) for the advective, viscous, Coriolis and inertial terms.

Figure S25. (a) Atmosphere SW; (b) Ocean. Convergence under CFL-controlled refinement. Gravity-wave and transport errors as a function of grid spacing, shown together with the reference slopes expected from the design order of each scheme, for (a) the atmospheric shallow-water core and (b) the ocean.
Variational data assimilation
Modern weather prediction depends on data assimilation to integrate observations with prior forecasts and provide accurate initial conditions. We developed a variational data assimilation system for legoESM and evaluated its effectiveness using single-observation experiments. We first used a three-dimensional variational data assimilation (3DVar) [72] experiment to test whether a static background-error covariance matrix, , estimated from time-lagged legoESM forecast differences using the NMC method[73], captures the spatial and cross-variable covariances needed to spread observational information realistically.
Following Jung et al. 74```, we assimilated a single (+1 K) temperature innovation near 800 hPa and examined the surrounding temperature and wind increments (Figure S26). The temperature response decayed smoothly with horizontal and vertical distance from the observation, consistent with the correlation structure encoded in . The wind response was anticyclonic above and cyclonic below the warm anomaly, as expected from balanced mass–wind coupling. These results indicate that the static , derived from legoESM forecasts, captures realistic spatial correlations and multivariate balance.

Figure S26. 3DVar single-observation experiment. Panels show the temperature and horizontal wind increments at native model levels near 675, 800 and 925 hPa after assimilating a single (+1 K) temperature innovation near 800 hPa. The background state at () was taken from a 24-h MPAS forecast initialized from ERA5 at 00 UTC on 14 January 2017. The observation was assigned to the MPAS grid cell near , , at approximately 800 hPa. The cross marks the observation location. The static background-error covariance matrix, , was estimated from 80 pairs of 48-h and 24-h legoESM forecasts valid at the same times using the NMC method.
Extending 3DVar through time, four-dimensional variational data assimilation (4DVar) [75] optimizes the initial state against observations throughout the assimilation window under the constraint of model dynamics, and underpins many of the world’s leading operational weather prediction systems. In conventional systems, however, 4DVar requires dedicated tangent-linear and adjoint models that are difficult to develop and maintain[76]. By contrast, in the fully differentiable legoESM, both operators can be readily obtained through JAX automatic differentiation, making 4DVar comparatively straightforward to implement.
To illustrate this capability, we performed a standard 4DVar single-observation experiment [77] with the MPAS dynamical core (Figure S27). We introduced a synthetic 500 hPa temperature innovation in the Northern Hemisphere midlatitudes at h and used both 3DVar and 4DVar to update the atmospheric state at . In 3DVar, observations within the assimilation window are treated as if they were made at the analysis time, which may misplace their influence in the evolving flow[78]. Here, this causes the increment centre to shift east of the observation by h. In contrast, 4DVar uses the model dynamics to propagate the influence of the observation at h back to , producing an upstream increment that is carried eastward by the midlatitude westerlies to the observation location by h. We also propagated the analysis increment using the tangent-linear model generated automatically by JAX. The result agrees closely with the nonlinear forecast, with a difference of less than 1%.

Figure S27. Comparison of 3DVar and 4DVar for assimilating a future single observation. Columns show the evolution of the 500 hPa temperature increment at , , , and . The synthetic observation has a K innovation and is valid at near N, W. Shading denotes the temperature increment, black contours show the background 500 hPa geopotential height, and the cross marks the observation location. The top row shows the evolution of the 3DVar increment, for which the observation is treated as valid at . The middle row shows the 4DVar increment, and the bottom row shows the same increment propagated by the tangent-linear model generated automatically with JAX. Both 3DVar and 4DVar use the same static and background state as in Figure S26.
References
- [1]C. Ronchi, R. Iacono, and P. S. Paolucci. The “cubed sphere”: A new method for the solution of partial differential equations in spherical geometry. Journal of Computational Physics, 124:93–114, 1996. doi: 10.1006/jcph.1996.0047.DOI
- [2]W. M. Putman and S.-J. Lin. Finite-volume transport on various cubed-sphere grids. Journal of Computational Physics, 227:55–78, 2007. doi: 10.1016/j.jcp.2007.07.022.
- [3]J. Mouallem, L. M. Harris, and R. Benson. Implementation of the novel duo-grid in GFDL’s FV3 dynamical core. Journal of Advances in Modeling Earth Systems, 15:e2023MS003712, 2023. doi: 10.1029/2023MS003712.DOI
- [4]R. Sadourny. Conservative finite-difference approximations of the primitive equations on quasi-uniform spherical grids. Monthly Weather Review, 100:136–144, 1972. doi: 10.1175/1520-0493(1972)100<0136:CFAOTP>2.3.CO;2.doi.org/10.1175/1520-0493(1972)100<0136:cfaotp>2.3.co;2
- [5]W. Bourke. An efficient, one-level, primitive-equation spectral model. Monthly Weather Review, 100:683–689, 1972. doi: 10.1175/1520-0493(1972)100<0683:AEOPSM>2.3.CO;2.doi.org/10.1175/1520-0493(1972)100<0683:aeopsm>2.3.co;2
- [6]J. Thuburn, T. D. Ringler, W. C. Skamarock, and J. B. Klemp. Numerical representation of geostrophic modes on arbitrarily structured C-grids. Journal of Computational Physics, 228:8321–8335, 2009. doi: 10.1016/j.jcp.2009.08.006.DOI
- [7]T. D. Ringler, J. Thuburn, J. B. Klemp, and W. C. Skamarock. A unified approach to energy conservation and potential vorticity dynamics for arbitrarily-structured C-grids. Journal of Computational Physics, 229:3065–3090, 2010. doi: 10.1016/j.jcp.2009.12.007.DOI
- [8]W. C. Skamarock, J. B. Klemp, M. G. Duda, L. D. Fowler, S.-H. Park, and T. D. Ringler. A multiscale nonhydrostatic atmospheric model using centroidal Voronoi tessellations and C-grid staggering. Monthly Weather Review, 140:3090–3105, 2012. doi: 10.1175/MWR-D-11-00215.1.DOI
- [9]S. Danilov, D. Sidorenko, Q. Wang, and T. Jung. The Finite-volumeE Sea ice–Ocean Model (FESOM2). Geoscientific Model Development, 10:765–789, 2017. doi: 10.5194/gmd-10-765-2017.DOI
- [10]A. J. Simmons and D. M. Burridge. An energy and angular-momentum conserving vertical finite-difference scheme and hybrid vertical coordinates. Monthly Weather Review, 109:758–766, 1981. doi: 10.1175/1520-0493(1981)109<0758:AEAAMC>2.0.CO;2.doi.org/10.1175/1520-0493(1981)109<0758:aeaamc>2.0.co;2
- [11]P. Colella and P. R. Woodward. The piecewise parabolic method (PPM) for gas-dynamical simulations. Journal of Computational Physics, 54:174–201, 1984. doi: 10.1016/0021-9991(84)90143-8.DOI
- [12]S.-J. Lin. A “vertically Lagrangian” finite-volume dynamical core for global models. Monthly Weather Review, 132:2293–2307, 2004. doi: 10.1175/1520-0493(2004)132<2293:AVLFDC>2.0.CO;2.doi.org/10.1175/1520-0493(2004)132<2293:avlfdc>2.0.co;2
- [13]B. J. Hoskins and A. J. Simmons. A multi-layer spectral model and the semi-implicit method. Quarterly Journal of the Royal Meteorological Society, 101:637–655, 1975. doi: 10.1002/qj.49710142918.DOI
- [14]D. M. W. Frierson, I. M. Held, and P. Zurita-Gotor. A gray-radiation aquaplanet moist GCM. Part I: Static stability and eddy scale. Journal of the Atmospheric Sciences, 63:2548–2566, 2006. doi: 10.1175/JAS3753.1.DOI
- [15]R. Pincus, E. J. Mlaver, and J. S. Delamere. Balancing accuracy, efficiency, and flexibility in radiation calculations for dynamical models. Journal of Advances in Modeling Earth Systems, 11:3074–3089, 2019. doi: 10.1029/2019MS001621.DOI
- [16]M. Tiedtke. A comprehensive mass flux scheme for cumulus parameterization in large-scale models. Monthly Weather Review, 117:1779–1800, 1989. doi: 10.1175/1520-0493(1989)117<1779:ACMFSF>2.0.CO;2.doi.org/10.1175/1520-0493(1989)117<1779:acmfsf>2.0.co;2
- [17]G. J. Zhang and N. A. McFarlane. Sensitivity of climate simulations to the parameterization of cumulus convection in the Canadian Climate Centre general circulation model. Atmosphere–Ocean, 33:407–446, 1995. doi: 10.1080/07055900.1995.9649539.DOI
- [18]J. Smagorinsky. General circulation experiments with the primitive equations. I. The basic experiment. Monthly Weather Review, 91:99–164, 1963. doi: 10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2.doi.org/10.1175/1520-0493(1963)091<0099:gcewtp>2.3.co;2
- [19]S. Shima, K. Kusano, A. Kawano, T. Sugiyama, and S. Kawahara. The super-droplet method for the numerical simulation of clouds and precipitation: a particle-based and probabilistic microphysics model coupled with a non-hydrostatic model. Quarterly Journal of the Royal Meteorological Society, 135:1307–1320, 2009. doi: 10.1002/qj.441.DOI
- [20]A. F. Shchepetkin and J. C. McWilliams. The regional oceanic modeling system (ROMS): a split-explicit, free-surface, topography-following-coordinate oceanic model. Ocean Modelling, 9:347–404, 2005. doi: 10.1016/j.ocemod.2004.08.002.DOI
- [21]W. G. Large, J. C. McWilliams, and S. C. Doney. Oceanic vertical mixing: A review and a model with a nonlocal boundary layer parameterization. Reviews of Geophysics, 32:363–403, 1994. doi: 10.1029/94RG01872.DOI
- [22]P. R. Gent and J. C. McWilliams. Isopycnal mixing in ocean circulation models. Journal of Physical Oceanography, 20:150–155, 1990. doi: 10.1175/1520-0485(1990)020<0150:IMIOCM>2.0.CO;2.doi.org/10.1175/1520-0485(1990)020<0150:imiocm>2.0.co;2
- [23]O. Johansen. Thermal Conductivity of Soils. PhD thesis, University of Trondheim, 1975.
- [24]G. D. Farquhar, S. von Caemmerer, and J. A. Berry. A biochemical model of photosynthetic CO₂ assimilation in leaves of C₃ species. Planta, 149:78–90, 1980. doi: 10.1007/BF00386231.DOI
- [25]E. C. Hunke and J. K. Dukowicz. An elastic–viscous–plastic model for sea ice dynamics. Journal of Physical Oceanography, 27:1849–1867, 1997. doi: 10.1175/1520-0485(1997)027<1849:AEVPMF>2.0.CO;2.doi.org/10.1175/1520-0485(1997)027<1849:aevpmf>2.0.co;2
- [26]B. Bonev, T. Kurth, C. Hundt, J. Pathak, M. Baust, K. Kashinath, and A. Anandkumar. Spherical Fourier neural operators: Learning stable dynamics on the sphere. In Proceedings of the 40th International Conference on Machine Learning (ICML), volume 202 of PMLR, pages 2806–2823, 2023.arxiv.org/abs/2306.03838
- [27]Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anand-kumar. Fourier neural operator for parametric partial differential equations. In International Conference on Learning Representations (ICLR), 2021.
- [28]D. L. Williamson, J. B. Drake, J. J. Hack, R. Jakob, and P. N. Swarztrauber. A standard test set for numerical approximations to the shallow water equations in spherical geometry. Journal of Computational Physics, 102:211–224, 1992. doi: 10.1016/S0021-9991(05)80016-6.DOI
- [29]C. Jablonowski and D. L. Williamson. A baroclinic instability test case for atmospheric model dynamical cores. Quarterly Journal of the Royal Meteorological Society, 132:2943–2975, 2006. doi: 10.1256/qj.06.12.DOI
- [30]I. M. Held and M. J. Suarez. A proposal for the intercomparison of the dynamical cores of atmospheric general circulation models. Bulletin of the American Meteorological Society, 75: 1825–1830, 1994. doi: 10.1175/1520-0477(1994)075<1825:APFTIO>2.0.CO;2.doi.org/10.1175/1520-0477(1994)075<1825:apftio>2.0.co;2
- [31]K. Jordan, Y. Jin, V. Boza, J. You, F. Cesista, L. Newhouse, and J. Bernstein. Muon: an optimizer for hidden layers in neural networks. https://kellerjordan.github.io/posts/muon/, 2024.
- [32]H. Morrison, G. Thompson, and V. Tatarskii. Impact of cloud microphysics on the development of trailing stratiform precipitation in a simulated squall line: comparison of one- and two-moment schemes. Monthly Weather Review, 137(3):991–1007, 2009. doi: 10.1175/2008MWR2556.1.DOI
- [33]M. Germano, U. Piomelli, P. Moin, and W. H. Cabot. A dynamic subgrid-scale eddy viscosity model. Physics of Fluids A, 3:1760–1765, 1991. doi: 10.1063/1.857955.DOI
- [34]F. Porté-Agel, C. Meneveau, and M. B. Parlange. A scale-dependent dynamic model for large-eddy simulation: application to a neutral atmospheric boundary layer. Journal of Fluid Mechanics, 415:261–284, 2000. doi: 10.1017/S0022112000008776.
- [35]R. J. Beare, M. K. Macvean, A. A. M. Holtslag, J. Cuxart, I. Esau, J.-C. Golaz, M. A. Jimenez, M. Khairoutdinov, B. Kosovic, D. Lewellen, et al. An intercomparison of large-eddy simulations of the stable boundary layer. Boundary-Layer Meteorology, 118:247–272, 2006. doi: 10.1007/s10546-004-2820-6.DOI
- [36]A. André n, A. R. Brown, J. Graf, P. J. Mason, C.-H. Moeng, F. T. M. Nieuwstadt, and U. Schumann. Large-eddy simulation of a neutrally stratified boundary layer: a comparison of four computer codes. Quarterly Journal of the Royal Meteorological Society, 120:1457–1484, 1994. doi: 10.1002/qj.49712052003.DOI
- [37]R. H. Clarke, A. J. Dyer, R. R. Brook, D. G. Reid, and A. J. Troup. The Wangara experiment: boundary layer data. Technical Paper 19, CSIRO Division of Meteorological Physics, 1971.
- [38]B. Stevens, C.-H. Moeng, A. S. Ackerman, C. S. Bretherton, A. Chlond, S. de Roode, J. Edwards, J.-C. Golaz, H. Jiang, M. Khairoutdinov, et al. Evaluation of large-eddy simulations via observations of nocturnal marine stratocumulus. Monthly Weather Review, 133:1443–1462, 2005. doi: 10.1175/MWR2930.1.DOI
- [39]M. C. van Zanten, B. Stevens, L. Nuijens, A. P. Siebesma, A. S. Ackerman, F. Burnet, A. Cheng, F. Couvreux, H. Jiang, M. Khairoutdinov, et al. Controls on precipitation and cloudiness in simulations of trade-wind cumulus as observed during RICO. Journal of Advances in Modeling Earth Systems, 3:M06001, 2011. doi: 10.1029/2011MS000056.
- [40]A. A. Wing, K. A. Reed, M. Satoh, B. Stevens, S. Bony, and T. Ohno. Radiative–convective equilibrium model intercomparison project (RCEMIP). Geoscientific Model Development, 11:793–813, 2018. doi: 10.5194/gmd-11-793-2018.DOI
- [41]P. Bartman, O. Bulenok, K. Górski, A. Jaruga, G. Łazarski, M. Olesik, B. Piasecki, C. Singer, A. Talar, and S. Arabas. PySDM v1: particle-based cloud modelling package for warm-rain microphysics and aqueous chemistry. Journal of Open Source Software, 7(72):3219, 2022. doi: 10.21105/joss.03219.DOI
- [42]K. D. Lamb et al. Perspectives on systematic cloud microphysics scheme development with machine learning. Journal of Advances in Modeling Earth Systems, 2026. doi: 10.1029/2025MS005341.DOI
- [43]V. Eyring, S. Bony, G. A. Meehl, C. A. Senior, B. Stevens, R. J. Stouffer, and K. E. Taylor. Overview of the Coupled Model Intercomparison Project Phase 6 (CMIP6) experimental design and organization. Geoscientific Model Development, 9:1937–1958, 2016. doi: 10.5194/gmd-9-1937-2016.DOI
- [44]K. E. Taylor, D. Williamson, and F. Zwiers. The sea surface temperature and sea-ice concentration boundary conditions for AMIP II simulations. PCMDI Report 60, Program for Climate Model Diagnosis and Intercomparison, Lawrence Livermore National Laboratory, Livermore, CA, 2000. URL https://pcmdi.llnl.gov/report/ab60.html.
- [45]K. Matthes, B. Funke, M. E. Andersson, L. Barnard, J. Beer, P. Charbonneau, M. A. Clilverd, T. Dudok de Wit, M. Haberreiter, A. Hendry, C. H. Jackman, M. Kretzschmar, T. Kruschke, M. Kunze, U. Langematz, D. R. Marsh, A. C. Maycock, S. Misios, C. J. Rodger, A. A. Scaife, A. Seppälä, M. Shangguan, M. Sinnhuber, K. Tourpali, I. Usoskin, M. van de Kamp, P. T. Verronen, and S. Versick. Solar forcing for CMIP6 (v3.2). Geoscientific Model Development, 10(6):2247–2302, 2017. doi: 10.5194/gmd-10-2247-2017. URL https://gmd.copernicus.org/articles/10/2247/2017/.DOI
- [46]A. L. Berger. Long-term variations of daily insolation and Quaternary climatic changes. Journal of the Atmospheric Sciences, 35(12):2362–2367, 1978. doi: 10.1175/1520-0469(1978)035<2362:LTVODI>2.0.CO;2.doi.org/10.1175/1520-0469(1978)035<2362:ltvodi>2.0.co;2
- [47]M. Meinshausen, E. Vogel, A. Nauels, K. Lorbacher, N. Meinshausen, D. M. Etheridge, P. J. Fraser, S. A. Montzka, P. J. Rayner, C. M. Trudinger, P. B. Krummel, U. Beyerle, J. G. Canadell, J. S. Daniel, I. G. Enting, R. M. Law, C. R. Lunder, S. O’Doherty, R. G. Prinn, S. Reimann, M. Rubino, G. J. M. Velders, M. K. Vollmer, R. H. J. Wang, and R. Weiss. Historical greenhouse gas concentrations for climate modelling (CMIP6). Geoscientific Model Development, 10(5):2057–2116, 2017. doi: 10.5194/gmd-10-2057-2017. URL https://gmd.copernicus.org/articles/10/2057/2017/.DOI
- [48]R. Checa-Garcia. CMIP6 ozone forcing dataset: supporting information. Zenodo, 2018.
- [49]S. Kinne, D. O’Donnell, P. Stier, S. Kloster, K. Zhang, H. Schmidt, S. Rast, M. Giorgetta, T. F. Eck, and B. Stevens. MACv1: A new global aerosol climatology for climate studies. Journal of Advances in Modeling Earth Systems, 5(4):704–740, 2013. doi: 10.1002/jame.20035.DOI
- [50]L. A. Richards. Capillary conduction of liquids through porous mediums. Physics, 1(5): 318–333, 1931. doi: 10.1063/1.1745010.DOI
- [51]M. A. Celia, E. T. Bouloutas, and R. L. Zarba. A general mass-conservative numerical solution for the unsaturated flow equation. Water Resources Research, 26:1483–1496, 1990. doi: 10.1029/WR026i007p01483.DOI
- [52]H. Hersbach, B. Bell, P. Berrisford, S. Hirahara, A. Horányi, J. Muñoz-Sabater, J. Nicolas, C. Peubey, R. Radu, D. Schepers, et al. The ERA5 global reanalysis. Quarterly Journal of the Royal Meteorological Society, 146:1999–2049, 2020. doi: 10.1002/qj.3803.DOI
- [53]M. Righi, B. Andela, V. Eyring, A. Lauer, V. Predoi, M. Schlund, J. Vegas-Regidor, L. Bock, B. Brötz, L. de Mora, F. Diblen, L. Dreyer, N. Drost, P. Earnshaw, B. Hassler, N. Koldunov, B. Little, S. Loosveldt Tomas, and K. Zimmermann. Earth System Model Evaluation Tool (ESMValTool) v2.0 – technical overview. Geoscientific Model Development, 13(3):1179–1199, 2020. doi: 10.5194/gmd-13-1179-2020. URL https://gmd.copernicus.org/articles/13/1179/2020/.DOI
- [54]G. Madec and the NEMO team. NEMO ocean engine, version 3.6. Technical report, Institut Pierre-Simon Laplace (IPSL), Note du Pôle de modélisation 27, 2017.
- [55]K. Novick and R. Phillips. AmeriFlux FLUXNET-1F US-MMS Morgan Monroe State Forest, Ver. 3-5. AmeriFlux AMP (Dataset), 2022.
- [56]C. Bernhofer and T. Grünwald. Fluxnet Archive Product from Oberbärenburg, 2008–2023, 2024. URL https://hdl.handle.net/11676/HCnUq6q2u2D14–7GlKgFV mkn.
- [57]S. Ma, L. Xu, J. Verfaillie, and D. Baldocchi. AmeriFlux FLUXNET-1F US-Ton Tonzi Ranch, Ver. 4-6. AmeriFlux AMP (Dataset), 2025.
- [58]A. Knohl, F. Tiedemann, A. Klosterhalfen, C. Markwitz, D. Fellert, M. Herbst, O. Kolle, H. Kreilein, W. Kutsch, C. Rebmann, and L. Siebicke. Fluxnet Archive Product from Hainich, 2000–2023, 2024. URL https://hdl.handle.net/11676/11Ur73qeVFIkn yMheaAXZXO_.
- [59]R. B. Myneni, S. Hoffman, Y. Knyazikhin, et al. Global products of vegetation leaf area and fraction absorbed PAR from year one of MODIS data. Remote Sensing of Environment, 83: 214–231, 2002. doi: 10.1016/S0034-4257(02)00074-3.
- [60]C. B. Schaaf, F. Gao, A. H. Strahler, et al. First operational BRDF, albedo nadir reflectance products from MODIS. Remote Sensing of Environment, 83:135–148, 2002. doi: 10.1016/S0034-4257(02)00091-3.DOI
- [61]Y. Ryu, C. Jiang, H. Kobayashi, and M. Detto. MODIS-derived global land products of shortwave radiation and diffuse and total photosynthetically active radiation at 5 km resolution from 2000. Remote Sensing of Environment, 204:812–825, 2018. doi: 10.1016/j.rse.2017.09.021.DOI
- [62]Y. Li and H. Fang. Real-time software for the efficient generation of the clumping index and its application based on the Google Earth Engine. Remote Sensing, 14(15):3837, 2022. doi: 10.3390/rs14153837.DOI
- [63]S. Wei, H. Fang, C. B. Schaaf, L. He, and J. M. Chen. Global 500 m clumping index product derived from MODIS BRDF data (2001–2017). Remote Sensing of Environment, 232:111296, 2019. doi: 10.1016/j.rse.2019.111296.DOI
- [64]G. Pastorello, C. Trotta, E. Canfora, et al. The FLUXNET2015 dataset and the ONEFlux processing pipeline for eddy covariance data. Scientific Data, 7:225, 2020. doi: 10.1038/s41597-020-0534-3.DOI
- [65]M. Reichstein, E. Falge, D. Baldocchi, et al. On the separation of net ecosystem exchange into assimilation and ecosystem respiration: review and improved algorithm. Global Change Biology, 11(9):1424–1439, 2005. doi: 10.1111/j.1365-2486.2005.001002.x.DOI
- [66]P. J. Sellers. Canopy reflectance, photosynthesis and transpiration. International Journal of Remote Sensing, 6:1335–1372, 1985. doi: 10.1080/01431168508948283.DOI
- [67]Y. Ryu, D. D. Baldocchi, H. Kobayashi, et al. Integration of MODIS land and atmosphere products with a coupled-process model to estimate gross primary productivity and evapotranspiration from 1 km to global scales. Global Biogeochemical Cycles, 25:GB4017, 2011. doi: 10.1029/2011GB004053.DOI
- [68]J. Kattge and W. Knorr. Temperature acclimation in a biochemical model of photosynthesis: a reanalysis of data from 36 species. Plant, Cell & Environment, 30:1176–1190, 2007. doi: 10.1111/j.1365-3040.2007.01690.x.DOI
- [69]G. J. Collatz, M. Ribas-Carbo, and J. A. Berry. Coupled photosynthesis–stomatal conductance model for leaves of C₄ plants. Australian Journal of Plant Physiology, 19:519–538, 1992. doi: 10.1071/PP9920519.DOI
- [70]J. T. Ball, I. E. Woodrow, and J. A. Berry. A model predicting stomatal conductance and its contribution to the control of photosynthesis under different environmental conditions. Progress in Photosynthesis Research, 4:221–224, 1987. doi: 10.1007/978-94-017-0519-6_48.DOI
- [71]J. Fang et al. A differentiable land model (DifferLand) reveals global environmental controls on the terrestrial carbon cycle. Nature Communications, 2026. doi: 10.1038/s41467-026-73395-4.
- [72]P. Courtier, E. Andersson, W. A. Heckley, J. Pailleux, D. Vasiljevic, M. Hamrud, A. Hollingsworth, F. Rabier, and M. Fisher. The ECMWF implementation of three-dimensional variational assimilation (3D-Var). I: Formulation. Quarterly Journal of the Royal Meteorological Society, 124(550):1783–1807, 1998. doi: 10.1002/qj.49712455002.DOI
- [73]D. F. Parrish and J. C. Derber. The National Meteorological Center’s spectral statistical-interpolation analysis system. Monthly Weather Review, 120(8):1747–1763, 1992. doi: 10.1175/1520-0493(1992)120<1747:TNMCSS>2.0.CO;2.doi.org/10.1175/1520-0493(1992)120<1747:tnmcss>2.0.co;2
- [74]B.-J. Jung, B. Ménétrier, C. Snyder, Z. Liu, J. J. Guerrette, J. Ban, I. Hernández Baños, Y. G. Yu, and W. C. Skamarock. Three-dimensional variational assimilation with a multivariate background error covariance for the Model for Prediction Across Scales–Atmosphere with the Joint Effort for Data assimilation Integration (JEDI-MPAS 2.0.0-beta). Geoscientific Model Development, 17(9):3879–3895, 2024. doi: 10.5194/gmd-17-3879-2024.DOI
- [75]P. Courtier, J.-N. Thépaut, and A. Hollingsworth. A strategy for operational implementation of 4D-Var, using an incremental approach. Quarterly Journal of the Royal Meteorological Society, 120(519):1367–1387, 1994. doi: 10.1002/qj.49712051912.DOI
- [76]K. Solvik, S. G. Penny, and S. Hoyer. 4D-Var using Hessian approximation and back-propagation applied to automatically differentiable numerical and machine learning models. Journal of Advances in Modeling Earth Systems, 17(4):e2024MS004608, 2025. doi: 10.1029/2024MS004608.DOI
- [77]X.-Y. Huang, Q. Xiao, D. M. Barker, X. Zhang, J. Michalakes, W. Huang, T. Henderson, J. Bray, Y. Chen, Z. Ma, J. Dudhia, Y. Guo, X. Zhang, D.-J. Won, H.-C. Lin, and Y.-H. Kuo. Four-dimensional variational data assimilation for WRF: Formulation and preliminary results. Monthly Weather Review, 137(1):299–314, 2009. doi: 10.1175/2008MWR2577.1.DOI
- [78]S. Massart, B. Pajot, A. Piacentini, and O. Pannekoucke. On the merits of using a 3D-FGAT assimilation scheme with an outer loop for atmospheric situations governed by transport. Monthly Weather Review, 138(12):4509–4522, 2010. doi: 10.1175/2010MWR3237.1.DOI
AI tools statement
This work lists 3 AI tools.
Claude · AI tool
- Roles
- Software
- Verification
- self-declared at submission
Codex · AI tool
- Roles
- Software
- Verification
- self-declared at submission
GLM (multiple versions) · AI tool
- Roles
- Software
- Verification
- self-declared at submission
Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.






