Wind Climates#
Wind climates are central to resource assessment in PyWAsP. They represent wind speed and direction distributions at locations of interest.
See also
- Wind Climates
Overview, statistics, and Weibull fitting.
- Time Series Wind Climate (TSWC)
Time Series Wind Climate - schema, I/O, creation.
- Binned Wind Climate (BWC)
Binned Wind Climate - schema, I/O, creation.
- Weibull Wind Climate (WWC)
Weibull Wind Climate - schema, I/O, creation.
- Generalized Wind Climate (GWC)
Generalized Wind Climate - schema, I/O, creation.
PyWAsP builds on WindKit’s wind climate support, adding terrain-aware processing through the WAsP flow model. This page covers PyWAsP-specific workflows.
In [1]: import pywasp as pw
In [2]: import windkit as wk
In [3]: import xarray as xr
Geospatial transforms for wind climates#
WindKit's spatial module makes it easy to work with geospatial data
and to perform typical transforms, such as reprojection, spatial clipping, and spatial masking.
To illustrate this, let’s read a binned wind climate and transform it from lat-long coordinates to UTM 29N coordinates:
In [4]: bwc = wk.read_bwc("source/tutorials/data/SerraSantaLuzia.omwc", crs="EPSG:4326")
In [5]: bwc = wk.spatial.reproject(bwc, to_crs="EPSG:32629")
In [6]: print(bwc)
<xarray.Dataset> Size: 4kB
Dimensions: (point: 1, sector: 12, wsbin: 32)
Coordinates:
height (point) float64 8B 25.3
west_east (point) float64 8B 5.147e+05
south_north (point) float64 8B 4.621e+06
* 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
* wsbin (wsbin) float64 256B 0.5 1.5 2.5 3.5 ... 28.5 29.5 30.5 31.5
wsceil (wsbin) float64 256B 1.0 2.0 3.0 4.0 ... 29.0 30.0 31.0 32.0
wsfloor (wsbin) float64 256B 0.0 1.0 2.0 3.0 ... 28.0 29.0 30.0 31.0
crs int8 1B 0
Dimensions without coordinates: point
Data variables:
wdfreq (sector, point) float64 96B 0.05314 0.03321 ... 0.1148 0.0707
wsfreq (wsbin, sector, point) float64 3kB 0.02601 0.04219 ... 0.0 0.0
Attributes:
Conventions: CF-1.8
history: 2026-01-29T14:40:58+00:00:\twindkit==2.0.0\tcreate_data...
description: SerraSantaluzia
Package name: windkit
Package version: 2.0.0
Creation date: 2026-01-29T14:40:58+00:00
Object type: Binned Wind Climate
author: Neil Davis
author_email: neda@dtu.dk
institution: DTU Wind and Energy Systems
Note
Note that the west_east and south_north coordinate values change after reprojection.
To set and get the crs of an object, use windkit.spatial.set_crs() and windkit.spatial.get_crs().
Using wind climates as site objects in PyWake#
PyWAsP wind climate objects can be used as site objects for wind farm flow modeling in PyWake.
This is done by instantiating an XRSite using the py_wake.Site.XRSite.from_pwc() method.
# First get a Weibull wind climate
In [7]: wwc = wk.weibull_fit(bwc)
In [8]: import py_wake
In [9]: site = py_wake.site.XRSite.from_pwc(wwc)
In [10]: print(site.ds)
<xarray.Dataset> Size: 832B
Dimensions: (i: 1, wd: 13, ws: 23)
Coordinates:
h (i) float64 8B 25.3
x (i) float64 8B 5.147e+05
y (i) float64 8B 4.621e+06
* wd (wd) float64 104B 0.0 30.0 60.0 90.0 ... 300.0 330.0 360.0
* ws (ws) int64 184B 3 4 5 6 7 8 9 10 ... 19 20 21 22 23 24 25
Dimensions without coordinates: i
Data variables:
Sector_frequency (i, wd) float64 104B 0.05314 0.03321 ... 0.0707 0.05314
Weibull_A (i, wd) float64 104B 5.47 5.346 5.746 ... 7.312 6.022 5.47
Weibull_k (i, wd) float64 104B 1.924 2.145 2.594 ... 1.97 1.924
Speedup (i, wd) float64 104B 1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
TI (i, wd) float64 104B 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
Attributes:
Conventions: CF-1.8
history: 2026-01-29T14:40:58+00:00:\twindkit==2.0.0\tcreate_data...
description: SerraSantaluzia
Package name: windkit
Package version: 2.0.0
Creation date: 2026-01-29T14:40:59+00:00
Object type: Weibull Wind Climate
author: Neil Davis
author_email: neda@dtu.dk
institution: DTU Wind and Energy Systems
sector_width: 30.0
Spatial inhomogeneity can be taken into account in PyWake by speedup and turning variables in the site object.
These variables track the relative speed-up and turning of the wind in the spatial domain during the wind farm flow modeling.
The py_wake.Site.XRSite.from_pwc() method can take different speedup arguments for specifying the way to calculate speed-ups
between spatial points. By default, the “park” method is used, which calculates the sector-wise speed-ups relative
to the maximum mean wind speed in that sector.
Depending on how the speed-up is defined/calculated in the PyWake site object, the post-processing, or aggregation, of wind farm flow results should take this into account.