Technical Design & Implementation Report

Namma Weather A hybrid physics-constrained multi-agent system for hyper-local urban weather forecasting

Author — Rehaan Date — July 2026 Repo — dripston/bangaloreweatherAI
Scope note — this is an engineering design and implementation report for a personal project. It is not a peer-reviewed publication and has not been submitted to arXiv or any venue. Every result below is reproducible from the linked repository, and every component is explicitly marked as trained & validated or implemented-but-not-yet-converged.

§0 Abstract

Standard numerical weather prediction (NWP) models operate at coarse spatial scales (9–25 km), failing to resolve hyper-local microclimate variations in complex urban environments. In cities like Bengaluru, convective precipitation and localized thermal dynamics create severe spatial variation over sub-kilometer distances.

Namma Weather is a hybrid multi-agent forecasting framework designed for hyper-local (100 m radius) predictions. It fuses distributed simulated Edge-IoT telemetry, simulated satellite feeds, and simulated crowdsourced mobile data alongside live historical meteorological data from Open-Meteo. Specialized physics-constrained agents model simplified Navier–Stokes relations, Kessler microphysics, and Urban Heat Island (UHI) effects. These feed a meta-ensemble of XGBoost, LightGBM, Gradient Boosting, and Random Forest regressors, optimized via Optuna and evaluated with Gaussian Process uncertainty estimation. Neighborhoods are indexed with Uber's H3 hexagonal grid at resolution 9 for microclimate and elevation adjustment.

The gradient-boosting ensemble and cloud classifier are fully trained and validated. Deep spatiotemporal architectures — ConvLSTM, Transformers, Bayesian Neural Networks — are implemented and unit-tested, but not yet trained to convergence. This is stated explicitly throughout rather than implied otherwise.

§1 Introduction & Problem Statement

Regional forecasts from agencies like IMD, or global models like GFS and ECMWF, are optimized for multi-day horizons over large geographic zones. They are inadequate for urban planning, localized storm warning, and daily commuting decisions. In Bengaluru, convective rainfall is highly localized: it's common for one neighborhood — Koramangala, say — to experience heavy downpour while an adjacent one, HSR Layout, stays dry.

To bridge this resolution gap, Namma Weather fuses data-driven ML with classical physical constraints. A multi-agent system distributes the forecasting task among specialized estimators that enforce thermodynamic and fluid-dynamic boundaries on their own outputs — rather than letting a purely statistical model produce physically implausible predictions.

§2 System Architecture

Trained & validated Implemented, not yet converged

The system is organized into three layers: multi-source data fusion, physics-constrained agents, and an ML ensemble with spatial adjustment.

┌─────────────────────────────────────────────────────────────┐
│                       DATA SOURCES                          │
│  ┌────────────┐   ┌────────────┐   ┌─────────────────────┐  │
│  │ IoT Grid   │   │ Satellite  │   │ Crowdsourced mobile │  │
│  │ (Simulated)│   │ (Simulated)│   │ reports (Simulated) │  │
│  └─────┬──────┘   └─────┬──────┘   └──────────┬──────────┘  │
└────────┼────────────────┼─────────────────────┼─────────────┘
         └────────────────┼─────────────────────┘
                          ▼
            ┌───────────────────────────┐
            │      Data Normalizer      │  ← Conflict resolution
            │     and Fusion Layer      │    via confidence weights
            └─────────────┬─────────────┘
                          ▼
 ┌───────────────────────────────────────────────────────────┐
 │               PHYSICS AGENTS LAYER                        │
 │  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌─────────┐ │
 │  │ Pressure   │ │ Temp Agent │ │ Precip     │ │ Cloud   │ │
 │  │ Gradient   │ │ (Urban heat│ │ Kessler    │ │ Vision  │ │
 │  │ (N-S Eq.)  │ │ canyon)    │ │ microphys. │ │ (MNv2)  │ │
 │  └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ └────┬────┘ │
 └────────┼──────────────┼──────────────┼─────────────┼──────┘
          └──────────────┴──────────────┴─────────────┘
                                ▼
            ┌───────────────────────────────────┐
            │         ML Ensemble Layer         │  ← Optuna-optimized
            │ XGBoost + LightGBM + Gradient      │    weight mapping
            │ Boosting + Random Forest           │
            └─────────────────┬─────────────────┘
                              ▼
            ┌───────────────────────────────────┐
            │       H3 Hexagonal Grid           │  ← Microclimate
            │  Spatial Adjustment (Res 9)       │    corrections
            └─────────────────┬─────────────────┘
                              ▼
            ┌───────────────────────────────────┐
            │      Hyper-Local Forecast         │
            └───────────────────────────────────┘

