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 becausepressure_midis the exact arithmetic midpoint of the two interface pressures.- Parameters:
slope (xarray.DataArray) – The slope from
linear_slope().pressure_mid (xarray.DataArray) – Mid-layer sea gauge pressure in Pa.
pressure (xarray.DataArray or float) – The pressure at which to evaluate, in Pa.
- Returns:
deviation (xarray.DataArray) – The deviation from the layer mean.