polaris.ocean.eos.teos10.compute_specvol

polaris.ocean.eos.teos10.compute_specvol(sa: DataArray | float, ct: DataArray | float, p: DataArray | float) DataArray | float[source]

Compute specific volume from co-located p, CT and SA.

Notes

  • For xarray inputs, this function converts inputs to NumPy arrays

    and calls gsw.specvol directly for performance. Inputs must fit in memory.

  • Any parallelization should be handled by the caller (e.g., splitting

    over outer dimensions and calling this function per chunk).

Parameters:
Returns:

float or xarray.DataArray – Specific volume with the same dims/coords as the input arrays (m^3/kg), or a scalar if all inputs are scalar.