anchor.diff:            h_ray(i) = sqrt(sum(xr**2)) - radearth
           end do calc_hray
   
  -        Q(:) = (h_ray - hterr) / (adist * radearth * t)
  -
  -        attn(j) = minval(Q) / 0.01 + 1
  +        attn(j) = minval(h_ray - hterr) / chkray_toler_meters + 1
           if (attn(j) < 0) attn(j) = 0
           if (attn(j) > 1) attn(j) = 1
   
  
positive.code: 
      trace_ray: block
  
        real(dp), dimension(nn) :: t, lat_ray, lng_ray, h_ray, hterr, Q
        real(dp), dimension(3) :: x1, x2, xi, xw, xr
        integer :: i, j
  
  
negative.code: 
    contains
  
      pure function cross(x,y) result(z)
        real(dp), dimension(3), intent(in) :: x,y
        real(dp), dimension(3) :: z
        z(1) =   x(2)*y(3) - x(3)*y(2)
        z(2) = - x(1)*y(3) + x(3)*y(1)
        z(3) =   x(1)*y(2) - x(2)*y(1)
      end function
  
      elemental real(dp) function f(t, k)
        real(dp), intent(in) :: t, k
  