WindKit API
The windkit
module contains several modules for reading and writing WAsP specific files, as well as performing common geospatial operations on these datasets. These are split into three groups, wind climate data, topographic data, and geospatial tools. You can find an introduction to each of these areas below.
Wind Climate objects
WAsP works with a number of different Wind Climate Objects, which each have their own API. All wind climates have an xarray.Dataset
backend that can be used to provide wind specific calculations.
Time series wind climate module |
|
Binned wind climate module |
|
Generalized wind climate module |
|
Weibull wind climate module |
Wind Climate tools
Tools to work with windkit wind climate objects.
Routines for working with the sector coordinate. |
|
Utility functions for Weibull distributions |
|
Utility functions for working with wind data |
|
Wind climate functions. |
|
Module for downloading wind time series and wind climates from models and observations. |
Topographic Data
Topographic Data provides the roughness and elevation data that is used to model the wind resource. The tools in WindKit allow you to work with both raster and vector based maps, and use the powerful GDAL library behind the scenes to enable a wide variety of file formats to be used.
Readers and writers for vectormap objects. |
|
Contains class and class methods to manipulate topographic raster files |
|
Module to handle elevation maps. |
|
Module to handle roughness maps. |
|
Class and associated class methods to work with landcover tables. |
|
|
Download a map from the planetary computer or google earth engine. |
|
Convert a geodataframe of lines to a geodataframe of polygons. |
|
Convert a geodataframe of polygons to a geodataframe of lines. |
Geospatial Tools
The WindKit Geospatial Tools allow you to perform common GIS functions such as convert between the different Geospatial structures, reproject or warp the data into common projections, and clip or mask the data based on additional data sources.
In addition to the provided tools, since WindKit stores its objects in the formats of powerful python libraries, you can also make use of additional geopandas functions for vector data, and additional xarray functions for raster data.
Throughout this documentation, the following abbreviations are used to reference different data types.
geodf - either a
geopandas.GeoDataFrame
orgeopandas.GeoSeries
xr_data - either an
xarray.DataArray
orxarray.Dataset
CRS -
pyproj.crs.CRS
A collection of functions for working with geospatial object supported by WindKit. |
|
|
WindKit Bounding Box |
|
Adds a Coordinate Reference System to a WindKit object. |
|
Returns a pyproj.crs.CRS object from object metadata. |
|
Check if CRS's of two WindKit objects are equal |
|
Mask WindKit object with geometric mask. |
|
Reprojects WindKit object a new CRS without changing the data. |
|
Clip object to mask. |
|
Warp cuboid WindKit object to another in a new CRS using data interpolation. |
|
Create a WindKit dataset given a set of locations. |
Plotting
WindKit Plotting allows you to execute a number of different plotting functions in order to visualize and analyze your data. Plots are largely broken into two categories; statistical and maps. Statistical plots are generally plotted using Plotly and Dash Python libraries at a single location, e.g. mast or turbine location, while maps use geopandas and xarray functions directly to show an overview of the area.
Plotting functionality for WindKit objects |
|
|
Plot the histogram represented in a binned wind climate. |
|
Create a "distribution" plot and matching frequency wind rose for binned wind climate. |
Wind turbine generator operational curves. |
|
|
Creates a raster map plot. |
|
Create roughness rose plot. |
Wind speed time-series plotting including wind speed and wind direction |
|
|
Plots the vertical profile of the dataArray or dataArrays introduced. |
|
Create wind rose plot. |
Helper functions for colors and colormaps. |
|
|
Plot the polygons or lines dataframe as a map. |
Windkit’s wind turbine API has routines to load both wind turbine generator power curves, and to create layouts of wind farms.
Wind Turbine classs defines the parameters of a certain type of wind turbine. |
|
Defines a wind_turbines object |
Long Term Correction
Windkit allows to perform long term correction for wind time series using linear regresion or the variance ratio method.
Measure-Correlate-Predict MCP Module. |
|
Implements different regression methods to be used for the long term correction. |
|
Functions to calculate common scoring metrics to be used on windkit time series wind climate datasets. |
Other data
Additional windkit functions.
Create empty datasets for various WindKit structures. |
|
WAsP Workspace module. |
Metadata handling
Functions to handle metadata.
Variable Metadata for CF Conventions |