polaris.tasks.ocean.horiz_press_grad.finite_volume.column_scan

polaris.tasks.ocean.horiz_press_grad.finite_volume.column_scan(pieces: dict, order: int = 2, guards: set[str] | None = None) → ndarray[source]

The design’s [d-recurrence]: \(D_k = \Delta_e z(\bar q_k)\) accumulated along the edge’s column from anchor_difference(), which sits at the sea floor.

\[D_{k+1} = D_k - \frac{1}{g} \int_{\bar q_k}^{\bar q_{k+1}} \Delta_e\hat\alpha(p)\,dp\]

Anchored at the floor the recurrence is run in the direction \(D_k = D_{k+1} + \frac{1}{g}\int\), upward; the integrals are the same ones either way.

Every quantity here is small. \(D_k\) is a fixed-pressure height difference – order \(10^{-1}\) m for a realistic baroclinic column and zero for a resting one – against the \(10^{2}\) m height differences at fixed layer index that a scheme comparing at fixed index has to form and cancel. The increments are smaller still, being integrals of a horizontal contrast. There is no cancellation of large quantities anywhere.

Parameters:
  • pieces (dict) – From matched_pressure_pieces().

  • order (int) – Number of Gauss-Legendre points for the layer integrals, matching Omega’s QuadraturePoints.

Returns:

difference (numpy.ndarray) – \(D_k\) at every edge interface valid in both columns, in m, with difference[anchor_index(pieces)] the anchor.