APL Ocean Remote Sensing
 Home      Staff      Research      Links      Outreach      Software 
 DensCalc 

A Sea Water Equation of State Calculator

The JavaScript calculator below will allow you to compute the UNESCO International Equation of State (IES 80) as described in Fofonoff (1985). The calculator is quite flexible. To use the calculator:

  1. You must enter either the depth or the pressure.
  2. Check any 2 of the bottom 4 checkboxes to indicate what parameters will be entered.
  3. Enter changes to the checked parameters and the other parameters will be automatically recalculated.

The depth and pressure are related according to a simplified approximation for a standard ocean (by convention an ocean at 0 deg C and 35 psu). The depth label includes an approximation symbol as a reminder. The quantities below the horizontal rule (Sound speed,...) are output only.


~Depth:m
Pressure:dbar
Temperature:deg C
Conductivity:S/m
Salinity:PSU
Density:kg/m^3



Sound speed:m/s
Specific heat:J/(kg °C)
Freezing point:°C
Adiabatic lapse rate:mdeg/dbar
Potential temperature:°C

You must have JavaScript enabled in your browser to work with this calculator.

Click here for an alternative version of this calculator that computes temperature, salinity and the speed of sound in seawater. This could be useful for estimating salinity when only temperature and sound speed measurements are available.



DensCalc - A Palm OS Density Calculator:

An improved version of this calculator, called DensCalc, is now available for the Palm OS. Click on the image of the Palm to read more about this free program or to download DensCalc.

palm version

DISCUSSION:

The equation of state of water is a complicated curve fit to very precise measurements. The relationship between the Practical Salinity Scale and older measures of salinity (typically measured in parts per thousand) is nearly, but not quite 1:1. In addition the conversion from absolute conductivity to salinity is discussed in some detail in Fofonoff. The interested reader is urged to read that article for a more complete discussion of these issues.

The general relationship between temperature, salinity and density is illustrated in the figure below. The isopycnals (lines of constant density) are labelled in units of sigma-t, where sigma-t = (density-1000)(kg/m^3). This is a standard oceanographic notation.

Density Curves

Although the actual equation of state is quite complex there is a simple rule of thumb to remember that can be quite helpful: density increases by roughly 1 part per 1000 when the temperature decreases by 5 deg C, the salinity increases by 1 psu or the pressure increases by 200 dbar (about 200 m depth).

Range of Validity:

The underlying equations are valid for temperatures from -2 to 35 deg C, pressures from 0 to 10,000 dbar, and practical salinity from 2 to 42.

Numerics:

The Javascript functions contained within this page provide a direct calculation of salinity from temperature, conductivity and pressure, and density from temperature, salinity and pressure. All of the other calculations are done by numerical inversion. The error criterion for convergence is set to 0.001% of the iterated parameter, but the reader is cautioned that the author cannot certify the numerical accuracy and precision of Javascript on your system.

While the numerics are reasonably accurate for "reasonable" values, I have not incorporated extensive error checking. Thus it is easy to enter nonsensical values and get nonsensical results. The underlying equations are valid for temperatures from -2 to 35 deg C, pressures from 0 to 10,000 dbar, and practical salinity from 2 to 42.

