windkit.Workspace#

class windkit.Workspace(tree, path)[source]#

Workspace class for interacting with WAsP workspace XML files

Objects in the workspace are addressed by their integer ID in catalogue. Printing the workspace lists the IDs, object descriptions and names of all objects as a tree, and get_ids() finds them by object description and name. A getter called without an ID reads the only object of its kind in the workspace. Positions come from the workspace itself, and so does their CRS: the one the vector maps of the object’s WAsP project state, else the one all vector maps of the workspace state. Every getter that returns positions takes a crs argument for a workspace that states none, which also overrides a stated CRS with a warning. Besides the inputs (observed and generalised wind climates, vector maps, turbine positions), the results WAsP stored in the workspace can be read: predicted wind climates, site effects, annual energy production and the Weibull fit of the observed wind climate. These are WAsP’s values as stored, parsed without rounding by windkit.io.wasp.wwh.

Parameters:
  • tree (lxml.etree._ElementTree) – WAsP workspace XML tree

  • path (str or Path) – File path.

Methods

__init__(tree, path)

get_aep([ID, crs])

Annual energy production WAsP stored for a turbine site, or for the turbine sites of a group.

get_air_density_reference([ID, crs])

Reference values behind WAsP's air density, at a generalised wind climate.

get_elevation_map([ID, crs])

Extracts elevation map from WWH and creates VectorMap object.

get_gwc([ID, crs, west_east, south_north, ...])

Generalised wind climate stored in the workspace.

get_ids(object_description)

IDs of the objects of a kind.

get_member(ID)

Parsed data of an object, as plain dicts of numpy arrays.

get_mesoclimate([ID, crs])

Mesoscale climate WAsP generalised with, at a generalised wind climate.

get_object(ID[, map_type, crs])

Extracts object from .wwh file.

get_owc([ID, crs])

Observed wind climate of a met station, as a binned wind climate.

get_owc_weibull_fit([ID, crs])

WAsP's Weibull fit of the observed wind climate at a met station.

get_parameters([ID])

WAsP parameters stored in the workspace.

get_roughness_map([ID, crs, ...])

Extracts vector map from WWH and creates VectorMap object.

get_site_effects([ID, crs])

Site effects WAsP stored for a site, or for the turbine sites of a group.

get_turbines([ID, crs])

Extracts turbine positions from WWH and creates WindKit xarray DataArray.

get_wtg([ID, regulation_type])

Wind turbine generator stored in the workspace.

get_wwc([ID, crs])

Predicted wind climate WAsP stored for a site, or for the turbine sites of a group.

read_wwh(path)

Instantiated Workspace class using WAsP Workspace Hierarchy (WWH) file.