System Overview

Jal Drishti implements a raster-based water balance model that simulates pluvial (rainfall-driven) flooding. The system processes terrain data, applies hydrological algorithms, and classifies flood risk using multiple weighted criteria.

This system models:

Pluvial flooding (surface runoff from rainfall) in rural and semi-urban contexts across India

This system does NOT model:
  • River hydraulics or fluvial flooding
  • Dam/reservoir operations
  • Urban stormwater infrastructure
  • Groundwater interactions

Data Acquisition Pipeline

The system fetches data from multiple open sources to build flood risk assessments:

Source Data Type Resolution
Copernicus GLO-30 Digital Elevation Model (DEM) 30 meters
Open-Meteo Rainfall & Soil Moisture Daily historical
CHIRPS (fallback) Rainfall Archive ~5km daily since 1981
OpenStreetMap Building Footprints Vector

Terrain Analysis (D8 Algorithm)

Slope Calculation

Slope is computed using the gradient of the DEM with a 3×3 moving window:

slope(degrees) = arctan(√(dz/dx² + dz/dy²)) × (180/π)

D8 Flow Direction

The D8 algorithm determines water flow direction from each cell to its steepest downslope neighbor among 8 surrounding cells:

32
64
128
16
X
1
8
4
2

D8 encoding: each cell is assigned a direction code based on steepest descent

Flow Accumulation

Counts the number of upstream cells flowing into each cell. High flow accumulation indicates natural drainage channels where water concentrates during rainfall events.

Sink Filling:

Local depressions (sinks) in the DEM are filled using an iterative algorithm to ensure continuous flow paths.

D8 Flow Direction

Automated D8 Vector Field Analysis for Hydrological Routing

Core Equations

The water balance model calculates surface runoff based on rainfall input, infiltration, and terrain characteristics. Our implementation uses a modified SCS Curve Number inspired approach for rural Indian landscapes:

Infiltration: I = C_land × R × (1 - S_ratio) × K_village
Where C_land = base infiltration coefficient, R = rainfall, S_ratio = current soil saturation, K_village = terrain-specific modifier
Surface Runoff: Q = max(0, R - I) × Runoff_Multiplier
Where Runoff_Multiplier varies by terrain type (High for Wayanad, Low for Darbhanga plains)
Water Depth (Synthetic): D = (Q × Flow_Acc) ^ 0.7 + Noise_Field
Non-linear scaling applied to simulate realistic accumulation in depressions

Village-Specific Flood Dynamics

Jal Drishti 2.0 uses specialized algorithms for different topographical zones:

Hilly (Wayanad)

Focuses on Flash Flood corridors. Uses steep gravitational potential to simulate rapid water concentration in narrow valley floors.

Riverine (Darbhanga)

Simulates Embankment Breaches. Models linear channel overflow with "tongues" of water extending into the plains.

Floodplain (Dhemaji)

Models Braided River Swell. Focuses on wide-area sheet flooding where multiple tributaries converge on flat terrain.

Time Simulation

The model simulates flood progression with snapshots at 4 time steps, allowing visualization of how risk evolves:

Simulation Timeline

T = 0hInitial state
T = 6hEarly accumulation
T = 12hPeak intensity
T = 24hFull event

Infiltration Coefficients

Forest0.80
Agriculture0.65
Bare Ground0.45
Built-up0.15
Simulation Timeline

Multi-Step Temporal Flood Propagation Simulation results

Multi-Criteria Risk Classification

Weighted Risk Formula

Risk is calculated by combining multiple normalized factors with predetermined weights:

Risk Score = Σ(weight_i × factor_i)
Water Depth
40%
Slope (inverted)
25%
Flow Accumulation
25%
Habitation Proximity
10%
Slope Logic:

Slope risk is inverted—flat areas (low slope) have higher flood risk because water accumulates instead of draining naturally.

Risk Classification Levels

Extreme Risk

Score ≥ 0.90

High Risk

Score 0.80 – 0.90

Medium Risk

Score 0.60 – 0.80

Low Risk

Score < 0.60

Advanced Algorithmic Core

1. High-Fidelity Rescue Routing (A*)

A deterministic control algorithm operating on a high-resolution 100x100 navigation mesh to calculate the Least-Cost Path (LCP) for emergency extraction. It optimizes for safety by treating flood depth as a variable movement cost.

Cost(n) = G(n) + H(n) + [ α × Risk(n) ] + [ β × Slope(n) ]
Where α=50 (Flood Severity Weight), β=10 (Terrain Difficulty Weight)

Heuristic Efficiency

Mesh Resolution10,000 nodes
Time ComplexityO(E log V)

Safety Constraints

Hard BlockRisk > 0.70
Path SmoothingCatmull-Rom

2. Multi-Objective Resource Allocation

Solves the Weighted Utility Maximization problem to distribute finite resources (boats, ambulances) based on "Impact per Minute". This ensures critical assets are not wasted on low-priority zones.

Maximize U = Σ ( (Population_i × (1 + Risk_i)) / (1 + Distance_i) )
Prioritizes high-risk, high-population clusters that are simplest to reach.

3. Geospatial Population Clustering

A Habitat Gravity Model that predicts population density. It typically follows an inverse-risk distribution, snapping synthetic population points to building centroids while being repelled by high-risk tensors.

P(loc) ∝ (Building_Density) / (1 + Flood_Risk_Tensor)

4. Dynamic Risk Engine

Real-time Tensor Fusion of multiple hydrological variables to generate a composite hazard surface. This surface is downsampled dynamically for rapid client-side rendering.

Hazard_Tensor = (Depth × 0.4) + (Velocity × 0.3) + (Slope_Inv × 0.3)

Machine Learning Components

LSTM Flood Predictor

A Bidirectional LSTM neural network provides 7-day flood probability forecasts based on 30 days of historical data.

Model Architecture

Input Sequence30 days
Forecast Horizon7 days
Hidden Units64
Dropout0.2

Input Features

Daily rainfall✓
3-day cumulative✓
7-day cumulative✓
Soil moisture✓
Model Performance

XGBoost Risk Scorer: Accuracy Calibration and Regional Validation Curve

XGBoost Risk Scorer

A gradient boosting model provides seasonal risk assessment using terrain, climate, and historical flood features.

  1. Feature Extraction: Terrain stats, rainfall patterns, building density, historical floods
  2. Seasonal Modeling: Monsoon multiplier applied (2.0× during June–September)
  3. Calendar Generation: Monthly risk predictions for yearly planning

Alert Thresholds (IMD Standards)

Alert levels follow India Meteorological Department (IMD) guidelines for rainfall intensity:

Alert Level Rainfall (24h) IMD Category
● Yellow ≥ 64.5 mm Heavy Rainfall
● Orange ≥ 115.5 mm Very Heavy Rainfall
● Red ≥ 204.5 mm Extremely Heavy Rainfall

Model Execution Workflow

Jupyter-Based Development Cycle

All core models undergo an iterative development and testing phase within Jupyter notebooks before being optimized for high-performance Python production deployment.

Experimental Phase:

Models are prototyped in Jupyter to visualize gradients, verify hydrological consistency, and adjust hyperparameters through interactive plotting.

Module Python Implementation Notebook Optimization
Simulation simulation.py (FastAPI) Runoff & Accumulation tuning
Risk Engine routing.py (A* Algorithm) Penalty weighting for flood depth
ML Forecasting generators.py (Synthetic) Cluster intensity & geometry calibration
Population Analysis

Spatial Population Vulnerability Analysis: Notebook-driven Gaussian Clustering

Limitations & Future Work

Current Limitations

Recommended Enhancements