windkit.sector.create_direction_coords

windkit.sector.create_direction_coords(nsec=None, direction=None)[source]

Create wind direction coordinate as a DataArray

Wind direction coordinates use “sector” as their dimension, but represent a single wind direction rather than a sectoral region.

Parameters:
  • nsec (int, optional) – Number of sectors to create, by default None. If None, direction must be specified.

  • direction (float, optional) – Wind direction to set, by default None. If None, nsec must be specified.

Returns:

dir_da – Data array with direction coordinates.

Return type:

xarray.DataArray