foxes.utils.wd2uv(wd, ws=1.0, axis=-1)[source]

Calculate wind vectors from wind directions in degrees.

Parameters

wd: numpy.ndarray

Wind direction array (any shape)

ws: float or numpy.ndarray

The wind speed. Has to broadcast against wd.

axis: int

Axis location where to insert the (u, v) components into the shape of wd

Returns

uv: numpy.ndarray

The wind vectors