windkit.gwc_to_file#
- windkit.gwc_to_file(gwc, filename, *, file_format='infer', **kwargs)[source]#
Write generalized wind climate to file.
Note
For most use cases, we recommend writing the dataset directly to netCDF using
xarray.Dataset.to_netcdf()and reading it back withxarray.open_dataset(). This preserves all metadata and precision and is more portable than format-specific writers.- Parameters:
gwc (xarray.Dataset) – Generalized wind climate dataset.
filename (str or Path) – File path to write to.
file_format (str) – File format to write to. Supported formats are ‘lib’. Default value is ‘infer’ which will infer the file format from the file extension.
kwargs (dict) – Additional arguments to pass to the file writer.