The actual Javascript code that performs the calculations is easily accessible. With this page open in your broswer, select "Source" under the "View" menu. The functions within the code can be used in other Javascript programs or are easily ported to C or Java. C-language versions of the routines are also available by downloading the source code to the Palm OS version of this calculator. (You don't need a Palm to look at the source code.)

Relationship of Depth and Pressure:

This calculator relates depth and pressure according to the quadratic relationship proposed by Saunders (1981) evaluated at a latitude of 30 deg. This is a simplified approximation to a more complicated form describing the depth/pressure relationship for a standard ocean (by convention this is an ocean at 0 deg C and 35 psu). The latitude enters in through the variation in gravity, effecting the depth of the 5000 dBar surface at a rate of 40 cm per degree of latitude at 30 deg. The net result is that the depth is at best an approximation. At 30 deg latitude it should be good to a few meters, but the errors will grow to as much as 15 m near the poles.

Units:

The pressures in this calculator are not absolute pressures, but gauge pressures. The difference is that gauge pressure is measured relative to 1 standard atmosphere, so the gauge pressure at the surface is 0, not 1000 mbar. I've also used decibar's throughout. This reflects common oceanographic usage, but is not accepted as an SI unit. The internationally preferred units are Pascals, where 1 dbar = 1e4 Pascal.

Auxiliary Parameters:

The calculator computes the values for several additional properties of seawater based on temperature, salinity and pressure. These include the following properties:

  • Speed of sound (units m/s)
  • Specific heat: the energy in Joules required to to raise the temperature of one kg of seawater one °C at constant pressure (units Joules/(kg °C))
  • Freezing point: valid for practical salinity ranging from 4 to 40 (units °C)
  • Adiabatic lapse rate: the change of temperature per unit pressure for an adiabatic change of pressure of an element of seawater (units millideg/decibar)
  • Potential temperature: temperature an element of seawater would have if raised adiabatically with no change in salinity to atmospheric pressure (units °C)

The speed of sound calculation is based on Chen and Millero (1977). The actual Javascript was a port of Fortran code provided to me by Pascal Vernin (pvernin@cea.fr). The values for the other four parameters are based on algorithms described in Fofonoff and Millard (1983).

Other Formulations:

Other formulations of the equation of state exist and may be superior for some applications. Feistel (2003) describes a Gibbs potential formulation of seawater thermodynamics that is claimed to be more accurate than the IES 80 and is valid over a slightly wider range of temperatures. Feistel (2005) describes the numerical implementation of these functions. Wright (1977) produced an equation of state formulation for efficient use in numerical models. McDougall, et al. (2005) likewise modified the 2003 Gibbs potential functions for more efficient computation. Anati (1999) discussed the problems in the measurement of salinity in highly saline brines and showed how the density becomes strongly dependent on the ionic composition of the brine.

References:

Anati, D. A., "The salinity of hypersalinme brines: Concepts and misconceptions," International Journal of Salt Lake Research, Vol. 8, 55-70, 1999.
Chen and Millero, "Speed of sound in seawater at high pressures," Journal of the Acoustical Society of America, Vol. 62, No. 5, 1129-1135, Nov 1977.
Feistel, R. "A new extended Gibbs thermodynamic potential of seawater," Progress in Oceanography, 58, 43-115, 2003, Corrigendum, 61, 99, 2004.
Feistell, R., "Numerical implementation and oceanographic application of the Gibbs thermodynamic potential of seawater," Ocean Science, 1, 9-16, 2005.
Fofonoff, N. P., "Physical Properties of Seawater: A New Salinity Scale and Equation of State of Seawater," Journal of Geophysical Research, Vol 90 No. C2, pp 3332-3342, March 20, 1985.
PDF Fofonoff and Millard, "Algorithms for computation of fundamental properties of seawater," UNESCO Technical papers in marine science No. 44, 1983.
McDougall, T. J., Jackett, D. R., Wright, D. G., and Feistel, R., "Accurate and Computationally Efficient Algorithms for Potential Temperature and Density of Seawater," Journal of Atmospheric and Oceanic Technology, 20, 730Ð741, 2003.
Saunders, Journal of Physical Oceanography, Vol. 11, pp. 573-574, April 1981.
PDF UNESCO, "Background papers and supporting data on the International Equation of State of Seawater 1980," UNESCO Technical papers in marine science No. 38, 1981.
Wright, D. G., "An equation of state for use in ocean models: Eckart's formula revisited," Journal of Atmospheric and Oceanic Technology, 14, 735Ð 740, 1997.

Revision History:

Text was updated on November 24, 2006 to include reference list and links to UNESCO papers.

The calculator was updated on January 22, 2006. A description of how to access the Javascript code was added to address a frequenctly asked question. Additional comments were also added to the Javascript code to make it slightly easier to read.

This calculator was updated on June 17, 1998 and again on November 8, 1999 to fix bugs in the interpretation of pressure units (dbar vs bar). The updated version has been checked against additional test points and seems to be accurate. The calculator now also updates automatically if the pressure or depth units are changed. The depth and pressure calculations were updated on Feb 23, 2000, based on the suggestion of Pascal Vernin.



Rick.Chapman@jhuapl.edu
© The Johns Hopkins University Applied Physics Laboratory
Update:Nov 26 17:17:54 2006