FV3 Bundle
gsw_sigma0.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_sigma0 (sa, ct)
3 !==========================================================================
4 !
5 ! Calculates potential density anomaly with reference pressure of 0 dbar,
6 ! this being this particular potential density minus 1000 kg/m^3. This
7 ! function has inputs of Absolute Salinity and Conservative Temperature.
8 ! This function uses the computationally-efficient expression for
9 ! specific volume in terms of SA, CT and p (Roquet et al., 2014).
10 !
11 ! SA = Absolute Salinity [ g/kg ]
12 ! CT = Conservative Temperature (ITS-90) [ deg C ]
13 !
14 ! sigma0 = potential density anomaly with [ kg/m^3 ]
15 ! respect to a reference pressure of 0 dbar,
16 ! that is, this potential density - 1000 kg/m^3.
17 !--------------------------------------------------------------------------
18 
20 
22 
23 use gsw_mod_kinds
24 
25 implicit none
26 
27 real (r8), intent(in) :: sa, ct
28 
29 real (r8) :: gsw_sigma0
30 
31 real (r8) :: vp0, xs, ys
32 
33 xs = sqrt(gsw_sfac*sa + offset)
34 ys = ct*0.025_r8
35 
36 vp0 = 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)))))
41 
42 gsw_sigma0 = 1.0_r8/vp0 - 1000.0_r8
43 
44 return
45 end function
46 
47 !--------------------------------------------------------------------------
elemental real(r8) function gsw_sigma0(sa, ct)
Definition: gsw_sigma0.f90:3