windkit.wwc_to_file#
- windkit.wwc_to_file(wwc, filename, *, file_format='infer', **kwargs)[source]#
Write a weibull wind climate dataset to a file.
- Parameters:
wwc (xarray.Dataset) – Weibull wind climate dataset.
filename (str or pathlib.Path) – Path to the file to write the dataset to.
file_format (str) – File format of the file. If “infer”, the file format is inferred from the file extension. Supported file formats are “rsf”, “wrg”, “nc”, and “yaml” (windIO). Defaults to “infer”.
**kwargs – Additional keyword arguments passed to the write function For windIO format, the level can be specified via the ‘level’ keyword argument (e.g. level=’plant’, level=’site’, level=’energy_resource’, or level=’wind_resource’).
Examples
>>> import windkit as wk >>> # Write to .rsf file >>> wk.wwc_to_file(wwc, "output.rsf") >>> # Write to .wrg file >>> wk.wwc_to_file(wwc, "output.wrg") >>> # Write to windIO YAML format >>> wk.wwc_to_file(wwc, "output.yaml")