FV3 Bundle
gsw_gibbs_ice_part_t.f90
Go to the documentation of this file.
1 ! =========================================================================
2 elemental function gsw_gibbs_ice_part_t (t, p)
3 ! =========================================================================
4 !
5 ! part of the the first temperature derivative of Gibbs energy of ice
6 ! that is the outout is gibbs_ice(1,0,t,p) + S0
7 !
8 ! t = in-situ temperature (ITS-90) [ deg C ]
9 ! p = sea pressure [ dbar ]
10 !
11 ! gibbs_ice_part_t = part of temperature derivative [ J kg^-1 K^-1 ]
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_gibbs_ice_part_t
25 
26 real (r8) :: dzi, tau
27 complex (r8) :: g, tau_t1, tau_t2, r2
28 
29 tau = (t + gsw_t0)*rec_t3p
30 
31 dzi = db2pa*p*rec_pt
32 
33 tau_t1 = tau/t1
34 tau_t2 = tau/t2
35 
36 r2 = r20 + dzi*(r21 + r22*dzi)
37 
38 g = r1*(log((1.0_r8 + tau_t1)/(1.0_r8 - tau_t1)) - 2.0_r8*tau_t1) &
39  + r2*(log((1.0_r8 + tau_t2)/(1.0_r8 - tau_t2)) - 2.0_r8*tau_t2)
40 
41 gsw_gibbs_ice_part_t = real(g,r8)
42 
43 return
44 end function
45 
46 !--------------------------------------------------------------------------
integer, parameter r8
elemental real(r8) function gsw_gibbs_ice_part_t(t, p)