polaris.tasks.ocean.overflow.init_utils.compute_initial_density

polaris.tasks.ocean.overflow.init_utils.compute_initial_density(config, ds, logger=None)[source]

Compute the in-situ density of the initial state on a geometric vertical coordinate (z-star or sigma), at the hydrostatic pressure of the resting state with zero surface pressure.

Parameters:
Returns:

xarray.DataArray – The in-situ density (kg m-3) at layer midpoints.