25 real (r8),
intent(in) :: sa, p
29 integer :: number_of_iterations
30 real (r8) :: alpha, ct, ct_mean, ct_old, dalpha_dct
32 real (r8),
parameter :: dct = 0.001_r8
34 ct = 3.978_r8 - 0.22072_r8*sa
36 dalpha_dct = 1.1e-5_r8
38 do number_of_iterations = 1, 3
41 ct = ct_old - alpha/dalpha_dct
42 ct_mean = 0.5_r8*(ct + ct_old)
43 dalpha_dct = (
gsw_alpha(sa,ct_mean+dct,p) &
44 -
gsw_alpha(sa,ct_mean-dct,p))/(dct + dct)
45 ct = ct_old - alpha/dalpha_dct
elemental real(r8) function gsw_ct_maxdensity(sa, p)