Reading windIO Files#
Reading Plant and Turbine Files#
from windkit.io.windio import read_plant, read_turbine
plant_data = read_plant("my_plant.yaml") # Returns nested dictionary
turbine_data = read_turbine("IEA-15-240-RWT.yaml")
!include directives are preserved as markers rather than immediately resolved.
All *_from_windio translation functions automatically resolve any remaining
markers, so you can pass an unresolved plant dict directly to a translator:
plant_data = read_plant("my_plant.yaml") # markers preserved
wwc = wwc_from_windio(plant_data, crs="EPSG:32632") # markers auto-resolved
Reading Partial Files#
For standalone files (not full plant structures), use convenience readers that wrap them for use with translation functions:
from windkit.io.windio import read_wind_resource, read_layout, wwc_from_windio
# Wind climate from standalone file
plant_data = read_wind_resource("wind_resource.yaml")
wwc = wwc_from_windio(plant_data, crs="EPSG:32632")
# Turbine layout from standalone file
plant_data = read_layout("layout.yaml")
Available readers: read_site, read_energy_resource, read_wind_resource,
read_wind_farm, read_layout.
Resolving Include Directives#
from windkit.io.windio import resolve_includes
plant_data = resolve_includes("my_plant.yaml") # Expands all !include refs
Handles relative paths, nested includes, and NetCDF references (.nc files).
Note
All *_from_windio translation functions (wwc_from_windio,
bwc_from_windio, tswc_from_windio, wind_turbines_from_windio,
wtg_from_windio, wtg_dict_from_windio, wtg_from_windio_turbine)
automatically detect and resolve !include markers. Explicit resolution
with resolve_includes is only needed if you want to inspect the fully
expanded dict before passing it to a translator.
CRS Handling#
windIO lacks CRS metadata. Provide it when translating:
wwc = wwc_from_windio(plant_data, crs="EPSG:32632") # UTM zone 32N
wwc = wwc_from_windio(plant_data, crs=4326) # WGS84 lat/lon