arviz.InferenceData.to_netcdf#
- InferenceData.to_netcdf(filename, compress=True, groups=None, engine='h5netcdf', base_group='/', overwrite_existing=True)[source]#
Write InferenceData to netcdf4 file.
- Parameters:
- filename
str
Location to write to
- compressbool, optional
Whether to compress result. Note this saves disk space, but may make saving and loading somewhat slower (default: True).
- groups
list
, optional Write only these groups to netcdf file.
- engine{“h5netcdf”, “netcdf4”}, default “h5netcdf”
Library used to read the netcdf file.
- base_group
str
, default “/” The group in the netCDF file where the InferenceData is will be stored. By default, will write to the root of the netCDF file
- overwrite_existingbool, default
True
Whether to overwrite the existing file or append to it.
- filename
- Returns:
str
Location of netcdf file