polaris.tasks.ocean.horiz_press_grad.reconstruction.layer_deviation

polaris.tasks.ocean.horiz_press_grad.reconstruction.layer_deviation(slope: DataArray, pressure_mid: DataArray, pressure: DataArray | float) → DataArray[source]

The deviation from the layer mean, slope * (p - p^mid).

This is the Theta' of [vert-recon]. It integrates to zero over the layer because pressure_mid is the exact arithmetic midpoint of the two interface pressures.

Parameters:
Returns:

deviation (xarray.DataArray) – The deviation from the layer mean.