I have a DEM as shown for which I have determined flow paths using D8 algorithm (My own code) in R. The resulting DEM with the flow paths is also shown. The flow paths are generated in the form of lines with the help of lines function in R, joining the centers of each pixel in the direction of steepest slope. I would like to perform flow routing with flow paths being derived on the DEM. It should be noted that the flow paths are just lines plotted on the DEM using lines function and elevation of the pixels.
Is there any way to perform flow routing for a hypothetical storm event in R?