Meridia Insight Science Breakthroughs Knowledge

A land model that can learn from its own mistakes

A GPU-ready, differentiable version of a major land model matches its Fortran predecessor over five years—and can trace how an initial temperature change

4.04× faster on one GPU than the Fortran model on 64 CPU cores, while reproducing its five-year global run within its

A single NVIDIA A800 GPU ran the new CLM-JAX land model 4.04 times faster than the established Fortran model compiled with gfortran on 64 CPU cores—and the new version’s errors over five continuous years generally stayed below the original model’s own rounding-level differences. That pairing matters: climate science needs models that are both trustworthy and cheap enough to run repeatedly. CLM-JAX also does something its predecessor cannot readily do: calculate how a change in today’s land conditions propagates through tomorrow’s simulated landscape.

The result is not a new forecast of climate change, nor evidence that the model is more accurate against observations. It is a software and methods advance: a careful reimplementation of the Community Land Model version 5.0, built to run on GPUs and to support gradients through time. Those gradients may eventually help researchers tune uncertain parameters or blend observations with model simulations. First, though, the team had to show that translating a complex model did not quietly change what it computes.

The Science

Land surface models represent the exchanges of energy, water and carbon between land and atmosphere. They also track processes such as vegetation growth, nitrogen cycling, snow, crops and soil moisture. Their outputs help Earth system models represent how the ground responds to weather and climate—and how that response can feed back into the atmosphere. Soil moisture, for example, affects how much incoming energy goes into evaporation versus heating the surface.

The Community Land Model, or CLM, is a widely used land component of the Community Earth System Model. This paper focuses on its BGC-Crop configuration, which simulates vegetation carbon and nitrogen, crop growth and other coupled processes. Its landscape is not represented as one uniform patch of ground: each grid cell contains landunits, columns and patches. A cell might include natural vegetation, cropland, urban areas or lakes; columns carry soil and snow layers; patches represent plant types.

That structure lets CLM capture real heterogeneity, but it also creates computational and organizational complexity. Processes depend on one another. Radiation and surface exchange influence soil heat and water; those soil conditions affect carbon and nitrogen cycling; crop processes add planting, irrigation, fertilization and harvest. Some calculations operate every half hour, while others update annually. A translated model can match isolated equations yet diverge once all those processes interact over years.

CLM-JAX reimplements this configuration in Python using JAX, a framework for compiling numerical programs and calculating derivatives automatically. In the original Fortran model, the code primarily targets CPUs and does not provide automatic differentiation. In CLM-JAX, the state is represented as arrays, and the model advances through successive half-hour time steps. JAX can then trace how the output depends on earlier states, parameters or forcing inputs.

Figure 1: CLM-JAX workflow and execution. (a) Forward and backward passes through a model time step. Starting from the initial state 𝐒0, the forward pass (dark blue arrows) advances the state 𝐒n to 𝐒n+1 using forcing and boundary inputs 𝐔n, parameters 𝜽 and grid structure 𝒢, as in Eq. (1). Carbon and nitrogen calculations are performed before and after subsurface drainage. History files record states, fluxes and diagnostics after the vegetation state update. In the backward pass (red dotted arrows), the adjoint 𝝀N=∇𝐒NJ obtained from the objective J is propagated backward in time and, within each time step, through the processes in reverse order, as in Eq. (3). The resulting 𝝀0 is the gradient of J with respect to the initial state, and gradients with respect to the continuous forcing and the parameters can be computed in the same way. (b) Compilation and execution. XLA compiles JAX process functions into CPU or GPU executables. Selected GPU kernels are written in Pallas, compiled by Triton, and called from the GPU executable.
Figure 1: CLM-JAX workflow and execution. (a) Forward and backward passes through a model time step. Starting from the initial state 𝐒0, the forward pass (dark blue arrows) advances the state 𝐒n to 𝐒n+1 using forcing and boundary inputs 𝐔n, parameters 𝜽 and grid structure 𝒢, as in Eq. (1). Carbon and nitrogen calculations are performed before and after subsurface drainage. History files record states, fluxes and diagnostics after the vegetation state update. In the backward pass (red dotted arrows), the adjoint 𝝀N=∇𝐒NJ obtained from the objective J is propagated backward in time and, within each time step, through the processes in reverse order, as in Eq. (3). The resulting 𝝀0 is the gradient of J with respect to the initial state, and gradients with respect to the continuous forcing and the parameters can be computed in the same way. (b) Compilation and execution. XLA compiles JAX process functions into CPU or GPU executables. Selected GPU kernels are written in Pallas, compiled by Triton, and called from the GPU executable. Source: Shijin Yuan, Zhen Wei

