Bin ERA5-style eastward (u) and northward (v) wind
components into the ws / wd / probab table that
windata_format() and genetic_algorithm() expect.
Direction is meteorological (where the wind comes from; 0 = north).
Each direction bin gets the mean speed and the hour share.
Usage
wind_from_uv(u, v, dir_width = 30)
Value
A data.frame with ws, wd, probab (probabilities sum to 100).
Arguments
u
Eastward wind component (m/s). Same length as v.
v
Northward wind component (m/s).
dir_width
Width of direction bins in degrees. Default is 30.