[7] In the D8-LAD and D8-LTD methods, a single drainage direction from each DEM cell is selected among the eight possible directions by considering the angular or transversal deviations, respectively, both at the local computational scale depicted in Figure 1 and along the upstream drainage path. A sign σ is assigned to each deviation that may occur in the eight triangular facets of the elementary computational system so as to allow a meaningful (arithmetic) accumulation of deviations along a drainage path. Possible values of *p*_{1}, *p*_{2} and σ are reported in Table 1. For any DEM cell, the values of *r*, *s*_{max}, *p*_{1}, *p*_{2}, and σ for the facet containing the TDD are calculated by considering the eight facets centered on that DEM cell. The accumulation of deviations along a drainage path is formulated in this section by considering the transversal deviations (D8-LTD methods). A similar formulation can be easily derived for the case in which angular deviations are considered (D8-LAD methods).

[8] At the *k*th cell along a given path (*k* = 1, 2, ⋯), the local transversal deviations associated to pointers *p*_{1} and *p*_{2} are δ_{1}(*k*) = *d*_{1} sin α_{1}, where α_{1} = *r*, and δ_{2}(*k*) = (*d*_{1}^{2} + *d*_{2}^{2})^{1/2} sin α_{2}, where α_{2} = arctan(*d*_{2}/*d*_{1}) − *r* (π/4 − *r* rad when square cells are used), respectively. The related cumulative transversal deviations are defined here as δ_{1}^{+}(*k*) = σδ_{1}(*k*) and δ_{2}^{+}(*k*) = −σδ_{2}(*k*), for *k* = 1, or as

and

for *k* = 2, 3, ⋯, where λ is a dampening factor that can assume values varying between 0 and 1. The drainage direction is selected between the two possibilities so as to minimize the absolute value of the cumulative transversal deviation δ^{+}(*k*) (*k* = 1, 2,⋯).

For λ = 0, the selection of the drainage directions is based only on the local transversal deviations δ_{1}(*k*) and δ_{2}(*k*) (*k* = 1, 2, ⋯). For 0 < λ ≤ 1 the memory of the upstream transversal deviations between selected and theoretical drainage directions is retained. For λ = 1, full memory of the upstream transversal deviations is retained. For 0 < λ < 1, the upstream transversal deviations are dampened proceeding downstream. The D8-LAD methods are expressed by equations similar to those reported in this paragraph, where angular deviations are considered in preference to transversal deviations (section 2.1.2).

[9] One can note that the D8-LAD method with λ = 0 reproduces the classical D8 method. It is also remarked here that the benefit of using cumulative (path-based) deviations for the determination of drainage directions can be demonstrated geometrically only if the D8-LTD method with λ = 1 and the simple case of a planar slope are considered. In the case of the planar slope, one can verify that the D8-LAD method (with λ = 1) produces nonlocally biased drainage paths as these paths become sufficiently long. Nevertheless, both angular and transversal deviations are employed in this study and the resulting D8-LAD and D8-LTD methods are evaluated numerically considering also complex drainage systems.