windkit.io.windio.wwc_to_windio#
- windkit.io.windio.wwc_to_windio(wwc, level='plant')[source]#
Convert windkit Weibull 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:
wwc (xarray.Dataset) – Weibull 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 wwc_to_windio >>> wwc = wk.read_wwc("resource.rsf", crs="EPSG:32632") >>> >>> # Full plant structure (default) >>> plant_data = wwc_to_windio(wwc) >>> >>> # Just the wind_resource dict >>> wind_resource = wwc_to_windio(wwc, level="wind_resource") >>> >>> # Energy resource level for modular files >>> energy_resource = wwc_to_windio(wwc, level="energy_resource")