polaris.tasks.ocean.horiz_press_grad.finite_volume.matched_pressure_pieces

polaris.tasks.ocean.horiz_press_grad.finite_volume.matched_pressure_pieces(ds: Dataset, guards: set[str] | None = None) → dict[source]

Everything the matched-pressure integrand needs, computed once per state.

Parameters:

ds (xarray.Dataset) – The two-column state, which must contain temperature, salinity, pressure, ZTildeInterface and maxLevelCell.

Returns:

pieces (dict) – expansion (the edge-shared coefficients per edge layer), theta/salinity and their reconstruction slope``s and ``pressure_mid, each column’s interface pressures and its deepest valid layer, and the edge-layer interface pressures edge_interface.