25 real (r8),
intent(in) :: t, p, p_ref
29 integer :: number_of_iterations
30 real (r8) :: dentropy, dentropy_dt, dp
31 real (r8) :: pt_ice, pt_ice_old, ptm_ice, true_entropy
33 real (r8),
parameter :: p1 = -2.259745637898635e-4_r8
34 real (r8),
parameter :: p2 = 1.486236778150360e-9_r8
35 real (r8),
parameter :: p3 = 6.257869607978536e-12_r8
36 real (r8),
parameter :: p4 = -5.253795281359302e-7_r8
37 real (r8),
parameter :: p5 = 6.752596995671330e-9_r8
38 real (r8),
parameter :: p6 = 2.082992190070936e-11_r8
40 real (r8),
parameter :: q1 = -5.849191185294459e-15_r8
41 real (r8),
parameter :: q2 = 9.330347971181604e-11_r8
42 real (r8),
parameter :: q3 = 3.415888886921213e-13_r8
43 real (r8),
parameter :: q4 = 1.064901553161811e-12_r8
44 real (r8),
parameter :: q5 = -1.454060359158787e-10_r8
45 real (r8),
parameter :: q6 = -5.323461372791532e-13_r8
50 pt_ice = t + dp*(p1 + (p + p_ref)*(p2 + p3*t) + t*(p4 + t*(p5 + p6*t)))
54 if (pt_ice.lt.-273.0_r8) pt_ice = pt_ice + 0.05_r8
62 do number_of_iterations = 1, 3
65 pt_ice = pt_ice_old - dentropy/dentropy_dt
66 ptm_ice = 0.5_r8*(pt_ice + pt_ice_old)
68 pt_ice = pt_ice_old - dentropy/dentropy_dt
71 if (pt_ice.lt.-273.0_r8)
then 73 pt_ice = t + (p - p_ref)*(q1 + (p + p_ref)*(q2 + q3*t) &
74 + t*(q4 + t*(q5 + q6*t)))
81 do number_of_iterations = 1, 3
84 pt_ice = pt_ice_old - dentropy/dentropy_dt
85 ptm_ice = 0.5_r8*(pt_ice + pt_ice_old)
86 ptm_ice = ptm_ice + 0.01_r8
88 pt_ice = pt_ice_old - dentropy/dentropy_dt
real(r8), parameter gsw_t0
elemental real(r8) function gsw_pt_from_t_ice(t, p, p_ref)