FV3 Bundle
gsw_specvol.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_specvol (sa, ct, p)
3 !==========================================================================
4 !
5 ! Calculates specific volume from Absolute Salinity, Conservative
6 ! Temperature and pressure, using the computationally-efficient
7 ! polynomial expression for specific volume (Roquet et al., 2014).
8 !
9 ! SA = Absolute Salinity [ g/kg ]
10 ! CT = Conservative Temperature (ITS-90) [ deg C ]
11 ! p = sea pressure [ dbar ]
12 ! ( i.e. absolute pressure - 10.1325 dbar )
13 !
14 ! specvol = specific volume [ m^3/kg ]
15 !--------------------------------------------------------------------------
16 
18 
20 
21 use gsw_mod_kinds
22 
23 implicit none
24 
25 real (r8), intent(in) :: sa, ct, p
26 
27 real (r8) :: gsw_specvol
28 
29 real (r8) :: xs, ys, z
30 
31 xs = sqrt(gsw_sfac*sa + offset)
32 ys = ct*0.025_r8
33 z = p*1e-4_r8
34 
35 gsw_specvol = v000 + xs*(v010 + xs*(v020 + xs*(v030 + xs*(v040 + xs*(v050 &
36  + v060*xs))))) + ys*(v100 + xs*(v110 + xs*(v120 + xs*(v130 + xs*(v140 &
37  + v150*xs)))) + ys*(v200 + xs*(v210 + xs*(v220 + xs*(v230 + v240*xs))) &
38  + ys*(v300 + xs*(v310 + xs*(v320 + v330*xs)) + ys*(v400 + xs*(v410 &
39  + v420*xs) + ys*(v500 + v510*xs + v600*ys))))) + z*(v001 + xs*(v011 &
40  + xs*(v021 + xs*(v031 + xs*(v041 + v051*xs)))) + ys*(v101 + xs*(v111 &
41  + xs*(v121 + xs*(v131 + v141*xs))) + ys*(v201 + xs*(v211 + xs*(v221 &
42  + v231*xs)) + ys*(v301 + xs*(v311 + v321*xs) + ys*(v401 + v411*xs &
43  + v501*ys)))) + z*(v002 + xs*(v012 + xs*(v022 + xs*(v032 + v042*xs))) &
44  + ys*(v102 + xs*(v112 + xs*(v122 + v132*xs)) + ys*(v202 + xs*(v212 &
45  + v222*xs) + ys*(v302 + v312*xs + v402*ys))) + z*(v003 + xs*(v013 &
46  + v023*xs) + ys*(v103 + v113*xs + v203*ys) + z*(v004 + v014*xs + v104*ys &
47  + z*(v005 + v006*z)))))
48 
49 return
50 end function
51 
52 !--------------------------------------------------------------------------
elemental real(r8) function gsw_specvol(sa, ct, p)
Definition: gsw_specvol.f90:3