📦 What was delivered
| Component | Where | What it does |
| Interactive map |
/heatwave-v2/ |
688 mandals × 5 days, tier colour, click-popup with all 9 indices, search box, day selector, tier-history strip per mandal |
| Skill report |
/heatwave-v2/skill.html |
Nightly forecast-vs-observed for 6 sources; updates 23:30 IST |
| Design + ops doc |
/heatwave-v2/design.html |
5-layer architecture, formulas, rules, references — single shareable file |
| District HAP PDFs |
/heatwave-v2/hap.html |
28 auto-generated bilingual Telugu+English action plans per district |
| Run archive |
/heatwave-v2/archive.html |
Browse past runs — state PDF + press PNG per archived day |
| State-wide PDF |
latest_state.pdf |
One-page A3-landscape — 28×5 heatmap + statewide bars + top-10 table — for SEOC/CM |
| JSON API |
/data/api/v1/ |
Machine-readable mandal-day records + district rollup + schema spec — for SEOC dashboard or mobile apps |
| Excel workbook |
latest.xlsx |
33-column mandal-day matrix — full transparency for analysts |
| CSV |
latest.csv |
Same as Excel, machine-readable for QGIS / R / Python downstream |
| Press PNG (D+1) |
latest_press.png |
Bilingual map of tomorrow's tier per mandal — for press release |
| SMS templates |
sms_latest.json |
140 ready-to-send Telugu+English messages — 3 length tiers (citizen, operational, extended) |
| Mandal history |
mandal_history.json |
D+1 tier history per mandal across past archived runs (rolling 30-day window) |
🔬 Scientific basis (all formulas cited)
- HWMID — Russo et al. 2014 — Heat Wave Magnitude Index daily
- EHF — Nairn & Fawcett 2013 — Excess Heat Factor (acclimatisation-aware)
- Heat Index — Rothfusz/NWS 1990
- Apparent Temperature — Steadman 1984 (BoM convention)
- UTCI — Brode et al. 2012 (shaded approximation for Phase 1; full Phase B)
- WBGT — ACGIH with Stull 2011 wet-bulb approximation
- IMD HW / SHW class — IMD HAP convention (Tmax + departure thresholds)
- Tmin anomaly (warm night) — IMD convention (+4.5 °C warm, +6.5 °C very warm)
- 5-tier output — NDMA-aligned GREEN / YELLOW / ORANGE / RED / MAROON
- Impact scoring — WMO-WHO 2024 impact-based forecasting (tier × HVI × duration)
⏰ Automation — scheduled tasks (all Ready)
| Task | When | What |
APSDMA_HeatEWS_Daily | Daily 10:35 IST |
Full pipeline — Excel/CSV/PDF/PNG/SMS/JSON/portal refresh (~45 s) |
APSDMA_HeatEWS_Verify | Daily 23:30 IST |
Compute forecast skill vs DES observations → skill.html |
APSDMA_HeatEWS_MOS_Train | Sundays 03:00 IST |
Refresh per-district MOS coefficients on rolling 60-day window |
🛡️ Safety — external dispatch is gated
Email + Telegram dispatch only triggers when heat_ews_daily.py is invoked with the --send flag.
The scheduled task batch (start_heat_ews_daily.bat) does not include --send.
Enable external dispatch only after stakeholder review of the daily output.
📊 Reference performance
| Metric | Value |
| End-to-end pipeline wall-clock | ~45 s |
| Mandal-day rows per run | 3,440 (688 × 5 days) |
| MOS coefficients fitted | 196 (district × lead pairs) |
| MOS RMSE improvement | −1.1 °C |
| Ensemble sources blended | 6 of 6 active (GFS, IMD MME, ECMWF, GFS NCEP, ICON, imd_gfs_grib) |
| Phase A WRF probe | Connected — 147 files / 8.65 GB per run available at IMD upstream |
| Healthcheck | 17 OK / 2 WARN / 0 FAIL |
📂 Code layout
E:\Heat_EWS_v2\
├── config.yaml ← SINGLE source of truth (thresholds, rules, paths)
├── heat_ews_daily.py ← main orchestrator (13 modules, ~45s)
├── export_portal_geojson.py ← portal data publisher
├── verify_daily.py ← nightly skill report
├── healthcheck.py ← operator health check
├── heat_ews/
│ ├── climatology.py ← wraps heatwave.* DB tables
│ ├── indices.py ← 9 scientific indices, unit-tested
│ ├── tiering.py ← YAML-driven 5-tier engine
│ ├── mos.py ← per-district MOS bias correction
│ ├── ensemble.py ← 6-model forecast blend
│ ├── impact.py ← tier × HVI × duration scoring
│ ├── dispatch.py ← press PNG + email + Telegram (gated)
│ ├── hap_pdf.py ← 28 district HAP PDFs
│ ├── sms_templates.py ← 140 SMS messages, trilingual
│ ├── state_summary_pdf.py ← single-page state-wide PDF
│ ├── archive.py ← run archival + portal index
│ ├── api_compact_json.py ← REST-like JSON API
│ ├── history_compile.py ← mandal tier history across runs
│ └── wrf_sync.py ← Phase A scaffold (probe-only)
├── tests/test_indices.py ← unit tests
├── output/ ← daily artifacts
├── logs/ ← daily.log, verify.log, mos_train.log
└── start_heat_ews_*.bat ← scheduled-task launchers
🚀 Phase roadmap
- Phase A — WRF 3km NetCDF (probe scaffold done; set OPERATIONAL=True in
wrf_sync.py after disk + bandwidth approval to add as 7th ensemble member)
- Phase B — Full Brode 2012 UTCI with solar radiation forecast
- Phase C — SMS gateway integration (VAANI / APSFL — procurement-gated)
- Phase D — Mobile app (Flutter, read-only tier viewer for public)
- Phase E — Health-dept mortality coupling (heatstroke admissions pilot — partnership-gated)
- Phase F — Citizen sensors / IoT ingestion (handheld AWS, school weather stations)
Generated by Heat EWS v2 handover · auto-produced from the operational pipeline state · last updated by the daily run.