I would like to calculate a weighted flow accumulation raster with GRASS. I have a DEM and a rainfall raster. I am looking to calculate the rainfall accumulated downstream. Basically, it is similar in the way that is calculated Flow Accumulation, but instead of sum cells with value 1, I would like to sum values from the rainfall raster.

It seems very easy in ArcGIS Desktop, but can I do it with GRASS?

2 Answers 2


I think that I found a solution for this. The r.watersheds function that calculates flow accumulation, have a parameter (flow) to integrate a raster indicating values to sum.

Parameter: flow=name Name of input raster representing amount of overland flow per cell

Raster flow map specifies amount of overland flow per cell. This map indicates the amount of overland flow units that each cell will contribute to the watershed basin model. Overland flow units represent the amount of overland flow each cell contributes to surface flow. If omitted, a value of one (1) is assumed.

Source: https://grass.osgeo.org/grass74/manuals/r.watershed.html

  • I think you found the right use of the parameter, beacuase the parameter name is quite wrong and a source of misleading. Certainly it is not a way to add flow, but volume, or a sort of. Could you share an example of its use? Assuming the rainfall is in mm, the cellsize is required somewhere and I think the final output should be in m^3 (or Hm^3)
    – Marco
    Commented Mar 14, 2018 at 8:25

r.watershed assumes a flow of 1 when the flow parameter is omitted, resulting in the number of accumulated upstream raster cells. So the unit of the final output will be the same as that of the flow raster map. For example, depth flow results in depth output; volume flow results in volume output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.