foxes.utils.wind_dir.wd2uv

foxes.utils.wind_dir.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 – The wind vectors

Return type:

numpy.ndarray