windkit.io.wasp.read_lib#

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

Read a WAsP .lib file and return parsed data.

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

  • encoding (str, optional) – File encoding. If "infer" (default), the encoding is detected automatically.

Returns:

Dictionary with keys:

  • "A" : ndarray, shape (n_sectors, n_heights, n_roughnesses)

  • "k" : ndarray, same shape as A

  • "wdfreq" : ndarray, shape (n_sectors, n_roughnesses), normalized values (0-1)

  • "gen_roughness" : ndarray, shape (n_roughnesses,)

  • "gen_height" : ndarray, shape (n_heights,)

  • "coords" : dict with "west_east", "south_north", "height" (values are None when the file has no <coordinates> tag)

  • "metadata" : dict with "description"

Return type:

dict