Skip to content

Create catchment from dem and flwdir

NOTE: If someone want to test the changes I made in the script just go to eve and type: mhm-tools create_catchment --vn Band1 -v dem -i /data/cats/data/merit_Hydro_flowdir/ -o <your/outpu/dir> to see the results in <your/outpu/dir>

Since Robert left, we have been working on modifying the scripts he used to generate an mHM restart file. This includes creating more mHM tools and developing a new suite to run them.

The first step in this process is to obtain the basins from a flow direction file.

In Robert's original script, he primarily used the flow direction as input and added some lines to incorporate a Digital Elevation Model (DEM) into the script. We have made some modifications to the script, which have finally yielded results.

Now, the script can either read a flow direction file to calculate the basins or read a DEM to calculate the flow direction and subsequently all basins. We used open-source data from MERIT for this purpose. Initially, we encountered issues when merging all flow direction data from MERIT into one file, so we decided to use MERIT DEM data for convenience.


I suggest running the second script that Robert created ( since @luedke has already tested and fixed it. Then we can see if the results are similar to those given by

Please let me know your comments. If you agree, we can proceed and merge this branch into /7-pre-proc-incorporate-tools-for-creating-global-setups.

Edited by Jeisson Javier Leal Rojas

Merge request reports