Skip to contents

Construct a certified TEOS-10 thermodynamic state

Usage

thermodynamic_state(
  x,
  salinity = NULL,
  temperature = NULL,
  pressure = NULL,
  reference_pressure_dbar = 0
)

Arguments

x

A direct source-profile <ocean_cube> containing one exact CF-identified salinity variable and one exact CF-identified temperature variable with point-valued metric-depth semantics.

salinity

Optional exact current variable name. When NULL, exactly one eligible Practical or Absolute Salinity variable must exist.

temperature

Optional exact current variable name. When NULL, exactly one eligible in-situ, potential, or Conservative Temperature variable must exist.

pressure

NULL derives sea pressure from metric depth and latitude. Otherwise, an exact current variable name declaring the CF standard name sea_water_pressure must be supplied.

reference_pressure_dbar

Finite non-negative sea pressure in dbar at which full potential density is evaluated.

Value

A memory-backed <ocean_cube> with variables, in order, absolute_salinity, conservative_temperature, sea_water_pressure, sea_water_density, and sea_water_potential_density.

Details

C9 uses the optional gsw package and the TEOS-10 75-term equation. It accepts only preserved CF semantic identities; variable names and long_name values never establish thermodynamic meaning. Practical Salinity is converted with position and pressure, temperature bases remain distinct, and complete finite states outside the GSW funnel abort the whole operation. No equation-of-state fallback or runtime installation is used.

The nonlinear state is evaluated from the supplied representative point values. Cell-mean temperature or salinity, density-threshold mixed layers, pycnoclines, and buoyancy frequency are outside this function's contract.

References

McDougall, T. J. and Barker, P. M. (2011). Getting started with TEOS-10 and the Gibbs Seawater Oceanographic Toolbox. SCOR/IAPSO WG127. https://www.teos-10.org/pubs/Getting_Started.pdf

Examples

if (FALSE) { # \dontrun{
state <- thermodynamic_state(cube)
state_1000 <- thermodynamic_state(cube, reference_pressure_dbar = 1000)
} # }