FV3 Bundle
gsw_gibbs_ice_pt0.f90
Go to the documentation of this file.
1 ! =========================================================================
2 elemental function gsw_gibbs_ice_pt0 (pt0)
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,pt0,0) + s0"
7 !
8 ! pt0 = potential temperature with reference sea pressure of zero dbar
9 ! [ deg C ]
10 !
11 ! gsw_gibbs_ice_pt0 = 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) :: pt0
23 
24 real (r8) :: gsw_gibbs_ice_pt0
25 
26 real (r8) :: tau
27 complex (r8) :: g, tau_t1, tau_t2
28 
29 tau = (pt0 + gsw_t0)*rec_t3p
30 
31 tau_t1 = tau/t1
32 tau_t2 = tau/t2
33 
34 g = r1*(log((1.0_r8 + tau_t1)/(1.0_r8 - tau_t1)) - 2.0_r8*tau_t1) &
35  + r20*(log((1.0_r8 + tau_t2)/(1.0_r8 - tau_t2)) - 2.0_r8*tau_t2)
36 
37 gsw_gibbs_ice_pt0 = real(g,r8)
38 
39 return
40 end function
41 
42 !--------------------------------------------------------------------------
elemental real(r8) function gsw_gibbs_ice_pt0(pt0)
integer, parameter r8