From 3988a07e3b67e4edb213fa214b4d35f7efee8f3b Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Sun, 5 Oct 2025 13:01:07 -0700 Subject: [PATCH 1/2] Switch back default netCDF engine --- doc/whats-new.rst | 8 ++++++++ xarray/core/options.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index b8ffab2889f..af3cc7fc57c 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -17,6 +17,14 @@ New Features Breaking changes ~~~~~~~~~~~~~~~~ +- Xarray's default engine for reading/writing netCDF files been reverted to + prefer netCDF4, which was default the before before v2025.09.1. This change + had larger implications for the ecosystem than we anticipated. We are still + considering changing the default in the future, but will be a bit more careful + about the implications. See :issue:`10657` and linked issues for discussion. + The behavior can still be customized, e.g., with + ``xr.set_options(netcdf_engine_order=['h5netcdf', 'netcdf4', 'scipy'])``. + By `Stephan Hoyer `_. Deprecations ~~~~~~~~~~~~ diff --git a/xarray/core/options.py b/xarray/core/options.py index c8d00eea5d2..6799f61348d 100644 --- a/xarray/core/options.py +++ b/xarray/core/options.py @@ -59,7 +59,7 @@ class T_Options(TypedDict): enable_cftimeindex: bool file_cache_maxsize: int keep_attrs: Literal["default"] | bool - netcdf_engine_order: Sequence[Literal["h5netcdf", "scipy", "netcdf4"]] + netcdf_engine_order: Sequence[Literal["netcdf4", "h5netcdf", "scipy"]] warn_for_unclosed_files: bool use_bottleneck: bool use_flox: bool From c9ab1c63106ec3b346f7726732e06bca9a5b04ec Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Mon, 6 Oct 2025 09:24:33 -0700 Subject: [PATCH 2/2] Update doc/whats-new.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kai Mühlbauer --- doc/whats-new.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index af3cc7fc57c..e15be5f1a67 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -17,8 +17,8 @@ New Features Breaking changes ~~~~~~~~~~~~~~~~ -- Xarray's default engine for reading/writing netCDF files been reverted to - prefer netCDF4, which was default the before before v2025.09.1. This change +- Xarray's default engine for reading/writing netCDF files has been reverted to + prefer netCDF4, which was the default before v2025.09.1. This change had larger implications for the ecosystem than we anticipated. We are still considering changing the default in the future, but will be a bit more careful about the implications. See :issue:`10657` and linked issues for discussion.