r.flowaccumulation supports parallel computation of flow accumulation using OpenMP while r.accumulate does not. However, for weighted flow accumulation, use r.accumulate.
The module recognizes three different formats of flow directions:
Since the module does not use elevation data (i.e., slope), flow accumulation is calculated by single flow direction (SFD) routing and may not be comparable to the result from multiple flow direction (MFD) routing.
Calculate flow accumulation using r.watershed and r.flowaccumulation:
# set computational region g.region -p raster=elevation # calculate positive flow accumulation and drainage directions using r.watershed # for comparison, use -s (SFD) r.watershed -sa elevation=elevation accumulation=flow_accum drainage=drain_directions # calculate flow accumulation using r.flowaccumulation r.flowaccumulation input=drain_directions output=flow_accum_new # copy color table r.colors map=flow_accum_new raster=flow_accum # check difference between flow_accum and flow_accum_new r.mapcalc expression="flow_accum_diff=if(flow_accum-flow_accum_new, flow_accum-flow_accum_new, null())"
There are slight differences between the two output maps. The yellow and purple cells show the difference raster map (flow_accum_diff). The red arrows and numbers represent drainage directions (drain_directions) and flow accumulation by r.watershed (flow_accum), respectively. Note that some cells close to headwater cells are assigned 1 even though they are located downstream of other cells.
For comparison, these numbers show the new flow accumulation by r.flowaccumulation (flow_accum_new). The same cells are properly accumulated from the headwater cells.
Available at: r.flowaccumulation source code (history)
Latest change: Wednesday Nov 08 17:11:07 2023 in commit: 91cec76abcffe4296d5e3f1afb3cea3c1633f8a3
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual