From 3dee847db43175a1d8f7536967ef8adeae2583ea Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Thu, 26 Nov 2026 17:02:26 +0000 Subject: [PATCH 1/5] Replace NEXTVERSION placeholder with new release version 3.22.0 --- cf/mixin/fielddomain.py | 4 ++-- cf/mixin/fielddomainlist.py | 4 ++-- cf/query.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cf/mixin/fielddomain.py b/cf/mixin/fielddomain.py index 2eb8e3a1ad..230a1ac75d 100644 --- a/cf/mixin/fielddomain.py +++ b/cf/mixin/fielddomain.py @@ -3929,7 +3929,7 @@ def set_coordinate_reference( def to_xarray(self, group=True): """Convert the {{class}} to an `xarray` dataset. - Deprecated at version NEXTVERSION and is no longer + Deprecated at version 3.22.0 and is no longer available. Use `cf.to_xarray` instead. .. versionadded:: 3.21.0 @@ -3939,7 +3939,7 @@ def to_xarray(self, group=True): _DEPRECATION_ERROR_METHOD( self, "to_xarray", - version="NEXTVERSION", + version="3.22.0", removed_at="4.0.0", message="Use the 'cf.to_xarray' function instead.", ) # pragma: no cover diff --git a/cf/mixin/fielddomainlist.py b/cf/mixin/fielddomainlist.py index 8d94235428..c828566e1c 100644 --- a/cf/mixin/fielddomainlist.py +++ b/cf/mixin/fielddomainlist.py @@ -335,14 +335,14 @@ def select_by_rank(self, *ranks): def to_xarray(self, group=True): """Convert the list elements to an `xarray` Dataset. - Deprecated at version NEXTVERSION and is no longer + Deprecated at version 3.22.0 and is no longer available. Use `cf.to_xarray` instead. """ _DEPRECATION_ERROR_METHOD( self, "to_xarray", - version="NEXTVERSION", + version="3.22.0", removed_at="4.0.0", message="Use the 'cf.to_xarray' function instead.", ) # pragma: no cover diff --git a/cf/query.py b/cf/query.py index 9871709612..2de27aa74b 100644 --- a/cf/query.py +++ b/cf/query.py @@ -1980,7 +1980,7 @@ def _YMDhms(value, attr): See `cf.year`, `cf.month`, `cf.day`, `cf.hour`, `cf.minute`, `cf.second` for details. - .. versionadded:: NEXTVERSION + .. versionadded:: 3.22.0 """ if isinstance(value, Query): From 17944d7924c15e18a7708e3ae6f4d3bdd8b43937 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Thu, 26 Nov 2026 17:35:44 +0000 Subject: [PATCH 2/5] Update stated dependencies for v3.22.0 --- cf/__init__.py | 8 ++++---- docs/source/installation.rst | 12 +++++++++--- requirements.txt | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/cf/__init__.py b/cf/__init__.py index 5d31b4504a..3808914bf9 100644 --- a/cf/__init__.py +++ b/cf/__init__.py @@ -56,16 +56,16 @@ from packaging.version import Version -__date__ = "2026-08-28" -__version__ = "3.21.0" +__date__ = "2026-11-26" +__version__ = "3.22.0" __cf_version__ = cfdm.__cf_version__ __Conventions__ = f"CF-{__cf_version__}" # Check the version of cfdm (this is worth doing because of the very # tight coupling between cf and cfdm, and the risk of bad things # happening at run time if the versions are mismatched). -_minimum_vn = "1.13.3.0" -_maximum_vn = "1.13.4.0" +_minimum_vn = "1.13.4.0" +_maximum_vn = "1.13.5.0" _cfdm_vn = Version(cfdm.__version__) if _cfdm_vn < Version(_minimum_vn) or _cfdm_vn >= Version(_maximum_vn): raise RuntimeError( diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 53f93a5d77..03f25587f9 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -209,7 +209,7 @@ installed, which: Required ^^^^^^^^ -* `Python `_, 3.10.0 or newer. +* `Python `_, 3.11.0 or newer. * `numpy `_, versions 2.0.0 or newer. @@ -227,8 +227,8 @@ Required * `scipy `_, version 1.10.0 or newer. -* `cfdm `_, version 1.13.3.0 or up to, - but not including, 1.13.4.0. +* `cfdm `_, version 1.13.4.0 or up to, + but not including, 1.13.5.0. * `cfunits `_, version 3.3.7 or newer. @@ -324,6 +324,12 @@ environments for which these features are not required. newer. This package is required to create 2-d latitude and longitude coordinates from grid mappings. +.. rubric:: Conversions from and to Iris + +* `ncdata `_, version 3.7.2 or + newer. This package is required to convert CF Fields from and to + `Iris cubes `_. + ---- .. _Tests: diff --git a/requirements.txt b/requirements.txt index 5341bb8b79..3579166d28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ netCDF4>=1.7.2 cftime>=1.6.4 numpy>=2.0.0 -cfdm>=1.13.3.0, <1.13.4.0 +cfdm>=1.13.4.0, <1.13.5.0 psutil>=0.6.0 cfunits>=3.3.7 dask>=2025.5.1 From 56b9e0288f3e9192e514b4a5c8d00f719e8deaa7 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Thu, 26 Nov 2026 17:50:25 +0000 Subject: [PATCH 3/5] Update package description for xarray & iris conversions --- README.md | 3 ++- docs/source/introduction.rst | 4 +++- setup.py | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6b19a1339..73306c4c9e 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,8 @@ of its array manipulation and can: * read, write, and create netCDF and CDL datasets containing hierarchical groups, * read, write, and create data that have been compressed by convention (i.e. ragged or gathered arrays, or coordinate arrays compressed by subsampling), whilst presenting a view of the data in its uncompressed form, * read and write data that are quantized to eliminate false precision, -* convert field and domain constructs to `xarray` datasets in memory, +* convert field and domain constructs from and to `xarray` datasets in memory, +* convert field and domain constructs from and to `iris` cubes, * inspect field constructs, * test whether two field constructs are the same, * modify field construct metadata and data, diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index dab0fa0db4..e945bfae1b 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -97,7 +97,9 @@ The `cf` package can: * read and write data that are quantized to eliminate false precision, -* convert field and domain constructs to `xarray` datasets in memory, +* convert field and domain constructs from and to `xarray` datasets in memory, + +* convert field and domain constructs from and to `iris` cubes, * inspect field constructs, diff --git a/setup.py b/setup.py index 6602737fd9..41067db99e 100755 --- a/setup.py +++ b/setup.py @@ -132,7 +132,8 @@ def _get_version(): * read, write, and create netCDF and CDL datasets containing hierarchical groups, * read, write, and create data that have been compressed by convention (i.e. ragged or gathered arrays, or coordinate arrays compressed by subsampling), whilst presenting a view of the data in its uncompressed form, * read and write data that are quantized to eliminate false precision, -* convert field and domain constructs to `xarray` datasets in memory, +* convert field and domain constructs from and to `xarray` datasets in memory, +* convert field and domain constructs from and to `iris` cubes, * inspect field constructs, * test whether two field constructs are the same, * modify field construct metadata and data, From bd420e24c7ba89c56199eb10faac5f8e4159289e Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Thu, 26 Nov 2026 18:01:50 +0000 Subject: [PATCH 4/5] Set changelog new release version and date --- Changelog.rst | 4 ++-- cf/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog.rst b/Changelog.rst index 4903b33603..b0f10b19b2 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -1,7 +1,7 @@ -Version NEXTVERSION +Version 3.22.0 -------------- -**2026-11-??** +**2026-11-26** * New package-level functions to convert from and to `iris`: `cf.from_iris` and `cf.to_iris` diff --git a/cf/__init__.py b/cf/__init__.py index 3808914bf9..b484da1359 100644 --- a/cf/__init__.py +++ b/cf/__init__.py @@ -22,7 +22,8 @@ * read, write, and create netCDF and CDL datasets containing hierarchical groups, * read, write, and create data that have been compressed by convention (i.e. ragged or gathered arrays, or coordinate arrays compressed by subsampling), whilst presenting a view of the data in its uncompressed form, * read and write data that are quantized to eliminate false precision, -* convert field and domain constructs to `xarray` datasets in memory, +* convert field and domain constructs from and to `xarray` datasets in memory, +* convert field and domain constructs from and to `iris` cubes, * inspect field constructs, * test whether two field constructs are the same, * modify field construct metadata and data, From 9a25de98db15797f3be278794e4e7d22c09c2364 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Thu, 26 Nov 2026 18:18:19 +0000 Subject: [PATCH 5/5] Add new release to docs releases listing --- docs/source/releases.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 5e363cda89..c18d57270b 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -16,9 +16,10 @@ Documentation for all versions of cf. **CF-1.13** ----------- +* `Version 3.22.0 `_ (2026-11-26) * `Version 3.21.0 `_ (2026-08-28) * `Version 3.20.1 `_ (2026-07-07) -* `Version 3.20.0 `_ (2026-08-28) +* `Version 3.20.0 `_ (2026-04-10) * `Version 3.19.0 `_ (2026-01-19) **CF-1.12**