FV3 Bundle
gsw_t_freezing.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_t_freezing (sa, p, saturation_fraction, poly)
3 !==========================================================================
4 !
5 ! Calculates the in-situ 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 ! t_freezing = in-situ temperature at which seawater freezes. [ deg C ]
14 ! (ITS-90)
15 !--------------------------------------------------------------------------
16 
18 
19 use gsw_mod_kinds
20 
21 implicit none
22 
23 real (r8), intent(in) :: sa, p, saturation_fraction
24 logical, intent(in), optional :: poly
25 
26 real (r8) :: gsw_t_freezing
27 
28 logical :: do_poly
29 
30 if (present(poly)) then
31  do_poly = poly
32 else
33  do_poly = .false.
34 end if
35 
36 if (do_poly) then
37  gsw_t_freezing = gsw_t_freezing_poly(sa,p,saturation_fraction)
38 else
39  gsw_t_freezing = gsw_t_freezing_exact(sa,p,saturation_fraction)
40 end if
41 
42 return
43 end function
44 
45 !--------------------------------------------------------------------------
elemental real(r8) function gsw_t_freezing(sa, p, saturation_fraction, poly)