GramVarshaग्रामवर्षा

SIH26074 · Ministry of Earth Sciences · Team Hexadecimal, WCE Sangli

From one block forecast to advice for every gram panchayat

IMD issues agromet forecasts at block level, so every village in Miraj block gets the same numbers. GramVarsha estimates how each panchayat differs, says why, turns it into crop advice in the farmer's language, and learns from their replies.

The pipeline

  1. 1

    Coarse block forecast

    backend/forecast.py

    One 5-day forecast for the whole block. Today: Open-Meteo GFS as an IMD proxy. The IMD block feed plugs into the same function.

  2. 2

    Kriging

    ml/kriging.py

    Ordinary kriging of each village's usual monthly difference from the block, fitted on training years only. Works for villages with no data.

  3. 3

    XGBoost correction

    ml/model.py

    Learns what kriging missed from terrain (elevation, slope, river distance, position), season and the day's block weather.

  4. 4

    SHAP explanation

    ml/explain.py

    Every correction is split into named causes, marked as village-specific or block-wide, and written as a sentence.

  5. 5

    Crop advisory

    backend/advisory.py

    Deterministic rules for 8 Sangli crops × 5 stages, hand-written in English, Hindi and Marathi. Optional LLM rewording may never change a number.

  6. 6

    SMS · WhatsApp · voice

    backend/tts.py

    Reaches any phone. Nothing to install, nothing to type.

  7. 7

    Farmer feedback

    backend/db.py

    Replies 1/2 and 👍/👎 are stored per panchayat and shown to officers. Real station data can replace the pseudo-truth for retraining.

↺ Feedback and any station data flow back into step 2 at the next retraining (make train).

It never fails silently

Tier AFull ML

Kriging + XGBoost, with confidence range and SHAP reasons.

Tier BPhysics only

Models unavailable: lapse rate 6.5 °C/km and an orographic rain factor, no training needed.

Tier CPass-through

No local data: the block value is shown unchanged and flagged “limited local data”.

If the forecast source is down, the last good forecast is served with a “stale since” notice. If the server is down, the site falls back to a copy produced daily by the same pipeline, and says so.

Open data, zero cost

NeedSourceNote
Block forecast (IMD proxy)Open-Meteo Forecast & Historical Forecast API, GFS 0.25°Free, no key
Village “truth” for trainingOpen-Meteo Archive API, ECMWF IFS ~9 kmPseudo ground truth
Elevation, slope, aspectCopernicus GLO-90 DEM via Open-Meteo Elevation API90 m
Villages, taluka boundaryOpenStreetMap (Overpass), relation 9742028 / LGD 4302ODbL
Krishna riverOpenStreetMap (Nominatim), relation 337204ODbL
VoicegTTS (Google Translate TTS), Marathi / Hindi / EnglishFree

Limitations we know about

  • The “truth” is a 9 km weather model, not rain gauges or AWS. Nearby villages can share one grid cell, which caps the village detail we can learn and prove. Real IMD AWS/ARG CSVs drop into data/imd_import/ and replace it.
  • For daily max temperature and rainfall the gain over the block forecast is a better block-level forecast, not village-level detail. The Validation page shows this per variable.
  • In the current models XGBoost leans on season and the day's block weather more than on terrain; most village-to-village detail comes from the kriging step. Miraj is flat (under 150 m of relief), so terrain signal is small.
  • Scores cover day 0–1 lead time. Days 3–5 on the map are shown but not yet validated.
  • Panchayat outlines are Voronoi cells around OSM village points, not official boundaries. LGD / Bhunaksha polygons replace them in production.
  • Advisory thresholds are general agronomy rules of thumb and need review by the Sangli KVK / AMFU before farmers act on them.
  • Marathi village names are hand-transliterated and marked for local checking.

The measured numbers are on Validation.