FV3 Bundle
gsw_t_freezing_exact.f90
Go to the documentation of this file.
1
!==========================================================================
2
elemental function
gsw_t_freezing_exact
(sa, p, saturation_fraction)
3
!==========================================================================
4
!
5
! Calculates the in-situ temperature at which seawater freezes. The
6
! in-situ temperature freezing point is calculated from the exact
7
! in-situ freezing temperature which is found by a modified Newton-Raphson
8
! iteration (McDougall and Wotherspoon, 2013) of the equality of the
9
! chemical potentials of water in seawater and in ice.
10
!
11
! An alternative GSW function, gsw_t_freezing_poly, it is based on a
12
! computationally-efficient polynomial, and is accurate to within -5e-4 K
13
! and 6e-4 K, when compared with this function.
14
!
15
! SA = Absolute Salinity [ g/kg ]
16
! p = sea pressure [ dbar ]
17
! ( i.e. absolute pressure - 10.1325 dbar )
18
! saturation_fraction = the saturation fraction of dissolved air in
19
! seawater
20
! (i.e., saturation_fraction must be between 0 and 1, and the default
21
! is 1, completely saturated)
22
!
23
! t_freezing = in-situ temperature at which seawater freezes. [ deg C ]
24
!--------------------------------------------------------------------------
25
26
use
gsw_mod_teos10_constants
,
only
:
gsw_sso
27
28
use
gsw_mod_toolbox
,
only
:
gsw_gibbs_ice
,
gsw_chem_potential_water_t_exact
29
use
gsw_mod_toolbox
,
only
:
gsw_t_deriv_chem_potential_water_t_exact
30
use
gsw_mod_toolbox
,
only
:
gsw_t_freezing_poly
31
32
use
gsw_mod_kinds
33
34
implicit none
35
36
real (r8)
,
intent(in)
:: sa, p, saturation_fraction
37
38
real (r8)
::
gsw_t_freezing_exact
39
40
real (r8)
:: df_dt, tf, tfm, tf_old, f
41
42
! The initial value of t_freezing_exact (for air-free seawater)
43
tf =
gsw_t_freezing_poly
(sa,p,polynomial=.true.)
44
45
df_dt = 1e3_r8*
gsw_t_deriv_chem_potential_water_t_exact
(sa,tf,p) - &
46
gsw_gibbs_ice
(1,0,tf,p)
47
! df_dt here is the initial value of the derivative of the function f whose
48
! zero (f = 0) we are finding (see Eqn. (3.33.2) of IOC et al (2010)).
49
50
tf_old = tf
51
f = 1e3_r8*
gsw_chem_potential_water_t_exact
(sa,tf_old,p) - &
52
gsw_gibbs_ice
(0,0,tf_old,p)
53
tf = tf_old - f/df_dt
54
tfm = 0.5_r8*(tf + tf_old)
55
df_dt = 1e3_r8*
gsw_t_deriv_chem_potential_water_t_exact
(sa,tfm,p) - &
56
gsw_gibbs_ice
(1,0,tfm,p)
57
tf = tf_old - f/df_dt
58
59
tf_old = tf
60
f = 1e3_r8*
gsw_chem_potential_water_t_exact
(sa,tf_old,p) - &
61
gsw_gibbs_ice
(0,0,tf_old,p)
62
tf = tf_old - f/df_dt
63
64
! Adjust for the effects of dissolved air
65
gsw_t_freezing_exact
= tf - &
66
saturation_fraction*(1e-3_r8)*(2.4_r8 - sa/(2.0_r8*
gsw_sso
))
67
68
return
69
end function
70
71
!--------------------------------------------------------------------------
gsw_mod_toolbox::gsw_t_freezing_exact
Definition:
gsw_mod_toolbox.f90:1450
gsw_mod_toolbox
Definition:
gsw_mod_toolbox.f90:1
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_toolbox::gsw_t_freezing_poly
Definition:
gsw_mod_toolbox.f90:1473
gsw_mod_toolbox::gsw_gibbs_ice
Definition:
gsw_mod_toolbox.f90:633
gsw_mod_kinds
Definition:
gsw_mod_kinds.f90:2
gsw_mod_toolbox::gsw_chem_potential_water_t_exact
Definition:
gsw_mod_toolbox.f90:287
gsw_t_freezing_exact
elemental real(r8) function gsw_t_freezing_exact(sa, p, saturation_fraction)
Definition:
gsw_t_freezing_exact.f90:3
gsw_mod_toolbox::gsw_t_deriv_chem_potential_water_t_exact
Definition:
gsw_mod_toolbox.f90:1435
src
fv3-bundle
gsw
toolbox
gsw_t_freezing_exact.f90
Generated on Tue Nov 6 2018 11:39:00 for FV3 Bundle by
1.8.14