Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 6 additions & 5 deletions cf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -56,16 +57,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(
Expand Down
4 changes: 2 additions & 2 deletions cf/mixin/fielddomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cf/mixin/fielddomainlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion cf/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 9 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ installed, which:
Required
^^^^^^^^

* `Python <https://www.python.org/>`_, 3.10.0 or newer.
* `Python <https://www.python.org/>`_, 3.11.0 or newer.

* `numpy <http://www.numpy.org>`_, versions 2.0.0 or newer.

Expand All @@ -227,8 +227,8 @@ Required

* `scipy <https://pypi.org/project/scipy>`_, version 1.10.0 or newer.

* `cfdm <https://pypi.org/project/cfdm/>`_, version 1.13.3.0 or up to,
but not including, 1.13.4.0.
* `cfdm <https://pypi.org/project/cfdm/>`_, version 1.13.4.0 or up to,
but not including, 1.13.5.0.

* `cfunits <https://pypi.org/project/cfunits/>`_, version 3.3.7 or newer.

Expand Down Expand Up @@ -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 <https://pypi.org/project/ncdata>`_, version 3.7.2 or
newer. This package is required to convert CF Fields from and to
`Iris cubes <https://scitools-iris.readthedocs.io/en/stable/user_manual/explanation/iris_cubes.html#cube>`_.

----

.. _Tests:
Expand Down
4 changes: 3 additions & 1 deletion docs/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
3 changes: 2 additions & 1 deletion docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ Documentation for all versions of cf.
**CF-1.13**
-----------

* `Version 3.22.0 <https://ncas-cms.github.io/cf-python-docs/3.22.0>`_ (2026-11-26)
* `Version 3.21.0 <https://ncas-cms.github.io/cf-python-docs/3.21.0>`_ (2026-08-28)
* `Version 3.20.1 <https://ncas-cms.github.io/cf-python-docs/3.20.1>`_ (2026-07-07)
* `Version 3.20.0 <https://ncas-cms.github.io/cf-python-docs/3.20.0>`_ (2026-08-28)
* `Version 3.20.0 <https://ncas-cms.github.io/cf-python-docs/3.20.0>`_ (2026-04-10)
* `Version 3.19.0 <https://ncas-cms.github.io/cf-python-docs/3.19.0>`_ (2026-01-19)

**CF-1.12**
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading