Simplified teaching model. This is not a validated analysis of any property.
Where does rainwater go on this small grid?
terrain_engine.fill_depressions and terrain_engine.flow_accumulation
Assumptions
- Each grid is a synthetic 3 by 3 DEM in meters with 10 m cells.
- Accumulation is run on the filled DEM, which is the input flow_accumulation expects.
- This implementation includes each finite cell itself in its accumulation count; cells times 100 gives contributing area in square meters, not a water volume.
- Only positive downhill slopes receive flow. Equal slopes keep the first neighbor in the implementation's fixed iteration order. Edges cannot route outside this small grid; missing cells are not counted.
- The center cell is row 1 column 1 and the southeast cell is row 2 column 2.
Limitations
- flow_accumulation does not return flow direction.
- Epsilon-fill can impose drainage on a flat or a pit, so the result is not the unfilled surface.
- Simplified teaching model, not a property drainage plan.
Counterexample
Epsilon-fill can impose drainage on a flat or a pit, so the result is not the unfilled surface.
Sources
- USGS 3D Elevation Program (3DEP), https://www.usgs.gov/3d-elevation-program
- Implementation reference: terrain_engine.py
Floats are rounded to 6 significant digits.
Scenario outputs
worked-example
| Name | Value | Units |
|---|---|---|
| center_cell_accumulation_cells | 3 | cells |
| center_cell_accumulation_square_meters | 300 | square meters |
| southeast_cell_accumulation_cells | 9 | cells |
| southeast_cell_accumulation_square_meters | 900 | square meters |
| max_sink_depth_m | 0 | m |
| filled_differs_from_input | False | boolean |
| direction_exported | False | boolean |
pit
| Name | Value | Units |
|---|---|---|
| center_cell_accumulation_cells | 1 | cells |
| center_cell_accumulation_square_meters | 100 | square meters |
| southeast_cell_accumulation_cells | 1 | cells |
| southeast_cell_accumulation_square_meters | 100 | square meters |
| max_sink_depth_m | 3.001 | m |
| filled_differs_from_input | True | boolean |
| direction_exported | False | boolean |
flat
| Name | Value | Units |
|---|---|---|
| center_cell_accumulation_cells | 1 | cells |
| center_cell_accumulation_square_meters | 100 | square meters |
| southeast_cell_accumulation_cells | 1 | cells |
| southeast_cell_accumulation_square_meters | 100 | square meters |
| max_sink_depth_m | 0.001 | m |
| filled_differs_from_input | True | boolean |
| direction_exported | False | boolean |
| Name | Value | Units |
|---|