FV3 Bundle
gsw_internal_energy.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_internal_energy (sa, ct, p)
3 !==========================================================================
4 !
5 ! Calculates specific internal energy of seawater.
6 !
7 ! sa : Absolute Salinity [g/kg]
8 ! ct : Conservative Temperature [deg C]
9 ! p : sea pressure [dbar]
10 !
11 ! gsw_internal_energy : internal_energy of seawater [ J/kg ]
12 !--------------------------------------------------------------------------
13 
15 
17 
18 use gsw_mod_kinds
19 
20 implicit none
21 
22 real (r8), intent(in) :: sa, ct, p
23 
24 real (r8) :: gsw_internal_energy
25 
26 gsw_internal_energy = gsw_enthalpy(sa,ct,p) - &
27  (gsw_p0 + db2pa*p)*gsw_specvol(sa,ct,p)
28 return
29 end function
30 
31 !--------------------------------------------------------------------------
32 
33 
elemental real(r8) function gsw_internal_energy(sa, ct, p)