polaris.ocean.eos.compute_density
- polaris.ocean.eos.compute_density(config: PolarisConfigParser, temperature: DataArray, salinity: DataArray, pressure: DataArray | None = None) DataArray[source]
Compute the density of seawater based on the equation of state specified in the configuration.
- Parameters:
config (polaris.config.PolarisConfigParser) – Configuration object containing ocean parameters.
temperature (float or xarray.DataArray) – Temperature (conservative, potential or in-situ) of the seawater.
salinity (float or xarray.DataArray) – Salinity (practical or absolute) of the seawater.
pressure (float or xarray.DataArray, optional) – Pressure (in-situ or reference) of the seawater.
- Returns:
density (float or xarray.DataArray) – Computed density (in-situ or reference) of the seawater.