Chapter 36 Instructor Notes — Weather Analytics

Chapter: Weather Analytics: Rain Probability, Track Temperature, Wind, and How Conditions Shape Performance · Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Discussion guide

Chapter 36 takes the one weather station OpenF1 provides (a reading a minute, no radar, no forecast) and asks what it can honestly tell a strategist. The answers are a mix of small real effects, surprising null results and one strong one. Track temperature raises tyre wear a little; the station wind does not show up in the speed traps; rain is persistent and the weekend forecasts Sunday; rain more than doubles the safety-car hazard. The chapter then prices the early switch to intermediates as an expected-value bet and reruns Anchor C (Singapore) with showers. Students build the conditions.py module of Box Box, which adds weather scenarios to the simulator.

Learning objectives

By the end of the session, students should be able to:

  1. List what an OpenF1 weather record contains and what it cannot see, and clean track-temperature dropouts before summarising.
  2. Explain why track temperature follows the sun more than the air, using the track-minus-air excess by hour.
  3. Estimate the within-circuit effect of track temperature on degradation, and state which fuel correction it uses.
  4. Explain why a null result for wind in the speed traps does not prove wind has no effect.
  5. Use the weekend's earlier sessions and a rain-persistence model to forecast rain, and explain why a one-minute Markov chain under-predicts persistence.
  6. Price a pre-emptive switch to intermediates as $pG - (1-p)C$ and find its break-even probability.
  7. Explain why a shower forecast pushes the dry stop later in the Singapore Monte Carlo.

Threshold concept

This chapter has no designated threshold concept. It carries the 🪞 Learning check-in for Part VI: students rank five weather effects by how much they matter to a race strategy, using the numbers rather than intuition, and say which they would trust in a simulator. Give five minutes to it; expect some students to rank wind and temperature above rain-driven safety cars, which the numbers do not support.

Suggested 75-minute session plan

Time Segment What happens
0–8 min Hook Ask the class to guess the range of race-day track temperatures in 2023–26. Reveal: 13.7 °C (2026 Las Vegas) to 54.9 °C (2026 Italian GP). Then ask whether a 41 °C difference should change the strategy.
8–22 min Concept The sun, not the air: track excess 17.3 °C at 13:00, 4.3 °C after 19:00, 5.0 °C under rain. Degradation: +0.017 s/lap per 10 °C within circuit (95% CI +0.008 to +0.026), using the toolkit's standard fuel correction (100 kg, 0.03 s/kg). +5 °C over a 25-lap stint ≈ 2.5 s.
22–40 min Live demo Run code/06_early_inters_ev.py (about 20 s). Show the lopsided bet: going early gains about a second if the rain comes and costs 35.7 s if it does not, so in this model it never pays on average. Then show code/05_output.txt: wet laps start an SC, VSC or red flag 2.38 times as often (1.30–4.34).
40–58 min Activity Pairs work B5 (the early-switch bet) and B1 (extra stint time), then D3 (a forecast at Singapore, lap 30) with the reveal closed.
58–75 min Wrap-up The 🪞 Learning check-in (five minutes). Exit ticket: "Which weather input would you add to a simulator first, and why?"

