Skip to content

About

Desktop weather app with multi-model ensemble forecasting, self-scoring accuracy, and alerts. Python + PySide6 + Open-Meteo.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

10 Commits

Folders and files

Repository files navigation

Weather Forecasting

Python PySide6 Open-Meteo License

Platform Models PRs Welcome Made with love

A modern desktop weather app that asks four world-class models, shows you where they disagree, and grades its own accuracy.

✨ Features Β β€’Β  πŸ“Έ Screenshots Β β€’Β  πŸš€ Quick Start Β β€’Β  πŸ”¬ How It Works Β β€’Β  πŸ—ΊοΈ Roadmap


Weather Forecasting main window

🌟 At a Glance

4

weather models
queried in parallel

24h + 5d

hourly strip and
daily outlook

0

API keys
required

MAE + HitΒ Rate

self-scored vs.
persistence & IFS

🎯 Why This Project

Most weather apps present one model's output as if it were certain. But models disagree, and that disagreement is useful information.

Weather Forecasting queries several independent models at once, reports the median, shows how far apart they are, and then checks itself against what actually happened, so you can see how much to trust a forecast, not just what it says.

πŸ’‘ Narrow spread = models agree. Wide spread = treat the forecast with caution.


✨ Features

🧠 Ensemble Forecasts

Queries ECMWF IFS, ECMWF AIFS, GFS and ICON in parallel and reports the median temperature with a confidence spread.

πŸ“ˆ Self-Scoring Accuracy

Grades forecasts against observed conditions and benchmarks them against persistence and IFS baselines.

🚨 Severe Weather Alerts

Automatic detection of heat, cold, wind, rain and storm conditions.

πŸ“Š Location Scoring

Ranks locations by comfort, safety and overall conditions.

πŸŒ— Sun & Moon Arc

Daylight curve with sunrise and sunset markers, plus the current moon phase.

πŸ“… Hourly & 5-Day

A 24-hour strip and 5-day outlook with precipitation probabilities.

🎨 Adaptive Dark UI

Card-based layout with dynamic colors and icons that follow conditions.

πŸ” Search & Geolocation

City search with geolocation calibration.

πŸ–₯️ Headless CLI

A quick terminal preview of the full ensemble, great for scripting.

πŸ“Έ Screenshots

Hourly strip, 5-day outlook, and forecast accuracy
⏱️ Hourly strip · 5-day outlook · Forecast accuracy
CLI ensemble forecast
⌨️ CLI preview · Multi-model ensemble output

πŸ”¬ How It Works

flowchart LR
    A["City search<br/>or geolocation"] --> B["fetcher.py"]
    B --> C1["ECMWF IFS"]
    B --> C2["ECMWF AIFS"]
    B --> C3["GFS"]
    B --> C4["ICON"]
    C1 --> D["Ensemble merge<br/>median + spread"]
    C2 --> D
    C3 --> D
    C4 --> D
    D --> E["alerts.py"]
    D --> F["scoring.py"]
    D --> G["ui.py + widgets.py"]
    E --> G
    F --> G

    style A fill:#1b5fa8,color:#fff
    style D fill:#8b5cf6,color:#fff
    style G fill:#22c55e,color:#fff
Loading
Step What happens
1 Β· Fetch Open-Meteo is queried once per configured model, in parallel
2 Β· Merge Responses are normalized; the median is reported and the spread becomes the confidence signal
3 Β· Assess Alert rules flag hazards; scoring ranks comfort and safety
4 Β· Grade Past forecasts are compared with observations using MAE and hit rate, against persistence and IFS baselines

πŸš€ Quick Start

Requirements: Python 3.10+ and an internet connection. No API key.

1 Β· Clone

git clone https://github.com/sonubiswal/Weather-Forecasting.git
cd Weather-Forecasting

2 Β· Create a virtual environment

πŸͺŸ Windows🍎 macOS / 🐧 Linux
python -m venv venv
venv\Scripts\activate
python3 -m venv venv
source venv/bin/activate

3 Β· Install

pip install -r requirements.txt

4 Β· Run

πŸ–₯️ Desktop GUI⌨️ CLI preview
cd src
python -m weather_app.main
python preview.py
πŸ“Ÿ Sample CLI output
Puri, India  (19.798, 85.825)
  median temperature : 26.1 Β°C  (spread 2.1Β° across 4/4 models)
  feels like         : 31.6 Β°C
  humidity / wind    : 88% / 4.8 km/h
  condition          : Clear sky
  confidence         : Good confidence Β· 4 models within 2.1Β°
  hours / days       : 24 / 5
  models configured  : ecmwf_ifs025, ecmwf_aifs025_single, gfs_seamless, icon_seamless

