windkit.io.windio.bwc_to_windio#
- windkit.io.windio.bwc_to_windio(bwc, level='plant')[source]#
Convert windkit Binned Wind Climate to windIO data structure.
Warning
windIO support is experimental. API may change in future versions.
Handles both point and stacked_point spatial structures. For stacked_point datasets (with height dimension), the height information is preserved in the windIO output.
- Parameters:
bwc (xarray.Dataset) – Binned Wind Climate dataset with point or stacked_point structure.
level (str) –
Export level controlling what part of the windIO structure to return. Options:
’plant’: Complete plant structure (default)
’site’: Site dict with boundaries and energy_resource
’energy_resource’: Energy resource dict with wind_resource
’wind_resource’: Just the wind_resource dict with climate data
- Returns:
Dictionary at the specified level of the windIO schema structure.
- Return type:
- Raises:
ValueError – If level is not one of the valid options.
Examples
>>> import windkit as wk >>> from windkit.io.windio.translate import bwc_to_windio >>> bwc = wk.read_bwc("histogram.tab", crs="EPSG:4326") >>> >>> # Full plant structure (default) >>> plant_data = bwc_to_windio(bwc) >>> >>> # Just the wind_resource dict >>> wind_resource = bwc_to_windio(bwc, level="wind_resource")