Key numbers students should leave with

  • The station: 52,954 records in 470 sessions, about one a minute. 45 track readings at or below 0 °C (44 outside testing) are dropouts.
  • Track excess: 17.3 °C at 13:00; 4.3 °C after 19:00; races cool by a median 2.0 °C from start to finish (dry, n = 78).
  • Temperature and wear: +0.0169 s/lap per 10 °C within circuit with the standard fuel correction, +0.0195 with the data-driven one. Most circuits need 15 °C or more to cross the one-stop/two-stop line; only seven sit within ±12 °C.
  • Wind: −0.084 km/h per m/s of "headwind" [−0.209, +0.045] across 249,216 lap-trap readings, against a physics benchmark of −2.4. The OpenF1 location frame cannot be confirmed as north-up.
  • Rain persistence: raining now → still flagged 30 minutes later 45.7% of the time (Markov chain: 7.1%). Earlier-session rain → wet race 35.1% vs 14.8%.
  • Track temperature forecast: from qualifying, MAE 4.6 °C; from last practice 7.3 °C.
  • Rain and safety cars: hazard ratio 2.38 (1.30–4.34), wet vs dry laps.
  • Early inters 🧪: costs 35.7 s (lap 20) to 42.1 s (lap 45) if the rain does not come; break-even near 92–95% even for heavy showers.
  • Singapore with showers 🧪: best plan is the latest soft stop (lap 37); at a 60% rain chance, staying on slicks beats reacting at the crossover by 17.7 s in moderate showers.
  • Friday's forecast: FP2 overstates race degradation by a median 0.072 s/lap; adjusting for temperature makes it slightly worse.

Common misconceptions and remedies

Misconception Remedy
"Rain flag = wet track." The flag is the station; the Chapter 15 wetness gauge reads the water from lap times. The 2025 Belgian GP had 102 rain records but few wet laps (exercise C6).
"Temperature doesn't matter: the across-circuit fit is not significant." Compare within circuit. Circuits differ in surface and layout far more than in temperature.
"A degradation number is a degradation number." Always state the fuel correction: standard, data-driven or raw. Raw 2025 Suzuka slopes were all negative.
"No wind effect means wind doesn't matter." One station, an unconfirmed map frame and trap locations all blur the signal. A null result is not a zero.
"Pit for inters the moment the crossover arrives." A crossover is necessary, not sufficient: the remaining gain must repay two stops.
"Correct Friday's long runs for temperature." The Friday error is not the temperature; adjusting increased squared error by 9.6%.

Exercises to assign

  • Core (everyone): Part A — A2, A4, A7, A9; Part B — B1, B2, B5.
  • Code lab: Part C — C1 (2026 Monaco race cooling) and C6 (the 2025 Belgian GP rain flag). Add C4 (locate the traps on 2025 Suzuka qualifying) for engineering students.
  • Judgment: Part D — D3 (a forecast at Singapore) and D4 (wind as a setup variable).
  • Stretch: Part E — E2 (orient the map) or E1 (a real forecast source).
  • Interleaving: Part M — M2 with Chapter 14 (Anchor C under rain) and M4 with Chapter 15 (two crossover rules).

Lab tips

  • Run order: 01 → 02 → (03, 04, 05) → 06 / 07 → case studies. 01_weather_anatomy.py (about 7 s) writes _cache/race_conditions.parquet, read by 02 and 04; 02_track_temp_and_deg.py (about 15 s first run) caches stint degradation for both case studies; 05_rain_and_safety_cars.py caches the race summary read by 07.
  • Runtime: 03_wind_speed_traps.py takes 3–5 minutes on its first run while it locates the speed traps; build its cache before class. 06 takes about 20 s and 07 about 35 s. Outputs are saved as code/*_output.txt.
  • Gotcha — dropouts: the laps table's weather columns carry the same ≤ 0 °C dropouts (merged from the nearest record). Apply the dropout rule to lap-level temperatures too.
  • Gotcha — missing session: f1data.laps() raises DataMissingError for 2025 Azerbaijan qualifying (listed, no laps). Wrap loops in a try/except.
  • Gotcha — compass bearings: any student work that turns x/y into a bearing must carry the caveat that the frame's orientation is undocumented.
  • The Singapore Monte Carlo is single-car (no traffic or track position) and the shower shape is 🧪. Say so whenever its numbers are quoted.

Connections

  • Backward: Chapter 4 and Chapter 5 (the tyre window); Chapter 14 (SC hazard and Anchor C); Chapter 15 (the wetness gauge and switch decision); Chapter 22 (degradation and fuel correction).
  • Forward: Chapter 37 adds the other random events (failures and penalties). The capstone, Chapter 40, can import conditions.sample_weather_scenario and the wet hazard ratio.