FV3 Bundle
gsw_beta.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_beta (sa, ct, p)
3 !==========================================================================
4 !
5 ! Calculates the saline (i.e. haline) contraction coefficient of seawater
6 ! at constant Conservative Temperature using the computationally-efficient
7 ! expression for specific volume in terms of SA, CT and p
8 ! (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 ! beta = saline contraction coefficient [ kg/g ]
16 ! at constant Conservative Temperature
17 !--------------------------------------------------------------------------
18 
19 use gsw_mod_toolbox, only : gsw_specvol
20 
22 
24 
25 use gsw_mod_kinds
26 
27 implicit none
28 
29 real (r8), intent(in) :: sa, ct, p
30 
31 real (r8) :: gsw_beta
32 
33 real (r8) :: xs, ys, z, v_sa_part
34 
35 xs = sqrt(gsw_sfac*sa + offset)
36 ys = ct*0.025_r8
37 z = p*1e-4_r8
38 
39 v_sa_part = b000 + xs*(b100 + xs*(b200 + xs*(b300 + xs*(b400 + b500*xs)))) &
40  + ys*(b010 + xs*(b110 + xs*(b210 + xs*(b310 + b410*xs))) &
41  + ys*(b020 + xs*(b120 + xs*(b220 + b320*xs)) + ys*(b030 &
42  + xs*(b130 + b230*xs) + ys*(b040 + b140*xs + b050*ys)))) &
43  + z*(b001 + xs*(b101 + xs*(b201 + xs*(b301 + b401*xs))) &
44  + ys*(b011 + xs*(b111 + xs*(b211 + b311*xs)) + ys*(b021 &
45  + xs*(b121 + b221*xs) + ys*(b031 + b131*xs + b041*ys))) &
46  + z*(b002 + xs*(b102 + xs*(b202 + b302*xs))+ ys*(b012 &
47  + xs*(b112 + b212*xs) + ys*(b022 + b122*xs + b032*ys)) &
48  + z*(b003 + b103*xs + b013*ys + b004*z)))
49 
50 gsw_beta = -v_sa_part*0.5_r8*gsw_sfac/(gsw_specvol(sa,ct,p)*xs)
51 
52 return
53 end function
54 
55 !--------------------------------------------------------------------------
elemental real(r8) function gsw_beta(sa, ct, p)
Definition: gsw_beta.f90:3