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.

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.

windkit.get_map(bbox[, dataset, band, source])

Download a map from the planetary computer or google earth engine.

map_conversion.lines2poly(line_gdf[, bbox, ...])

Convert a geodataframe of lines to a geodataframe of polygons.

map_conversion.poly2lines(poly_gdf[, ...])

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.


A collection of functions for working with geospatial object supported by WindKit.

spatial.BBox(ring, crs)

WindKit Bounding Box

spatial.add_crs(obj, crs)

Adds a Coordinate Reference System to a WindKit object.


Returns a object from object metadata.

spatial.crs_are_equal(obj_a, obj_b)

Check if CRS's of two WindKit objects are equal

spatial.mask(obj, mask[, all_touched, ...])

Mask WindKit object with geometric mask.

spatial.reproject(obj, to_crs[, copy])

Reprojects WindKit object a new CRS without changing the data.

spatial.clip(obj, mask[, all_touched, ...])

Clip object to mask.

spatial.warp(obj, to_crs[, resolution, ...])

Warp cuboid WindKit object to another in a new CRS using data interpolation.

spatial.create_dataset(west_east, ...[, ...])

Create a WindKit dataset given a set of locations.


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.histogram(ds[, style, color, weibull, ...])

Plot the histogram represented in a binned wind climate.

plot.histogram_lines(ds[, colors, gap])

Create a "distribution" plot and matching frequency wind rose for binned wind climate.


Wind turbine generator operational curves.

plot.raster_plot(da[, contour, ...])

Creates a raster map plot.

plot.roughness_rose(ds[, style, gap])

Create roughness rose plot.


Wind speed time-series plotting including wind speed and wind direction

plot.vertical_profile([da_meas, da_pred, ...])

Plots the vertical profile of the dataArray or dataArrays introduced.

plot.wind_rose(ds[, wind_speed_bins, style, ...])

Create wind rose plot.


Helper functions for colors and colormaps.

plot.landcover_map(gdf[, plot_endpoints, ...])

Plot the polygons or lines dataframe as a map.

Other data

Additional windkit functions.


Create empty datasets for various WindKit structures.


Wind Turbine classs defines the parameters of a certain type of wind turbine.


WAsP Workspace module.

Metadata handling

Functions to handle metadata.


Variable Metadata for CF Conventions