# Stormwater: rain on a terrain

```json
jifto_analysis {"module": "stormwater", "analysis": ["<terrain id or ground mesh id>"]}
jifto_settings {"set": {"stormwater.RainIntensity": 60, "stormwater.SimulationDuration": 0.5, "stormwater.Resolution": 1.0}}
jifto_run {"module": "stormwater", "kind": "depth"}
jifto_job {"job_id": "stormwater-3", "wait_seconds": 120}
jifto_results {"module": "stormwater", "points": true}
```

- Rain falls at `RainIntensity` mm/h for `SimulationDuration` hours (0.5 to 24) on a grid of
  `Resolution` metres. The job's progress is **simulated minutes of the event**; it ends when the event
  does, and the simulation pauses there, so the result is the water at the event's end.
- `kind`: `depth` (water depth, mm) or `velocity` (flow speed, m/s).
- Results: `Water depth` per cell in mm. Ponding on a path: the points within the path's half-width
  of its curve; report the deepest water and the length of path under more than 10 mm.
- The statistics' total row is the wet area (cells with at least 1 mm).
- Fit the legend to the question: `stormwater.MaxDepth` (mm) is the top of the depth legend and of
  the colours. The default 500 mm suits flooding; ponding on paths reads better at 50, where shallow
  water takes more of the colour range. The colours are linear in depth, and the legend's labels say
  which depth each colour is.
- The palest blue on open slopes is sheet flow (a film of 1 to 3 mm running downhill), not ponding.
  At the edge of the analysed ground the model lets runoff leave the site; the water drawn along the
  edge is that outflow. Frame plans a few metres inside the edge (`jifto_capture` box) and say so.
- Comparing designs: change the terrain (it settles before the call returns), then `jifto_run` again.
  Each run rains from dry ground.
- A job that cannot start fails at once with the reason: no terrain, a grid too small for the
  resolution, or a terrain with no valid heights.
