Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The Arakawa C-Grid

Authors
Affiliations
University of Valencia

Every somax model discretises its fields on a staggered Arakawa C-grid, supplied by finitevolX. Staggering is not an implementation detail — it is the choice that makes the discrete operators mimic the continuous ones (a discrete gradient that lands exactly where the next operator needs it, a divergence that is genuinely the adjoint of the gradient). This chapter shows where each field lives, how ghost cells frame the physical interior, and why the layout matters Arakawa & Lamb (1977)Durran (2010).

What you will learn

  • The four stagger positions (T, U, V, X) and the half-index convention that places them

  • How finitevolX frames the interior with a one-cell ghost halo

  • How to construct a grid and create correctly-shaped staggered fields

Why stagger?

Consider the rotating shallow-water system, the prototype for the ocean models in this book Vallis (2017). Mass conservation couples the layer thickness hh to the divergence of the transport,

∂th+∇⋅(h u)=0,\partial_t h + \nabla\cdot(h\,\mathbf{u}) = 0,

while the momentum balance couples the velocity u=(u,v)\mathbf{u}=(u,v) to the pressure gradient,

∂tu+(f z^×u)=−g ∇h.\partial_t \mathbf{u} + (f\,\hat{\mathbf{z}}\times\mathbf{u}) = -g\,\nabla h .

On a collocated grid (all variables at the cell centre), the pressure gradient ∇h\nabla h in (2) needs a centred two-cell stencil, which is blind to the 2Δx2\Delta x checkerboard mode — pressure and velocity decouple and spurious grid-scale noise grows. The C-grid cure is to place uu and vv on the cell faces, half a cell from the pressure point, so the gradient in (2) and the divergence in (1) both become compact one-cell differences that see every mode Arakawa & Lamb (1977).

The four stagger positions

A 2-D C-grid cell carries its variables at four distinct locations, named by the somax/finitevolX convention in Table 1. Writing the cell index as [j,i][j, i] (row jj, column ii) and the cell spacing as (Δx,Δy)(\Delta x, \Delta y), the half-index offsets are:

Table 1:Stagger positions on the Arakawa C-grid. The index [j,i][j,i] labels the south-west corner of the stencil neighbourhood (the “same-index” rule).

Symbol

Name

Location

Position of [j,i][j,i]

Typical field

T

cell centre

tracer point

(i Δx,  j Δy)(i\,\Delta x,\; j\,\Delta y)

thickness hh, pressure

U

east face

x-velocity point

((i+12) Δx,  j Δy)((i+\tfrac12)\,\Delta x,\; j\,\Delta y)

zonal velocity uu

V

north face

y-velocity point

(i Δx,  (j+12) Δy)(i\,\Delta x,\; (j+\tfrac12)\,\Delta y)

meridional velocity vv

X

north-east corner

vorticity point

((i+12) Δx,  (j+12) Δy)((i+\tfrac12)\,\Delta x,\; (j+\tfrac12)\,\Delta y)

vorticity ζ\zeta, PV qq

The placement is exactly what the equations want: uu sits where ∂xh\partial_x h is naturally defined (between two T-points), and the vorticity ζ=∂xv−∂yu\zeta = \partial_x v - \partial_y u lands cleanly at the corner where the circulation around a cell is measured.

Constructing a grid

finitevolX exposes the C-grid through CartesianGrid2D. The from_interior factory is the idiomatic constructor: you give it the number of physical (interior) cells and the domain size, and it computes the spacing and adds the ghost halo.

watermark extension not installed; skipping reproducibility readout.
interior cells : 16 x 16
full grid      : Nx=18 x Ny=18  (interior + 1 ghost cell per side)
spacing        : dx=0.0625, dy=0.0625

Ghost cells frame the interior

finitevolX surrounds the nx×nyn_x \times n_y physical cells with a one-cell ghost halo, so the stored arrays are (ny+2)×(nx+2)(n_y+2)\times(n_x+2). The ghost cells hold the boundary-condition values (next chapter); every diagnostic and conserved integral in somax is taken over the interior slice [1:-1, 1:-1] to exclude them. All four stagger types share this same full shape — only their physical interpretation differs.

stored field shape   : (18, 18)
interior field shape : (16, 16)  (the 16x16 physical cells)

Visualising the stagger

Figure 1 overlays the four stagger positions for a single cell. The tracer point T anchors the cell; U/V sit on the east/north faces half a cell away; the vorticity point X sits at the north-east corner. This is the geometry that makes the discrete gradient, divergence, and curl land exactly where the next operator consumes them (next chapter).

<Figure size 700x700 with 1 Axes>
The four Arakawa C-grid stagger positions over a 3×3 block of cells. Tracer
quantities (T) sit at cell centres; velocities (U, V) on the east and
north faces; vorticity / potential vorticity (X) at the north-east corners.

Figure 1:The four Arakawa C-grid stagger positions over a 3×3 block of cells. Tracer quantities (T) sit at cell centres; velocities (U, V) on the east and north faces; vorticity / potential vorticity (X) at the north-east corners.

Summary

  • somax fields live on a staggered Arakawa C-grid: T (centre), U/V (faces), X (corner) — see Table 1 and Figure 1.

  • Staggering makes the pressure gradient in (2) and the divergence in (1) compact, mode-aware operators — the original motivation of Arakawa & Lamb (1977).

  • CartesianGrid2D.from_interior(...) builds the grid; the stored arrays carry a one-cell ghost halo, and diagnostics use the [1:-1, 1:-1] interior slice.

The next chapter, discrete operators, shows how the staggering lets Difference2D map fields between these positions to build gradients, divergences, and the vorticity.

References

References
  1. Arakawa, A., & Lamb, V. R. (1977). Computational design of the basic dynamical processes of the UCLA general circulation model. Methods in Computational Physics, 17, 173–265.
  2. Durran, D. R. (2010). Numerical Methods for Fluid Dynamics: With Applications to Geophysics (2nd ed., Vol. 32). Springer. 10.1007/978-1-4419-6412-0
  3. Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics.