GeoStack · somax · box 3 and box 6 of the six-step cycle
Hybrid model taxonomy: what can be learned in an ocean model
The physical model is not one object. It is a stack of pieces: parameters, discretisation, terms, a tendency, an integrator, a step map, a rollout. Every hybrid or emulator learns one of those pieces and glues it back in one of a few ways. This page lists the ten that matter, on the same Gulf Stream QG example as the state-estimation page.
TL;DR
One signature, ten insides
Every type T1–T8 is the same operator: today's state, covariates, forcing and parameters in, tomorrow's state out. Any of them drops into the cycles, the DA and the rollouts of the last page unchanged. T9 and T10 change the signature.
Types differ in which layer is learned (the diagram below) and in how the learned piece is glued back: added, used as a coefficient, built into a conserving form, or substituted.
The training target splits them into two jobs.emulation reproduces the physical model faster (box 3, ground truth step 1). correction makes the model closer to the real ocean (box 6, ground truth a richer model or data).
The lower the learned layer, the more physics survives: conservation, freedom in Δt, a trustworthy adjoint. The higher, the more speed and the less structure.
Chip colour gives each type's usual job: teal mostly emulation, amber mostly correction. Several types do either; the card says which target each one takes.
Your 2 × 2, as a slice of the list
Classical integrator
Learned integrator
Physical tendency
the physical modelno learning
T6 solver in the loopbig step + learned error
Hybrid tendency
T3, T4 closuresphysics + learned term or field
T3 or T4 inside T6both at once
Learned tendency
T5 neural ODEnetwork RHS, RK4
T8 pure step mapno tendency at all
The 2 × 2 misses three things: learning below the tendency (T1 parameters, T2 discretisation), correcting after the step (T7), and learning above it (T9 rollouts, T10 representations).
Notation
As on the state-estimation page, plus the pieces of the model.
Symbol
Meaning
Kind, shape
\(\vect{x}_k\)
state at day k; here the model's prognostic PV \(q\) on the grid (SSH \(\eta = f_0 \psi / g\) is a linear diagnostic of it)
\(\mathbb{R}^{D_x} \to \mathbb{R}^{D_x}\), field → field
\(f_{k \leftarrow 0}\), \(f_{1:T \leftarrow 0}\)
k days of \(f\) composed; the rollout over a window, \((f_{1 \leftarrow 0}, \ldots, f_{T \leftarrow 0})\)
\(\mathbb{R}^{D_x} \to \mathbb{R}^{T \times D_x}\), field → cube
\(\gvect{\theta}_\text{emu}\)
weights of whatever is learned, emulator or correction
weights
\(g_\text{label}\), \(\mathcal{G}\)
a learned map on vectors, a learned operator on fields, where the piece has no role letter of its own; the label names the piece
map, operator
\(\mathcal{C}\)
coarse-graining from a finer grid to ours
(height_hr, width_hr) → (height, width)
Note the clash: \(\nu\) in the equations below is the viscosity, as is standard in QG. The variational parameters \(\gvect{\nu}\) of the last page never appear on this page.
The physical model, taken apart
The 1.5-layer QG model of the last page, written layer by layer. Let \(\nabla := \nabla_{\vect{s}}\) act on the horizontal coordinates \(\vect{s} = (s_1, s_2)\), \(\mathcal{A} = \nabla^2 - L_d^{-2}\) be the Helmholtz operator and \(J(a, b) = \partial_{s_1} a \partial_{s_2} b - \partial_{s_2} a \partial_{s_1} b\) the Jacobian.
Below the terms sits the discretisation: \(J\) is the Arakawa stencil and \(\nabla^2\) the five-point stencil on the C-grid, and \(\mathcal{A}^{-1}\) is a spectral or sine-transform solve. Each layer is a function with a signature, and each can be swapped.
The sketch below is the model in code. Every type in this page is an edit to one or two of its lines.
Markers: today ships on main (checked 24 Oct 2026: finitevolX 831c69f, gaussx eeda235, somax 9cb19b3); today* ships, arguments sketched; user is defined on these pages; not pinned is a library whose API was not checked. Shape column letters are defined in the header.
somax ships barotropic and baroclinic QG models but no 1.5-layer one, so the tendency here is page-defined. BaroclinicQG.create(n_layers=1) may be the shipped route, but it is untested.
Type
The edit
T1
params.viscosity → viscosity_net(phi, covariates)
T2
jacobian and difference.laplacian use learned stencil weights
the network outputs a coefficient the physics uses: \(g_\nu(\vect{u}^\text{cov}; \gvect{\theta}_\text{emu})\), \(g_\kappa\)
the operator bounds what it can do
T1, T4
Structural
output forced into a form: \(-\nabla \cdot \mathcal{G}_\text{flux}\), \(\kappa \ge 0\), flux-form stencils
conservation or dissipation by construction
T2, T3 (flux), T4
Splitting
physics step, then correction step
physics untouched; error tied to the step size
T6
Replacement
the network is the piece
only the signature
T5, T8, T9
What it is trained against
Two jobs, three sources of reference, four loss levels. Let \(\vect{x}^\text{ref}\) be the reference trajectory and \(\mathcal{F}_\text{ref}\) its tendency.
Job
Reference
Ground truth box
emulation
\(\vect{x}^\text{ref}\) from the physical model itself
step 1
correction
\(\vect{x}^\text{ref} = \mathcal{C}[\vect{x}^\text{hr}]\), a finer or richer run coarse-grained to our grid
a better step 1
correction
observations \(\vect{y}_{1:T}\) through \(\mat{H}_k\)
the ocean
The loss can sit at four levels, from cheapest to most faithful to how the model will be used:
For correction against a finer run, the tendency target is the subgrid forcing: what the coarse physics misses when applied to the coarse-grained state,
The tendency and one-step losses are a priori: cheap, but the model never sees its own errors, so long rollouts often go unstable. The rollout and observation losses are a posteriori: they differentiate through the solver, which is what a JAX model makes affordable. The observation loss also needs each window's \(\vect{x}_0\), so learning from data is 4D-Var with \(\gvect{\theta}_\text{emu}\) added to the control vector.
The ten types
Each card gives the equation, the operator signature with what is learned, and the training target as a column. Shapes use the named dimensions of the last page.
T1
Learned parameters
layer: parameters
The equations are fixed. Constants become leaves, or a network maps the covariates to a parameter field:
constants, or a parameter field from a small network on u^cov
Glue
parametric: the physics consumes the learned numbers
Target
correctiondata or a richer model; emulationstep 1 only to test identifiability
Regime
a posteriori, through the rollout (the parameters have no local target)
Keeps
everything: conservation, Δt freedom, a correct adjoint
Six-step
box 2's inner loop when θ is constant, box 6 when it becomes a field
The cheapest hybrid and the most honest one. It can only fix errors the equations already have room for: a missing process stays missing.
T2
Learned discretisation
layer: discretisation
The PDE is fixed; the stencil weights are learned. With offsets \((p, r) \in \mathcal{O}\) and weights \(w\), a derivative or face value is a weighted sum of shifted copies. In flux form the update telescopes, so the domain integral of \(q\) is conserved whatever the weights are:
stencil coefficients, constant or predicted per point from the local state
Glue
structural: the learned numbers sit inside the stencil, the PDE is untouched
Target
correctiona finer-grid run coarse-grained to this grid (numerics error, not physics error)
Regime
a posteriori; a priori on face values is possible but drifts
Keeps
conservation (flux form), Δt freedom, the C-grid staggering
Six-step
box 6: it changes how box 1 is computed
Lets a coarse grid behave like a finer one. With constant weights it still compiles to one slice fusion, and its Fourier symbol is inspectable, so you can see what it learned.
T3
Physics plus a learned term
layer: terms (additive)
A network adds the missing term. In flux form the term moves PV around without creating it:
one tendency term: a subgrid PV flux, a missing forcing
Glue
additive, or structural when written as a flux divergence
Target
correctionsubgrid forcing from a coarse-grained high-resolution run, or observations
Regime
a priori on the subgrid forcing, then a posteriori; a priori alone is often unstable
Keeps
Δt freedom; conservation only in flux form; an adjoint as good as 𝒢's Jacobian
Six-step
box 6: a structural change to box 1
The workhorse of hybrid modelling. Its danger is identifiability: trained jointly with θ, an additive term can absorb part of the physics.
T4
Learned fields in a known form
layer: terms (parametric)
The network never writes a tendency. It supplies a field that a physics operator then uses. An eddy diffusivity kept non-negative is dissipative by construction:
emulationtendencies of step 1, exact and free; correctiona richer model or data
Regime
a priori on tendencies, then a posteriori
Keeps
Δt freedom and the integrator's stability region; loses conservation
Six-step
box 3 when emulating, box 6 when correcting
For QG this is no faster than the physics it replaces, because the network is called 192 times a day (48 steps × 4 RK4 stages). It earns its place when the true tendency is unknown, not when it is expensive.
T6
Physical tendency, learned integrator
layer: integrator
Take a large step \(\Delta t_\text{big} = 8 \Delta t\) that the classical integrator gets wrong, and learn the time-discretisation error. Six corrected big steps replace 48 small ones:
\[ \vect{x} \leftarrow \mathrm{RK4}_{\Delta t_\text{big}}[\mathcal{F}_\text{phys}](\vect{x}) + g_\text{corr}(\vect{x}; \gvect{\theta}_\text{emu}) \text{, repeated 6 times per day.} \]
correctionreanalysis states or a richer model sampled daily
Regime
one-step, then rollout
Keeps
nothing beyond what f(·; θ) gives; loses Δt freedom
Six-step
box 6
Easy to bolt onto an existing model, and g_res itself is a map of where the model is wrong. It mixes physics error and numerics error, so it does not tell you which one to fix.
nothing by construction; same signature as f, so it drops into any cycle
Six-step
box 3 (the emulator of the last page)
The largest speed-up per day, and the one whose Jacobian is least trustworthy for 4D-Var. Long rollouts drift toward smooth or unstable states unless trained on them.
T9
Rollout operator
layer: rollout
The network maps an initial state and a forcing sequence to a whole window at once:
emulationstep 1 windows; correctionreanalysis windows
Regime
trajectory loss
Keeps
nothing; the horizon T is fixed
Six-step
box 3
The signature changes from field → field to field → cube, so it cannot be stepped, cycled or restarted mid-window. It fits a fixed 10-day 4D-Var window and little else.
T10
Learned representation
layer: representation (orthogonal)
An encoder maps the state to an embedding \(\vect{z}_k \in \mathbb{R}^{D_z}\), any of T5, T8 or T9 runs there, and a decoder maps back. The embedding is the latent \(\vect{z}\) because \(\vect{x}\) is already the state of the probabilistic model:
inx_k(variable, height, width)outx_k+1(variable, height, width)learnedθ_emug_enc, g_dec and dynamicsz_k(channel, height′, width′)
Learned
the space the dynamics run in, plus the dynamics
Glue
composition g_enc → dynamics → g_dec
Target
emulationor correction, plus reconstruction ‖x − g_dec(g_enc(x))‖²
Regime
reconstruction and latent rollout, jointly or in stages
Keeps
whatever the inner type keeps, in the embedding only
Six-step
box 3
Cheap dynamics in a small space. For assimilation, the observation operator becomes H_k ∘ g_dec, so every 4D-Var gradient goes through the decoder, and the decoder's errors become observation errors no Σ_ε accounts for.
Selection matrix
● yes ◐ partly or with care ○ no
Type
Faster than f
Can fix model error
Free Δt
Usable adjoint
Conserves by construction
Inspectable
T1 parameters
○
◐
●
●
●
●
T2 discretisation
●
◐
●
●
●
●
T3 learned term
◐
●
●
◐
◐
◐
T4 learned field
◐
●
●
◐
●
●
T5 neural tendency
○
●
●
◐
○
○
T6 learned integrator
●
○
○
◐
○
◐
T7 step residual
○
●
○
◐
○
◐
T8 step map
●
◐
○
○
○
○
T9 rollout
●
◐
○
○
○
○
T10 representation
●
◐
◐
◐
○
○
"Faster" is for this QG model, where the physics is already cheap. T2 is faster because a learned stencil lets a coarser grid match a finer one, not because a stencil is quicker. "Can fix model error ◐" for T8–T10 means only when trained on reanalysis or data instead of step 1.
What the structure implies
Emulation and correction are different boxes
An emulator answers "same model, faster" and is scored against step 1. A correction answers "better model" and is scored against a richer model or the ocean. Benchmarking a closure against the QG model, or an emulator against observations, measures the wrong thing. For this QG example emulation buys little; correction is where the value is.
Additive terms are not identifiable
Fit θ and an additive \(\mathcal{G}\) together and the network can learn part of \(\nu \nabla^6 \psi\) or of \(\beta s_2\), leaving θ meaningless. The fixes, in order of preference: a parametric or structural form (T4, flux-form T3); fit θ first and freeze it; penalise \(\Vert \mathcal{G} \Vert^2\).
For 4D-Var, learn low in the stack
T1–T5 keep a classical integrator, so stability, Δt and the meaning of the adjoint come from the physics. T6–T9 trade that for speed, and a step map that matches values can still have the wrong Jacobian. If a type above T5 is meant for step 4, its training should include Jacobian–vector products, not only values.
A priori training is a trap for T3–T5
A term that fits the subgrid forcing perfectly on reference states meets its own errors in a rollout and can blow up within days. Use the a priori loss to initialise, then train a posteriori through the solver.
Where each type lives
Type
Hook in the stack
T1
differentiable constants in somax term kernels; a JaxOperator for the parameter field
T2
the stencil-as-data layer in finitevolX, with a learnable stencil module in somax
T3, T4
OperatorTerm wrapping a network, added to the somax term tree
T5
a term tree with one OperatorTerm and no physics terms
T6, T7, T8
a JaxOperator with the step-map signature, used as the cycle's step
T9, T10
a JaxOperator outside the step interface; T10 also changes the DA observation operator
all, a posteriori
rollout_loss on a scanned cycle with checkpointing