Implementation and Evaluation of a Machine Learned Mesoscale Eddy Parameterization Into a Numerical Ocean Circulation Model

Cheng Zhang, Pavel Perezhogin, Cem Gültekin, Alistair Adcroft, Carlos Fernandez‐Granda, Laure Zanna

Abstract

We address the question of how to use a machine learned parameterization in a general circulation model, and assess its performance both computationally and physically. We take one particular machine learned parameterization (GZ21) and evaluate the online performance in a different model from which it was previously tested. This parameterization is a deep convolutional network that predicts parameters for a stochastic model of subgrid momentum forcing by mesoscale eddies. We treat the parameterization as we would a conventional parameterization once implemented in the numerical model. This includes trying the parameterization in a different flow regime from that in which it was trained, at different spatial resolutions, and with other differences, all to test generalization. We find the parameterization, without modification or special treatment, to be stable and that the action of the parameterization to be diminishing as spatial resolution is refined. We also find some limitations: tuning of outputs at various depths is necessary; forcing near boundaries is less accurate; and the cost is high on CPUs.

Introduction

Global ocean circulation models are essential for climate forecasting but struggle with resolution. Mesoscale eddies, ranging from 10 to 100 km, significantly influence heat and carbon transport. Directly simulating these features is computationally prohibitive for long-term studies, necessitating "parameterizations"—mathematical shortcuts representing subgrid effects. While traditional parameterizations are physically derived, Machine Learning (ML) offers a data-driven alternative. This study investigates the "online" integration of an ML parameterization into a live physics simulation, assessing stability, generalization, and computational feasibility.

Implementation and Methods

The researchers integrated the GZ21 model, a deep convolutional neural network (CNN) originally trained on high-resolution CM2.6 data. The CNN predicts the mean and standard deviation of subgrid forcing, enabling a stochastic approach that mimics turbulent "noise."

To bridge the gap between the Fortran-based MOM6 (Modular Ocean Model version 6) and the Python-based PyTorch framework, the team utilized Forpy. This library allows the numerical model to pass velocity fields to the CNN and receive momentum forcing updates in real-time during the simulation loop.

Workflow of the online integration between the Fortran (MOM6) and Python (PyTorch) environments using Forpy.

Experimental Design

The performance was evaluated using an idealized "double gyre" configuration. The "truth" was established using a high-resolution 1/32° simulation (R32), while the ML parameterization was tested on coarser grids, primarily 1/4° (R4). These resolutions represent the jump from eddy-resolving to eddy-parameterized regimes.

Comparison of experimental parameters for the coarse (R4) and high-resolution (R32) simulations.

Key Results and Discussion

Stability and Accuracy

The hybrid model remained stable throughout the simulations without requiring artificial constraints. In the R4 configuration, the ML parameterization reduced Sea Surface Height (SSH) error by approximately 20%. With manual tuning of scaling factors, this improvement reached 26%. Crucially, the model successfully implemented "energy backscatter," injecting energy back into the flow—a feature often missing in traditional dissipative schemes.

Generalization Challenges

Several hurdles were identified during implementation:

  • Vertical Generalization: Since the model was trained on surface data, it required manual tuning to perform accurately at deeper ocean layers.
  • Boundary Effects: The CNN, trained on open-ocean data, produced artifacts near coastlines, highlighting the need for training sets that include topographical boundaries.
  • Scale Awareness: The parameterization's influence naturally diminished as resolution increased, though the optimal scaling factor required linear adjustment relative to grid size.

Computational Performance

Running the CNN on a CPU introduced a 10x slowdown compared to the physics core. However, offloading inference to a GPU via NVIDIA’s Multi-Process Service (MPS) reduced this overhead to negligible levels, demonstrating that GPU acceleration is vital for operational deployment.

Conclusion

The integration of ML-based eddy parameterizations into MOM6 shows significant promise for improving the realism of coarse-resolution ocean models. While the GZ21 model successfully captures energy backscatter and improves accuracy, future iterations must address boundary conditions and depth-specific scaling to become truly "plug-and-play" in global climate models. The team plans to move from this idealized "double gyre" to a realistic global ocean configuration (OM4) in future work.

Summary updated

BibTeX
@article{zhang2023implementation,
  author = {Cheng Zhang and Pavel Perezhogin and Cem Gültekin and Alistair Adcroft and Carlos Fernandez‐Granda and Laure Zanna},
  title = {{Implementation and Evaluation of a Machine Learned Mesoscale Eddy Parameterization Into a Numerical Ocean Circulation Model}},
  journal = {Journal of Advances in Modeling Earth Systems},
  year = {2023},
  doi = {10.1029/2023ms003697},
}
Figure