FV3 Bundle
gsw_ct_freezing.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_ct_freezing (sa, p, saturation_fraction, poly)
3 !==========================================================================
4 !
5 ! Calculates the Conservative Temperature at which seawater freezes.
6 !
7 ! sa = absolute Salinity [ g/kg ]
8 ! p = sea pressure [ dbar ]
9 ! ( i.e. absolute pressure - 10.1325 dbar )
10 ! saturation_fraction = the saturation fraction of dissolved air in
11 ! seawater
12 !
13 ! ct_freezing = Conservative Temperature at freezing of seawater [ deg C ]
14 ! That is, the freezing temperature expressed in
15 ! terms of Conservative Temperature (ITS-90).
16 !--------------------------------------------------------------------------
17 
19 
20 use gsw_mod_kinds
21 
22 implicit none
23 
24 real (r8), intent(in) :: sa, p, saturation_fraction
25 logical, intent(in), optional :: poly
26 
27 real (r8) :: gsw_ct_freezing
28 
29 logical :: do_poly
30 
31 if (present(poly)) then
32  do_poly = poly
33 else
34  do_poly = .false.
35 end if
36 
37 if (do_poly) then
38  gsw_ct_freezing = gsw_ct_freezing_poly(sa,p,saturation_fraction)
39 else
40  gsw_ct_freezing = gsw_ct_freezing_exact(sa,p,saturation_fraction)
41 end if
42 
43 return
44 end function
45 
46 !--------------------------------------------------------------------------
elemental real(r8) function gsw_ct_freezing(sa, p, saturation_fraction, poly)