windkit.io.wasp.read_tab#

windkit.io.wasp.read_tab(filepath, encoding='infer')[source]#

Read a .tab file and return parsed data with normalized frequencies.

Parameters:
  • filepath (str or Path) – Path to the .tab file.

  • encoding (str, optional) – File encoding. If “infer”, the encoding is detected automatically. Defaults to “infer”.

Returns:

Dictionary with keys: - “wsfreq”: ndarray(n_wsbins, n_sectors) - wind speed frequencies (0-1) - “wdfreq”: ndarray(n_sectors) - wind direction frequencies (0-1) - “wsbins”: ndarray(n_wsbins+1) - wind speed bin edges - “coords”: dict with “south_north”, “west_east”, “height” - “metadata”: dict with “description”

Return type:

dict

Raises:

ValueError – If the tabfile type is not supported or encoding cannot be detected.