The key concept is a gradient: a measure of how much an output changes when an input changes slightly. For a land model, a gradient can answer questions such as: if the initial temperature of a soil layer shifts by a small amount, how does temperature later in the simulation respond? Repeating this sensitivity calculation for many parameters by changing each one in turn can be costly. Backpropagation calculates a set of sensitivities by propagating information backward through the model’s operations.

To preserve numerical behavior, the authors kept the original hierarchy, process formulations and process sequence. CLM-JAX uses fixed shapes and masks to work well with just-in-time compilation, while retaining the same subgrid organization and area-weighted aggregation. The implementation uses double precision, and selected GPU kernels use Pallas and Triton. It can read CESM input files and writes output in a format designed for comparison with CLM.

The researchers tested both numerical agreement and computational performance. They used the CESM2.1.3 BGC-Crop configuration on a global grid, with atmospheric forcing from WFDE5, and ran from 2019 through 2023. Both models began from the same restart state, generated by a 1979–2018 spin-up. The comparison covered 32 variables, including land states, surface fluxes, vegetation and carbon cycling.

A subtle challenge is that two runs of the same model can drift apart even when their inputs are intended to be identical. Floating-point arithmetic rounds numbers; tiny differences can grow in a nonlinear, coupled system. So the authors did not demand exact equality. Instead, they made ten additional CLM runs, each with an initial soil-temperature perturbation of around one part in a hundred trillion, and measured how much those nominally identical model runs differed from one another. This ensemble supplied a baseline for CLM’s own numerical variability.

What They Found

Across the five-year simulation, CLM-JAX differences for 32 variables generally fell below that baseline. In other words, the translated model’s discrepancies were usually no larger than the differences the original model developed when its initial state was nudged by an almost imperceptible amount. That is a demanding consistency test because the comparison spans many interacting processes, seasonal cycles and annual updates—not simply a few steps or a single module.

The paper’s time-series figures show the CLM-JAX differences alongside the spread among the perturbed CLM runs. The red CLM-JAX line generally sits within the range of the blue pairwise differences, while the black line marks the median baseline. This is a visual way of making the central claim tangible: the port behaves, for the measured quantities, like another numerically indistinguishable realization of CLM.

Figure 2: Six-hourly RMSE of eight variables during 2019–2023. Blue lines show the 45 pairwise
differences among ten CLM runs with perturbed initial soil temperature, and the black line shows
the baseline of CLM’s own differences. The red line shows the difference between CLM-JAX and the unperturbed CLM run.
Soil variables include all valid soil layers.
Figure 2: Six-hourly RMSE of eight variables during 2019–2023. Blue lines show the 45 pairwise differences among ten CLM runs with perturbed initial soil temperature, and the black line shows the baseline of CLM’s own differences. The red line shows the difference between CLM-JAX and the unperturbed CLM run. Soil variables include all valid soil layers. Source: Shijin Yuan, Zhen Wei

The claim has limits. “Numerically indistinguishable” here means close under the paper’s chosen tests and baseline, not identical in every possible configuration or scientifically validated against every observation. Nor does agreement prove that CLM’s underlying representation of the real world is correct. It shows that CLM-JAX faithfully reproduces the behavior of this CLM configuration in this five-year experiment.

The performance result is striking but should be read in its experimental context. On one A800 GPU, CLM-JAX took 0.7692 seconds per simulated model hour. Its sustained integration speedup was 4.04 times over the gfortran build and 2.57 times over the ifort build, each running on 64 CPU cores. These comparisons exclude initialization, file output and JAX compilation, and are specific to the tested server, software and configuration. They do not guarantee the same ratio on other hardware or workloads.

The GPU result matters because models are often run not once but many times: to explore uncertain parameters, compare scenarios, or test how assumptions shape outcomes. Reducing the cost of a run can make those experiments more practical. The largest gain, however, may come from gradients rather than raw speed. A model that can say how its outputs respond to inputs can guide the search toward useful parameter settings instead of relying only on repeated trial and error.

The gradient test followed one specific question. The researchers ran 100 half-hour steps—50 hours—and calculated the sensitivity of first-layer soil temperature to initial soil temperatures in all ground layers of active soil and crop columns. They compared the backpropagated gradients against converged central finite differences, a numerical reference method that estimates sensitivity by repeatedly perturbing inputs in both directions.

There were 84,254 nonzero reference comparisons. In 95.79% of them, the relative error was no greater than 1%; 98.22% had matching signs. The median relative error was reported as 5.862 × 10⁻⁷%, and the 90th percentile as 3.578 × 10⁻⁴%. These tiny summary errors are encouraging, but the share within the 1% threshold is important too: it shows that the high accuracy is not just a median masking a substantial tail of weaker results.

