Table Of Contents

Previous topic

Getting Started

Next topic

Changes in liboceanography

This Page

Function reference

liboceanography define the following functions:

  1. adiabatic_temperature_gradient
  2. atg
  3. conductivity
  4. cpsw
  5. depth
  6. freezing_point
  7. potential_temperature
  8. salinity
  9. sound_speed
  10. specific_heat
  11. specific_volume_anomaly
  12. svan
  13. theta

adiabatic_temperature_gradient

Compute the adiabatic temperature gradient.

double adiabatic_temperature_gradient(double salinity, double temperature,
                                      double pressure)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars

Returns adiabatic temperature gradient in °C/decibars.

conductivity

Convert salinity to conductivity ratio.

double conductivity(double salinity, double temperature, double pressure)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars

cpsw

Alias for specific_heat.

depth

Compute depth from pressure using Saunders and Fofonoff’s method.

double depth(double pressure, double latitude)

Units:

pressure  -- decibars
latitude -- degrees

Returns depth in meters.

freezing_point

Compute the freezing point of seawater.

double freezing_point(double salinity, double pressure)

Units:

salinity -- PSS-78
pressure  -- decibars

Returns freezing point in degrees Celsius.

potential_temperature

Compute the local potential temperature at reference pressure.

double potential_temperature(double salinity, double temperature,
                             double pressure, double reference_pressure)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars
reference_pressure  -- decibars

Returns local potential temperature in degrees Celsius.

salinity

Convert conductivity ratio to salinity.

double salinity(double conductivity, double temperature, double pressure)

Units:

temperature -- degrees Celsius
pressure  -- decibars

Returns salinity in PSS-78.

sound_speed

Compute the speed of sound in seawater by Chen and Millero.

double sound_speed(double salinity, double temperature, double pressure)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars

Returns sound speed in meters/second.

specific_heat

Compute the specific heat of seawater.

double specific_heat(double salinity, double temperature, double pressure)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars

Returns specific heat in J/(Kg °C).

specific_volume_anomaly

Compute specific volume anomaly (steric anomaly).

double specific_volume_anomaly(double salinity, double temperature,
                            double pressure, double *sigma)

Units:

salinity -- PSS-78
temperature -- degrees Celsius
pressure  -- decibars
sigma (density anomaly) -- Kg/m^3

Returns specific volume anomaly as 1.0e-8 m^3/Kg.

svan

Alias for specific_volume_anomaly.

theta

Alias for potential_temperature.