polaris.ocean.vertical.ztilde.pressure_and_spec_vol_from_state_at_geom_height

polaris.ocean.vertical.ztilde.pressure_and_spec_vol_from_state_at_geom_height(config: PolarisConfigParser, geom_layer_thickness: DataArray, temperature: DataArray, salinity: DataArray, surf_pressure: DataArray, iter_count: int, logger: Logger | None = None) tuple[DataArray, DataArray, DataArray][source]

Compute gauge pressure at layer interfaces and midpoints, as well as the specific volume at midpoints given geometric layer thicknesses, temperature and salinity at layer midpoints (i.e. constant in geometric height, not pseudo-height), and surface gauge pressure. The solution is found iteratively starting from a specific volume calculated from the reference density.

Requires config options needed by {py:func}`polaris.ocean.eos.compute_specvol()`.

Parameters:
  • config (polaris.config.PolarisConfigParser) – Configuration options with parameters defining the equation of state.

  • geom_layer_thickness (xarray.DataArray) – The geometric thickness of each layer.

  • temperature (xarray.DataArray) – The temperature at layer midpoints.

  • salinity (xarray.DataArray) – The salinity at layer midpoints.

  • surf_pressure (xarray.DataArray) – The surface gauge pressure at the top of the water column (zero for a free surface open to the atmosphere).

  • iter_count (int) – The number of iterations to perform.

  • logger (logging.Logger, optional) – A logger for logging iteration information.

Returns:

  • p_interface (xarray.DataArray) – The gauge pressure at layer interfaces.

  • p_mid (xarray.DataArray) – The gauge pressure at layer midpoints.

  • spec_vol (xarray.DataArray) – The specific volume at layer midpoints.