[MITgcm-support] LOCOMgcm: a differentiable PyTorch implementation of MITgcm's ocean model for GPUs
唐浩洋
tanghy at idsse.ac.cn
Sun Nov 22 10:24:17 EST 2026
Hi all,
We would like to introduce LOCOMgcm to the MITgcm community. LOCOMgcm is a differentiable ocean general circulation model developed by the Laboratory of Ocean Circulation Observing and Modeling (LOCOM) at the Institute of Deep-sea Science and Engineering, Chinese Academy of Sciences. It implements the MITgcm ocean discretizations in PyTorch and runs on NVIDIA GPUs.
Repository:https://github.com/wojiaonioo/LOCOMgcm
Main features
Differentiable. Gradients pass through the time steps of an integration, so a neural network placed inside the time step can be trained on the result of the integration, in the way NeuralGCM trains its networks through its atmospheric dynamical core (Kochkov et al., 2024, https://doi.org/10.1038/s41586-024-07744-y). The MITgcm dynamics can thus be combined with machine-learning components in hybrid models, and the same gradients can be used for 4D-Var.
Fast on GPUs. The PyTorch compiler (torch.compile) compiles the whole time step as one graph and fuses its operations into GPU kernels, and custom CUDA kernels implement the most expensive computations, such as the equation of state, KPP, tracer advection and the implicit vertical solves. On a 960 × 960 × 90 grid in double precision, four A800 GPUs run a hydrostatic time step 1.6 times as fast as MITgcm on 768 Xeon Gold 6132 cores.
Numerically equivalent to MITgcm in what it supports. LOCOMgcm supports part of MITgcm's ocean packages and options. What it supports has been compared with MITgcm in MITgcm verification experiments and in variants of them with other options: its fields agree with those of MITgcm step by step, and its gradients agree with the MITgcm adjoint generated by Tapenade. The supported packages and options, and the cases compared, are listed at
https://github.com/wojiaonioo/LOCOMgcm/blob/main/docs/SUPPORT.md
The README describes installation and how to run a case. If an option you need is missing, or if you have questions, bug reports or suggestions, please open an issue at
https://github.com/wojiaonioo/LOCOMgcm/issues
Best regards,
Haoyang Tang
Laboratory of Ocean Circulation Observing and Modeling (LOCOM)
Institute of Deep-sea Science and Engineering, Chinese Academy of Sciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20261122/d49c5d2f/attachment.html>
More information about the MITgcm-support
mailing list