GSW Oceanographic Toolbox Overview
GSW Oceanographic Toolbox Overview
Trevor J. McDougall, (chair), University of New South Wales, Sydney, Australia
Rainer Feistel, Leibniz-‐‑Institut fuer Ostseeforschung, Warnemuende, Germany
Daniel G. Wright+, formerly of Bedford Institute of Oceanography, Dartmouth, Canada
Rich Pawlowicz, University of British Columbia, Vancouver, Canada
Frank J. Millero, University of Miami, Florida, USA
David R. Jackett++, formerly of CSIRO, Hobart, Australia
Brian A. King, National Oceanography Centre, Southampton, UK
Giles M. Marion, Desert Research Institute, Reno, USA
Steffen Seitz, Physikalisch-‐‑Technische Bundesanstalt (PTB), Braunschweig, Germany
Petra Spitzer, Physikalisch-‐‑Technische Bundesanstalt (PTB), Braunschweig, Germany
C-‐‑T. Arthur Chen, National Sun Yat-‐‑Sen University, Taiwan, R.O.C.
+ deceased, 8th July 2010
++ deceased, 31st March 2012
The photograph on the front cover of a CTD and lowered ADCP hovering just below the sea
surface was taken south of Timor from the Southern Surveyor in August 2003 by Ann Gronell
Thresher. Document cover by Louise Bell.
For bibliographic purposes, this document should be cited as follows:
McDougall T. J. and P. M. Barker, 2011: Getting started with TEOS-‐‑10 and the Gibbs Seawater (GSW)
Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-‐‑0-‐‑646-‐‑55621-‐‑5.
1. Preamble ………………………………………………………………………... 2
2. Installing the GSW Oceanographic Toolbox in MATLAB ……….…………... 4
3. Absolute Salinity SA ………………………………………………….………... 5
4. Preformed Salinity S* …………………………………………………….……. 8
5. Conservative Temperature Θ …..……………………………………………... 10
6. Which types of salinity and temperature should be archived? ………........ 12
7. The 75-term expression vˆ ( SA , Θ, p ) for specific volume .................….…….... 13
8. Changes to oceanographic practice under TEOS-10 ….....……..…………... 18
9. Ocean modelling using TEOS-10 ……………………………………….......… 19
10. A guide to the GSW Oceanographic Toolbox ……… ……………………… 21
11. References …………………………………………………………………….… 25
12. Recommended nomenclature, symbols and units in oceanography …....... 26
1School of Mathematics and Statistics, University of New South Wales, Sydney, Australia
email: [Link]@[Link]
2 Getting Started with TEOS-10
1. Preamble
The International Thermodynamic Equation Of Seawater – 2010 (TEOS-10) allows all the
thermodynamic properties of pure water, ice, seawater and moist air to be evaluated in a self-
consistent manner. For the first time the effects of the variations in seawater composition
around the world ocean are accounted for; these spatial variations of seawater composition
cause density differences that are equivalent to ten times the precision of our Practical
Salinity measurements at sea.
The GSW Oceanographic Toolbox of TEOS-10 is concerned primarily with the properties
of pure liquid water and of seawater; the TEOS-10 software for evaluating the properties of
ice and of humid air is available in the SIA (Seawater-Ice-Air) software library from the
TEOS-10 web site, [Link]
TEOS-10 has introduced several new variables into oceanography, including Absolute
Salinity S A , Preformed Salinity S* , and Conservative Temperature Θ . These variables are
introduced in this document, and then the use of these variables is discussed, followed by the
complete listing and description of the functions available in the GSW toolbox.
Absolute Salinity is the salinity argument of the TEOS-10 algorithms which give the
various thermodynamic properties of seawater, and under TEOS-10 Absolute Salinity S A is
the salinity variable to be used in scientific publications. Note, however, it is Practical
Salinity SP which must be reported to and stored in national databases. The practice of
storing one type of salinity in national databases (Practical Salinity), but using a different
type of salinity in publications (Absolute Salinity), is exactly analogous to our present
practice with temperature; in situ temperature is stored in databases (since it is the measured
quantity), but the temperature variable that is used in publications is a calculated quantity,
being potential temperature to date, and from now, Conservative Temperature.
For the past thirty years, under EOS-80 we have taken the “raw” data of Practical
Salinity SP (PSS-78), in situ temperature t (now ITS-90) and pressure p and we have used
an algorithm to calculate potential temperature θ in order to analyze and publish water-
mass characteristics on the SP − θ diagram. On this SP − θ diagram we have been able to
draw curved contours of potential density using EOS-80. Under TEOS-10 this practice has
now changed. Density and potential density (and all types of geostrophic streamfunction
including dynamic height anomaly) are now not functions of Practical Salinity SP but rather
are functions of Absolute Salinity S A . TEOS-10 also defines a new temperature variable,
Conservative Temperature Θ , which takes the place of potential temperature θ .
Conservative Temperature Θ has the advantage over θ of more accurately representing the
“heat content” of seawater. Under TEOS-10 is not possible to draw isolines of potential
density on a SP − θ diagram. Rather, because of the spatial variations of seawater
composition, a given value of potential density defines an area on the SP − θ diagram, not a
curved line. Hence for the analysis and publication of ocean data under TEOS-10 we need to
change from using the SP − θ diagram which was appropriate under EOS-80, to using the
SA − Θ diagram. It is on this SA − Θ diagram that the isolines of potential density can be
drawn under TEOS-10.
As a fast-track precursor to the rest of this document, we note that these calculations
can be performed using the functions of the GSW Oceanographic Toolbox as follows. The
observed variables ( SP , t , p ) , together with longitude and latitude, are used to first form
Absolute Salinity S A using gsw_SA_from_SP, and then Conservative Temperature Θ is
calculated using gsw_CT_from_t. Oceanographic water masses are then analyzed on the
SA − Θ diagram (for example, by using gsw_SA_CT_plot), and potential density contours
can be drawn on this SA − Θ diagram using gsw_rho(SA,CT,p_ref).
Getting started with TEOS-10 3
Step 2
Unzip the Toolbox to a directory you name “GSW”.
ENSURE THAT THE FOUR SUBFOLDERS (html, library, pdf,
thermodynamics_from_t) HAVE ALSO BEEN EXTRACTED.
Step 5
Run gsw_check_functions to check that the Toolbox is correctly installed and that
there are no conflicts. (This function runs three stored vertical profiles through all of
the GSW functions, and checks that the outputs are within pre-defined limits of the
correct values. These pre-defined limits are a factor of approximately a hundred larger
than the errors expected from the numerical precision of different computers, at the
standard double precision of MATLAB).
Having installed the GSW Oceanographic Toolbox, the command gsw_contents will
show the contents list of the software functions. The software descriptions and the help files
for the GSW functions can be accessed by clicking on the function names on this list.
In addition, we have included a short demonstration function, gsw_demo, to introduce
the user to the GSW Oceanographic Toolbox. gsw_demo uses two stored SP , t , p profiles
from the North Pacific and demonstrates, in a step-by-step manner, how to convert these
into SA , , p profiles. gsw_demo then demonstrates how to evaluate several water-
column properties such as dynamic height, geostrophic streamfunction and geostrophic
velocity, as well as forming potential density contours on the SA diagram.
A user may want to run gsw_check_functions periodically to confirm that the software
remains uncorrupted.
Getting started with TEOS-10 5
3. Absolute Salinity SA
Perhaps the most apparent change in using TEOS-10 compared with using the
International Equation of State of seawater (EOS-80) is the adoption of Absolute Salinity S A
instead of Practical Salinity S P (PSS-78) as the salinity argument for evaluating the
thermodynamic properties of seawater. Importantly, Practical Salinity is retained as the
salinity variable that is stored in national databases. This is done to maintain continuity in
the archived salinity variable, and also because Practical Salinity is virtually the measured
variable (whereas Absolute Salinity is a calculated variable).
The “raw” physical oceanographic data, as collected from ships and from autonomous
platforms (e. g. Argo), and as stored in national oceanographic data bases, are
• Practical Salinity ( S P , unitless, PSS-78) and
• in situ temperature ( t, °C , ITS-90) as functions of
• sea pressure ( p, dbar ), at a series of
• longitudes and latitudes.
Under TEOS-10 all the thermodynamic properties are functions of Absolute Salinity S A
(rather than of Practical Salinity), hence the first step in processing oceanographic data is to
calculate Absolute Salinity, and this is accomplished by the GSW function
gsw_SA_from_SP. Hence the function gsw_SA_from_SP is perhaps the most fundamental
of the GSW functions as it is the gateway leading from oceanographic measurements to all
the thermodynamic properties of seawater under TEOS-10. A call to this function can be
avoided only if one is willing to ignore the influence of the spatial variations in the
composition of seawater on seawater properties (such as density and specific volume). If
this is indeed the intention, then the remaining GSW functions must be called with the
salinity argument being Reference Salinity S R , and most definitely, not with Practical
Salinity S P . Reference Salinity S R can be obtained from the function gsw_SR_from_SP.
The gsw_SA_from_SP(SP,p,long,lat) function first interpolates the global Absolute
Salinity Anomaly Ratio ( Rδ ) data set using the internal GSW library function gsw_SAAR to
the (p,long,lat) location. gsw_SA_from_SP then uses this interpolated value of Rδ to
calculate Absolute Salinity S A according to (see Eqn. (A.5.10) of appendix A.5 of the
TEOS-10 Manual, IOC et al. (2010) and McDougall et al. (2012))
35.165 04 g kg −1
SA =
35
(
SP 1 + Rδ . ) Non-Baltic (1)
( )
In this expression 35.165 04 g kg −1 35 SP is the Reference Salinity S R , which is the best
estimate of Absolute Salinity of a Standard Seawater sample.
Eqn. (1) is the value of Absolute Salinity returned by gsw_SA_from_SP unless the
function detects that the location is in the Baltic Sea (where incidentally the internal GSW
library function gsw_SAAR returns a value of Rδ of zero). If the observation is from the
Baltic Sea, the Absolute Salinity Anomaly δ SA is calculated according to
SA − SR = 0.087 g kg −1 × (1 − SP 35) (from Eqn. (A.5.16) of IOC et al. (2010), following Feistel et
al. (2010)), so that Absolute Salinity S A is given by
SA =
(35.165 04 − 0.087 ) g kg −1
SP + 0.087 g kg −1 . Baltic Sea (2)
35
In summary, the gsw_SA_from_SP function returns either Eqn. (1) or Eqn. (2)
depending on whether the longitude and latitude of the sample put the observation outside
or inside the Baltic Sea. Since Practical Salinity should always be positive but there are
sometimes a few negative values from a CTD, any negative input values of S P to this
function gsw_SA_from_SP are set to zero.
If the latitude and longitude are such as to place the observation well away from the
ocean, a flag ‘in_ocean’ is set to zero as a warning, otherwise it is 1. This flag is only set
when the observation is well and truly on dry land; often the warning flag is not set until
6 Getting Started with TEOS-10
one is several hundred kilometers inland from the coast. When the function detects that the
observation is not from the ocean, Rδ is set equal to zero and gsw_SA_from_SP returns
( )
SA = SR = 35.165 04 g kg −1 35 SP in accordance with Eqn. (1).
The largest influence of the variable seawater composition occurs in the northern North
Pacific where SA − SR = δ SA is as large as 0.027 g kg −1 (see Figure 2 of IOC et al. (2010)
which is reproduced below), this being the difference between Absolute Salinity and the
estimate of Absolute Salinity which can be made on the basis of Practical Salinity alone. This
increment of salinity equates to an increment of density of approximately 0.020 kg m −3.
In order to gauge the importance of the spatial variation of seawater composition, the
northward gradient of density at constant pressure is reproduced below from Fig. A.5.1 of
IOC et al. (2010) for the data in a world ocean hydrographic atlas deeper than 1000m. The
vertical axis in this figure is the magnitude of the difference between the northward density
gradient at constant pressure when the TEOS-10 algorithm for density is called with S A (as
it should be) compared with calling the same TEOS-10 density algorithm with SR as the
salinity argument. Figure A.5.1 shows that the “thermal wind” is misestimated by more
than 2% for 58% of the data in the world ocean below a depth of 1000m if the effects of the
variable seawater composition are ignored. When this same comparison is done for only the
North Pacific, it is found that 60% of the data deeper than 1000m has “thermal wind”
misestimated by more than 10% if S R is used in place of S A .
The first version of gsw_SA_from_SP was made available in January 2009 (then called
gsw_ASal). The second version (version 2.0) was released in October 2010 and superseded
version 1. The third version (version 3.0) was released in May 2011 and supersedes version
2.0. This is unchanged in version 3.05 which was released in March 2015.
Figure A.5.1. The northward density gradient at constant pressure (the horizontal axis)
for data in the global ocean atlas of Gouretski and Koltermann (2004) for
p > 1000 dbar. The vertical axis is the magnitude of the difference
between evaluating the density gradient using S A versus S R as the
salinity argument in the TEOS-10 expression for density.
As discussed in Pawlowicz (2010), Wright et al. (2011) and IOC et al. (2010), there are
actually several contenders for the title of the “absolute salinity” of seawater, namely
“Solution Salinity”, “Added-Mass Salinity”, and “Density Salinity”. The paper of Wright et
al. (2011) presents a clear and readable account of this difficult subject, however the nuances
surrounding these different definitions of absolute salinity need not concern most physical
oceanographers. Under TEOS-10 the words Absolute Salinity and symbol S A are reserved
for “Density Salinity” such as can be deduced using laboratory measurements with a
vibrating beam densimeter.
8 Getting Started with TEOS-10
4. Preformed Salinity S*
Absolute Salinity S A , Reference Salinity S R and Practical Salinity S P are all
conservative salinity variables under the processes of (i) adiabatic pressure changes, and (ii)
turbulent mixing, but none of these three salinity variables are conservative in the presence
of (iii) biogeochemical processes. Preformed Salinity S* is designed to be a conservative
salinity variable which is unaffected by biogeochemical activity in the ocean; it is defined as
Absolute Salinity less the contributions of biogeochemical processes to Absolute Salinity.
The gsw_Sstar_from_SP(SP,p,long,lat) function first interpolates the global Absolute
Salinity Anomaly Ratio ( Rδ ) data set using the internal GSW library function gsw_SAAR to
the (p,long,lat) location. gsw_Sstar_from_SP then uses this interpolated value of Rδ to
calculate Preformed Salinity S* according to (see Eqn. (A.5.11) of appendix A.5 of the TEOS-
10 Manual, IOC et al. (2010))
35.165 04 g kg −1
S* =
35
(
SP 1 − r1Rδ , ) Non-Baltic (3)
where r1 is taken to be the constant 0.35 based on the work of Pawlowicz et al. (2011). Note
( )
that 35.165 04 g kg −1 35 SP is Reference Salinity S R which is the best estimate of Absolute
Salinity for a Standard Seawater sample. The figure below (from Figure A.4.1 of the TEOS-
10 Manual, IOC et al., 2010) illustrates the relationships between Preformed Salinity S* ,
Reference Salinity S R and Absolute Salinity S A .
S* = SA =
(35.165 04 − 0.087 ) g kg −1
SP + 0.087 g kg −1 . Baltic Sea (4)
35
In summary, the gsw_Sstar_from_SP function returns either Eqn. (3) or Eqn. (4)
depending on whether the longitude and latitude of the sample put the observation outside
or inside the Baltic Sea. Since Practical Salinity should always be positive but there are
sometimes be a few negative values from a CTD, any negative input values of S P to this
function gsw_Sstar_from_SP are set to zero.
Getting started with TEOS-10 9
If the latitude and longitude are such as to place the observation well away from the
ocean, a flag ‘in_ocean’ is set to zero as a warning, otherwise it is 1. This flag is only set
when the observation is well and truly on dry land; often the warning flag is not set until
one is several hundred kilometers inland from the coast. When the function detects that the
observation is not from the ocean, Rδ is set equal to zero and gsw_Sstar_from_SP returns
( )
S* = SR = 35.165 04 g kg −1 35 SP in accordance with Eqn. (3).
The largest influence of the variable seawater composition occurs in the northern North
Pacific where S R − S* is almost 0.01 g kg −1 , and the difference between Absolute Salinity and
the conservative Preformed Salinity, S A − S* , is as large as 0.036 g kg −1 , equivalent to an
increment of density of approximately 0.028 kg m−3 .
Continuing to concentrate on the mid-depth northern North Pacific, recall that the
salinity difference SA − SR = δ SA of 0.027 g kg −1 represents the difference between Absolute
Salinity and the estimate of it using only Practical Salinity, while the value of S A − S* of
0.036 g kg −1 is the total influence of biogeochemical processes on Absolute Salinity. An
ocean model which treats its salinity variable as being conservative needs to account for this
salinity difference, S A − S* , before density and the “thermal wind” can be accurately
calculated. The reason why the salinity differences SA − SR and S A − S* are not equal is that
biogeochemical processes have an effect on the conductivity of seawater and therefore on
Practical Salinity and Reference Salinity.
What then is the appropriate use of Preformed Salinity S* ? This salinity variable is the
one which can be treated as being conservative. Hence, in contrast to the evolution equation
of Absolute Salinity S A , the evolution equation for Preformed Salinity S* does not contain
non-conservative source terms caused by biogeochemistry (see appendix A.20 of IOC et al.
(2010)). This means that Preformed Salinity S* is ideal for use as
(i) the salinity variable that is advected and diffused in forward ocean models,
(ii) the salinity variable that is advected and diffused in inverse ocean models, and
(iii) the salinity variable that is averaged when forming a hydrographic atlas.
In these applications, the salinity difference SA − S* is added to the averaged atlas or model
salinity variable to form Absolute Salinity S A before other thermodynamic properties (such
as density etc.) are calculated. Because of its conservative nature, there is an argument that
suggests that Preformed Salinity S* should be used in place of Absolute Salinity S A as the
salinity axis of the SA − Θ diagram, since water masses are notionally mixed on this
diagram. However, to do so would take away the ability to draw isolines of potential
density on this diagram, so the SA − Θ diagram (as opposed to the S* − Θ diagram) is
recommended for water-mass analysis.
10 Getting Started with TEOS-10
5. Conservative Temperature Θ
Because the TEOS-10 properties of seawater are all derived from a Gibbs function, it is
possible to find thermodynamic properties such as enthalpy, internal energy and entropy.
Hence potential enthalpy and Conservative Temperature (which is simply proportional to
potential enthalpy) are readily available.
Conservative Temperature is in some respects quite similar to potential temperature in
that the same artificial thought experiment is involved with their definitions. In both cases
one takes a seawater sample at an arbitrary pressure in the ocean and one imagines
decreasing the pressure on the seawater parcel in an adiabatic and isohaline manner until
the sea pressure p = 0 dbar is reached. The temperature of the fluid parcel at the end of this
artificial thought experiment is defined to be the potential temperature θ . Similarly, the
enthalpy at the end of this artificial thought experiment is defined to be the potential
enthalpy h0 , and Conservative Temperature Θ is simply potential enthalpy divided by the
fixed “heat capacity” c0p ≡ 3991.867 957 119 63 J kg −1 K −1 .
Conservative Temperature Θ represents the “heat content” of seawater much more
accurately than does potential temperature θ (McDougall (2003), Graham and McDougall,
2013). Θ can be evaluated from in situ temperature t from the function gsw_CT_from_t.
The difference between potential temperature and Conservative Temperature can be as large
as θ − Θ = −1.4°C but is more typically no more than ± 0.1°C (see Figure A.17.1 of IOC et
al. (2010) which is reproduced below). To put a temperature difference of 0.1°C in context,
this is the typical difference between in situ and potential temperatures for a pressure
difference of 1000 dbar, and it is approximately 40 times as large as the typical differences
between t90 and t68 in the ocean.
The air-sea heat flux is exactly proportional to the flux of Conservative Temperature,
and because Θ is almost a perfectly conservative variable, the meridional “heat” flux is very
accurately given by the meridional flux of Θ (as opposed to the meridional flux of potential
temperature). Also, the parameterized lateral diffusion of “heat” along neutral tangent
planes can be more than 1% different when such lateral diffusive heat fluxes are estimated
using gradients of potential temperature rather than gradients of Conservative Temperature
(see Figure A.14.1 of IOC et al. (2010) which is reproduced below).
For these reasons Conservative Temperature Θ is the appropriate temperature variable
to be used in ocean analyses. Just as Absolute Salinity S A is now to be used in
oceanographic publications instead of Practical Salinity, so too Conservative Temperature Θ
takes the place of potential temperature θ under TEOS-10.
( )
Figure A.14.1. Contours of ∇nθ ∇n Θ − 1 × 100% at p = 0 , showing the percentage
difference between the epineutral gradients of θ and Θ . The red dots
are from the global ocean atlas of Gouretski and Koltermann (2004) at
p = 0.
12 Getting Started with TEOS-10
of the 75-term equation of state is different from the same thermal expansion coefficient
evaluated directly from TEOS-10 with an rms error in the “funnel” of 0.03x10−6 K −1 ,
compared with the rms error of the thermal expansion coefficient of the laboratory data to
which the Feistel (2008) Gibbs function was fitted of 0.73 x10−6 K −1 . In terms of the
evaluation of density gradients, the haline contraction coefficient evaluated from the 75-term
equation is many times more accurate than the thermal expansion coefficient.
In dynamical oceanography it is the thermal expansion and haline contraction
coefficients α Θ and β Θ which are the most important aspects of the equation of state since
the “thermal wind” is proportional to α Θ∇ p Θ − β Θ∇ p SA and the vertical static stability is
given in terms of the buoyancy frequency N by g −1 N 2 = α Θ Θ z − β Θ (SA ) z . Hence for
dynamical oceanography the 75-term polynomial expression for specific volume retains
essentially the full accuracy of TEOS-10. The use of the 75-term polynomial expression for
specific volume has several advantages over using the exact formulation, namely
• it is a function of Conservative Temperature, so eliminating the need to be
continually converting between Conservative and in-situ temperatures in order
to evaluate density,
• it is computationally faster (by a factor of 4) to use the 75-term expression
gsw_specvol(SA,CT,p) rather than using gsw_specvol_CT_exact(SA,CT,p)
which is based on the sum of the Gibbs functions of pure water (IAPWS-09) and
of sea salt (IAPWS-08),
• ocean models will use this 75-term equation of state, and it is advantageous for
the fields of observational and theoretical oceanography to use the same
equation of state as ocean models.
The functions of the GSW Oceanographic Toolbox are listed on the next four pages, after
which section 8 begins on page 18.
Page 1. GSW version 3.06.12
SA = S (1+ F δ ) ,
* (6)
where
Rδ ≡
δ SAatlas
and Fδ =
[1+ r1 ] Rδ . (7a, b)
S Ratlas (1 − r Rδ )
1
20 Getting Started with TEOS-10
The Absolute Salinity Anomaly Ratio, Rδ ≡ δ SAatlas S Ratlas , is the ratio of the values of
Absolute Salinity Anomaly and Reference Salinity in the stored hydrographic atlas, and r1 is
taken to be the constant 0.35 .
Because Preformed Salinity S* is designed to be a conservative salinity variable, blind to
the effects of biogeochemical processes, its evolution equation is in the conservative form
(see appendix A.21 of IOC et al. (2010)),
⎛ ∂ Ŝ ⎞
dŜ*
dt
( )
= γ z ∇ n ⋅ γ z−1 K∇ n Ŝ* + ⎜ D * ⎟ .
⎝ ∂z ⎠ z
(8)
Here the over-tilde of Ŝ* indicates that this variable is the thickness-weighted average
Preformed Salinity, having been averaged between a pair of closely-spaced neutral tangent
planes. The material derivative on the left-hand side of Eqn. (8) is with respect to the sum of
the Eulerian and quasi-Stokes velocities of height coordinates (equivalent to the description
in appendix A.21 of IOC et al. (2010) in terms of the thickness-weighted mean horizontal
velocity and the mean dianeutral velocity), while the right-hand side of this equation is the
standard notation indicating that Ŝ* is being diffused along neutral tangent planes with the
diffusivity K and in the vertical direction with the diapycnal diffusivity D (and γ z−1 is the
average of the reciprocal of the vertical gradient of Neutral Density or locally-referenced
potential density). The model is initialized with values of Preformed Salinity using Eqn. (5)
based on observations of Practical Salinity and on the interpolated global observed data base
of Rδ ; this is best done by calling gsw_Sstar_from_SP.
In order to evaluate density during the running of an ocean model, Absolute Salinity
must be evaluated based on the model’s primary salinity variable, Preformed Salinity, and
Eqn. (6). This can be done by carrying the following evolution equation for F δ
⎛ ∂F δ ⎞
dF δ
dt
( )
= γ z ∇ n ⋅ γ z−1 K∇ n F δ + ⎜ D
⎝ ∂z ⎟⎠
( )
+ τ −1 F δ obs − F δ . (9)
z
The model variable F δ (note that F δ = SA S* − 1) is initialized based on observations of
Rδ ≡ δ SAatlas S Ratlas and the use of Eqn. (7b); this is best done by calling gsw_Fdelta. Equation
(9) shows that F δ is advected and diffused like any other tracer, but in addition, there is a
( )
non-conservative source term τ −1 F δ obs − F δ which serves to restore the model variable
F δ towards the observed value (found from gsw_Fdelta) with a restoring time τ that can
be chosen to suit particular modeling needs (see the discussion in appendix A.20 of the
TEOS-10 Manual, IOC et al. (2010)).
In summary, the approach for handling salinity in ocean models suggested in IOC et al.
(2010) and summarized here carries the evolution Eqns. (8) and (9) for Ŝ* and F δ , while Ŝ A
is calculated from these two model variables at each time step according to
(
SˆA = Sˆ* 1+ F δ . ) (10)
It is this salinity, Ŝ A , which is used as the argument for the model’s expression for density at
each time step of the model.
The Baltic Sea is somewhat of an exception because its compositional variations are not
due to biogeochemistry but to anomalous riverine input of dissolved salts which behave
conservatively. Preformed Salinity S* in the Baltic is equal to Absolute Salinity S A , which
implies that r1 = − 1 and F δ = 0 in the Baltic Sea. Hence in the Baltic, an ocean model
simply puts SA = S∗ and the value of Absolute Salinity Anomaly δ SA is immaterial during
the running of the model. Of course the values of δ SA in the Baltic are important for
relating Absolute Salinity and Preformed Salinity to measured values of Practical Salinity
there. The discharges (mass fluxes) of river water and of Absolute Salinity should both
appear as source terms at the edges of the Baltic Sea in the model.
If an ocean model is to be run for only a short time (perhaps as long as a century) then it
may be sufficiently accurate to carry only one salinity variable, namely Absolute Salinity S A .
Getting started with TEOS-10 21
For longer integrations the neglect of the non-conservative biogeochemical source term
means that the model’s salinity variable SA will depart from reality. A more detailed
discussion of these points is available in appendix A.20 of IOC et al. (2010). To our
knowledge, as of July 2020, no ocean model has adopted this approach; rather they have
used only one salinity variable, namely Absolute Salinity SA .
In summary, the changes needed to make ocean models TEOS-10 compatible are
(i) ( )
use an equation of state in terms of SA and , v̂ SA ,, p , such as the 75-term
expression to be found in gsw_specvol(SA,CT,p),
(ii) have Conservative Temperature as the model’s temperature variable (note
that SST needs to be evaluated in the model’s air-sea flux module using
gsw_pt_from_CT at the sea surface only),
(iii) incorporate the effects of the spatially variable seawater composition using the
techniques of appendix A.20 of IOC et al. (2010) as summarized above,
(iv) restoring boundary conditions for ocean-only models can be imposed on the
model variables S* and ,
(v) model output salinities and temperatures are best made as Absolute Salinity SA
and Conservative Temperature , consistent with the variables which will be
published in oceanographic journals.
To our knowledge, as of July 2020, points (iii) and (iv) have not yet been implemented in
ocean models. Rather the model’s salinity variable is initialized and is interpreted as
Absolute Salinity SA , and if a salinity restoring boundary condition is used, it is applied to
Absolute Salinity.
In the documentation set the function gsw_check_functions confirms that the GSW
Oceanographic Toolbox is correctly installed and that there are no conflicts. This function
runs three stored vertical profiles through of all the other GSW functions, and checks that
the outputs are within predefined limits of the correct answers. These pre-defined limits are
a factor of approximately a hundred larger than the errors expected from numerical round-
off (at the standard double precision of MATLAB). The user may want to run
gsw_check_functions periodically to confirm that the software remains uncorrupted.
gsw_demo runs and displays results from several of the GSW functions, so introducing the
user to some of the features of the Toolbox.
The GSW Oceanographic Toolbox is designed to be comprehensive and to be installed
in its entirety, even though most users may use relatively few of the functions for routine
oceanographic analyses. For example, the most basic use of the GSW Oceanographic
Toolbox would begin with a data set of ( SP , t , p ) at known longitudes and latitudes. The
first steps are to call gsw_SA_from_SP and then gsw_CT_from_t to convert to a data set of
( SA , Θ, p ) . With the data set in this form, water masses may be analyzed accurately on the
SA − Θ diagram, and in situ density and potential density are available by calling the
computationally-efficient 75-term expression for density, gsw_rho, with the pressure input
being the in situ sea pressure p , and the reference sea pressure p_ref, respectively. That is,
in situ density is evaluated as gsw_rho(SA,CT,p) and potential density with respect to the
reference pressure p_ref is given by gsw_rho(SA,CT,p_ref).
11. References
Barker, P. M. and T. J. McDougall, 2017: Stabilising hydrographic profiles with minimal change
to water masses. Journal of Atmospheric and Oceanic Technology, 34, 1935-1945.
Barker, P. M. and T. J. McDougall, 2020: Two Interpolation Methods using Multiply-Rotated
Piecewise Cubic Hermite Interpolating Polynomials. Journal of Atmospheric and Oceanic
Technology, 37, 605-619.
Feistel, R., 2003: A new extended Gibbs thermodynamic potential of seawater, Progr. Oceanogr.,
58, 43-114.
Feistel, R., 2008: A Gibbs function for seawater thermodynamics for −6 to 80 °C and salinity up to
120 g kg–1, Deep-Sea Res. I, 55, 1639-1671.
Feistel, R., S. Weinreben, H. Wolf, S. Seitz, P. Spitzer, B. Adel, G. Nausch, B. Schneider and
D. G. Wright, 2010: Density and Absolute Salinity of the Baltic Sea 2006–2009. Ocean Science,
6, 3–24. [Link]
Graham, F. S. and T. J. McDougall, 2013: Quantifying the non-conservative production of
Conservative Temperature, potential temperature and entropy. Journal of Physical
Oceanography, 43, 838-862.
Hill, K. D., T. M. Dauphinee and D. J. Woods, 1986: The extension of the Practical Salinity Scale
1978 to low salinities, IEEE J. Oceanic Eng., 11, 109–112.
IAPWS, 2008: Release on the IAPWS Formulation 2008 for the Thermodynamic Properties of
Seawater. The International Association for the Properties of Water and Steam. Berlin,
Germany, September 2008, available from [Link].
IAPWS, 2009: Supplementary Release on a Computationally Efficient Thermodynamic
Formulation for Liquid Water for Oceanographic Use. The International Association for the
Properties of Water and Steam. Doorwerth, The Netherlands, September 2009, available
from [Link]. This Release is referred to in the text as IAPWS-09.
IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of seawater – 2010:
Calculation and use of thermodynamic properties. Intergovernmental Oceanographic
Commission, Manuals and Guides No. 56, UNESCO (English), 196 pp. Available from
[Link]
Getting started with TEOS-10 25
Jackett, D. R. and T. J. McDougall, 1997: A neutral density variable for the world’s oceans. Journal
of Physical Oceanography, 27, 237-263.
Klocker, A., T. J. McDougall and D. R. Jackett, 2009: A new method for forming approximately
neutral surfaces. Ocean Sci., 5, 155-172.
McDougall, T. J. 2003: Potential enthalpy: A conservative oceanic variable for evaluating heat
content and heat fluxes. Journal of Physical Oceanography, 33, 945-963.
McDougall T. J. and P. M. Barker, 2011: Getting started with TEOS-10 and the Gibbs Seawater
(GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.
Available from [Link] (this is the present document).
McDougall, T. J., D. R. Jackett, F. J. Millero, R. Pawlowicz and P. M. Barker, 2012: A global
algorithm for estimating Absolute Salinity. Ocean Science, 8, 1123-1134. [Link]
[Link]/8/1123/2012/[Link]
McDougall, T. J., D. R. Jackett, D. G. Wright and R. Feistel, 2003: Accurate and computationally
efficient algorithms for potential temperature and density of seawater. Journal of Atmospheric
and Oceanic Technology, 20, 730-741.
McDougall, T. J. and A. Klocker, 2010: An approximate geostrophic streamfunction for use in
density surfaces. Ocean Modelling, 32, 105-117.
Millero, F. J., R. Feistel, D. G. Wright, and T. J. McDougall, 2008: The composition of Standard
Seawater and the definition of the Reference-Composition Salinity Scale, Deep-Sea Res. I, 55,
50-72.
Pawlowicz, R., 2010: What every oceanographer needs to know about TEOS-10 (The TEOS-10
Primer), unpublished manuscript, available from [Link].
Pawlowicz, R., D. G. Wright and F. J. Millero, 2011: The effects of biogeochemical processes on
oceanic conductivity/salinity/density relationships and the characterization of real seawater.
Ocean Science, 7, 363–387. [Link]
Roquet, F., G. Madec, T. J. McDougall and P. M. Barker, 2015: Accurate polynomial expressions
for the density and specific volume of seawater using the TEOS-10 standard. Ocean
Modelling, 90, 29-43, [Link]
Wright, D. G., R. Pawlowicz, T. J. McDougall, R. Feistel and G. M. Marion, 2011: Absolute
Salinity, “Density Salinity” and the Reference-Composition Salinity Scale: present and
future use in the seawater standard TEOS-10. Ocean Sci., 7, 1-26.
[Link]
26 Getting Started with TEOS-10
This section 12 is from appendix L of the TEOS-10 Manual, IOC et al. (2010).
sea pressure. Sea pressure p dbar Equal to P − P0 and usually expressed in dbar not
is the pressure argument
Pa.
to all the
GSW Toolbox functions.
Getting started with TEOS-10 27
gauge pressure. Gauge p gauge dbar Equal to the Absolute Pressure P minus the local
pressure (also called atmospheric pressure at the time of the instrument
applied pressure) is calibration, and expressed in dbar not Pa. Sea
sometimes reported from pressure p is preferred over gauge pressure p gauge ,
ship-born instruments. as p is the argument to the seawater Gibbs
function.
reference pressure pr dbar The value of the sea pressure p to which potential
temperature and/or potential density are
referenced.
one standard atmosphere P0 Pa exactly 101 325 Pa (= 10.1325 dbar)
isopycnal slope ratio r 1 α Θ ( p) β Θ ( p)
r =
α Θ ( pr ) β Θ ( pr )
Stability Ratio Rρ 1 Rρ = α ΘΘz β Θ ( SA )z ≈ α θ θ z β θ ( SA )z .
isopycnal temperature GΘ 1 G Θ = r ⎡⎣ Rρ −1⎤⎦ ⎡⎣ Rρ − r ⎤⎦ ; ∇σ Θ = G Θ∇n Θ
gradient ratio
Practical Salinity SP 1 Defined in the range 2 < SP < 42 by PSS-78 based
on measured conductivity ratios.
Reference Salinity SR g kg-1 Reference-Composition Salinity (or Reference
Salinity for short) is the Absolute Salinity of
seawater samples that have Reference
Composition. At S P = 35, S R is exactly uPS SP .
while in the range 2 < SP < 42 SR ≈ uPS SP .
Absolute Salinity SA = SAdens g kg-1 SA = SR + δ SA ≈ uPS SP + δ SA
(This is the salinity Absolute Salinity is the sum of S R on the Millero
argument of all the
et al. (2008a) Reference-Salinity Scale and the
GSW Toolbox functions.)
Absolute Salinity Anomaly. The full symbol for
S A is SAdens as it is the type of absolute salinity
which delivers the best estimate of density when
used as the salinity argument of the TEOS-10
Gibbs function. Another name for SA = SAdens is
“Density Salinity”.
Absolute Salinity δ SA g kg-1 δ SA = SA − SR , the difference between Absolute
Anomaly Salinity, SA = SAdens , and Reference-Composition
Salinity. In terms of the full nomenclature of
Pawlowicz et al. (2010), Wright et al. (2010b) and
appendix A.4 herein, the Absolute Salinity
Anomaly δ SA is δ SRdens .
“Preformed Absolute S* g kg-1 Preformed Absolute Salinity S* is a salinity
Salinity”, variable that is designed to be as conservative as
often shortened to possible, by removing the estimated
biogeochemical influences on the seawater
“Preformed Salinity” composition from other forms of salinity (see
Pawlowicz et al. (2010), Wright et al. (2010b)).
“Solution Absolute S Asoln g kg-1 The mass fraction of non-H2O constituents in
Salinity”, often shortened seawater after it has been brought to chemical
to “Solution Salinity” equilibrium at t = 25°C and p = 0 dbar (see
Pawlowicz et al. (2010), Wright et al. (2010b)).
“Added-Mass Salinity” SAadd g kg-1 SAadd − SR is the estimated mass fraction of non-
H2O constituents needed as ingredients to be added
to Standard Seawater which when mixed and
brought to chemical equilibrium at t = 25°C and
p = 0 dbar results in the observed seawater
composition.
28 Getting Started with TEOS-10
temperature t ºC
Absolute Temperature T K T / K ≡ T0 / K + t / (°C) = 273.15 + t / (°C)
temperature derivatives T K When a quantity is differentiated with respect to in
situ temperature, the symbol T is used in order to
distinguish this variable from time.
Celsius zero point T0 K T0 ≡ 273.15 K
potential temperature θ ºC Defined implicitly by Eqn. (3.1.3)
Conservative Temperature Θ ºC Defined in Eqn. (3.3.1) as exactly potential
enthalpy divided by c 0p .
the “specific heat”, for use c 0p J kg–1 K–1 c0p ≡ 3991.867 957 119 63 J kg −1 K −1 . This 15-digit
with Conservative number is defined to be the exact value of c 0p .
Temperature c 0p is the ratio of potential enthalpy h0 to Θ .
combined standard uc Varies
uncertainty
enthalpy H J
specific enthalpy h J kg–1 h = u + ( p + P0 ) v .
Here p and P0 must be in Pa not dbar.
specific potential enthalpy h0 J kg–1 specific enthalpy referenced to zero sea pressure,
h0 = h ( SA ,θ [ SA , t , p, pr = 0], pr = 0 )
–1 –1
specific isobaric heat cp J kg K c p = ∂h ∂T SA , p
capacity
internal energy U J
specific internal energy u J kg–1
specific isochoric heat cv J kg–1 K–1 cv = ∂u ∂T SA , v
capacity
Gibbs function G J
(Gibbs energy)
specific Gibbs function g J kg–1
(Gibbs energy)
specific Helmholtz energy f J kg–1
unit conversion factor for uPS g kg–1 uPS ≡ (35.16504 35) g kg−1 ≈ 1.004 715... g kg−1
salinities The first part of this expression is exact. This
conversion factor is an important and invariant
constant of the 2008 Reference-Salinity Scale
(Millero et al. (2008a)).
entropy Σ J K–1
specific entropy η J kg–1 K–1 In many other publications the symbol s is used for
specific entropy.
density ρ kg m–3
kg m–3 ρ ( SA , t,0) – 1000 kg m
–3
density anomaly σt
σ2 kg m–3 ρ ( SA , θ [ SA , t , p, pr ], pr ) – 1000 kg m where
potential density anomaly -3
referenced to a sea
pressure of 2000 dbar pr = 2000 dbar
σ4 kg m–3 ρ ( SA , θ [ SA , t , p, pr ], pr ) – 1000 kg m where
potential density anomaly -3
referenced to a sea
pressure of 4000 dbar pr = 4000 dbar
thermal expansion αt
coefficient with respect to
K–1 v −1∂v / ∂T SA , p = − ρ −1∂ρ / ∂T SA , p
in situ temperature
thermal expansion αθ
coefficient with respect to
K–1 v −1∂v / ∂θ SA , p = − ρ −1∂ρ / ∂θ SA , p
potential temperature θ
Getting started with TEOS-10 29
thermal expansion αΘ
coefficient with respect to
K–1 v −1∂v / ∂Θ SA , p = − ρ −1∂ρ / ∂Θ SA , p
Conservative Temperature
Θ
saline contraction βt kg g–1 − v −1∂v / ∂SA T,p = ρ −1∂ρ / ∂SA T,p
coefficient at constant in
situ temperature Note that the units for β t are consistent with SA
being in g kg-1.
–1
sound speed c ms
specific volume v m3 kg–1 v = ρ −1
specific volume anomaly δ m3 kg–1
thermobaric coefficient
based on θ
Tbθ K −1Pa −1 Tbθ = β θ ∂ α θ β θ ( ) ∂P SA , θ
cabbeling coefficient 2
Cbθ K −2
Cbθ = ∂α θ ∂θ
θ
+ 2 α θ ∂α θ ∂SA
⎛ θ⎞
− ⎜ α ⎟ ∂β θ ∂SA
based on θ SA , p β θ , p ⎝ βθ ⎠ θ, p
cabbeling coefficient C bΘ K −2 Θ ⎛ Θ⎞
2
CbΘ = ∂α Θ ∂Θ + 2 α Θ ∂α Θ ∂SA − ⎜ α Θ ⎟ ∂β Θ ∂SA
based on Θ SA , p β Θ, p ⎝β ⎠ Θ, p
buoyancy frequency N s −1 ( )
N = g α Θz − β SA z = g α θ θ z − β θ SA z
2 Θ Θ
( )
neutral helicity H n
m −3 defined by Eqns. (3.13.1) and (3.13.2)
Neutral Density γn a density variable whose iso-surfaces are designed
kg m–3
to be approximately neutral, i. e.
α Θ∇γ Θ ≈ β Θ∇γ SA .
Neutral-Surface-Potential- NSPV s −3 NSPV = − g ρ −1 f γ zn where f is the Coriolis
Vorticity parameter.
dynamic height anomaly Ψ m 2 s −2 Pa m3 kg −1 = m2 s−2
Montgomery geostrophic ΨM m 2 s −2 Pa m3 kg −1 = m2 s−2
streamfunction
30 Getting Started with TEOS-10
Acknowledgements
We gratefully acknowledge Australian Research Council support through grant
FL150100090. The authors also acknowledge financial support from CSIRO during the early
development of the GSW Oceanographic Toolbox.
TEOS-10 and GSW in a nutshell
Under TEOS-10, the SA − diagram is the new “T-S” diagram. The above
SA − diagram was plotted using gsw_SA_CT_plot. The 2 potential
density anomaly contours were evaluated inside this function using
gsw_rho(SA,CT,2000). This same function can be used to evaluate in situ
density via gsw_rho(SA,CT,p). In the above diagram the raw data appears as
black dots and the blue line was produced using the function
gsw_SA_CT_interp.
[Link]