Releases: pydata/xarray
v2025.12.0
This release rolls back the default engine for HTTP urls, adds support for DataTree objects in combine_nested and contains numerous bug fixes.
Thanks to the 16 contributors to this release:
Benoit Bovy, Christine P. Chai, Deepak Cherian, Dhruva Kumar Kaushal, Ian Hunt-Isaak, Ilan Gold, Illviljan, Julia Signell, Justus Magin, Lars Buntemeyer, Maximilian Roos, Miguel Jimenez, Nick Hodgskin, Richard Berg, Spencer Clark and Stephan Hoyer
What's Changed
- new release section by @keewis in #10926
- Fix numpy typing issue with numpy=2.3.5 by @shoyer in #10935
- support combine_nested on DataTree objects by @shoyer in #10849
- [pydap backend] enables downloading multiple dim arrays within single http request by @Mikejmnez in #10629
- Fix flaky Hypothesis stateful test for unique name generation by @max-sixty in #10946
- normalize the first indexer by @keewis in #10948
- Mostly restore
netcdfbackend behavior with URLs by @ianhi in #10931 - Adapt to change in behavior of
pandas.Timestampconstructor by @spencerkclark in #10944 - DOC: Correct many grammatical issues by @star1327p in #10959
- avoid casting custom indexes in
Dataset.drop_attrsby @keewis in #10961 - Fix type annotation for DataVariables to use Hashable instead of Any by @dhruvak001 in #10960
- Coerce
IndexVariabletoVariablewhen assigning to data variables or coordinates by @jsignell in #10909 - (fix): handle internal type promotion and
nas for extension arrays properly by @ilan-gold in #10423 - Migrate development workflow to Pixi by @VeckoTheGecko in #10888
- Fix workflow name to embed
matrix.pytest-addoptsby @VeckoTheGecko in #10970 - Add GitHub Codespaces config for Pixi by @VeckoTheGecko in #10929
- small changes to the pixi env definitions by @keewis in #10976
- Use
._datainVariable._replaceby @dcherian in #10969 - Support decoding unsigned integers to timedelta by @dcherian in #10972
- DOC: Remove RTD htmlzip output format by @VeckoTheGecko in #10977
- document limitations of cftime arithmetics by @larsbuntemeyer in #10653
- DOC: Add
llms.txtgeneration to build process by @VeckoTheGecko in #10978 - release v2025.12.0 by @keewis in #10981
- set the release date by @keewis in #10984
New Contributors
- @larsbuntemeyer made their first contribution in #10653
Full Changelog: v2025.11.0...v2025.12.0
v2025.11.0
This release changes the default for keep_attrs such that attributes are preserved by default, adds support for DataTree in top-level functions, and contains several memory and performance improvements as well as a number of bug fixes.
Thanks to the 21 contributors to this release:
Aled Owen, Charles Turner, Christine P. Chai, David Huard, Deepak Cherian, Gregorio L. Trevisan, Ian Hunt-Isaak, Ilan Gold, Illviljan, Jan Meischner, Jemma Jeffree, Jonas Lundholm Bertelsen, Justus Magin, Kai Mühlbauer, Kristian Bodolai, Lukas Riedel, Max Jones, Maximilian Roos, Niclas Rieger, Stephan Hoyer and William Andrea
What's Changed
- Blank whats new for 2025.10.2 by @shoyer in #10830
- Change
keep_attrsdefault toTrueby @max-sixty in #10726 - Add support for DataTree to xarray.merge() by @shoyer in #10790
- Fix equivalent() for NumPy scalar NaN comparison by @max-sixty in #10838
- Fix Dataset.map to handle non-DataArray outputs by @max-sixty in #10839
- Support DataTree in xarray.concat() by @shoyer in #10846
- Fix typing for to_zarr() methods by @shoyer in #10847
- Add version requirement to matplotlib by @Illviljan in #10837
- Add chunks='auto' support for cftime datasets by @charles-turner-1 in #10527
- new dependency for zarr in the nightly ci by @keewis in #10857
- Add support for NETCDF4_CLASSIC to h5netcdf engine by @huard in #10686
- fix h5netcdf backend for format=None, use same rule as netcdf4 backend by @kmuehlbauer in #10859
- fix: be more cautious when guessing what a backend can open by @ianhi in #10804
- Update docs to reflect open_mfdataset default chunk behaviour by @jemmajeffree in #10567
pre-commithook maintenance by @keewis in #10871- Fix empty indexing by @kmuehlbauer in #10870
- Minimize concat memory usage by @dcherian in #10866
- DOC: Correct typos: lets -> let's by @star1327p in #10874
- Use version-independent Zenodo DOI by @gtrevisan in #10881
- Import h5netcdf.core to use EnumType by @maxrjones in #10779
- Fix typing issue with numpy 2.3.4 by @shoyer in #10882
- xfail pydap datatree tests by @shoyer in #10869
- remove notes pointing to non-existing projects by @KBodolai in #10877
- [docs] Remove duplicated example in ".where" by @jmeischner in #10884
- Update pydap link in installation guide by @nicrie in #10885
- Fix
drop_selfor a MultiIndex by @owena11 in #10863 - Switch to use cmap.with_extremes by @Illviljan in #10836
- fix: error handling decode_cf_var exceptions - use add_note by @jonaslb in #10886
- fix: don't expect string arrays to roundtrip in
pandasby @ilan-gold in #10894 - DOC: Typo in terminology.rst by @wjandrea in #10897
- support datatree in
assert_allcloseby @keewis in #10887 - DOC: Correct typos like a/an usage by @star1327p in #10905
- Fix fill_value handling during unstack by @peanutfun in #10901
- Simplify implementation of merge() for DataTree by @shoyer in #10844
- Rewrite test_iso8601_decode to work without cftime by @dcherian in #10914
- DOC: Correct minor grammar issues by @star1327p in #10915
- skip ci based on a label by @keewis in #10918
- Optimize padding for coarsening. by @dcherian in #10921
- release v2025.11.0 by @keewis in #10917
New Contributors
- @charles-turner-1 made their first contribution in #10527
- @KBodolai made their first contribution in #10877
- @jmeischner made their first contribution in #10884
- @owena11 made their first contribution in #10863
- @jonaslb made their first contribution in #10886
- @wjandrea made their first contribution in #10897
- @peanutfun made their first contribution in #10901
Full Changelog: v2025.10.1...v2025.11.0
v2025.10.1
This release actually reverts a breaking change to Xarray's preferred netCDF backend.
v2025.10.0
This release reverts a breaking change to Xarray's preferred netCDF backend.
v2025.09.1
This release contains improvements to netCDF IO and the DataTree.from_dict() constructor, as well as a variety of bug fixes. In particular, the default netCDF backend has switched from netCDF4 to h5netcdf, which is typically faster.
Thanks to the 17 contributors to this release: Claude, Deepak Cherian, Dimitri Papadopoulos Orfanos, Dylan H. Morris, Emmanuel Mathot, Ian Hunt-Isaak, Joren Hammudoglu, Julia Signell, Justus Magin, Maximilian Roos, Nick Hodgskin, Spencer Clark, Stephan Hoyer, Tom Nicholas, gronniger, joseph nowak and pierre-manchon
v2025.09.0
This release brings a number of small improvements and fixes, especially related to writing DataTree objects and netCDF files to disk.
Thanks to the 13 contributors to this release: Benoit Bovy, DHRUVA KUMAR KAUSHAL, Deepak Cherian, Dhruva Kumar Kaushal, Giacomo Caria, Ian Hunt-Isaak, Illviljan, Justus Magin, Kai Mühlbauer, Ruth Comer, Spencer Clark, Stephan Hoyer and Tom Nicholas
New Features
Support rechunking by SeasonResampler for seasonal data analysis (GH10425, PR10519). By Dhruva Kumar Kaushal.
Add convenience methods to Coordinates (PR10318) By Justus Magin.
Added load_datatree() for loading DataTree objects into memory from disk. It has the same relationship to open_datatree(), as load_dataset() has to open_dataset(). By Stephan Hoyer.
compute=False is now supported by DataTree.to_netcdf() and DataTree.to_zarr(). By Stephan Hoyer.
open_dataset will now correctly infer a path ending in .zarr/ as zarr By Ian Hunt-Isaak.
Breaking changes
Following pandas 3.0 (pandas-dev/pandas#61985), Day is no longer considered a Tick-like frequency. Therefore non-None values of offset and non-"start_day" values of origin will have no effect when resampling to a daily frequency for objects indexed by a xarray.CFTimeIndex. As in pandas-dev/pandas#62101 warnings will be emitted if non default values are provided in this context (GH10640, PR10650). By Spencer Clark.
The default backend engine used by Dataset.to_netcdf() and DataTree.to_netcdf() is now chosen consistently with open_dataset() and open_datatree(), using whichever netCDF libraries are available and valid, and preferring netCDF4 to h5netcdf to scipy (GH10654). This will change the default backend in some edge cases (e.g., from scipy to netCDF4 when writing to a file-like object or bytes). To override these new defaults, set engine explicitly. By Stephan Hoyer.
The return value of Dataset.to_netcdf() without path is now a memoryview object instead of bytes (PR10656). This removes an unnecessary memory copy and ensures consistency when using either engine="scipy" or engine="h5netcdf". If you need a bytes object, simply wrap the return value of to_netcdf() with bytes(). By Stephan Hoyer.
Bug fixes
Fix contour plots not normalizing the colors correctly when using for example logarithmic norms. (GH10551, PR10565) By Jimmy Westling.
Fix distribution of auto_complex keyword argument for open_datatree (GH10631, PR10632). By Kai Mühlbauer.
Warn instead of raise in case of misconfiguration of unlimited_dims originating from dataset.encoding, to prevent breaking users workflows (GH10647, PR10648). By Kai Mühlbauer.
DataTree.to_netcdf() and DataTree.to_zarr() now avoid redundant computation of Dask arrays with cross-group dependencies (GH10637). By Stephan Hoyer.
DataTree.to_netcdf() had h5netcdf hard-coded as default (GH10654). By Stephan Hoyer.
Internal Changes
Run TestNetCDF4Data as TestNetCDF4DataTree through open_datatree (PR10632). By Kai Mühlbauer.
v2025.08.0
This release brings the ability to load xarray objects asynchronously, write netCDF as bytes, fixes a number of bugs, and starts an important deprecation cycle for changing the default values of keyword arguments for various xarray combining functions.
Thanks to the 24 contributors to this release:
Alfonso Ladino, Brigitta Sipőcz, Claude, Deepak Cherian, Dimitri Papadopoulos Orfanos, Eric Jansen, Ian Hunt-Isaak, Ilan Gold, Illviljan, Julia Signell, Justus Magin, Kai Mühlbauer, Mathias Hauser, Matthew, Michael Niklas, Miguel Jimenez, Nick Hodgskin, Pratiman, Scott Staniewicz, Spencer Clark, Stephan Hoyer, Tom Nicholas, Yang Yang and jemmajeffree
What's Changed
- Add dev whats-new by @dcherian in #10522
- Improve warning message and tests for timedelta decoding by @shoyer in #10508
- Remove test skip by @VeckoTheGecko in #10523
- Pydap flaky tests by @Mikejmnez in #10525
- drop_vars: use emit_user_level_warning by @mathause in #10528
- Fix labeler for
topic-documentationby @VeckoTheGecko in #10524 - CI: update actions location by @bsipocz in #10529
- Call
super().__init__()inst.SearchStrategysubclasses by @spencerkclark in #10543 - Fix kerchunk error in docs build by @dcherian in #10545
- Fix convert calendar with different dimension name by @ej81 in #10544
- Restructure API documentation into organized sections by @dcherian in #10540
- Unnecessary literal by @DimitriPapadopoulos in #10552
- Fix
DatetimeAccessor.strftimeerrors due to upstream changes by @spencerkclark in #10550 - Fix transpose of BoolTypeArray, NativeEndiannessArray by @dcherian in #10546
- Pythagorean calculation with sub-optimal numerics by @DimitriPapadopoulos in #10575
- interp - Prefer broadcast over reindex when possible by @Illviljan in #10554
- Update documentation to copy tags when forking, so versioning is reasonable by @jemmajeffree in #10576
- install
pyarrowfrom its official repo by @keewis in #10577 - fix: Filter out
StringDTypeeven when the backing array is notNumpyExtensionArrayby @ilan-gold in #10559 - fix: pd.Series in pandas>=3 does not preserve object dtype metadata by @ilan-gold in #10564
- Fix
_get_default_engine_netcdfto check forh5netcdfby @scottstanie in #10557 pre-commithook maintenance:typosby @keewis in #10586- bump the build metadata by @keewis in #10592
- New defaults for
concat,merge,combine_*by @jsignell in #10062 - Fix doctests by ignoring warning from netcdf by @jsignell in #10599
- Fix typo found by codespell by @DimitriPapadopoulos in #10601
- change the type of
ogp_custom_meta_tagstotupleby @keewis in #10603 - Fix docstring in find_independent_seasons by @Illviljan in #10615
- Make warning message clearer when assigning to
PandasMultiIndexby @jsignell in #10610 - Update pre-commit hooks by @pre-commit-ci[bot] in #10604
- Support for DataTree.to_netcdf to write to a file-like object or bytes by @mjwillson in #10571
- add kwarg to handle invalid files in open_mfdataset by @pratiman-91 in #9955
- Bump actions/download-artifact from 4 to 5 in the actions group by @dependabot[bot] in #10621
- Sanitize unlimited_dims when writing
to_netcdfby @kmuehlbauer in #10608 - slicing a slice with an array without expanding the slice by @keewis in #10580
- Skip call to
.tolist()when creating pd.Index by @y4n9squared in #10619 - fix: Empty
RangeIndexDisplay by @ianhi in #10594 - clarify lazy behaviour and eager loading chunks=None in open_*-functions by @kmuehlbauer in #10627
- Avoid refining parent dimensions in NetCDF files by @shoyer in #10623
- Add DataTree.prune() method … by @aladinor in #10598
- Add asynchronous load method by @TomNicholas in #10327
- Fix
ds.mergeto prevent altering original object depending on join value by @jsignell in #10596 - release notes for v2025.08.0 by @TomNicholas in #10641
New Contributors
- @bsipocz made their first contribution in #10529
- @jemmajeffree made their first contribution in #10576
- @mjwillson made their first contribution in #10571
- @pratiman-91 made their first contribution in #9955
- @y4n9squared made their first contribution in #10619
Full Changelog: v2025.07.1...v2025.08.0
v2025.07.1
What's Changed
- New whatsnew section by @TomNicholas in #10496
- Update HOW_TO_RELEASE.md to reflect inability to push to main by @TomNicholas in #10497
- Enforce ruff/flake8-simplify rules (SIM) by @DimitriPapadopoulos in #10480
- Unnecessary generator by @DimitriPapadopoulos in #10506
- Use
iswhen comparing type of two objects by @DimitriPapadopoulos in #10504 - More f-strings, less format() by @DimitriPapadopoulos in #10505
- Unnecessary lambda expression by @DimitriPapadopoulos in #10502
- Clean-up indexing adapter classes by @benbovy in #10355
- Add NDPointIndex (KDTree) by @benbovy in #10478
- Use a set comprehension by @DimitriPapadopoulos in #10509
- Update pre-commit ruff legacy alias by @DimitriPapadopoulos in #10511
- DOC: add Pandas(Multi)Index to API reference by @benbovy in #10515
- Allow setting (or skipping) new indexes in open_dataset by @benbovy in #8051
- Raise if
Index.create_variablesreturns more variables than passed in throughset_xindexby @dhruvak001 in #10503 - Expression not assigned by @DimitriPapadopoulos in #10507
- Update Custom Indexes section in api.rst by @dcherian in #10517
- Updates for Zarr 3 Dtypes by @ianhi in #10456
- Add release notes for v2025.07.1 by @dcherian in #10520
Full Changelog: v2025.07.0...v2025.07.1
v2025.07.0
This release extends xarray's support for custom index classes, restores support for reading netCDF3 files with SciPy, updates minimum dependencies, and fixes a number of bugs.
Thanks to the 17 contributors to this release:
Bas Nijholt, Benoit Bovy, Deepak Cherian, Dhruva Kumar Kaushal, Dimitri Papadopoulos Orfanos, Ian Hunt-Isaak, Kai Mühlbauer, Mathias Hauser, Maximilian Roos, Miguel Jimenez, Nick Hodgskin, Scott Henderson, Shuhao Cao, Spencer Clark, Stephan Hoyer, Tom Nicholas and Zsolt Cserna
What's Changed
- new whats-new section by @mathause in #10420
- Fix Pydap tests for numpy 2.3.0 changes (scalar string to unicode) by @kmuehlbauer in #10421
- Fixed color.shape != grid.shape in streamplot when nx != ny by @scaomath in #10411
- Fix
Index._repr_inline_()signature by @benbovy in #10415 - Clean up backend indexing some more by @dcherian in #10376
- Check and fix chararray string dimension names by @kmuehlbauer in #10395
- Fix reindex on Dataset from MultiIndex DataFrame with RuntimeError by @csernazs in #10381
- Apply new ruff rules by @DimitriPapadopoulos in #10428
- BUG: Fix display with nested NumPy arrays by @basnijholt in #10222
- DOC: Add cf_xarray to ecosystem page by @VeckoTheGecko in #10443
- Expose top-level xarray.indexes in init by @dcherian in #10435
- fix assert_equal for DataTree by @mathause in #10440
- Use a set comprehension by @DimitriPapadopoulos in #10453
- Redundant list comprehension can be replaced using generator by @DimitriPapadopoulos in #10454
- Simplify chained comparison between the operands by @DimitriPapadopoulos in #10447
- Unassigned string statement by @DimitriPapadopoulos in #10452
- Iterate the dictionary directly instead of calling
.keys()by @DimitriPapadopoulos in #10451 - Unnecessary tuple/list literal by @DimitriPapadopoulos in #10450
- Unreachable code by @DimitriPapadopoulos in #10449
- Appending to dictionary immediately following its definition by @DimitriPapadopoulos in #10448
- Exceptions are overlapping by @DimitriPapadopoulos in #10446
- Enforce ruff/Pylint Warnings (PLW) by @DimitriPapadopoulos in #10458
- Update pre-commit hook pre-commit by @DimitriPapadopoulos in #10461
- Enforce ruff/Pylint Refactor rules (PLR) by @DimitriPapadopoulos in #10459
- Enforce ruff/Pylint Convention rules (PLC) by @DimitriPapadopoulos in #10460
- Switch to using the NumFOCUS Code of Conduct by @shoyer in #10432
- More Pylint issues by @DimitriPapadopoulos in #10463
- More f-strings, less format() by @DimitriPapadopoulos in #10474
- Enforce ruff/flake8-2020 rules (YTT) by @DimitriPapadopoulos in #10467
- assert_equal: ensure check_dim_order=False works for DataTree by @mathause in #10442
- Keyword argument passed twice by @DimitriPapadopoulos in #10473
- Branches of the
ifstatement have similar implementation by @DimitriPapadopoulos in #10475 - Enforce ruff/flake8-simplify rules (SIM) by @DimitriPapadopoulos in #10462
- Apply assorted ruff preview rules by @DimitriPapadopoulos in #10465
- Revert "Enforce ruff/flake8-simplify rules (SIM)" by @max-sixty in #10476
- Fix RangeIndex slicing by @benbovy in #10471
- Update error message regex for latest Zarr by @dcherian in #10485
- update dependencies; drop python 3.10 by @dhruvak001 in #10438
- Fix critical
np.timedelta64encoding bugs by @spencerkclark in #10469 - Prevent pydap (dap4) to change string arrays to unicode type (testing). Fixed upstream by @Mikejmnez in #10482
- Downgrade zarr requests performance expectations for zarr 3.0.9 by @TomNicholas in #10491
- Use add_note() to annotate exceptions when encoding fails by @shoyer in #10464
- Check if zarr store supports consolidated metadata by @TomNicholas in #10457
- Fix Zarr 'number of requests' test by @ianhi in #10492
- Rename toplevel header from Contribute to Development by @scottyhq in #10472
- Release workflows: always check that the built dist is valid. by @dcherian in #10408
- Fix bug with
ci/release_contributors.pyscript by @TomNicholas in #10494 - Release notes for v2025.07.0 by @TomNicholas in #10495
New Contributors
- @scaomath made their first contribution in #10411
- @csernazs made their first contribution in #10381
- @basnijholt made their first contribution in #10222
- @dhruvak001 made their first contribution in #10438
Full Changelog: v2025.06.1...v2025.07.0
v2025.06.1
This is quick bugfix release to remove an unintended dependency on typing_extensions. Apologies for the trouble.
What's Changed
- Guard typing_extension import by @sjperkins in #10413
- (fix): disallow
NumpyExtensionArrayby @ilan-gold in #10334 - (fix):
ndimaccessible asnp.ndimonPandasExtensionArrayby @ilan-gold in #10414 - Up-to-date instructions for reading & writing to Zarr with Xarray by @alxmrs in #10410
- Release 2025.06.1 by @dcherian in #10416
New Contributors
Full Changelog: v2025.06.0...v2025.06.1