FV3 Bundle
gsw_kappa.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_kappa (sa, ct, p)
3 !==========================================================================
4 !
5 ! Calculates the isentropic compressibility of seawater. This function
6 ! has inputs of Absolute Salinity and Conservative Temperature. This
7 ! function uses the computationally-efficient expression for
8 ! specific volume in terms of SA, CT and p (Roquet et al., 2014).
9 !
10 ! SA = Absolute Salinity [ g/kg ]
11 ! CT = Conservative Temperature (ITS-90) [ deg C ]
12 ! p = sea pressure [ dbar ]
13 ! ( i.e. absolute pressure - 10.1325 dbar )
14 !
15 ! kappa = isentropic compressibility of seawater [ 1/Pa ]
16 !--------------------------------------------------------------------------
17 
19 
21 
22 use gsw_mod_kinds
23 
24 implicit none
25 
26 real (r8), intent(in) :: sa, ct, p
27 
28 real (r8) :: gsw_kappa
29 
30 real (r8) :: v, v_p, xs, ys, z
31 
32 xs = sqrt(gsw_sfac*sa + offset)
33 ys = ct*0.025_r8
34 z = p*1e-4_r8
35 
36 v = v000 + xs*(v010 + xs*(v020 + xs*(v030 + xs*(v040 + xs*(v050 &
37  + v060*xs))))) + ys*(v100 + xs*(v110 + xs*(v120 + xs*(v130 + xs*(v140 &
38  + v150*xs)))) + ys*(v200 + xs*(v210 + xs*(v220 + xs*(v230 + v240*xs))) &
39  + ys*(v300 + xs*(v310 + xs*(v320 + v330*xs)) + ys*(v400 + xs*(v410 &
40  + v420*xs) + ys*(v500 + v510*xs + v600*ys))))) + z*(v001 + xs*(v011 &
41  + xs*(v021 + xs*(v031 + xs*(v041 + v051*xs)))) + ys*(v101 + xs*(v111 &
42  + xs*(v121 + xs*(v131 + v141*xs))) + ys*(v201 + xs*(v211 + xs*(v221 &
43  + v231*xs)) + ys*(v301 + xs*(v311 + v321*xs) + ys*(v401 + v411*xs &
44  + v501*ys)))) + z*(v002 + xs*(v012 + xs*(v022 + xs*(v032 + v042*xs))) &
45  + ys*(v102 + xs*(v112 + xs*(v122 + v132*xs)) + ys*(v202 + xs*(v212 &
46  + v222*xs) + ys*(v302 + v312*xs + v402*ys))) + z*(v003 + xs*(v013 &
47  + v023*xs) + ys*(v103 + v113*xs + v203*ys) + z*(v004 + v014*xs + v104*ys &
48  + z*(v005 + v006*z)))))
49 
50 v_p = c000 + xs*(c100 + xs*(c200 + xs*(c300 + xs*(c400 + c500*xs)))) &
51  + ys*(c010 + xs*(c110 + xs*(c210 + xs*(c310 + c410*xs))) + ys*(c020 &
52  + xs*(c120 + xs*(c220 + c320*xs)) + ys*(c030 + xs*(c130 + c230*xs) &
53  + ys*(c040 + c140*xs + c050*ys)))) + z*(c001 + xs*(c101 + xs*(c201 &
54  + xs*(c301 + c401*xs))) + ys*(c011 + xs*(c111 + xs*(c211 + c311*xs)) &
55  + ys*(c021 + xs*(c121 + c221*xs) + ys*(c031 + c131*xs + c041*ys))) &
56  + z*( c002 + xs*(c102 + c202*xs) + ys*(c012 + c112*xs + c022*ys) &
57  + z*(c003 + c103*xs + c013*ys + z*(c004 + c005*z))))
58 
59 gsw_kappa = -1e-8_r8*v_p/v
60 
61 return
62 end function
63 
64 !--------------------------------------------------------------------------
elemental real(r8) function gsw_kappa(sa, ct, p)
Definition: gsw_kappa.f90:3