# gsw_ice_fraction_to_freeze_seawater

    ice mass fraction, which when melted into seawater,
    brings the diluted seawater to the freezing temperature

## Contents

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

## USAGE:

    [SA_freeze, CT_freeze, w_Ih] = ...
                          gsw_ice_fraction_to_freeze_seawater(SA,CT,p,t_Ih)

## DESCRIPTION:

    Calculates the mass fraction of ice (mass of ice divided by mass of ice
    plus seawater), which, when melted into seawater having (SA,CT,p) causes
    the final diluted seawater to be at the freezing temperature.  The other
    outputs are the Absolute Salinity and Conservative Temperature of the
    final diluted seawater.

## INPUT:

    SA   =  Absolute Salinity of seawater                           [ g/kg ]
    CT   =  Conservative Temperature of seawater (ITS-90)          [ deg C ]
    p    =  sea pressure                                            [ dbar ]
              ( i.e. absolute pressure - 10.1325 dbar )
    t_Ih =  in-situ temperature of the ice at pressure p (ITS-90)  [ deg C ]

    SA, CT and t_Ih must have the same dimensions.
    p may have dimensions 1x1 or Mx1 or 1xN or MxN, where SA, CT and t_Ih
    are MxN.

## OUTPUT:

    SA_freeze  = Absolute Salinity of seawater after the mass fraction of
                 ice, w_Ih, at temperature t_Ih has melted into the
                 original seawater, and the final mixture is at the freezing
                 temperature of seawater.                           [ g/kg ]

    CT_freeze  = Conservative Temperature of seawater after the mass
                 fraction, w_Ih, of ice at temperature t_Ih has melted into
                 the original seawater, and the final mixture is at the
                 freezing temperature of seawater.                 [ deg C ]

    w_Ih       = mass fraction of ice, having in-situ temperature t_Ih,
                 which, when melted into seawater at (SA,CT,p) leads to the
                 final diluted seawater being at the freezing temperature.
                 This output must be between 0 and 1.             [unitless]

## EXAMPLE:

    SA = [34.7118; 34.8915; 35.0256; 34.8472; 34.7366; 34.7324;]
    CT = [28.7856; 28.4329; 22.8103; 10.2600;  6.8863;  4.4036;]
    p = [     10;      50;     125;     250;     600;    1000;]
    t_Ih = [-10.7856; -13.4329; -12.8103; -12.2600; -10.8863; -8.4036;]

    [SA_freeze, CT_freeze, w_Ih] = ...
                         gsw_ice_fraction_to_freeze_seawater(SA,CT,p,t_Ih)

    SA_freezee =

      25.823952352620722
      26.120495895535438
      27.460572941868072
      30.629978769577168
      31.458222332943784
      32.121170316796444

    CT_freezee =

      -1.389936216242376
      -1.437013334134283
      -1.569815847128818
      -1.846419165657020
      -2.166786673735941
      -2.522730879078756

    w_Ih =

       0.256046867272203
       0.251379393389925
       0.215985652155336
       0.121020375537284
       0.094378196687535
       0.075181377710828

## AUTHOR:

    Trevor McDougall & 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.

    McDougall, T.J. and S.J. Wotherspoon, 2013: A simple modification of
     Newton’s method to achieve convergence of order "1 + sqrt(2)". Applied
     Mathematics Letters, 29, 20-25.
     http://dx.doi.org/10.1016/j.aml.2013.10.008

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