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.specvoldirectly 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:
sa (float or xarray.DataArray) – Absolute Salinity at the same points as p and ct.
ct (float or xarray.DataArray) – Conservative Temperature at the same points as p and sa.
p (float or xarray.DataArray) – Sea pressure in Pascals (Pa) at the same points as ct and sa.
- 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.