Routing networks can be designed by hand using avaiable maps, or by automatic methods using basin DEMs. Once a routing network has been constructed, the information must be transferred into a routing file. A routing file has a separate line for each grid cell, this includes inactive cells, the file must define a rectangular region. Each line is formatted as:
| Column | Position | Description |
|---|---|---|
| 1 | block number | Consecutive numbers from upper left |
| 2 | block type | 1 if active, 0 if not |
| 2 | precent grid drained | percent of grid cell drained, can be > 100% |
| 3 | reservoir type | 0 for no reservoir (more details in source code) |
| 4 | velocity | flow velocity in (m/s), default to 1.0 m/s |
| 5 | NET.bot | Net flow through south side of grid cell |
| 6 | NET.bot_left | Net flow through southwest side of grid cell |
| 7 | NET.left | Net flow through west side of grid cell |
| 8 | NET.top_left | Net flow through northwest side of grid cell |
| 9 | NET.top | Net flow through north side of grid cell |
| 10 | NET.top_right | Net flow through northeast side of grid cell |
| 11 | NET.right | Net flow through east side of grid cell |
| 11 | NET.bot_right | Net flow through southeast side of grid cell |
The percentage of grid cell drained was added to allow for grid cells not full in basin. Percents can be greater than 100%, to allow for drainage from cells not actually in masked basin.
NET flow columns contain the number of grid cell draining into or out of the cell. Inflows must be positive (+), outflows should be negative (-), and directions of no flow are set to 0. Only one outflow can exist in a grid cell. The basin outflow is marked using a -999, since it dos not flow out into an active cell.
Download the routing code (use right mouse button to save link directly).