Cloud Classifier

MobileNetV2 / ResNet50 fine-tuned on GCD, 7 sky classes.

Trained · 62.0% val acc

Gradient Boosting Ensemble

XGBoost, LightGBM, Gradient Boosting, Random Forest + Optuna.

Trained · see §5

ConvLSTM Temperature Agent

Spatiotemporal convolutional LSTM for temperature fields.

Architecture only

BiLSTM Wind Agent

Bidirectional LSTM with attention over pressure gradients.

Architecture only

Bayesian Neural Net

TensorFlow Probability, DenseVariational layers, MC sampling.

Architecture only

Temporal Fusion Transformer

Multi-head attention over spatial + temporal grids.

Architecture only

§3 Methodology & Equations

3.1 Multi-source data fusion

Data is ingested from three sources with varying confidence:

Weighted fusion
$$W_{\text{fused}} = \alpha \cdot D_{\text{IoT}} + \beta \cdot D_{\text{Sat}} + \gamma \cdot D_{\text{Crowd}}$$

where $\alpha=0.5$ (direct IoT sensor reading), $\beta=0.3$ (indirect satellite grid), and $\gamma=0.2$ (crowdsourced reports). Conflicting observations are resolved with confidence-weighted averaging:

Conflict resolution
$$\bar{T} = \frac{\sum T_i \cdot C_i \cdot w_i}{\sum C_i \cdot w_i}$$

3.2 Physics-constrained agents

Precipitation agent — Kessler microphysics, modeling autoconversion, collection, and evaporation:

Net precipitation
$$P_{\text{net}} = \max(0,\ P_{\text{autoconv}} + P_{\text{collection}} - P_{\text{evap}})$$ $$P_{\text{autoconv}} = \begin{cases} c_{\text{conv}} (q_{\text{cloud}} - q_{\text{threshold}}) & \text{if } q_{\text{cloud}} > q_{\text{threshold}} \\ 0 & \text{otherwise} \end{cases}$$

Temperature agent — Urban Heat Island. Sky View Factor:

Sky view factor
$$SVF = \frac{1}{\pi} \arccos\left(\min\left(\max\left(\frac{H}{W}, -1\right), 1\right)\right)$$

where $H$ is average building height and $W$ average street width. UHI temperature delta:

UHI delta
$$\Delta T_{\text{UHI}} = (1 - SVF) \cdot \left(\frac{R_{\text{radiation}}}{1000}\right) \cdot 2.0$$

Wind agent — geostrophic + log-law surface friction:

Geostrophic wind & surface profile
$$V_g = \frac{1}{\rho \cdot f} \cdot \frac{\partial p}{\partial n}$$ $$u(z) = u_{\text{geostrophic}} \cdot \frac{\ln(z / z_0)}{\ln(z_{\text{gradient}} / z_0)}$$

where $z_0$ is urban surface roughness (0.5 m) and $f$ is the Coriolis parameter.

3.3 Spatial neighborhood adjustment

Predictions are indexed with Uber's H3 hexagonal grid at resolution 9 (~0.1 km² cells). Elevation lapse-rate correction:

Lapse rate correction
$$T_{\text{adjusted}} = T_{\text{base}} + (H_{\text{avg}} - H_{\text{cell}}) \cdot 0.0065$$

where $H_{\text{cell}}$ is the cell's elevation and $0.0065\ ^\circ\text{C/m}$ is the standard atmospheric lapse rate.

