From 971be103d6376d6572d1f12d32526f12f07ae2c7 Mon Sep 17 00:00:00 2001 From: vallirep <137871823+vallirep@users.noreply.github.com> Date: Fri, 21 Jul 2023 23:57:40 +0200 Subject: [PATCH] improved docstring of to_netcdf (issue #7127) (#7947) * improved docstring of to_netcdf (issue #7127) * Spelling * Update xarray/core/dataset.py --------- Co-authored-by: Tom Nicholas Co-authored-by: Deepak Cherian --- xarray/core/dataset.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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