windkit.io.wasp.read_lib#
- windkit.io.wasp.read_lib(filepath, encoding='infer')[source]#
Read a WAsP .lib file and return parsed data.
- Parameters:
- 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:
- Raises:
WindkitFileFormatError – If the encoding cannot be detected; if the header line does not hold three integers; if a roughness, height, row or
<coordinates>value is not a number; if the file ends before a row is complete; if a row holds more values than the header declares; or if the first generalized roughness is not 0.0.