πŸ—οΈ Architecture

Weather-Forecasting/
β”œβ”€β”€ πŸ–ΌοΈ  assets/
β”‚   β”œβ”€β”€ banner.svg
β”‚   └── screenshots/
β”œβ”€β”€ πŸ“¦ src/weather_app/
β”‚   β”œβ”€β”€ __init__.py     # Package metadata and version
β”‚   β”œβ”€β”€ main.py         # Entry point (QApplication + event loop)
β”‚   β”œβ”€β”€ fetcher.py      # Open-Meteo client, ensemble merge, normalization
β”‚   β”œβ”€β”€ scoring.py      # Comfort / safety scoring, accuracy tracking
β”‚   β”œβ”€β”€ alerts.py       # Severe weather detection rules
β”‚   β”œβ”€β”€ theme.py        # Dynamic color, font, and icon selection
β”‚   β”œβ”€β”€ widgets.py      # Reusable PySide6 components (cards, strips, arcs)
β”‚   └── ui.py           # Main window layout and event wiring
β”œβ”€β”€ preview.py          # Headless CLI preview
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ pyproject.toml
└── .env.example
Principle In practice
Separation of concerns Data (fetcher), logic (scoring, alerts) and presentation (ui, widgets, theme) are separate modules
Reusable widgets UI building blocks are isolated in widgets.py
Provider-agnostic data layer Normalization in fetcher.py keeps the rest of the app independent of the API's response shape

βš™οΈ Configuration

Open-Meteo needs no key, so this is optional. To add a custom provider later:

πŸͺŸ Windows🍎 macOS / 🐧 Linux
copy .env.example .env
cp .env.example .env
Model ID Provider
ecmwf_ifs025 πŸ‡ͺπŸ‡Ί ECMWF IFS
ecmwf_aifs025_single πŸ€– ECMWF AIFS
gfs_seamless πŸ‡ΊπŸ‡Έ NOAA GFS
icon_seamless πŸ‡©πŸ‡ͺ DWD ICON

🩺 Troubleshooting

❌ ModuleNotFoundError: No module named 'weather_app'

Run from inside src using the module form:

cd src
python -m weather_app.main
🌐 The app opens but shows no data

Check your internet connection and that Open-Meteo is reachable. The CLI line shows how many models responded (for example 4/4 models).

πŸ“¦ PySide6 fails to install or the window won't launch

Use Python 3.10+ and upgrade pip first:

python -m pip install --upgrade pip
pip install -r requirements.txt

On some Linux distributions, Qt may need extra system libraries (for example libxcb-related packages).

πŸͺŸ venv won't activate in PowerShell

Use Command Prompt, or allow scripts for the current session:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned

πŸ› οΈ Tech Stack

Python Qt Requests Open-Meteo ECMWF GFS ICON setuptools


πŸ—ΊοΈ Roadmap

  • πŸ“‰ Historical trend charts (30 / 90-day temperature and rainfall)
  • ⭐ Saved locations and quick-switch favorites
  • πŸ”” System tray notifications for active alerts
  • πŸŒ“ Light / dark theme toggle
  • πŸ“¦ Standalone executable (PyInstaller)
  • πŸ† Expanded accuracy dashboard (per-model scoring breakdown)

Have an idea? Open an issue πŸ’¬


🀝 Contributing

Contributions, bug reports and feature requests are welcome.

  1. πŸ’¬ Open an issue first to discuss any major change
  2. 🍴 Fork the repo and create a branch: git checkout -b feature/your-feature
  3. ✍️ Commit with clear, descriptive messages
  4. πŸš€ Open a Pull Request explaining what changed and why

Please keep changes focused, match the existing module structure, and include screenshots for UI changes.


πŸ™ Data Attribution

Weather data by Open-Meteo.com under CC BY 4.0. Forecasts derive from models operated by ECMWF, NOAA (GFS) and DWD (ICON).

⚠️ Disclaimer: For informational use only. Do not rely on this app as your sole source for safety-critical decisions; consult official meteorological authorities during severe weather.


πŸ“„ License

Released under the MIT License. See LICENSE.

πŸ‘€ Author

Sonu Biswal Β· @sonubiswal


⭐ If this project helped you, give it a star!

Built with Python, PySide6 and Open-Meteo

About

Desktop weather app with multi-model ensemble forecasting, self-scoring accuracy, and alerts. Python + PySide6 + Open-Meteo.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages