FV3 Bundle
gsw_enthalpy_ice.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_enthalpy_ice (t, p)
3 !==========================================================================
4 !
5 ! Calculates the specific enthalpy of ice (h_Ih).
6 !
7 ! t = in-situ temperature (ITS-90) [ deg C ]
8 ! p = sea pressure [ dbar ]
9 ! ( i.e. absolute pressure - 10.1325 dbar )
10 !
11 ! gsw_enthalpy_ice : specific enthalpy of ice [ J/kg ]
12 !--------------------------------------------------------------------------
13 
15 
17 
18 use gsw_mod_kinds
19 
20 implicit none
21 
22 real (r8), intent(in) :: t, p
23 
24 real (r8) :: gsw_enthalpy_ice
25 
26 real (r8) :: tau, dzi, g0
27 complex (r8) :: r2, sqtau_t1, sqtau_t2, g
28 
29 tau = (t + gsw_t0)*rec_t3p
30 
31 dzi = db2pa*p*rec_pt
32 
33 g0 = g00 + dzi*(g01 + dzi*(g02 + dzi*(g03 + g04*dzi)))
34 
35 r2 = r20 + dzi*(r21 + r22*dzi)
36 
37 sqtau_t1 = (tau/t1)**2
38 sqtau_t2 = (tau/t2)**2
39 
40 g = r1*t1*(log(1.0_r8 - sqtau_t1) + sqtau_t1) &
41  + r2*t2*(log(1.0_r8 - sqtau_t2) + sqtau_t2)
42 
43 gsw_enthalpy_ice = g0 + t3p*real(g,r8)
44 
45 return
46 end function
47 
48 !--------------------------------------------------------------------------
integer, parameter r8
elemental real(r8) function gsw_enthalpy_ice(t, p)