§4 Implementation & Training Details

4.1 Cloud classifier Trained

  • Dataset: Ground-based Cloud Dataset (GCD), 7 cloud categories.
  • Architecture: MobileNetV2 and ResNet50, ImageNet-initialized.
  • Training: Phase 1 — head trained 20 epochs, base frozen. Phase 2 — top 30 conv layers unfrozen, fine-tuned 40 epochs, lr 1e-5, Adam.
  • Result: 62.0% overall validation accuracy on the GCD test set. Class-wise precision/recall not yet computed — noted as future work.

4.2 Forecasting ensembles Trained

  • Models: XGBoost, LightGBM, Gradient Boosting, Random Forest.
  • Data: 60 days of historical Bengaluru meteorological data, fetched live from Open-Meteo.
  • Split: 80/20 train-test.
  • Optimization: Optuna, 100 trials, minimizing RMSE.
  • Uncertainty: Gaussian Process Regressor, Matérn + RBF kernels — produces a confidence score from posterior uncertainty, reported separately from RMSE in §5.

4.3 Deep spatiotemporal architectures Implemented, not converged

ConvLSTM2D (temperature), BiLSTM-attention (wind), Temporal Fusion Transformers, and a Bayesian Neural Network (TensorFlow Probability, DenseVariational layers with Gaussian priors/posteriors) are fully coded and pass architecture/unit tests, but have not been trained to convergence due to compute/environment constraints. These are documented as a defined upgrade path, not production components.

§5 Experimental Evaluation Results

Evaluated on the 20% held-out test split of the 60-day Bengaluru dataset:

ModelTemp. RMSE (°C)Wind RMSE (m/s)Precip. RMSE (mm)
Random Forest0.22030.38271.1776
Gradient Boosting0.18700.35731.3172
XGBoost0.12170.39601.4390
LightGBM0.71661.02592.8454
Ensemble Average0.26870.28100.8974

Best value per column highlighted in amber.

Separately, the Gaussian Process-based Ensemble Confidence Score for the combined pipeline was 94.86% — a measure of posterior prediction certainty, not an accuracy percentage, and should not be conflated with the RMSE table above.

Key observations

  1. Precipitation & wind speed: the Ensemble Average had the lowest error of the group — consistent with variance reduction from combining diverse learners, even though no single base model led on both metrics.
  2. Temperature: XGBoost alone had the lowest individual RMSE (0.1217°C); the Ensemble Average (0.2687°C) was pulled upward by LightGBM's comparatively weak temperature fit (0.7166°C) within the average — reported honestly rather than cherry-picking the best individual model as "the ensemble result."
  3. Physical feasibility: Kessler microphysics constraints prevented physically invalid negative precipitation output, which unconstrained models (notably LightGBM near zero targets) were otherwise prone to producing.

§6 Limitations & Future Work

6.1 Stated limitations

Simulated telemetry — IoT sensor nodes, satellite feed aggregates, and crowdsourced report data are currently simulated, not sourced from deployed hardware.
No physical ground truth — without deployed IoT hardware, the pipeline hasn't been validated against physical sensor readings or benchmarked directly against a live competing forecast for the same locations/days. Planned future work, not a claimed result.
Untrained deep architectures — ConvLSTM2D, Temporal Fusion Transformers, and the Bayesian NN are implemented and unit-tested but not trained to convergence.
Cloud classifier accuracy — 62% on a 7-class problem is a reasonable baseline with room for improvement via augmentation and class-wise error analysis.

6.2 Future work roadmap

  • Deploy physical ESP32-CAM and Arduino-based sensor nodes in a pilot zone (Koramangala).
  • Integrate real satellite feeds (INSAT-3D via MOSDAC API) in place of simulated input.
  • Benchmark directly against Open-Meteo and IMD forecasts for the same locations once real sensor data exists.
  • Train ConvLSTM, Temporal Fusion Transformer, and Bayesian NN to convergence on GPU-enabled hardware.
  • Integrate Doppler radar for 0–2 hour precipitation nowcasting.