Noah-MP-bench, Can AI Edit a Land Surface Model Without Breaking the Physics

12 minute read

Published:

A piece of code can compile, run, and still quietly break the physics of the Earth.

Author: Koutian Wu; GitHub: ktwu01

That sentence stayed with me through most of this work. An artificial intelligence system, meaning software that can read a request, inspect a repository, and write code in response, was going to get very good at editing scientific models, very fast. The harder question was whether anyone could tell whether an edit it made was actually right, not tidy looking right, but right in the sense that water still goes where water should go, carbon still adds up, and snow still behaves like snow.

This post is about my master’s report at the University of Texas at Austin, titled Noah-MP-bench, Are AI-Generated Land Surface Model Changes Physically Consistent. It is my sole-author work, now available on Zenodo at https://doi.org/10.5281/zenodo.24616163 and on alphaXiv at https://www.alphaxiv.org/abs/2611.noah-mp-bench-are-ai-generated-land-surface-model-changes-physically-consistent . I built a benchmark, meaning a fixed set of tasks with fixed scoring rules that different systems can be compared on, to test what happens when an AI coding agent changes a real land surface model.

Let me back up and explain the model itself, because everything else hangs on it. A land surface model simulates how land exchanges water and energy with the atmosphere. Rain falls, some of it runs off into streams, some soaks into the soil, some evaporates back up. Sunlight arrives, the ground warms or cools, snow accumulates and melts, plants take up carbon and release carbon. The model turns all of that into numbers, grid cell by grid cell and hour by hour, and those numbers become the lower boundary for weather and climate prediction. If the land part is wrong, the atmosphere above it starts from a wrong place.

Noah-MP is one such model. It represents exchanges among soil, snow, vegetation, and the atmosphere, and it extends an earlier model called Noah used in operational weather prediction. The MP part points to its multiple parameterization options, meaning that for selected processes the model offers more than one scheme for representing the same piece of physics, and a user can choose among them.

Working on a model like this by hand is slow for a reason. Changing it well takes knowledge of hydrology, which is the study of how water moves through land, rivers, and soil, together with snow physics and biogeochemistry, which covers how living systems and soil exchange carbon and other elements, plus familiarity with a large Fortran code base, Fortran being the programming language that much of this generation of Earth science software is written in. Every process is coupled to the others through shared budgets of water, energy, and carbon, so touching one routine can move water or carbon somewhere else without anyone noticing.

That coupling is where AI editing gets dangerous. An AI coding system can often produce an edit that compiles cleanly, but compilation only tells you the program can be built. It tells you almost nothing about whether the change represents the physics you asked for. Conservation here means the accounting rule that water and carbon cannot appear or vanish inside the calculation, they have to move from one store to another or cross a boundary of the system. If a change creates water out of nothing, the code may still run beautifully. The output will just be wrong.

So I built Noah-MP-bench around a different idea. Do not score the edit by how it looks. Score it by what the changed model does when you run it. Slowing snow drainage, for example, requires retaining water inside the snowpack and releasing it later, not just turning one number down, and a locally sensible edit can still produce a response that is too large, a response in the wrong direction, a missing pathway, or a broken budget. Reading the diff alone catches none of that.

The tasks come from documented developer changes to Noah-MP. Each task gives the AI system a written physical objective and the source code as it existed before the corresponding developer change, and the system has to return an edit that realizes the requested behavior. The developer version serves as a reference, but an attempt does not have to resemble the developer code to pass. It passes if it meets the same physical criteria, so alternative implementations that satisfy the physics are accepted.

There are seven tasks, covering snow, runoff, crop carbon, and urban initialization. One deals with snow that compacts too fast under its own weight. One deals with meltwater leaving the bottom layer of the snowpack in a single pulse, when it should be stored and released more gradually. One deals with a crop carbon budget that mixes carbohydrate and carbon units. Two ask for new saturation-excess runoff options, schemes named Xinanjiang and VIC, both concerned with how much water runs off once soil becomes wet enough. Another deals with runoff and groundwater discharge that ignored soil texture and shifted the water table by a fixed offset. The urban task deals with city grid cells initialized incorrectly under multilayer building schemes.

Each task is scored by what I call a physical test, a controlled numerical experiment. It compiles the edited model, runs the changed routine under fixed starting states and fixed forcing, meaning the inputs fed to the routine are held the same across versions, and then checks the numbers that come out, the magnitude and timing of the response, conservation, and whether the response depends on physical state in the way it should, for example whether runoff changes sensibly as soil gets wetter or as the water table gets deeper. The original code, the developer version, and the AI version all receive the same inputs, so the comparison is fair.

