File Exchange

## Flow Accumulation (upslope area)

version 1.3.0.0 (107 KB) by Wolfgang Schwanghart

### Wolfgang Schwanghart (view profile)

Flow accumulation algorithm that routes through flats

Updated 10 Feb 2015

*** Note that this file is outdated. Please find TopoToolbox, a Matlab suite of functions for topographic analysis at
https://topotoolbox.wordpress.com/ . wflowacc will be removed from the File Exchange in the future. ****
How much water flows where? Use this algorithm to calculate the upslope area of each cell in a digital elevation model.

Algorithm specifications:
- multiple flow direction
- single flow direction
- routes across flats
- calculates deterministic, randomized and random flow
- allows you to specify a weighting exponent that governs the relation flow direction - slope
- handles edge effects

### Cite As

Wolfgang Schwanghart (2019). Flow Accumulation (upslope area) (https://www.mathworks.com/matlabcentral/fileexchange/14504-flow-accumulation-upslope-area), MATLAB Central File Exchange. Retrieved .

Wolfgang Schwanghart

### Wolfgang Schwanghart (view profile)

To all: TopoToolbox is now available here: http://physiogeo.unibas.ch/topotoolbox/

TopoToolbox can handle larger grids than wflowacc can and has many more utilities related to digital elevation model analysis.

Wolfgang Schwanghart

### Wolfgang Schwanghart (view profile)

Hi Liam,

thanks for your feedback. The code is it stands right now is a multiple flow direction algorithm, and yes, it can be very "dissipative". There is a way to avoid this behavior by element-wise exponentiate the flow direction matrix (M), so that steep gradients gain a larger weight than smaller ones.

I'll work on an update of this version and include it as an additional option.

Thanks a lot again for the feedback.

Wolfgang

Liam Reinhardt

### Liam Reinhardt (view profile)

A good user friendly piece of code. Unfortunately it does not seem to generate single thread 'rivers' 1 cell wide. Instead cells of high accumulation are often adjacent to each other (i.e. perpendicular to the primary flow direction) producing messy flow paths.

Wolfgang Schwanghart

Hi Jorge,

you are right. The algorithm is quite memory demanding and grids exceeding 600x600 cells may cause problems. I am currently working on an improved version that allows for huge grids. Please be a bit patient...

Best regards,
Wolfgang

Jorge Santos Santos

Does not work for large rivers

Wolfgang Schwanghart

I did not include a fill sinks option as it requires the image processing toolbox. If you have this toolbox use

demfs = imfill(dem,'holes')

Best regards,
Wolfgang

Salvatore Manfreda

Good, but do not have a fill sinks option that would be very useful.

looks good

looks good