gsw_SA_Sstar_from_SP

Absolute Salinity and Preformed Salinity from 
Practical Salinity

Contents

USAGE:

[SA, Sstar, in_ocean] = gsw_SA_Sstar_from_SP(SP,p,long,lat)

DESCRIPTION:

Calculates Absolute Salinity and Preformed Salinity from Practical
Salinity.  Since SP is non-negative by definition, this function 
changes any negative input values of SP to be zero.  
TEOS-10
Click for a more detailed description of calculating
Absolute Salinity and Preformed Salinity from 
Practical Salinity.

INPUT:

SP   =  Practical Salinity  (PSS-78)                        [ unitless ]
p    =  sea pressure                                            [ dbar ]
        ( i.e. absolute pressure - 10.1325 dbar )
long =  longitude in decimal degrees                      [ 0 ... +360 ]
                                                   or  [ -180 ... +180 ]
lat  =  latitude in decimal degrees north                [ -90 ... +90 ]
p, lat & long may have dimensions 1x1 or Mx1 or 1xN or MxN,
where SP is MxN.

OUTPUT:

SA        =  Absolute Salinity                                  [ g/kg ]
Sstar     =  Preformed Salinity                                 [ g/kg ]
in_ocean  =  0, if long and lat are a long way from the ocean
          =  1, if long and lat are in the ocean
  Note. 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 kilometres inland from the coast. 

EXAMPLE:

SP =   [34.5487; 34.7275; 34.8605; 34.6810; 34.5680; 34.5600;]
p =    [     10;      50;     125;     250;     600;    1000;]
lat =  [      4;       4;       4;       4;       4;       4;]
long = [    188;     188;     188;     188;     188;     188;]
If the profile data refers to one location (one station) is it
acceptable to enter the station location once.
( i.e. the following will produce the same result as the input above ).
SP =   [34.5487; 34.7275; 34.8605; 34.6810; 34.5680; 34.5600;]
p =    [     10;      50;     125;     250;     600;    1000;]
lat =   4;
long = 188;
[SA, Sstar, in_ocean] = gsw_SA_Sstar_from_SP(SP,p,long,lat)
SA =
  34.711778344814128
  34.891522618230113
  35.025544862476934
  34.847229026189602
  34.736628474576065
  34.732363065590860
Sstar =
  34.711553680880783
  34.891161395333768
  35.024650265047384
  34.843593141519371
  34.729033995955540
  34.719675962471797
in_ocean =
   1
   1
   1
   1
   1
   1

AUTHOR:

Paul Barker & Trevor McDougall                     [ help@teos-10.org ]

VERSION NUMBER:

3.01 (23rd May, 2011)

REFERENCES:

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 the TEOS-10 web site.
  See section 2.5 and appendices A.4 and A.5 of this TEOS-10 Manual.
McDougall, T.J., D.R. Jackett and F.J. Millero, 2010: An algorithm
 for estimating Absolute Salinity in the global ocean.  Submitted to
 Ocean Science. A preliminary version is available at Ocean Sci. Discuss.,
 6, 215-242.
 http://www.ocean-sci-discuss.net/6/215/2009/osd-6-215-2009-print.pdf
The software is available from http://www.TEOS-10.org