FV3 Bundle
gsw_dilution_coefficient_t_exact.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_dilution_coefficient_t_exact (sa, t, p)
3 !==========================================================================
4 !
5 ! Calculates the dilution coefficient of seawater. The dilution
6 ! coefficient of seawater is defined as the Absolute Salinity times the
7 ! second derivative of the Gibbs function with respect to Absolute
8 ! Salinity, that is, SA.*g_SA_SA.
9 !
10 ! SA = Absolute Salinity [ g/kg ]
11 ! t = in-situ temperature (ITS-90) [ deg C ]
12 ! p = sea pressure [ dbar ]
13 ! ( i.e. absolute pressure - 10.1325 dbar )
14 !
15 ! dilution_coefficient_t_exact = dilution coefficient [ (J/kg)(kg/g) ]
16 !--------------------------------------------------------------------------
17 
19 
20 use gsw_mod_kinds
21 
22 implicit none
23 
24 real (r8), intent(in) :: sa, t, p
25 
27 
28 real (r8) :: g08, x, x2, y, z
29 
30 x2 = gsw_sfac*sa
31 x = sqrt(x2)
32 y = t*0.025_r8
33 z = p*1e-4_r8 ! note.the input pressure (p) is sea pressure in units of dbar.
34 
35 g08 = 2.0_r8*(8103.20462414788_r8 + &
36  y*(2175.341332000392_r8 + &
37  y*(-274.2290036817964_r8 + &
38  y*(197.4670779425016_r8 + &
39  y*(-68.5590309679152_r8 + 9.98788038278032_r8*y))) - &
40  90.6734234051316_r8*z) + &
41  1.5_r8*x*(-5458.34205214835_r8 - 980.14153344888_r8*y + &
42  (4.0_r8/3.0_r8)*x*(2247.60742726704_r8 - &
43  340.1237483177863_r8*1.25_r8*x + 220.542973797483_r8*y) + &
44  180.142097805543_r8*z) + &
45  z*(-219.1676534131548_r8 + &
46  (-16.32775915649044_r8 - 120.7020447884644_r8*z)*z))
47 
48 g08 = x2*g08 + &
49  x*(-7296.43987145382_r8 + &
50  z*(598.378809221703_r8 + &
51  z*(-156.8822727844005_r8 + &
52  (204.1334828179377_r8 - 10.23755797323846_r8*z)*z)) + &
53  y*(-1480.222530425046_r8 + &
54  z*(-525.876123559641_r8 + &
55  (249.57717834054571_r8 - 88.449193048287_r8*z)*z) + &
56  y*(-129.1994027934126_r8 + &
57  z*(1149.174198007428_r8 + &
58  z*(-162.5751787551336_r8 + 76.9195462169742_r8*z)) + &
59  y*(-30.0682112585625_r8 - 1380.9597954037708_r8*z + &
60  y*(2.626801985426835_r8 + 703.695562834065_r8*z))))) + &
61  11625.62913253464_r8 + 1702.453469893412_r8*y
62 
64 
65 ! Note that this function avoids the singularity that occurs at SA = 0 if
66 ! the straightforward expression for the dilution coefficient of seawater,
67 ! SA*g_SA_SA is simply evaluated as SA.*gsw_gibbs(2,0,0,SA,t,p).
68 
69 return
70 end function
71 
72 !--------------------------------------------------------------------------
73 
elemental real(r8) function gsw_dilution_coefficient_t_exact(sa, t, p)