In summer 2002 TerraFlow was incorporated into GRASS with the support of Helena Mitasova from the Department of Marine, Earth and Atmospheric Sciences at NCSU.
The new GRASS module, r.terraflow, was augmented it with additional functionality in order to create an integrated flow tracing and watershed analysis tool. To assess the possibility to replace the numerous existing GRASS flow routing modules we investigated their functionality, performance and scalability and compared them with r.terraflow. r.terraflow integrates functions for filling depressions, assigning flow directions, computing flow accumulation, and various other watershed related indices. It provides the user with the flexibility of choosing between SFD (D8) and MFD routing. Moreover, it is be based on efficient and scalable algorithms and greatly extends the size of the grids that can be processed compared to the existing GRASS functions.
The project and a preliminary experimental analysis was was presented at the GRASS Users Conference in September 2002.
r.terraflow is included with GRASS 5.0.2 and later. The sources are in (grass-src-dir)/src.contrib/DUKE/, or you can download r.terraflow tar file directly from below. To compile it you will need gcc.
To compile go in (grass-src-dir)/src.contrib/DUKE/r.terraflow and run (path)/gmake5. This should compile two executables, r.terraflow and r.terraflow.short and place them in (grass-src-dir)/dist.(platform)/etc/bin/cmd/. To see them from grass5 copy them to (or make symbolic links) (grass-dir)/bin/grass5/.