Figure 8: Comparison of the backpropagated gradient with the finite-difference references for all 84,254 nonzero references. (a) Directional projection Dg,dAD versus reference value Rg,d, shown only for the range −1 to 1 K K-1. Colors indicate the number of combinations in each bin, and the dashed line is the :1 line. (b) Histogram of the relative error Eg,d with bins 0.25 orders of magnitude wide, stacked by the initial thermal state of the gridcell: snow-free, unfrozen (blue) and snow-covered or frozen (orange). The box plot at the top marks the median (thick vertical line), P25–P75 (box) and P10–P90 (whiskers) of all combinations, and the dashed line marks the 1% criterion. One combination with a relative error above 1024% is included in the rightmost bin.
Figure 8: Comparison of the backpropagated gradient with the finite-difference references for all 84,254 nonzero references. (a) Directional projection Dg,dAD versus reference value Rg,d, shown only for the range −1 to 1 K K-1. Colors indicate the number of combinations in each bin, and the dashed line is the :1 line. (b) Histogram of the relative error Eg,d with bins 0.25 orders of magnitude wide, stacked by the initial thermal state of the gridcell: snow-free, unfrozen (blue) and snow-covered or frozen (orange). The box plot at the top marks the median (thick vertical line), P25–P75 (box) and P10–P90 (whiskers) of all combinations, and the dashed line marks the 1% criterion. One combination with a relative error above 1024% is included in the rightmost bin. Source: Shijin Yuan, Zhen Wei

A gradient can be useful even when it is not perfect, but a wrong sign can point an optimization in the wrong direction. The sign agreement therefore speaks to a practical question: when the model says that a small increase in an initial temperature raises or lowers the target temperature later, does the independent finite-difference check usually agree? In this test, it did in the large majority of cases.

Why This Changes Things

The main opportunity is to make the land model more amenable to parameter estimation and data assimilation. CLM contains many uncertain parameters governing processes such as plant physiology, soil behavior and carbon cycling. Researchers can compare model outputs with observations and adjust parameters, but without gradients that search may require many expensive simulations. Gradients can indicate which direction to adjust parameters to reduce a mismatch.

A related application is four-dimensional variational data assimilation, often shortened to 4D-Var. It uses observations collected over a period of time, rather than at a single instant, to estimate the initial conditions that best explain them. The “four-dimensional” idea combines three dimensions of space with time. A differentiable model can help trace the influence of initial conditions through that time window, which is exactly the kind of calculation 4D-Var needs.

This approach could also support more integrated modeling workflows. A differentiable physical model might be optimized alongside machine-learning components, or used to test which observations would most improve estimates of land state. These possibilities are not demonstrated in the paper; they are enabled by the software architecture and motivate the authors’ next steps. The advance is therefore less “the model now knows the right answer” than “the model can participate in a different kind of scientific question.”

There is also a broader computational lesson. GPU ports of scientific models often focus on making existing code run faster. Differentiability adds a different capability: it turns the simulation into a tool for asking how outcomes depend on inputs. And doing so for a full, coupled land configuration is more consequential than differentiating a simplified equation or an isolated module, because feedbacks and state carry-over can change the sensitivity of the whole system.

Still, speed is not equivalent to lower energy use or lower cost in every setting. The study reports wall-clock performance on a particular machine, not power consumption or total operational cost. And while a GPU can accelerate this workload, the best hardware choice depends on the institution, model size, parallel setup and available computing resources.

What’s Next

The paper establishes a foundation, not a finished application pipeline. The gradient validation focuses on one objective—first-layer soil temperature after 50 hours—and derivatives with respect to initial soil temperatures. It does not establish equivalent accuracy for every model output, every parameter, every forcing variable or much longer backpropagation windows. Those tests matter because gradients can become unstable or uninformative over long periods in nonlinear systems.

The authors also need to show that the gradients improve real scientific tasks. A natural next step is parameter optimization against observations, with careful checks that a lower mismatch does not come at the expense of realistic behavior elsewhere. Another is a full data-assimilation experiment: can the model use observations to produce better initial land states, and do those states improve subsequent predictions? Such evaluations need independent data and clear baselines.

A further question is how the model behaves beyond this configuration and test period. The work uses a specific CESM component set, forcing product, grid and five-year interval. Extending the implementation to other configurations, evaluating longer simulations, and testing additional gradients would clarify its reach. The paper’s ensemble method offers a useful standard for that work: compare a port not only with a single reference run, but with the original model’s own sensitivity to numerical noise.

If those next steps succeed, CLM-JAX could help turn land-model calibration from a slow, repeated search into a more direct, sensitivity-guided process. That would not remove uncertainty from climate science. It could help researchers find where uncertainty matters most, use observations more effectively, and run richer experiments with limited computing resources. For a model that links soil, crops, vegetation and the atmosphere, being able to trace cause and effect through time may be as important as being able to run faster.

Comments (0)

No comments yet. Be the first to share your thoughts.