
Overview
The real problem
How the score works
100 · size · (0.4 + 0.6·period) · (0.15 + 0.85·wind) · tide · rain · daylight
- Size is not the raw model height. Each swell train is scaled by exposure — full marks inside the spot's swell window, fading to zero as the angle moves 30° outside it, and reduced further when the swell arrives obliquely. The exposed swell is turned into a breaking height (using the Komar and Gaudiano 1983 relation), combined across trains by energy, and compared to the spot's ideal wave.
- Wind is weighted by how onshore it is relative to the direction the beach faces. Onshore wind counts almost fully against the score; offshore barely touches it.
- Tide compares the INOCAR stage to the surrounding hours and matches it to the spot's preferred tide. It softens a score but never zeroes it.
- A separate beach-day score is a weighted geometric mean of calm water, light wind, no rain, sun and warmth, times daylight — because "nice day at the beach" and "good surf" are different questions.
- INOCAR alerts override everything: a rough-sea alert caps the score, a very-rough alert all but zeroes it, and those hours are never suggested as "best".
The interface
The part that makes it real: the field log
What the data actually showed
- INOCAR's 2026 tides exist as open data — an hourly CSV in local time — but cover nine stations, not the twenty-five you might assume. La Libertad is the nearest to both spots. Open-Meteo's own modelled tide matches the phase to within about an hour but overshoots the range, so the official INOCAR data wins.
- The marine model grid is coarse — about nine kilometres — and land cells return nothing, so the app deliberately snaps each spot to a sensible ocean cell rather than the merely nearest one.
- The models disagree a lot near the coast. On an early run, Montañita's predicted daily peak ranged from 37 to 77 depending on the model combination. One model called the primary swell a short-period wind sea while another reported a long-period groundswell for the very same hour. Midday wind ranged from 6 to 20 km/h across models. That disagreement is precisely what the field log is there to settle — and precisely why a single-number forecast for this coast would be a confident lie.
Technologies used
- Framework: Next.js 16 (App Router, static pages refreshed on a 3-hour interval) and React 19.
- Map: MapLibre GL with OpenFreeMap tiles — no API key, commercial use allowed.
- Charts: ECharts, tree-shaken, for the meteogram, timeline and swell rose.
- Data: Open-Meteo marine and weather models (all combinations fetched in one batched call), INOCAR tide CSVs, INOCAR sea-state alerts.
- Styling: plain CSS custom properties with light and dark themes.
- Testing: Vitest across the scoring and the tide parser.
- Tooling: a command-line "spike" that prints the hourly table for any spot and model combination and dumps every hour to CSV, so the model comparison can be run without the browser.
