A wave on the open ocean already has energy; what matters at the break is how the wind interacts with the wave face as it stands up and peels. Offshore wind pushes against the face, holding it upright and suspending the moment of pitching. Onshore wind does the opposite — pushes the top of the wave over before the face has built, crumbling it into mush.
Not all wind is a clean on/off binary. Wind parallel to the beach is cross-shore or sideshore. A cross-shore from one angle might be half-offshore at a wedging peak and half-onshore at a straight section of beach a few yards away. Experienced surfers read the wind bearing relative to the break’s specific orientation, not just the beach at large.
Most coastal spots are glassy at dawn because overnight land cooling produces a light offshore (air flows downhill from cool land to relatively warmer sea). As the land heats through the day, the gradient reverses and onshore wind fills in. This is why surfers are early people: the cleanest version of most days happens before 9am.
To classify wind as offshore/onshore you need the bearing the coastline runs at for the specific break. West-facing California coast: east wind = offshore. East-facing Atlantic coast: west wind = offshore.
LazySurfer pulls wind speed and wind direction from NWS wind stations near each spot and feeds both into the Similarity Score. Because the model is per-surfer, it learns your personal wind tolerance — some surfers rate sessions 9/10 in 15kt offshore, others prefer 5kt of anything.