windkit.metadata.create_coords

windkit.metadata.create_coords(data, dimname, meta)[source]

Create simple coordinate DataArray with metadata.

Parameters:
  • data (list or numpy.ndarray) – Data to fill the datarray with.

  • dimname (str) – Name of the dimension, also name of the key in metadata dict.

  • meta (dict) – dictionary containing metadata for the coordinate.

Returns:

DataArray containing the coordinate.

Return type:

xarray.DataArray