FV3 Bundle
gsw_cabbeling.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_cabbeling (sa, ct, p)
3 !==========================================================================
4 !
5 ! Calculates the cabbeling coefficient of seawater with respect to
6 ! Conservative Temperature. This function uses the computationally-
7 ! efficient 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 ! cabbeling = cabbeling coefficient with respect to [ 1/K^2 ]
16 ! Conservative Temperature.
17 !--------------------------------------------------------------------------
18 
22 
23 use gsw_mod_kinds
24 
25 implicit none
26 
27 real (r8), intent(in) :: sa, ct, p
28 
29 real (r8) :: gsw_cabbeling
30 
31 real (r8) :: alpha_ct, alpha_on_beta, alpha_sa, beta_sa, rho
32 real (r8) :: v_sa, v_ct, v_sa_sa, v_sa_ct, v_ct_ct
33 
34 call gsw_specvol_first_derivatives(sa,ct,p,v_sa,v_ct)
35 
36 call gsw_specvol_second_derivatives(sa,ct,p,v_sa_sa,v_sa_ct,v_ct_ct)
37 
38 rho = gsw_rho(sa,ct,p)
39 
40 alpha_ct = rho*(v_ct_ct - rho*v_ct*v_ct)
41 
42 alpha_sa = rho*(v_sa_ct - rho*v_sa*v_ct)
43 
44 beta_sa = -rho*(v_sa_sa - rho*v_sa*v_sa)
45 
46 alpha_on_beta = gsw_alpha_on_beta(sa,ct,p)
47 
48 gsw_cabbeling = alpha_ct + &
49  alpha_on_beta*(2.0_r8*alpha_sa - alpha_on_beta*beta_sa)
50 
51 return
52 end function
53 
54 !--------------------------------------------------------------------------
elemental real(r8) function gsw_cabbeling(sa, ct, p)