2 pure function gsw_mlp (sa, ct, p)
29 real (r8),
intent(in) :: sa(:), ct(:), p(:)
37 real (r8),
allocatable :: diff_rho0(:), dp(:), rho0(:)
39 character (*),
parameter :: func_name =
"gsw_mlp" 43 dp = p(2:np) - p(1:np-1)
44 if (any(dp .le. 0.0_r8))
then 50 if (min_p .gt. 20.0_r8)
then 55 allocate(rho0(np),diff_rho0(np))
59 diff_rho0 = (minval(rho0) + 0.3_r8) - rho0
60 k = minloc(diff_rho0, diff_rho0 .gt. 0.0_r8)
63 if ((
gsw_mlp-min_p) .lt. 20.0_r8)
then 70 k = minloc(abs(p - 5.0_r8))
71 rho0(1:k(1)-1) = rho0(k(1))
73 diff_rho0 = (minval(rho0) + 0.3_r8) - rho0
74 k = minloc(diff_rho0, diff_rho0 .gt. 0.0_r8)
77 if ((
gsw_mlp-min_p) .lt. 20.0_r8)
then
pure real(r8) function gsw_mlp(sa, ct, p)
elemental real(r8) function, public gsw_error_code(err_num, func_name, error_code)