FV3 Bundle
gsw_pot_enthalpy_from_pt_ice.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_pot_enthalpy_from_pt_ice (pt0_ice)
3 !==========================================================================
4 !
5 ! Calculates the potential enthalpy of ice from potential temperature of
6 ! ice (whose reference sea pressure is zero dbar).
7 !
8 ! pt0_ice = potential temperature of ice (ITS-90) [ deg C ]
9 !
10 ! gsw_pot_enthalpy_ice = potential enthalpy of ice [ J/kg ]
11 !--------------------------------------------------------------------------
12 
14 
16 
17 use gsw_mod_kinds
18 
19 implicit none
20 
21 real (r8), intent(in) :: pt0_ice
22 
24 
25 real (r8) :: tau
26 complex (r8) :: h0_part, sqtau_t1, sqtau_t2
27 
28 tau = (pt0_ice + gsw_t0)*rec_t3p
29 
30 sqtau_t1 = (tau/t1)**2
31 sqtau_t2 = (tau/t2)**2
32 
33 h0_part = r1*t1*(log(1.0_r8 - sqtau_t1) + sqtau_t1) &
34  + r20*t2*(log(1.0_r8 - sqtau_t2) + sqtau_t2)
35 
36 gsw_pot_enthalpy_from_pt_ice = g00 + t3p*real(h0_part,r8)
37 
38 return
39 end function
40 
41 !--------------------------------------------------------------------------
elemental real(r8) function gsw_pot_enthalpy_from_pt_ice(pt0_ice)