# gsw_SA_from_Sstar

    Absolute Salinity from Preformed Salinity

## Contents

- USAGE:
- DESCRIPTION:
- INPUT:
- OUTPUT:
- EXAMPLE:
- AUTHOR:
- VERSION NUMBER:
- REFERENCES:

## USAGE:

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

## DESCRIPTION:

    Calculates Absolute Salinity from Preformed Salinity.

    Click for a more detailed description of calculating
    Absolute Salinity from Preformed Salinity.

## INPUT:

    Sstar  =  Preformed Salinity                                    [ g/kg ]
    p      =  sea pressure                                          [ dbar ]
              ( ie. 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 and long may have dimensions 1x1 or Mx1 or 1xN or MxN,
    where Sstar is MxN.

## OUTPUT:

    SA        =  Absolute 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:

    Sstar = [34.7115; 34.8912; 35.0247; 34.8436; 34.7291; 34.7197;]
    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. (ie the following will
    produce the same result as the input above).

    Sstar = [34.7115; 34.8912; 35.0247; 34.8436; 34.7291; 34.7197;]
    p =     [     10;      50;     125;     250;     600;    1000;]
    lat =   4;
    long =  188;

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

    SA =                             in_ocean =

     34.711726510840045                  1
     34.891562712475853                  1
     35.025598478334928                  1
     34.847237309620859                  1
     34.736695996277788                  1
     34.732385481842321                  1

## AUTHOR:

    Trevor McDougall, Paul Barker and David Jackett, [ help_gsw@csiro.au ]

## VERSION NUMBER:

    2.0 (23rd July, 2010)

## 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.

    The software is available from http://www.TEOS-10.org