33 real (r8),
intent(in) :: ct, p, saturation_fraction
38 real (r8) :: ct_freezing, ct_freezing_zero_sa, dct_dsa
39 real (r8) :: sa, sa_old, sa_mean
41 integer,
parameter :: number_of_iterations = 2
45 real (r8),
parameter :: sa_cut_off = 2.5_r8
47 character (*),
parameter :: func_name =
"gsw_sa_freezing_from_ct_poly" 52 if (ct .gt. ct_freezing_zero_sa)
then 59 if (sa .lt. -sa_cut_off)
then 68 ctfreezing_sa=dct_dsa)
72 if (abs(sa) .lt. sa_cut_off) sa = (ct - ct_freezing_zero_sa)/dct_dsa
78 do i_iter = 1, number_of_iterations
81 sa = sa_old - (ct_freezing - ct)/dct_dsa
82 sa_mean = 0.5_r8*(sa + sa_old)
84 ctfreezing_sa=dct_dsa)
85 sa = sa_old - (ct_freezing - ct)/dct_dsa
elemental real(r8) function gsw_sa_freezing_from_ct_poly(ct, p, saturation_fraction)
real(r8), parameter, public gsw_error_limit
elemental real(r8) function, public gsw_error_code(err_num, func_name, error_code)