It calculates the draining area per length unit (A/b), where A is the total upstream area and b is the length of the contour line which is assumed as drained by the A area. The contour length is here be estimated by a a novel method based on curvatures.

Inputs



Output



Note


The drainage length, b is here evaluated in each point of the basin according to the value of the planar curvature. The contour line is locally approximated by an arc having the radius inversely proportional to the local planar curvature. It is in fact the curvature radius r is:
r = 1/kp
where kp is the planar curvature. Then, assuming that the contour line can be approximated by a circle radius, it is also
t=alpha*r t'=alpha(r-L)
where t is the drained contour at the beginning (uphill) of the pixel and t' is the drained contour at the end of the pixel (downhill), alpha is the angle enclosed between the two contours as an L is the pixel size. L, in turn can be related to alpha as:
L = 2r sin(alpha/2)
and then:
alpha = 2 arcsin(L/2r)
And substituting, one obtains:
t = 2 arcsin(L/2r) r t' = 2 arcsin(L/2r)(r-L)
Finally, for every pixel, it is assumed:
b = t'
where b is the drained contour. To very convergent sites, there correspond a proportionally shrinking contour line, and to divergent site an enlarging drainage line.