Every physical test has a property I insisted on from the start. It fails the original code and passes the developer change, which is the anchor of the whole design, because a test that cannot separate the code before a fix from the code after it is not measuring what the task is about. One example made this vivid for me. In one runoff task, the original code compiles and runs, yet with the water table a quarter of a metre below the surface it produces surface runoff at 72 times the water input of the step, and identical runoff for sand, loam, and clay. Runoff cannot exceed the water that came in, and the task asks for a dependence on soil texture, so a test checking those properties fails the original and passes the developer change, exactly as it should.

For the main evaluation I ran Codex, a command-line coding agent that can inspect files and run commands before returning its edit, three times on each of the seven tasks, which gives 21 attempts in total. Then I audited the session transcripts. An attempt was excluded if it opened a path outside its workspace or searched for source code online, or if the transcript could not rule that out. Four of the 21 attempts were excluded on those grounds. All three attempts on the Xinanjiang runoff task had accessed reference-related material, so that seventh task ended up with no scored attempt at all, and one crop carbon attempt could not be resolved by the audit either. That left 17 scored attempts across six tasks.

The headline result is simple to state and, I think, worth sitting with. Codex recorded 14 passes out of 17 scored attempts, and every scored attempt was computationally correct, meaning every edit applied, compiled, and ran. The failures were not crashes, they were physics failures in running code, precisely the category this benchmark exists to expose. The pattern by task is more informative than the total. Every scored attempt passed on urban initialization, crop carbon balance, snow compaction, the runoff and water table task, and the VIC runoff option, while every scored attempt failed on basal snow drainage, at zero passes out of three scored attempts. All three failures sit on that single task, which points at a specific difficulty, holding water in a snowpack and releasing it consistently, rather than a general inability to edit the model, although three attempts are too few to turn into a failure rate for that process.

The case studies are where I learned the most. I examined the scored agent attempts in detail, and I also ran a supplementary sample in which four models, Gemini 3.1 Pro, GPT-4.1, GPT-5.4, and GPT-5.5, were prompted directly without an agent, each receiving the task statement and the source files in a single request. GPT is the model family name used by its maker, and the numbers distinguish versions. That sample used an earlier version of the task statements, so it does not support a clean comparison with the agent results, and I treat it only as material for understanding failure mechanisms. Out of its 28 attempts, 4 passed, and the rest either failed the physical criteria or ended earlier through service, editing, or compilation failures.

Across both samples, plausible edits failed in recurring ways. Some responses were too large or in the wrong direction, so a process moved far more than the physics called for, or moved the opposite way as the soil got wetter. Some edits treated only part of a process, and the basal snow drainage failures are the clearest example. The agent attempts did reduce the peak release of water already stored in the bottom snow layer, but new rain arriving on the snow passed through almost unchanged. Stored water and incoming water were not being treated by the same retention logic, so the scheme looked right in one scenario and fell apart in the other. Other edits broke conservation outright, creating or losing water, or left a carbon budget that did not close. Each of these could look reasonable in a code review that stays at the level of the diff. Running the process is what exposes them.

There is also a humbling result in the other direction, and I included it deliberately. One passing runoff implementation contains an array-layout error, an error in how data is arranged across model layers, that the test scenarios simply do not exercise. It passed every physical test I gave it, and code review caught the problem. A pass here establishes that an edit produces the requested behavior in the controlled experiments I ran. It does not establish that the edit is correct everywhere, under every condition, forever.

That balance is the point I want to leave with you. AI coding systems are already good enough to make real, physically consistent changes to a production land surface model, and 14 passes out of 17 scored attempts is genuine evidence of that, not a marketing line. They are also good enough to make changes that run, look plausible, and quietly violate the water budget, and three failures concentrated on one storage and release problem is genuine evidence of that too. Both halves belong in the same conversation, because evaluating scientific coding only by whether code compiles misses the layer where Earth science actually lives, the quantitative behavior of the process and the budgets that tie processes together. So the way forward, in my view, is to give the agent a real model and a real physical objective, run the changed process under controlled conditions, check magnitude, timing, direction, state dependence, and conservation together, and then still read the code and widen the scenarios over time. Noah-MP-bench is a small step, seven tasks on one model, but it makes the physical consequences of AI-generated model changes measurable, and measurable is where honest argument can start.

The full detail is in the report itself, on Zenodo at https://doi.org/10.5281/zenodo.24616163 and on alphaXiv at https://www.alphaxiv.org/abs/2611.noah-mp-bench-are-ai-generated-land-surface-model-changes-physically-consistent . I am grateful to my supervisor and committee, and to the Noah-MP developers whose documented changes these tasks are built from. What starts here changes the world, and I would like the AI part of that to be checked against the physics, every single time.