FV3 Bundle
gsw_t_freezing_poly.f90
Go to the documentation of this file.
1
!==========================================================================
2
elemental function
gsw_t_freezing_poly
(sa, p, saturation_fraction, polynomial)
3
!==========================================================================
4
!
5
! Calculates the in-situ temperature at which seawater freezes from a
6
! computationally efficient polynomial.
7
!
8
! SA = Absolute Salinity [ g/kg ]
9
! p = sea pressure [ dbar ]
10
! ( i.e. absolute pressure - 10.1325 dbar )
11
! saturation_fraction = the saturation fraction of dissolved air in
12
! seawater
13
!
14
! t_freezing = in-situ temperature at which seawater freezes. [ deg C ]
15
! (ITS-90)
16
!--------------------------------------------------------------------------
17
18
use
gsw_mod_teos10_constants
,
only
:
gsw_sso
19
20
use
gsw_mod_freezing_poly_coefficients
21
22
use
gsw_mod_toolbox
,
only
:
gsw_ct_freezing_poly
,
gsw_t_from_ct
23
24
use
gsw_mod_kinds
25
26
implicit none
27
28
real (r8)
,
intent(in)
:: sa, p
29
real (r8)
,
intent(in)
,
optional
:: saturation_fraction
30
logical
,
intent(in)
,
optional
:: polynomial
31
32
real (r8)
::
gsw_t_freezing_poly
33
34
real (r8)
:: p_r, sa_r, x, ctf, sfrac
35
logical
:: direct_poly
36
37
if
(
present
(polynomial))
then
38
direct_poly = polynomial
39
else
40
direct_poly = .false.
41
end if
42
43
if
(.not. direct_poly)
then
44
45
if
(
present
(saturation_fraction))
then
46
sfrac = saturation_fraction
47
else
48
sfrac = 1.0_r8
49
end if
50
51
ctf =
gsw_ct_freezing_poly
(sa,p,sfrac)
52
gsw_t_freezing_poly
=
gsw_t_from_ct
(sa,ctf,p)
53
54
else
55
56
! Alternative calculation ...
57
sa_r = sa*1e-2_r8
58
x = sqrt(sa_r)
59
p_r = p*1e-4_r8
60
61
gsw_t_freezing_poly
=
t0
&
62
+ sa_r*(
t1
+ x*(
t2
+ x*(
t3
+ x*(
t4
+ x*(
t5
+
t6
*x))))) &
63
+ p_r*(
t7
+ p_r*(
t8
+
t9
*p_r)) &
64
+ sa_r*p_r*(
t10
+ p_r*(
t12
+ p_r*(
t15
+
t21
*sa_r)) &
65
+ sa_r*(
t13
+
t17
*p_r +
t19
*sa_r) &
66
+ x*(
t11
+ p_r*(
t14
+
t18
*p_r) + sa_r*(
t16
+
t20
*p_r +
t22
*sa_r)))
67
68
if
(.not.
present
(saturation_fraction))
return
69
70
! Adjust for the effects of dissolved air
71
gsw_t_freezing_poly
=
gsw_t_freezing_poly
- &
72
saturation_fraction*(1e-3_r8)*(2.4_r8 - sa/(2.0_r8*
gsw_sso
))
73
end if
74
75
return
76
end function
77
78
!--------------------------------------------------------------------------
gsw_mod_freezing_poly_coefficients::t0
real(r8), parameter t0
Definition:
gsw_mod_freezing_poly_coefficients.f90:37
gsw_mod_freezing_poly_coefficients::t22
real(r8), parameter t22
Definition:
gsw_mod_freezing_poly_coefficients.f90:59
gsw_mod_freezing_poly_coefficients::t6
real(r8), parameter t6
Definition:
gsw_mod_freezing_poly_coefficients.f90:43
gsw_mod_freezing_poly_coefficients::t16
real(r8), parameter t16
Definition:
gsw_mod_freezing_poly_coefficients.f90:53
gsw_mod_freezing_poly_coefficients::t11
real(r8), parameter t11
Definition:
gsw_mod_freezing_poly_coefficients.f90:48
gsw_mod_freezing_poly_coefficients::t13
real(r8), parameter t13
Definition:
gsw_mod_freezing_poly_coefficients.f90:50
gsw_mod_freezing_poly_coefficients::t14
real(r8), parameter t14
Definition:
gsw_mod_freezing_poly_coefficients.f90:51
gsw_mod_freezing_poly_coefficients::t5
real(r8), parameter t5
Definition:
gsw_mod_freezing_poly_coefficients.f90:42
gsw_mod_toolbox
Definition:
gsw_mod_toolbox.f90:1
gsw_mod_freezing_poly_coefficients::t12
real(r8), parameter t12
Definition:
gsw_mod_freezing_poly_coefficients.f90:49
gsw_t_freezing_poly
elemental real(r8) function gsw_t_freezing_poly(sa, p, saturation_fraction, polynomial)
Definition:
gsw_t_freezing_poly.f90:3
gsw_mod_freezing_poly_coefficients::t17
real(r8), parameter t17
Definition:
gsw_mod_freezing_poly_coefficients.f90:54
gsw_mod_toolbox::gsw_t_from_ct
Definition:
gsw_mod_toolbox.f90:1482
gsw_mod_freezing_poly_coefficients::t18
real(r8), parameter t18
Definition:
gsw_mod_freezing_poly_coefficients.f90:55
gsw_mod_freezing_poly_coefficients::t2
real(r8), parameter t2
Definition:
gsw_mod_freezing_poly_coefficients.f90:39
gsw_mod_teos10_constants
Definition:
gsw_mod_teos10_constants.f90:2
gsw_mod_teos10_constants::gsw_sso
real(r8), parameter gsw_sso
Definition:
gsw_mod_teos10_constants.f90:36
gsw_mod_freezing_poly_coefficients::t20
real(r8), parameter t20
Definition:
gsw_mod_freezing_poly_coefficients.f90:57
gsw_mod_toolbox::gsw_t_freezing_poly
Definition:
gsw_mod_toolbox.f90:1473
gsw_mod_freezing_poly_coefficients::t19
real(r8), parameter t19
Definition:
gsw_mod_freezing_poly_coefficients.f90:56
gsw_mod_freezing_poly_coefficients::t8
real(r8), parameter t8
Definition:
gsw_mod_freezing_poly_coefficients.f90:45
gsw_mod_freezing_poly_coefficients::t9
real(r8), parameter t9
Definition:
gsw_mod_freezing_poly_coefficients.f90:46
gsw_mod_freezing_poly_coefficients::t4
real(r8), parameter t4
Definition:
gsw_mod_freezing_poly_coefficients.f90:41
gsw_mod_freezing_poly_coefficients::t7
real(r8), parameter t7
Definition:
gsw_mod_freezing_poly_coefficients.f90:44
gsw_mod_kinds
Definition:
gsw_mod_kinds.f90:2
gsw_mod_freezing_poly_coefficients::t3
real(r8), parameter t3
Definition:
gsw_mod_freezing_poly_coefficients.f90:40
gsw_mod_freezing_poly_coefficients::t15
real(r8), parameter t15
Definition:
gsw_mod_freezing_poly_coefficients.f90:52
gsw_mod_freezing_poly_coefficients::t21
real(r8), parameter t21
Definition:
gsw_mod_freezing_poly_coefficients.f90:58
gsw_mod_freezing_poly_coefficients::t1
real(r8), parameter t1
Definition:
gsw_mod_freezing_poly_coefficients.f90:38
gsw_mod_freezing_poly_coefficients
Definition:
gsw_mod_freezing_poly_coefficients.f90:2
gsw_mod_toolbox::gsw_ct_freezing_poly
Definition:
gsw_mod_toolbox.f90:347
gsw_mod_freezing_poly_coefficients::t10
real(r8), parameter t10
Definition:
gsw_mod_freezing_poly_coefficients.f90:47
src
fv3-bundle
gsw
toolbox
gsw_t_freezing_poly.f90
Generated on Tue Nov 6 2018 11:39:00 for FV3 Bundle by
1.8.14