How prakhar9642/varuna works
VARUNA turns global NWP model data into region-level Indian forecasts, blending member predictions with an error-predicting meta-model where trained and serving explicit fallback weights otherwise. Users enter through the React command centre or focused forecast, skill, extremes, explainability, model, and health views; the UI fetches backend API data and presents provenance and validation state. Backend pipeline modules support aligned training and skill reports. Unsampled subsystems are included only where README or source-index references establish their role; their internal call paths are not inferred.
Main entry points: App.jsx Route shell · blend_service.py Forecast blend service · api.js API client · run_pipeline.py Training pipeline
Components 26
Frontend experience
- Route shell
src/App.jsx - Command centre
src/pages/CommandCentre.jsx - Forecast views
src/pages/Forecast.jsx - Skill and explain
src/pages/Skill.jsx - Extremes monitor
src/pages/Extremes.jsx - Models view
src/pages/Models.jsx - System health
src/pages/SystemHealth.jsx - Selection and regional state
src/store/useStore.js - API client
src/services/api.js - Display reference data
src/data/referenceData.js - Historical verification
src/verification
Backend API
- FastAPI application
varuna-backend/app/main.py - Endpoint routes
varuna-backend/app/api - Regions and model config
varuna-backend/app/config.py
Forecast science
- Forecast blend service
varuna-backend/app/services/blend_service.py - Regime classification
varuna-backend/app/science/regime.py - Member weighting
varuna-backend/app/science/weighting.py - Error meta-model
varuna-backend/app/science/meta_model.py
Training and verification
- Training pipeline
varuna-backend/app/science/run_pipeline.py - Forecast-reference alignment
varuna-backend/app/science/alignment.py - Skill evaluation
varuna-backend/app/science/verification.py
Data integrations
- Forecast provider
varuna-backend/app/providers/open_meteo.py - Response cache
varuna-backend/app/providers/cache.py
Other components
- Weather analyst
- Open-Meteo services
- ERA5 archive
Connections 33
- Weather analyst → Route shell: opens
src/App.jsx - Route shell → Command centre: routes to
src/App.jsx - Route shell → Forecast views: routes to
src/App.jsx - Route shell → Skill and explain: routes to
src/App.jsx - Route shell → Extremes monitor: routes to
src/App.jsx - Route shell → Models view: routes to
src/App.jsx - Route shell → System health: routes to
src/App.jsx - Command centre → Selection and regional state: reads and updates
src/pages/CommandCentre.jsx - Command centre → Display reference data: uses metadata
src/pages/CommandCentre.jsx - Forecast views → Selection and regional state: reads selections
src/pages/Forecast.jsx - Skill and explain → Selection and regional state: reads selections
src/pages/Skill.jsx - Extremes monitor → API client: fetches extremes
README.md - Models view → API client: fetches model data
README.md - System health → API client: fetches status
README.md - Selection and regional state → API client: requests regions and forecasts
src/store/useStore.js - API client → FastAPI application: HTTP API requests
README.md - FastAPI application → Endpoint routes: registers routers
varuna-backend/app/main.py - FastAPI application → Forecast blend service: serves health payload
varuna-backend/app/main.py - Endpoint routes → Forecast blend service: calls service
varuna-backend/app/api/routes_forecast.py - Forecast blend service → Forecast provider: loads forecasts
varuna-backend/app/services/blend_service.py - Forecast blend service → Error meta-model: predicts member errors
varuna-backend/app/services/blend_service.py - Forecast blend service → Member weighting: derives blend weights
varuna-backend/app/services/blend_service.py - Forecast blend service → Regime classification: classifies regime
varuna-backend/app/services/blend_service.py - Forecast provider → Response cache: uses cache
varuna-backend/app/providers/open_meteo.py - Forecast provider → Open-Meteo services: fetches model data
README.md - Training pipeline → Forecast-reference alignment: collects aligned rows
varuna-backend/app/science/run_pipeline.py - Training pipeline → Error meta-model: trains bundle
varuna-backend/app/science/run_pipeline.py - Training pipeline → Skill evaluation: evaluates skill
varuna-backend/app/science/run_pipeline.py - Training pipeline → Member weighting: builds weight reports
varuna-backend/app/science/run_pipeline.py - Forecast-reference alignment → Forecast provider: collects forecasts
varuna-backend/app/science/alignment.py - Forecast-reference alignment → ERA5 archive: retrieves reference data
README.md - Historical verification → API client: checks API data
README.md - FastAPI application → Regions and model config: reads settings
varuna-backend/app/main.py