windkit.Workspace.get_turbines#

Workspace.get_turbines(ID=None, crs=None)[source]#

Extracts turbine positions from WWH and creates WindKit xarray DataArray.

The positions are in the CRS the workspace states for the turbine site group.

Parameters:
  • ID (int, optional) – ID of turbine site group object to be converted. Defaults to None, which reads the only turbine site group in the workspace.

  • crs (int, dict, str or pyproj.crs.CRS, optional) – CRS of the positions, for a workspace that states none. Overrides the stated CRS, with a warning. Defaults to None.

Returns:

WindKit formated zero-filled data array with point dimension

Return type:

xarray.DataArray

Raises:

ValueError – If the ID does not exist or is not linked to a turbine site group, ID is None and the workspace holds no or several turbine site groups, or neither the workspace nor crs gives a CRS.

Warns:

UserWarning – If crs differs from the CRS the workspace states.