# gsw_frazil_properties

    Absolute Salinity, Conservative Temperature, and the
    ice mass fraction from bulk Absolute Salinity and
    bulk enthalpy

## Contents

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

## USAGE:

    [SA_final, CT_final, w_Ih_final] = ...
                                   gsw_frazil_properties(SA_bulk,h_bulk,p)

## DESCRIPTION:

    Calculates the mass fraction of ice (mass of ice divided by mass of ice
    plus seawater), w_Ih_final, which results from given values of the bulk
    Absolute Salinity, SA_bulk, bulk enthalpy, h_bulk, occuring at pressure
    p.  The final values of Absolute Salinity, SA_final, and Conservative
    Temperature, CT_final, of the interstitial seawater phase are also
    returned.  This code assumes that there is no dissolved air in the
    seawater (that is, saturation_fraction is assumed to be zero
    throughout the code).

    When the mass fraction w_Ih_final is calculated as being a positive
    value, the seawater-ice mixture is at thermodynamic equlibrium.

    This code returns w_Ih_final = 0 when the input bulk enthalpy, h_bulk,
    is sufficiently large (i.e. sufficiently "warm") so that there is no ice
    present in the final state.  In this case the final state consists of
    only seawater rather than being an equlibrium mixture of seawater and
    ice which occurs when w_Ih_final is positive.  Note that when
    w_Ih_final = 0, the final seawater is not at the freezing temperature.

    Note that there is another GSW code,
    gsw_frazil_properties_potential_poly(SA_bulk,h_pot_bulk,p) which
    treats potential enthalpy as the conservative variable, while, in
    contrast, the present code treats in situ enthalpy as the conservative
    variable during the interaction of seawater and ice Ih.

    Click for a more detailed description of the frazil properties.

## INPUT:

    SA_bulk =  bulk Absolute Salinity of the seawater and ice mixture
                                                                    [ g/kg ]
    h_bulk  =  bulk enthalpy of the seawater and ice mixture        [ J/kg ]
    p       =  sea pressure                                         [ dbar ]
               ( i.e. absolute pressure - 10.1325 dbar )

    SA_bulk and h_bulk must have the same dimensions.
    p may have dimensions 1x1 or Mx1 or 1xN or MxN, where SA_bulk and
    h_bulk are MxN.

## OUTPUT:

    SA_final    =  Absolute Salinity of the seawater in the final state,
                   whether or not any ice is present.               [ g/kg ]
    CT_final    =  Conservative Temperature of the seawater in the the final
                   state, whether or not any ice is present.       [ deg C ]
    w_Ih_final  =  mass fraction of ice in the final seawater-ice mixture.
                   If this ice mass fraction is positive, the system is at
                   thermodynamic equilibrium.  If this ice mass fraction is
                   zero there is no ice in the final state which consists
                   only of seawater which is warmer than the freezing
                   temperature.                                   [unitless]

## EXAMPLE:

    SA_bulk = [34.7118; 34.8915; 35.0256; 34.8472; 34.7366; 34.7324;]
    h_bulk = [-4.5544e4;-4.6033e4;-4.5830e4;-4.5589e4;-4.4948e4;-4.4027e4;]
    p =  [     10;      50;     125;     250;     600;    1000;]

    [SA_final, CT_final, w_Ih_final] = ...
                      gsw_frazil_properties(SA_bulk,h_bulk,p)

    SA_final =

        39.111030663000442
      39.407625769681573
      39.595789974885108
      39.481230045372889
      39.591177095552503
      39.826467709177123

    CT_final =

      -2.156311126114311
      -2.204672298963783
      -2.273689262333450
      -2.363714136353600
      -2.644541000680772
      -2.977651291726651

    w_Ih_final =

       0.112480560814322
       0.114600300867556
       0.115421108602301
       0.117372990660305
       0.122617649983886
       0.127906590822347

## AUTHOR:

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

## VERSION NUMBER:

    3.05 (16th February, 2015)

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

    McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
     Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
     Journal of Physical Oceanography, 44, 1751-1775.

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