diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 2ee9c1d17b7..22867e2e887 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -2042,7 +2042,9 @@ def to_netcdf( Nested dictionary with variable names as keys and dictionaries of variable specific encodings as values, e.g., ``{"my_variable": {"dtype": "int16", "scale_factor": 0.1, - "zlib": True}, ...}`` + "zlib": True}, ...}``. + If ``encoding`` is specified the original encoding of the variables of + the dataset is ignored. The `h5netcdf` engine supports both the NetCDF4-style compression encoding parameters ``{"zlib": True, "complevel": 9}`` and the h5py