33 real (r8),
intent(in) :: t, p, saturation_fraction
38 real (r8) :: dt_dsa, sa, sa_old, sa_mean, t_freezing, t_freezing_zero_sa
40 integer,
parameter :: number_of_iterations = 5
44 real (r8),
parameter :: sa_cut_off = 2.5_r8
46 character (*),
parameter :: func_name =
"gsw_sa_freezing_from_t_poly" 51 if (t .gt. t_freezing_zero_sa)
then 58 if (sa .lt. -sa_cut_off)
then 71 if (abs(sa) .lt. sa_cut_off) sa = (t - t_freezing_zero_sa)/dt_dsa
77 do i_iter = 1, number_of_iterations
80 sa = sa_old - (t_freezing - t)/dt_dsa
81 sa_mean = 0.5_r8*(sa + sa_old)
84 sa = sa_old - (t_freezing - t)/dt_dsa
elemental real(r8) function gsw_sa_freezing_from_t_poly(t, p, saturation_fraction)
real(r8), parameter, public gsw_error_limit
elemental real(r8) function, public gsw_error_code(err_num, func_name, error_code)