Note
Go to the end to download the full example code.
BWC to WWC
This example demonstrates how to convert a binned wind climate (BWC) object
to a weibull wind climate (WWC) object using the weibull_fit()
function from the
WindKit library.
Get Sample Data
First, we fetch some sample data from the Serra Santa Luzia case.
Downloading SerraSantaLuzia.zip from Zenodo...
Downloaded SerraSantaLuzia.zip to /root/.local/share/windkit/tutorial_data/serra_santa_luzia/SerraSantaLuzia.zip
<xarray.Dataset> Size: 4kB
Dimensions: (point: 1, sector: 12, wsbin: 32)
Coordinates:
height (point) float64 8B 25.3
crs int8 1B 0
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
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
* sector (sector) float64 96B 0.0 30.0 60.0 90.0 ... 270.0 300.0 330.0
west_east (point) float64 8B 5.147e+05
south_north (point) float64 8B 4.621e+06
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: 2025-04-27T14:55:55+00:00:\twindkit==0.8.2.dev22+g4fd01...
description: SerraSantaluzia
Package name: windkit
Package version: 0.8.2.dev22+g4fd0143
Creation date: 2025-04-27T14:55:55+00:00
Object type: Binned Wind Climate
author: Bjarke Tobias OLsen
author_email: btol@dtu.dk
institution: DTU Wind Energy
Convert BWC to WWC
Now, we can convert the binned wind climate (BWC) object to a weibull wind climate (WWC) object
<xarray.Dataset> Size: 601B
Dimensions: (sector: 12, point: 1)
Coordinates:
height (point) float64 8B 25.3
crs int8 1B 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
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
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: 2025-04-27T14:55:55+00:00:\twindkit==0.8.2.dev22+g4fd01...
description: SerraSantaluzia
Package name: windkit
Package version: 1.0.2
Creation date: 2025-07-21T09:49:26+00:00
Object type: Weibull Wind Climate
author: Default User
author_email: default_email@example.com
institution: Default Institution
Total running time of the script: (0 minutes 3.035 seconds)