βοΈ Prediction Algorithms
The forecast system runs 8 core algorithm modules that transform raw sensor data into actionable session predictions. Each module is documented below with its inputs, logic, and outputs.
1. Wind Prediction
wind-prediction.mjs
The core wind forecast builds a per-hour prediction array by combining synoptic base wind with a thermal boost curve, modulated by cloud cover.
Synoptic Base Estimation
The synoptic base represents the "background" trade wind strength without any thermal effects. Estimated from three independent signals:
- Evening retention β wind speed after 6pm HST when thermals have died (pure synoptic)
- Upolu Airport β 100 miles upwind, no thermal contamination
- Buoy median β median of far-field NDBC buoys (51004, 51002, 51000)
Thermal Boost Model
The isthmus thermal adds wind on top of the synoptic base, following a predictable diurnal curve:
- Peak: 11:00β14:00 HST (maximum solar heating of the isthmus)
- Decay: Linear decline from 14:00 to zero by 19:00 HST
- Cloud modulation: Thermal boost is multiplied by
(1 - cloud_cover_pct/100)
βΉοΈ Live thermal indicator: The KanahaβAirport wind spread is a real-time thermal signal. When Kanaha reads >3 kts above Airport, the thermal is actively contributing. This is the fastest-updating confirmation of the thermal model.
Taper Prediction
The output is an array of per-hour wind predictions across the session window. Each hour combines: synoptic_base + thermal_boost(hour) Γ cloud_modifier(hour). The array is used downstream for equipment sizing and session window scoring.
2. Isthmus Thermal Model
isthmus-thermal.mjs
Models the thermal drive created by differential heating of the Maui isthmus versus the surrounding ocean.
Weighted Heat Index
7 WeatherFlow stations across the isthmus are combined into a single heat index using weighted averaging. Higher-weighted stations (Hansen Rd at 1.5, Kahului Airport at 1.2) are more representative of the thermal core.
Land-Sea Differential
The primary thermal driver is the temperature difference between the isthmus and ocean:
thermal_drive = isthmus_temp_weighted_avg - ocean_SST_pauwela Larger differential = stronger thermal wind acceleration through the isthmus.
Regime Classification
| Regime | Synoptic | Thermal | Result |
|---|---|---|---|
| calm | <5 kts | Weak | Not rideable |
| pure_sea_breeze | <8 kts | Strong | 12-15 kts β thermal only |
| light_trades | 8-12 kts | Active | 14-18 kts β trades + thermal boost |
| trades_plus_thermal | 12-18 kts | Active | 15-22 kts β sweet spot |
| trades_dominant | 18-25 kts | Minor | 20-28 kts β synoptic dominates |
| trades_overpowering | 25+ kts | Irrelevant | 28+ kts β survival conditions |
Venturi Detection
The isthmus acts as a venturi nozzle, compressing trade winds between Haleakala and the West Maui Mountains. Detected when:
Maalaea / Kanaha wind ratio > 0.8 β venturi active Active venturi means the isthmus compression is contributing to wind acceleration at Kanaha.
3. Windswell Analysis
windswell-analysis.mjs
Decomposes the wave field into windswell and groundswell components, then rates conditions for downwind foiling.
Swell Decomposition
| Type | Period | Source | Kanaha Effect |
|---|---|---|---|
| Windswell | 3β8 s | Local trade winds | Bumps for downwind foiling |
| Groundswell | 10β20 s | Distant North Pacific storms | Overhead waves, wave riding |
NE Fetch Model
When wind direction is NE, the fetch along Maui's north shore is maximized, producing well-organized windswell bumps ideal for downwind foiling. The analysis considers:
- Period β longer period windswell (6-8s) = more organized bumps
- Height β 0.5-1.5m windswell = optimal bump size
- Direction β NE direction = long fetch = best bump organization
All three factors combine into a downwind foiling rating.
4. Equipment Recommendation
equipment-rec.mjs
Translates wind predictions and tide data into specific gear recommendations for each session window.
Gust Factor Logic
β‘ Critical sizing rule: Kite size and line length are chosen for the GUST value (you must be able to handle the strongest wind). Front wing area is chosen for the STEADY value (you need enough lift in the average wind).
Mast Selection
Mast length is a safety-critical decision driven by reef depth during the session window:
reef_depth = 0.9m + (tide_ft Γ 0.3048)
safe_mast = reef_depth - 0.15m clearance The system iterates over the tide predictions during the session window and uses the minimum reef depth to select the appropriate mast (72cm, 85cm, 90cm, or 100cm).
Session Windows
Equipment recommendations are generated per 2-hour block within the day's session window. Each block gets its own wind prediction and may get different gear if conditions are expected to change significantly (e.g., early block uses 4.0m kite, later block uses 3.4m as thermal builds).
5. Rain & Precipitation
forecast-nws.mjs + pressure-meteo.mjs + buildPrecipSummary
Dual-source precipitation analysis combining NWS and Open-Meteo, with WMO weathercode shower detection and radar confirmation.
Dual-Source PoP
Probability of precipitation is averaged from both NWS gridpoint data and Open-Meteo forecasts. Neither source alone is reliable enough for Maui's microclimate.
Shower Detection
WMO weathercodes identify shower activity:
- Codes 80β82: Rain showers (slight/moderate/violent)
- Codes 85β86: Snow showers (rare at sea level)
- Codes 95β99: Thunderstorms
Rain Tier Classification
| Tier | PoP | QPF | Action |
|---|---|---|---|
| scattered | <40% | <5mm | Normal forecast β brief showers possible |
| moderate | 40β69% | 5β14mm | MRMS radar activated, rain warning |
| heavy | β₯70% | β₯15mm | Triage mode activates |
| storm | β₯80% | β | + severe WMO codes β triage mode |
6. North Pacific Swell Propagation
north-pacific-swell.mjs
Physics-based swell propagation model that tracks North Pacific storms and predicts when their energy arrives at Maui's north shore.
Group Velocity
Swell energy travels at the group velocity, which depends on wave period:
Cg = g Γ T / (4Ο) m/s Longer period swell travels faster β a 16-second swell moves nearly twice as fast as an 8-second swell.
Travel Time
travel_time = distance_nm / (Cg Γ 1.944 kts) Height Attenuation
Swell height decreases with distance from the storm as energy spreads radially:
height_at_maui β height_at_source Γ 1/sqrt(distance_ratio) Direction Filter
Only swell arriving from the NW-to-NE arc (270Β°β090Β° passing through north) activates the north shore. Swell from other directions is shadowed by the island.
Alert Levels
| Level | Threshold | Meaning |
|---|---|---|
| flat | <0.5m | No significant swell |
| small | 0.5β1.0m | Minor swell, small surf |
| fun | 1.0β2.0m | Good wave riding conditions |
| pumping | β₯2m @ 14s+ | Cancel plans β overhead+ surf |
| XXL | β₯3m @ 16s+ | Dangerous β expert only |
β‘ CANCEL PLANS: At "pumping" level (β₯2m @ 14s+), the forecast triggers a WAVE-EVENT verdict. This overrides normal session planning β overhead surf at Kanaha is rare and demands a different board, different spot, and full commitment.
7. 3-Day Outlook
three-day-outlook.mjs
Extends the forecast window to 3 days with coarser granularity, focused on session planning and triage detection.
Per-Day Analysis
- Session window inference β automatically set by day of week (Mon-Thu 12-4pm, Fri 12-5pm, Sat 11-5pm, Sun 11-4pm)
- Rain risk β aggregated precipitation probability per day
- Swell level β predicted groundswell height and period per day
Triage Detection
The 3-day outlook identifies:
- Cancel days β days with heavy rain or pumping+ swell
- Storm duration β how many consecutive days are affected
- Next clear session β first available session after the weather clears
Wave Event Verdict
When a "cancel plans" swell is predicted within the 3-day window, the system issues a WAVE-EVENT verdict. This signals that conditions are exceptional enough to reorganize your schedule around the swell.
8. Gust Ratio Analysis
The gust-to-steady wind ratio is the primary condition quality indicator. It directly affects ride comfort and safety.
| Ratio | Quality | Description |
|---|---|---|
| 1.0β1.2Γ | Smooth | Laminar flow β best conditions, consistent power |
| 1.2β1.35Γ | Moderate | Typical trade wind gusting β manageable |
| 1.35β1.5Γ | Gusty | Requires active kite management, fatiguing |
| 1.5Γ+ | Very Gusty | Anomaly fired β violent gusts, difficult riding |
βΉοΈ Why gust ratio matters more than wind speed: A steady 22 kts with 1.1Γ ratio is more enjoyable and safer than a gusty 16 kts with 1.5Γ ratio. The ratio determines how much the kite surges and lulls, which directly impacts control and fatigue. The system fires an anomaly alert when the ratio exceeds 1.5Γ.