3 geo_strf_dyn_height_pc, p_mid)
44 real (r8),
intent(in) :: sa(:), ct(:), delta_p(:)
45 real (r8),
intent(out) :: geo_strf_dyn_height_pc(:), p_mid(:)
48 real (r8),
allocatable :: delta_h(:), delta_h_half(:), dyn_height_deep(:)
49 real (r8),
allocatable :: p_deep(:), p_shallow(:)
51 character (*),
parameter :: func_name =
"gsw_geo_strf_dyn_height_pc" 53 if (any(delta_p .lt. 0.0_r8))
then 55 p_mid = geo_strf_dyn_height_pc
60 allocate (delta_h(np),delta_h_half(np),dyn_height_deep(np))
61 allocate (p_deep(np),p_shallow(np))
63 p_deep(1) = delta_p(1)
65 p_deep(i) = p_deep(i-1) + delta_p(i)
67 p_shallow = p_deep - delta_p
71 dyn_height_deep(1) = -delta_h(1)
73 dyn_height_deep(i) = dyn_height_deep(i-1) - delta_h(i)
77 p_mid = 0.5_r8*(p_shallow + p_deep)
81 dyn_height_deep + delta_h_half
elemental real(r8) function, public gsw_error_code(err_num, func_name, error_code)
pure subroutine gsw_geo_strf_dyn_height_pc(sa, ct, delta_p, geo_strf_dyn_height_pc, p_mid)