Web viewer for the Urban Flash Flood Information and Forecasting System (UFFIS) forecast products. A single static page (Leaflet, no build step) that can be hosted on GitHub Pages. Two regions are wired in and can be switched in the header:
- Comoros (deployment default,
DEFAULT_REGIONin index.html): the three STREAM-Sat + StormLab cycles of 2025-12-25 11:00, 12:00 and 13:00 UTC, with the EF5 summary products on the 30 m grid, the pluvial FIM probability mosaic of the triggered municipalities and the IBF warning level. Context layers are the triggered FIM municipalities of the selected cycle and the 55 Comoros FIM communes. - Guatemala (template example): cycle 20260903.160000 with the national 900 m and basin 90 m EF5 products, the Santa Ines Petapa FIM library, IBF, gauge hydrographs and the full administrative context.
- Current conditions. QPE based EF5 products: the runs driven by the observed satellite rainfall (IMERG and SCaMPR in Guatemala, STREAM-Sat in the Comoros), combined on the model grid. Rainfall accumulation, max unit streamflow, soil saturation.
- Flood forecast. QPF based EF5 products from the StormLab rainfall ensemble. Same three products.
- Flood inundation mapping. Flood map library probabilities: P(depth >= 0.10, 0.30, 0.70, 1.00 m), overbank view of the matched scenarios (Santa Ines Petapa 5 m in Guatemala, the mosaicked municipality grids at 30 m in the Comoros).
- Impact based forecasting. Grid warning level on the flood risk matrix (Speight et al. 2018 / Flood Guidance Statement standard): likelihood bands of the minor (0.10 m), significant (0.30 m) and severe (0.70 m) thresholds, worst matrix cell per grid cell.
Every EF5 product has Min, Median and Max buttons (ensemble statistic). In Guatemala each layer shows the national 900 m grid with the 90 m domain drawn on top; in the Comoros there is a single 30 m grid.
- The map zooms to level 21. Above the basemap native zoom (19) the basemap scales up while the raster products keep their cells crisp (nearest-neighbour rendering), so single 30 m FIM cells stay readable.
- Opacity starts at 100 percent; pull the slider down to compare the products with the basemap underneath.
- Click a basin, commune or triggered-site outline to zoom into it; the FIM tab frames the mosaic of the triggered municipalities.
- Turning several FIM thresholds on stacks them, the last one drawn covers the lower ones; the legend names the visible bands.
index.html the whole app
scripts/prepare_cycle.py raw cycle folder -> web assets
scripts/prepare_comoros_gis.py FIM area-of-concern geojson -> context layers
data/cycles.json list of available cycles, newest first
data/gis/ Guatemala context layers (GeoJSON)
data/gis_comoros/ Comoros context layers (GeoJSON)
data/<cycle>/manifest.json bounds, legends, region and cycle facts
data/<cycle>/ef5/ colorized EF5 overlays (PNG)
data/<cycle>/fim/ flood probability overlays (PNG) and
triggered_sites.geojson (Comoros)
data/<cycle>/ibf/ warning level overlay (PNG)
data/<cycle>/ts/ gauge hydrograph envelopes (Guatemala)
-
Take the raw cycle folder the pipeline produced. It needs one
<name>_<res>/summaryfolder per model domain and, when FIM ran, its<name>_<res>/fim/<routine>/products (Guatemala writes combined_overbank, Comoros pluvial_overbank; the script picks the first available variant). Multi-site regions keep one folder per site (fim/<routine>/<Site>/) with the triggered sites mosaicked back intofim/<routine>/<mode>/; the script reads the mosaic and exports the triggered municipalities of the cycle as a small GeoJSON outline. -
Run:
python scripts/prepare_cycle.py path/to/20251225.120000 data --region comorosRequirements:
rasterio,numpy,pillow. The region key drives the labels and start view; it is inferred from the model folder name when--regionis omitted (comoros_30m->comoros). -
Commit and push. The viewer lists all cycles of
data/cycles.jsongrouped by region and opens the first cycle ofDEFAULT_REGION(index.html). Cycles sort newest first.
Comoros context layers are rebuilt from the TITO FIM configuration with:
python scripts/prepare_comoros_gis.py <tito>/fim_config/aoc
- The 20251225 11:00-13:00 cycles were re-run with the per-site FIM
layout (TITO hook fix): every municipality writes to
fim/<chain>/<Site>/and the triggered sites are mosaicked (per-pixel max) intofim/<chain>/<mode>/. The viewer shows the mosaic; the trigger facts come from the per-site summaries. - Triggered sites: 5 at 11:00 (Fomboni, Mledjele, Moili Mdjini, Moimbao, Moimbassa) and 6 at 12:00 and 13:00 (plus Djando), all on Moheli. Only the triggered municipalities are part of the mosaic.
- The FIM products are in EPSG:5629 (Moznet / UTM zone 38S) and carry a
bare
LOCAL_CSWKT without an EPSG code, sobounds_4326()falls back to a local UTM inverse transform when rasterio cannot reproject them. - Commune display names are ASCII-folded from the ADM3 spelling
(Mlédjélé -> Mledjele) and matched to the site stems with
norm_name(), which ignores accents, case and separators.
Push this repository to GitHub, then in Settings, Pages choose the main
branch and the root folder. The site appears at
https://<user>.github.io/<repo>/.
- All display text is plain ASCII: no em dashes, arrows, bullets or other special symbols.
- Point layers never use the hazard palette: Muy Alta settlements are black dots with a white rim, Alta are white dots with a black rim.
- Boundaries are dashed and roads are solid; both switch to white over the satellite basemap.
- Palettes: rainfall in a green to purple accumulation ramp, max unit streamflow in the operational FLASH palette, soil saturation in a brown to teal ramp, flood probability in the blue to purple product scale, IBF in the green, yellow, amber, red matrix colors.