FV3 Bundle
gsw_pt0_cold_ice_poly.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_pt0_cold_ice_poly (pot_enthalpy_ice)
3 !==========================================================================
4 !
5 ! Calculates an initial estimate of pt0_ice when it is less than about
6 ! -100 deg C.
7 !
8 ! pot_enthalpy_ice = potential enthalpy of ice [ J/kg ]
9 !
10 ! pt0_cold_ice_poly = initial estimate of potential temperatur
11 ! of very cold ice in dgress C (not K) [ deg C ]
12 !--------------------------------------------------------------------------
13 
15 
16 use gsw_mod_kinds
17 
18 implicit none
19 
20 real (r8), intent(in) :: pot_enthalpy_ice
21 
22 real (r8) :: gsw_pt0_cold_ice_poly
23 
24 real (r8) :: log_abs_theta0, log_h_diff
25 
26 ! h00 = gsw_enthalpy_ice(-gsw_t0,0)
27 real (r8), parameter :: h00 = -6.320202333358860e5_r8
28 
29 real (r8), parameter :: s0 = 1.493103204647916_r8
30 real (r8), parameter :: s1 = 2.372788609320607e-1_r8
31 real (r8), parameter :: s2 = -2.014996002119374e-3_r8
32 real (r8), parameter :: s3 = 2.640600197732682e-6_r8
33 real (r8), parameter :: s4 = 3.134706016844293e-5_r8
34 real (r8), parameter :: s5 = 2.733592344937913e-6_r8
35 real (r8), parameter :: s6 = 4.726828010223258e-8_r8
36 real (r8), parameter :: s7 = -2.735193883189589e-9_r8
37 real (r8), parameter :: s8 = -8.547714991377670e-11_r8
38 
39 log_h_diff = log(pot_enthalpy_ice - h00)
40 
41 log_abs_theta0 = s0 + log_h_diff*(s1 + log_h_diff*(s2 + log_h_diff*(s3 &
42  + log_h_diff*(s4 + log_h_diff*(s5 + log_h_diff*(s6 &
43  + log_h_diff*(s7 + log_h_diff*s8)))))))
44 
45 gsw_pt0_cold_ice_poly = exp(log_abs_theta0) - gsw_t0
46 
47 return
48 end function
49 
50 !--------------------------------------------------------------------------
elemental real(r8) function gsw_pt0_cold_ice_poly(pot_enthalpy_ice)