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

Calculate wind direction vectors from wind directions in degrees.


wd: numpy.ndarray

Wind direction array (any shape)

ws: float or numpy.ndarray

The wind speed. Has to broadcast against wd.

axis: int

Location where to insert the (x, y) dimension into the shape of wd


wdvec: numpy.ndarray

The wind direction vectors