windkit.generalized_wind_climate.read_gwc

windkit.generalized_wind_climate.read_gwc(file_or_obj, crs=None, west_east=None, south_north=None, height=None, header=None)[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, .gwc, and .nc 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.

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

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.