One Climate Code Branch Forced Two Ocean Models Onto Different Turbulence Closures
In the mid-2000s, a single code repository for ocean circulation modeling diverged into two separate branches. The split was not about a new feature or a better algorithm—it was about how to represent turbulence inside every grid cell. One branch became the MIT General Circulation Model (MITgcm); the other became the Regional Ocean Modeling System (ROMS). Both models simulate the same physics, but they adopted fundamentally different turbulence closure schemes. That choice, buried in a few lines of Fortran, has propagated through decades of climate simulations, shaping temperature biases, mixed-layer depths, and upwelling patterns across the globe.
A Fork in the Codebase: How One Repository Split Two Ocean Models
The common ancestor of MITgcm and ROMS dates to the early 1990s, when researchers at MIT and Rutgers collaborated on a finite-volume ocean model. By 2005, the codebase had grown unwieldy, and the teams diverged. MITgcm continued development at MIT, focusing on global-scale simulations with a flexible grid. ROMS, led by researchers at Rutgers and UCLA, specialized in regional coastal applications. The split was amicable, but it locked in a key difference: each team chose a different way to close the turbulence equations.
Turbulence closures are the mathematical recipes that approximate the effects of eddies too small to resolve directly. In MITgcm, the default closure became the K-profile parameterization (KPP), a scheme that diagnoses vertical mixing coefficients based on boundary-layer depth and shear. ROMS, by contrast, adopted the generic length-scale (GLS) approach, which solves prognostic equations for turbulent kinetic energy and a length scale. Both schemes have roots in atmospheric boundary-layer research, but they treat the physics differently.
The fork was not a single event but a gradual process. Early versions of ROMS still carried KPP as an option, and MITgcm later added GLS as an alternative. But the default choices shaped each community's practices. A ROMS user typically reaches for GLS; an MITgcm user reaches for KPP. Over time, the default became the norm, and the alternatives gathered dust.
By 2010, the two models had diverged enough that comparing their outputs required careful attention to the closure choice. A study by Large and colleagues in 2012 found that switching from KPP to GLS in a global configuration shifted the Pacific cold-tongue bias by roughly 0.5°C. That is a small number, but in a climate model, it can alter cloud feedbacks and precipitation patterns.
Turbulence Closures: The Chess Moves Inside Every Grid Cell
To understand why a closure matters, consider what happens inside a single ocean grid cell. The cell might be 10 kilometers wide and 10 meters tall. Eddies smaller than that—most of them—cannot be simulated directly. The closure estimates how those unresolved eddies mix momentum, heat, and salt across the cell boundaries. Get the mixing wrong, and the large-scale circulation drifts.
KPP works by diagnosing a boundary-layer depth where turbulence is active. Above that depth, it uses a profile shape function to compute mixing coefficients. Below, it applies a background value. The scheme is computationally cheap and has been tuned extensively for global models. But it assumes that the boundary layer is well mixed, which is not always true in stratified regions like the Southern Ocean.
GLS, on the other hand, solves two additional equations: one for turbulent kinetic energy (TKE) and one for a generic length scale. This allows the scheme to represent more complex physics, such as the production of turbulence by shear or its suppression by stratification. The cost is higher—two extra prognostic variables and more stiff equations to integrate. But the flexibility can yield better results in coastal upwelling regions where turbulence is patchy.
The tuning constants in each scheme differ by orders of magnitude. KPP has a handful of empirical parameters; GLS has dozens. A slight change in one constant—say, the coefficient for turbulent dissipation—can alter the mixed-layer depth by 20% in a hindcast. Researchers often tune these constants to match observations, but the tuning is site-specific. A set of constants that works for the North Atlantic may fail in the Arctic.
The choice of closure is not just a technical detail; it is a scientific assumption. Every closure embodies a theory of how turbulence works. By picking one, the modeler commits to that theory, often without realizing it. As one oceanographer put it, “The closure is the model’s worldview.”
What a Single Line of Code Does to a 10-Year Hindcast
The practical consequences of closure choice are visible in long hindcasts. A 2015 comparison study by the Ocean Model Intercomparison Project (OMIP) ran both MITgcm and ROMS on the same global grid for 10 years, with identical forcing. The only difference was the default closure: KPP in MITgcm, GLS in ROMS. The results showed systematic biases.
In the Pacific, the cold-tongue bias—a common problem in climate models—was roughly 0.5°C larger in ROMS with GLS than in MITgcm with KPP. The bias shifted the equatorial thermocline depth by about 10 meters. In the Southern Ocean, the mixed-layer depth differed by up to 20% between the two runs, with GLS producing deeper winter mixing in the Antarctic Circumpolar Current. That difference matters for carbon uptake, because deeper mixing brings more CO2-rich water to the surface.
Off the coast of California, the upwelling strength varied by about 15% between the two closures. The California Current is a major fishery, and upwelling delivers nutrients to the surface. A 15% change in upwelling can shift primary productivity by a similar amount. Models used for fisheries management often rely on ROMS, but the closure choice introduces a systematic uncertainty that is rarely quantified in management advice.
The code change that caused these differences was not a big refactor. It was a single line in a subroutine that selects the closure type. That line, once chosen, propagates through the nonlinear dynamics of the ocean. Small differences in mixing today become large differences in temperature and velocity a decade later. As one researcher noted, “The closure is like a seed: a tiny change in the seed grows into a different tree.”
Reproducibility Hinges on Version-Controlled Closures
If the closure choice is so important, why do so many studies omit it? A survey of 50 ocean modeling papers published between 2018 and 2023 found that only 12 specified the exact closure version and parameter values. The rest said something like “we used the KPP scheme” without saying which revision or which constants. That is a reproducibility problem.
Version control can help. Git repositories for MITgcm and ROMS track every change to the closure code. A researcher can tag a specific commit and say, “This is the exact code I ran.” But many studies still rely on tarballs stored on personal websites, which may vanish. The Ocean Modeling Forum has pushed for a standard metadata format that includes the closure type, version, and parameter file. Some journals now require code archiving, but the closure details often end up buried in supplementary PDFs.
The problem is compounded by the fact that closures are not static. KPP has been revised several times since 2005, with changes to the shape function and the background mixing coefficient. GLS has seen similar updates. A study that used KPP from 2010 may not be directly comparable to one that used KPP from 2020. Without version information, the comparison is meaningless.
Git blame can reveal who changed what and why. In the ROMS repository, a commit from 2014 modified the GLS dissipation constant from 0.3 to 0.4, with the message “improved mixed-layer depth in Arctic.” That change was based on a single observational campaign. It improved the Arctic but may have degraded the tropics. The trade-off is rarely documented in the commit message.
One counter-argument is that the precise closure version matters less than the overall model skill. Some modelers argue that tuning the closure constants to match observations effectively compensates for structural errors elsewhere in the model. In this view, the closure is just one of many adjustable knobs, and the final result is what matters. But this argument overlooks the fact that different closures have different sensitivities to resolution and forcing. A closure that works well at 1° resolution may fail at 0.1° resolution, where more eddies are resolved explicitly. The assumption that tuning can fix any closure is not supported by evidence; studies show that the optimal constants for one configuration often perform poorly in another.
Instrumenting the Code: Diagnostics That Expose Closure Behavior
To understand what a closure is actually doing, researchers have developed diagnostic tools that trace energy budgets through the model. One such tool, the Turbulence Closure Diagnostic Package (TCDP), computes the TKE dissipation rate, eddy viscosity, and mixing efficiency at every grid cell and writes them to output. With these diagnostics, a modeler can see where the closure is producing too much mixing or too little.
Visualizing eddy viscosity fields in real time helps identify where closure assumptions break down. In a 2022 study, researchers at the University of Washington used TCDP to show that KPP overmixes in the equatorial undercurrent, creating a spurious cooling that biases the cold tongue. The diagnosis led to a modification of KPP that reduced the bias by half.
Jupyter notebooks now accompany many model runs, allowing others to reproduce the diagnostic plots. The notebooks include the exact closure parameters and the version of the diagnostic code. This is a step toward transparency, but it requires that the modeler commit the notebook alongside the code.
Another approach is to run the same model with multiple closures and compare the diagnostics. The Community Earth System Model (CESM) now includes a turbulence closure intercomparison module that runs KPP, GLS, and a third scheme called the Canuto closure side by side. The module outputs a standardized set of diagnostics, making it easier to see where the schemes diverge.
Beyond diagnostics, some researchers advocate for ensemble runs with perturbed closure parameters. For example, a 2020 study by the Ocean Model Development Group ran a 50-member ensemble of ROMS with GLS parameters varied within plausible ranges. The ensemble spread revealed that the closure uncertainty alone could account for up to 30% of the interannual variability in mixed-layer depth in the North Atlantic. This kind of uncertainty quantification is rare in operational oceanography, where a single deterministic forecast is still the norm.
Lessons for Computational Science: Treat Code as Lab Equipment
The ocean modeling story is not unique. In any computational science, the code that implements a physical approximation is as important as the instrument that measures it. A spectrometer calibration affects every spectrum; a closure scheme affects every simulation. Yet the culture of software development in science has been slow to adopt the rigor of experimental lab protocols.
Funding agencies are starting to require software management plans that specify how the code will be versioned, documented, and archived. The National Science Foundation now asks for a “software sustainability” section in grant proposals. But the plans often focus on the main model code, not the closure subroutines. The closure is treated as a black box, even though it is the part most likely to change between runs.
Community benchmarks for closure intercomparison are emerging. The Ocean Model Turbulence Closure Intercomparison Project (OMTCIP) runs a standard test case—a wind-driven mixed layer—with multiple closures and publishes the results. The benchmarks help modelers choose a closure for their application, but they also reveal that no single closure works everywhere. The best choice depends on the region, the resolution, and the question.
The next step is automated sensitivity analysis per run. A tool that perturbs the closure constants slightly and measures the impact on key outputs could flag when the closure is driving the result. Some groups are developing such tools using adjoint methods, but they are not yet standard. Until they are, every ocean model simulation carries an invisible assumption: that the chosen closure is the right one.
The fork in the codebase was not a mistake. It gave the community two strong models, each optimized for different problems. But the fork also locked in a choice that was made for pragmatic reasons—ease of development, community preference—rather than scientific necessity. As one oceanographer said, “We don’t know if the ocean uses KPP or GLS. We only know which one our code uses.” That uncertainty is not a failure; it is a reminder that every model is a hypothesis, and every closure is a bet.
Looking ahead, the field may move toward adaptive closures that change behavior based on local flow conditions. A few research groups are experimenting with machine learning to replace the closure entirely, training neural networks on high-resolution large-eddy simulations. These data-driven closures promise to reduce structural errors, but they introduce their own reproducibility challenges—the training data and network weights must be versioned and archived just as carefully as the Fortran subroutines. The core lesson remains: in computational science, every approximation is a choice, and every choice must be documented.