windkit.Workspace.get_gwc#
- Workspace.get_gwc(ID=None, crs=None, west_east=None, south_north=None, height=None, description=None)[source]#
Generalised wind climate stored in the workspace.
The position is that of the met station the generalised wind climate holds in the workspace tree, at its working height, in the CRS the workspace states for it, and the description is the met station’s name. A generalised wind climate without a met station, e.g. one imported from a file, is placed at the latitude and longitude it stores (EPSG:4326) at 0 m, with its own description.
- Parameters:
ID (int, optional) – ID of a generalised wind climate. Defaults to None, which reads the only generalised wind climate in the workspace.
crs (int, dict, str or pyproj.crs.CRS, optional) – CRS of the position, for a workspace that states none. Overrides the stated CRS, with a warning. With
west_eastandsouth_north, the CRS they are in. Defaults to None.west_east (float, optional) –
Position to place the generalised wind climate at instead, in
crsor the CRS the workspace states. Give both or neither.Deprecated since version 2.2.0: Will be removed in windkit 3.0. Assign the coordinates of the returned dataset instead.
south_north (float, optional) –
Position to place the generalised wind climate at instead, in
crsor the CRS the workspace states. Give both or neither.Deprecated since version 2.2.0: Will be removed in windkit 3.0. Assign the coordinates of the returned dataset instead.
height (float, optional) –
Height to place the generalised wind climate at instead.
Deprecated since version 2.2.0: Will be removed in windkit 3.0. Assign the coordinate of the returned dataset instead.
description (str, optional) –
Description to give the generalised wind climate instead.
Deprecated since version 2.2.0: Will be removed in windkit 3.0. Set the attribute of the returned dataset instead.
- Returns:
xarray Dataset that is formatted to match the gwc description.
- Return type:
- Raises:
ValueError – If the ID does not exist or is not linked to a generalised wind climate, or ID is None and the workspace holds no or several generalised wind climates.
ValueError – If the generalised wind climate holds several met stations, has a met station but neither the workspace nor
crsgives a CRS, or has no met station and stores no position; or if only one ofwest_eastandsouth_northis given.
- Warns:
FutureWarning – If
west_east,south_north,heightordescriptionis given.UserWarning – If the generalised wind climate has no met station, so its height is set to 0 m.
UserWarning – If
crsdiffers from the CRS the workspace states.UserWarning – If WAsP marked the generalised wind climate as not up to date.