Dhruvin Dave

AirfieldShield

Short-range probabilistic nowcasts of thunderstorms and strong surface wind at six Indian airfields, built on archived METAR reports.

Problem

Airfield operations need a few hours’ warning of thunderstorms and strong wind to plan ground handling, fuelling and runway use. The question here is narrow and testable: given only an airfield’s METAR history up to some hour, what is the probability of a thunderstorm, or of wind at 25 knots or more, in the next hour or the next three?

The wind threshold is 25 knots rather than the 34-knot gale threshold because gale hours are too rare at these stations to evaluate.

Approach

The data are archived METAR reports for six airfields from 2016 to 2024, split by time: training before 2022, validation in 2022, and the test years 2023 and 2024 used once, for the report. No synthetic data is used anywhere in training or evaluation.

Features describe the current state, short-term tendencies and recent history, and the same function runs in training and serving. The model is a gradient-boosted tree, with probabilities calibrated by isotonic regression on the validation year and alert thresholds chosen there too. Each is compared with climatology, persistence, persistence plus the METAR trend group, and logistic regression, with confidence intervals from a block bootstrap over station-days.

Alerts are not hand-picked probability cut-offs. Each prediction carries the thresholds that were chosen on validation data for fixed precision targets, and they map to Green, Yellow, Orange or Red. Green never creates an alert. A scheduled cycle runs a few minutes after each half-hourly METAR.

On the test years the model scores a precision-recall AUC of 0.576 for a thunderstorm in the next hour, against 0.409 for persistence and 0.070 for climatology. The other targets are in the chart below. The path from report to alert is drawn below, and the code is covered by 63 tests.

Results

Every figure links to the file it was drawn from.

Thunderstorm in the next hour

Real METAR from six Indian airfields. Persistence means “whatever is happening now keeps happening”.

PR-AUC on the held-out 2023–2024 test period. Higher is better.

Thunderstorm in the next hourBar chart of PR-AUC: Model 0.576; Persistence 0.409; Climatology 0.070.Model0.576Persistence0.409Climatology0.070
Thunderstorm in the next hour
MethodPR-AUC
Model0.576
Persistence0.409
Climatology0.070

PR-AUC on the held-out 2023–2024 test period. Higher is better.

Thunderstorm in the next 3 hoursBar chart of PR-AUC: Model 0.480; Persistence 0.291; Climatology 0.119.Model0.480Persistence0.291Climatology0.119
Thunderstorm in the next 3 hours
MethodPR-AUC
Model0.480
Persistence0.291
Climatology0.119

PR-AUC on the held-out 2023–2024 test period. Higher is better. The 95% interval for the model's 0.337 is wide: 0.118 to 0.478.

Wind of 25 kt or more in the next hourBar chart of PR-AUC: Model 0.337; Persistence 0.203; Climatology 0.008.Model0.337Persistence0.203Climatology0.008
Wind of 25 kt or more in the next hour
MethodPR-AUC
Model0.337
Persistence0.203
Climatology0.008

PR-AUC on the held-out 2023–2024 test period. Higher is better. The 95% interval for the model's 0.218 is 0.104 to 0.300.

Wind of 25 kt or more in the next 3 hoursBar chart of PR-AUC: Model 0.218; Persistence 0.142; Climatology 0.018.Model0.218Persistence0.142Climatology0.018
Wind of 25 kt or more in the next 3 hours
MethodPR-AUC
Model0.218
Persistence0.142
Climatology0.018

Source

Real METAR, split by time

470,057 station-hours from six Indian airfields, 2016–2024. No synthetic data is used in training or evaluation.

Chronological splitA timeline from 2016 to 2024: training data before 2022, validation in 2022, and the held-out test period in 2023 and 2024.Train 2016–2021Validation 2022Test 2023–2024

Rows whose label window crosses a boundary are purged. The test years are used once, for the report.

Source

From METAR to alert

The same feature code runs in training and serving. Alert thresholds are chosen on validation data.

From METAR report to alert levelFlow from top to bottom: METAR reports from six airfields become hourly features, which a gradient-boosted tree model scores; the scores are calibrated with isotonic regression, compared with alert thresholds, and mapped to a Green, Yellow, Orange or Red alert.METAR reports, six airfieldsHourly featuresGradient-boosted treesIsotonic calibrationAlert thresholdsGreenYellowOrangeRed

Source

63 tests

Features, metrics and training, the prediction service, alerts and the API. They run on SQLite, with no Redis.

63

  • alerts 21
  • features 15
  • metrics and training 10
  • API 9
  • prediction service 8
pytest

Source

Precision-recall curves

From the repository’s evaluation report. The calibrated model is the heavy blue line.

Four precision-recall plots on the 2023 to 2024 test period: thunderstorm within 1 h and 3 h, and strong wind within 1 h and 3 h. The calibrated gradient-boosting curve sits above persistence and climatology in the thunderstorm plots.

Source

Reliability of the forecasts

Observed frequency against forecast probability. Thunderstorm forecasts follow the diagonal; wind forecasts are noisy because few events occurred.

Four reliability diagrams. For thunderstorms within 1 h and 3 h the calibrated forecasts follow the diagonal closely. For strong wind they scatter around it.

Source

Limits

The model sees METAR only: no radar, satellite or numerical weather prediction. It mostly extrapolates from what the airfield already reports, and its skill at storm onset is much lower than on overall occurrence.

Strong-wind events are rare in the test years, so those confidence intervals are wide, and the Brier improvement over persistence is not significant for wind. One model per target is shared across all six stations, with the station as a feature. Calibration is close to the diagonal for thunderstorms and noisy for wind, because there are so few wind events. One station, Kolkata, had 1,568 reports dropped for out-of-range pressure; the others lose far fewer. The map dashboard in the repository is an early prototype whose footer says it shows simulated data; the results above come from the evaluation, not from it.

Code

The pipeline, evaluation report and tests are on GitHub.