windkit.read_gwc

windkit.read_gwc(filename, *, crs=None, west_east=None, south_north=None, height=None, description=None, file_format='infer', **kwargs)[source]

Create gwc xarray.Dataset from file.

Parameters:
  • file (str or Path) – Path to a file that can be opened a gwc. This includes .lib, and .gwc files that were created as gwc files. The script will use the file extension to determine the file type and then parse it into a gwc object.

  • crs (int, dict, str or pyproj.crs.CRS) – Value to initialize pyproj.crs.CRS Defaults to 4326 (Lat-Lon on the WGS84 geodetic datum). for .lib and .gwc.

  • west_east (float or None, optional) – West-East coordinate of the GWC grid, by default None, which will attempt to read from the file.

  • south_north (float or None, optional) – South-North coordinate of the GWC grid, by default None, which will attempt to read from the file.

  • height (float or None, optional) – Height coordinate of the GWC grid, by default None, which will attempt to read from the file.

  • description (str or None, optional) – Header string to use for .lib and .gwc files, by default None, which will attempt to read from the file.

  • file_format (str) – File format to read. Supported formats are ‘lib’, ‘gwc’, and ‘nc’. Default value is ‘infer’ which will infer the file format from the file extension.

  • **kwargs (dict)

Returns:

Generalized wind climate dataset.

Return type:

xarray.Dataset

Raises:
  • ValueError – If the file extension is not recognized.

  • ValueError – If the requested crs does not match the dataset crs.