code: def downstream_index(dir_value, i, j, alg='taudem'):
          
          assert alg.lower() in FlowModelConst.d8_deltas
          delta = FlowModelConst.d8_deltas.get(alg.lower())
          drow, dcol = delta[int(dir_value)]
          return i + drow, j + dcol
docs: find downslope coordinate for D8 direction.