save_dataset

glotaran.plugin_system.data_io_registration.save_dataset(dataset: xr.Dataset | xr.DataArray, file_name: str | PathLike[str], format_name: str = None, *, allow_overwrite: bool = False, **kwargs: Any) None[source]

Save data from xarray.Dataset or xarray.DataArray to a file.

Parameters
  • dataset (xr.Dataset | xr.DataArray) – Data to be written to file.

  • file_name (str | PathLike[str]) – File to write the data to.

  • format_name (str) – Format the file should be in, if not provided it will be inferred from the file extension.

  • allow_overwrite (bool) – Whether or not to allow overwriting existing files, by default False

  • **kwargs (Any) – Additional keyword arguments passes to the write_dataset implementation of the data io plugin. If you aren’t sure about those use get_datawriter to get the implementation with the proper help and autocomplete.