Delineate catchment and create local drain direction map

You can now use the DEM you created in the previous section to generate a local drain direction (LDD) map for your own model area.

To create a flow direction map (or local drain direction (LDD)), you can use the pcraster command lddcreate. Type the following command in the Windows Command line window:

pcrcalc ldd.map = lddcreate(dem.map, 1e31,1e31,1e31,1e31)

This command should also fill the sinks in the DEM to avoid that pits are generated in the depression in the DEM, which could hamper the water to flow to the basin’s outlet. A good way to test if the LDD map is correct is to calculate for each cell how many cells are upstream. You can do this using the pcraster command accuflux. Type:

pcrcalc accuflux.map = accuflux(ldd.map,1)

Drag the newly generated accuflux.map to the QGIS canvas. Check if the stream network is complete, and all branches are connected to the outlet point.

If the generated LDD is not entirely correct and not all streams are connected toward the downstream outlet point, this happens because during the creation of the LDD map, pits have been generated where depressions in the landscape are present. More details on the LDD generation can be found in the PCRASTER online manual. There are multiple ways to overcome the problem of pit generation. The first and most easy option is to try this command in the Windows Command line window:

pcrcalc ldd.map = lddrepair(ldd.map)

If this does not solve the correct creation of the ldd.map, then you can try the following options:

  • Test different values for the parameters in the lddcreate command

  • Remove pits manually by changing the values for those cells.

  • Use a map with the streams present in your study area and “burn” them into the DEM to force the other cells to drain in into them.

Last updated