polaris.tasks.ocean.seamount.init_utils.compute_tracers

polaris.tasks.ocean.seamount.init_utils.compute_tracers(config: PolarisConfigParser, z_mid: DataArray) tuple[DataArray, DataArray][source]

Compute the temperature and salinity that reproduce the Beckmann and Haidvogel stratification under the configured equation of state.

Salinity is constant, so all of the stratification is carried by temperature. For eos_type = linear the linear equation of state is inverted algebraically; for eos_type = teos-10 the tracers are conservative temperature and absolute salinity, and the inversion is through polaris.ocean.eos.ct_from_potential_density().

Both branches reproduce the same potential density, so the two equations of state give the same buoyancy stratification and differ only in how density depends on pressure.

Parameters:
Returns:

  • temperature (xarray.DataArray) – Potential temperature for a linear equation of state, conservative temperature for TEOS-10 (degC).

  • salinity (xarray.DataArray) – Practical salinity for a linear equation of state, absolute salinity for TEOS-10.