Wind Climates#

Wind climates are representations of wind conditions at a location. WindKit supports several wind climate types, each suited for different purposes:

All wind climates can have any spatial structure (point, stacked_point, raster, cuboid).

Statistics#

WindKit provides functions to calculate common statistics from wind climate objects:

# Set up path to example data
path = wk.get_tutorial_data("serra_santa_luzia")

# Read a binned wind climate
bwc = wk.read_bwc(path / "bwc.omwc")

# Calculate mean wind speed
mean_ws = wk.mean_wind_speed(bwc)
print(f"Mean wind speed: {float(mean_ws):.2f} m/s")

# Calculate mean power density
mean_pd = wk.mean_power_density(bwc)
print(f"Mean power density: {float(mean_pd):.1f} W/m²")
Mean wind speed: 6.29 m/s
Mean power density: 261.4 W/m²

Note

The omni-directional statistics are returned by default. To return statistics by wind direction sector, use the argument bysector=True.

Weibull Fitting#

WindKit can fit Weibull parameters to the wind speed frequencies in a binned wind climate, transforming it into a Weibull wind climate:

# Fit Weibull distribution to binned wind climate
wwc = wk.weibull_fit(bwc)
print(wwc)
<xarray.Dataset> Size: 601B
Dimensions:       (sector: 12, point: 1)
Coordinates:
  * sector        (sector) float64 96B 0.0 30.0 60.0 90.0 ... 270.0 300.0 330.0
    sector_ceil   (sector) float64 96B 15.0 45.0 75.0 ... 285.0 315.0 345.0
    sector_floor  (sector) float64 96B 345.0 15.0 45.0 ... 255.0 285.0 315.0
    height        (point) float64 8B 25.3
    south_north   (point) float64 8B 41.74
    west_east     (point) float64 8B -8.823
    crs           int8 1B 0
Dimensions without coordinates: point
Data variables:
    wdfreq        (sector, point) float64 96B 0.05314 0.03321 ... 0.1148 0.0707
    A             (sector, point) float64 96B 5.47 5.346 5.746 ... 7.312 6.022
    k             (sector, point) float64 96B 1.924 2.145 2.594 ... 2.185 1.97
Attributes:
    Conventions:      CF-1.8
    history:          2026-01-29T09:30:13+00:00:\twindkit==2.0.1\tcreate_data...
    description:      SerraSantaluzia
    Package name:     windkit
    Package version:  2.0.1
    Creation date:    2026-01-29T09:30:15+00:00
    Object type:      Weibull Wind Climate
    author:           Default User
    author_email:     default_email@example.com
    institution:      Default Institution

The Weibull fit in WindKit uses the third moment of wind speed to preserve the mean power density.

Wind Data Functions#

Convert between wind speed/direction and U/V velocity components:

ws = np.array([5, 10, 15])  # Wind speed in m/s
wd = np.array([0, 45, 225])  # Wind direction in degrees

u, v = wk.wind_vectors(ws, wd)
print(f"U components: {u}")
print(f"V components: {v}")

ws_back, wd_back = wk.wind_speed_and_direction(u, v)
print(f"Converted back - WS: {ws_back}, WD: {wd_back}")
U components: [-0.         -7.07106781 10.60660172]
V components: [-5.         -7.07106781 10.60660172]
Converted back - WS: [ 5. 10. 15.], WD: [  0.  45. 225.]

Additional wind functions: