centered_2nd_uniform_latlon
Stencil

cos λ spherical metric
factor.Coefficients
| selector kind | axis | offset | coeff |
|---|---|---|---|
latlon | lon | −1 | −1 / (2 R cos λ dλ) |
latlon | lon | +1 | +1 / (2 R cos λ dλ) |
latlon | lat | −1 | −1 / (2 R dφ) |
latlon | lat | +1 | +1 / (2 R dφ) |
R is sphere radius, λ is latitude, dλ and dφ are constant grid
spacings. The lat-lon accessor surfaces cos_lat as a per-row metric
quantity bound at evaluation time.
Discrete operator
Let u_{i,j} denote the cell-centered value at longitude index i and
latitude index j, with constant grid spacings Δλ, Δφ and per-row
metric cos φ_j. The two axes apply independently:
A Taylor expansion about each cell center gives the leading truncation errors
$$ \frac{(\Delta\lambda)^2}{6}\, \frac{1}{R\cos\varphi_j}\,\frac{\partial^3 u}{\partial\lambda^3}, \qquad \frac{(\Delta\varphi)^2}{6}\, \frac{1}{R}\,\frac{\partial^3 u}{\partial\varphi^3}, $$so each axis is O(h²) in its own grid spacing. Latitude rows adjacent
to the poles are excluded from the support — the ±1 lat offset would
step past the grid — and the lon axis is periodic in i.
Convergence

Y2,0 spherical harmonic on the
unit sphere, sampled at cell centers with
n ∈ {16, 32, 64, 128} and dropping the polar rows from the
measurement. The empirical slope tracks the expected −2 reference
line.The Layer-B walker drives this rule through ESS’s
verify_mms_convergence with the registered
Y2,0 spherical-harmonic manufactured solution on the
unit sphere (lon-independent, so the lon stencil is exact and the test
isolates the lat-axis 2nd-order accuracy). The fixture sweeps
n ∈ {16, 32, 64, 128} with nlon = 2 n,
nlat = n and asserts an observed L∞ minimum order
≥ 1.9 over interior cells (poles excluded by the lat stencil’s reach).
Inputs/expected live under
fixtures/convergence/.