Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c44eacb
dev
davidhassell Jun 25, 2026
5e546a5
dev
davidhassell Jun 26, 2026
813f6d5
dev
davidhassell Jun 27, 2026
f35b817
dev
davidhassell Jun 27, 2026
77db7dc
dev
davidhassell Jun 28, 2026
fe45daa
dev
davidhassell Jun 28, 2026
ed250fe
dev
davidhassell Jul 1, 2026
9a0eca0
dev
davidhassell Jul 1, 2026
c16098b
dev
davidhassell Jul 2, 2026
dc54d9a
dev
davidhassell Jul 2, 2026
c8d74d1
dev
davidhassell Jul 3, 2026
7309ac3
dev
davidhassell Jul 3, 2026
4b33d7e
dev
davidhassell Jul 3, 2026
a489a9d
dev
davidhassell Jul 6, 2026
0a88711
dev
davidhassell Jul 8, 2026
8ac2b98
dev
davidhassell Jul 9, 2026
51bfa22
dev
davidhassell Jul 9, 2026
f5f9ea7
dev
davidhassell Jul 10, 2026
9e0bdbf
dev
davidhassell Jul 13, 2026
2dc12d7
dev
davidhassell Jul 15, 2026
8aaac63
dev
davidhassell Jul 15, 2026
6546ebd
dev
davidhassell Jul 15, 2026
21492e6
dev
davidhassell Jul 17, 2026
13dabc9
dev
davidhassell Jul 30, 2026
6a2151b
dev
davidhassell Jul 30, 2026
885ade5
dev
davidhassell Aug 3, 2026
34ea251
dev
davidhassell Aug 13, 2026
7ad5020
dev
davidhassell Aug 14, 2026
94e2671
dev
davidhassell Aug 14, 2026
37d872b
dev
davidhassell Aug 14, 2026
90aec7b
Merge branch 'main' into rotated-pole
davidhassell Aug 28, 2026
b4a1e89
Typos
davidhassell Aug 28, 2026
d99f91e
xnetcdf note
davidhassell Aug 28, 2026
e845141
Typo
davidhassell Aug 28, 2026
a19f852
Corrected lat_ts description
davidhassell Aug 28, 2026
c012a92
Typo
davidhassell Aug 28, 2026
de89ced
checker order changes
davidhassell Aug 28, 2026
f70648b
update comment
davidhassell Aug 28, 2026
a13e32c
remove umread_lib
davidhassell Aug 28, 2026
6aca0fd
pyproj optional dependency
davidhassell Aug 28, 2026
77997f7
remove proj.to_dict warning
davidhassell Aug 28, 2026
fe5c285
update cfdm version
davidhassell Aug 28, 2026
7522b16
update cfdm version
davidhassell Aug 28, 2026
e021938
update cfdm version
davidhassell Aug 28, 2026
bebf6fe
linting
davidhassell Aug 28, 2026
bf4c4d7
extra_requires coordinates
davidhassell Aug 28, 2026
c7b69d1
umfive optional dependency
davidhassell Aug 28, 2026
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
7 changes: 0 additions & 7 deletions .github/workflows/run-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ jobs:
cd ${{ github.workspace }}/main
pip install --no-deps -e .

# Make UMRead library
- name: Make UMRead
shell: bash -l {0}
run: |
cd ${{ github.workspace }}/main/cf/umread_lib/c-lib
make

# Install the coverage library
# We do so with conda which was setup in a previous step.
- name: Install coverage
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ cf/test/*.txt
cf/test/.coverage
cf/test/cf_coverage_report/

# C object files generated by tests under cf/umread_lib/ and its sub-dirs:
cf/umread_lib/c-lib/*.o
cf/umread_lib/c-lib/*.so
cf/umread_lib/c-lib/type-dep/*.o

# packaging-related files changing with environment adjustments:
*.egg-info/

Expand Down
19 changes: 19 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ Version NEXTVERSION

**2026-08-??**

* New keywords to `cf.read`: ``backend``, ``backend_options``,
``cfa_filesystem``, ``cfa_backend``, ``cfa_backend_options``
(https://github.com/NCAS-CMS/cf-python/issues/961)
* Deprecated keyword to `cfdm.read`: ``netcdf_backend``
(https://github.com/NCAS-CMS/cf-python/issues/961)
* Dataset reads are now entirely managed by `xnetcdf` and its backend
libraries (via `cfdm.read`)
(https://github.com/NCAS-CMS/cf-python/issues/961)
* Read with `cf.read` anything that can be read by `xarray`
(https://github.com/NCAS-CMS/cf-python/issues/961)
* Convert `xarray.Dataset` and `xarray.DataTree` to `cf.Field` via
`cf.read` (https://github.com/NCAS-CMS/cf-python/issues/961)
* Convert `pyfive.File`, `zarr.Group`, `h5py.File`, `umfile.File`, and
`xnetcdf.Dataset` to `cf.Field` via `cf.read`
(https://github.com/NCAS-CMS/cf-python/issues/961)
* Extend `cf.Field.create_latlon_coordinates` to allow the creation of
2-d latitudes/longitudes from plane projection and rotated pole
coordinates (https://github.com/NCAS-CMS/cf-python/issues/962)
* Automatically create consolidated HDF5 metadata with `cf.write`.
New keywords to `cf.write`: ``hdf5_consolidated_metadata`` and
``hdf5_expansion_factor``
Expand All @@ -17,6 +35,7 @@ Version NEXTVERSION
* New output format for `cf.write` that creates an `xarray` dataset in
memory: ``'XARRAY'``
(https://github.com/NCAS-CMS/cf-python/issues/933)
* New optional dependency: ``umfive>=0.3.0``
* New optional dependency: ``xarray>=2026.7.0``

----
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ recursive-exclude cf/data *.rst
prune cf/test
recursive-include cf/test __init__.py test_*.py
recursive-include cf/test cfa_test.sh run_tests.py setup_create_field.py create_test_files*.py individual_tests.sh
recursive-include cf/test test_file.nc test_file[2-4].nc file.nc file[1-9].nc ugrid_global_1.nc ugrid_global_2.nc create_test_files.npz create_test_files_2.npz wgdos_packed.pp extra_data.pp file1.pp *.cdl create_test_files.npz create_test_files_2.npz example_field_0.nc cell_measures.nc
recursive-include cf/test test_file.nc test_file[2-4].nc file.nc file[1-9].nc ugrid_global_1.nc ugrid_global_2.nc create_test_files.npz create_test_files_2.npz wgdos_packed.pp extra_data.pp file1.pp rotated_pole.pp *.cdl create_test_files.npz create_test_files_2.npz example_field_0.nc cell_measures.nc
recursive-include cf/test/example_field_0.zarr[23] *
include cf/test/example_field_0.kerchunk
prune cf/test/dir
5 changes: 3 additions & 2 deletions cf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
# 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.2.1"
_maximum_vn = "1.13.3.0"
_minimum_vn = "1.13.3.0"
_maximum_vn = "1.13.4.0"
_cfdm_vn = Version(cfdm.__version__)
if _cfdm_vn < Version(_minimum_vn) or _cfdm_vn >= Version(_maximum_vn):
raise RuntimeError(
Expand Down Expand Up @@ -172,6 +172,7 @@
ScipyNetcdfFileArray,
SubsampledArray,
UMArray,
XnetcdfArray,
ZarrArray,
)

Expand Down
58 changes: 2 additions & 56 deletions cf/cfimplementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@
BoundsFromNodesArray,
CellConnectivityArray,
GatheredArray,
H5netcdfArray,
NetCDF4Array,
PointTopologyArray,
PyfiveArray,
RaggedContiguousArray,
RaggedIndexedArray,
RaggedIndexedContiguousArray,
ScipyNetcdfFileArray,
SubsampledArray,
ZarrArray,
XnetcdfArray,
)
from .functions import CF

Expand Down Expand Up @@ -147,18 +143,14 @@ def set_construct(self, parent, construct, axes=None, copy=True, **kwargs):
BoundsFromNodesArray=BoundsFromNodesArray,
CellConnectivityArray=CellConnectivityArray,
GatheredArray=GatheredArray,
H5netcdfArray=H5netcdfArray,
NetCDF4Array=NetCDF4Array,
ScipyNetcdfFileArray=ScipyNetcdfFileArray,
PointTopologyArray=PointTopologyArray,
PyfiveArray=PyfiveArray,
Quantization=Quantization,
RaggedContiguousArray=RaggedContiguousArray,
RaggedIndexedArray=RaggedIndexedArray,
RaggedIndexedContiguousArray=RaggedIndexedContiguousArray,
SubsampledArray=SubsampledArray,
TiePointIndex=TiePointIndex,
ZarrArray=ZarrArray,
XnetcdfArray=XnetcdfArray,
)


Expand All @@ -174,51 +166,5 @@ def implementation():
`CFImplementation`
A container for the CF data model implementation.

**Examples**

>>> i = cf.implementation()
>>> i
<CFImplementation: >
>>> i.classes()
{'AuxiliaryCoordinate': cf.auxiliarycoordinate.AuxiliaryCoordinate,
'BoundsFromNodesArray': cf.data.array.boundsfromnodesarray.BoundsFromNodesArray,
'CellConnectivity': cf.cellconnectivity.CellConnectivity,
'CellConnectivityArray': cf.data.array.cellconnectivityarray.CellConnectivityArray,
'CellMeasure': cf.cellmeasure.CellMeasure,
'CellMethod': cf.cellmethod.CellMethod,
'CoordinateReference': cf.coordinatereference.CoordinateReference,
'DimensionCoordinate': cf.dimensioncoordinate.DimensionCoordinate,
'Domain': cf.domain.Domain,
'DomainAncillary': cf.domainancillary.DomainAncillary,
'DomainAxis': cf.domainaxis.DomainAxis,
'DomainTopology': cf.domaintopology.DomainTopology,
'Field': cf.field.Field,
'FieldAncillary': cf.fieldancillary.FieldAncillary,
'Bounds': cf.bounds.Bounds,
'InteriorRing': cf.interiorring.InteriorRing,
'InterpolationParameter': cf.interpolationparameter.InterpolationParameter,
'CoordinateConversion': cf.coordinateconversion.CoordinateConversion,
'Datum': cf.datum.Datum,
'List': cf.list.List,
'Index': cf.index.Index,
'Count': cf.count.Count,
'NodeCountProperties': cf.nodecountproperties.NodeCountProperties,
'PartNodeCountProperties': cf.partnodecountproperties.PartNodeCountProperties,
'Data': cf.data.data.Data,
'GatheredArray': cf.data.array.gatheredarray.GatheredArray,
'H5netcdfArray': cf.data.array.h5netcdfarray.H5netcdfArray,
'NetCDF4Array': cf.data.array.netcdf4array.NetCDF4Array,
'ScipyNetcdfFileArray': cf.data.array.scipynetcdffilearray.ScipyNetcdfFileArray,
'PointTopologyArray': <class 'cf.data.array.pointtopologyarray.PointTopologyArray'>,
'PyfiveArray': cf.data.array.pyfivearray.PyfiveArray,
'Quantization': cf.quantization.Quantization,
'RaggedContiguousArray': cf.data.array.raggedcontiguousarray.RaggedContiguousArray,
'RaggedIndexedArray': cf.data.array.raggedindexedarray.RaggedIndexedArray,
'RaggedIndexedContiguousArray': cf.data.array.raggedindexedcontiguousarray.RaggedIndexedContiguousArray,
'SubsampledArray': cf.data.array.subsampledarray.SubsampledArray,
'TiePointIndex': cf.tiepointindex.TiePointIndex,
'ZarrArray': cf.data.array.zarrarray.ZarrArray,
}

"""
return _implementation.copy()
1 change: 1 addition & 0 deletions cf/data/array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
from .raggedindexedcontiguousarray import RaggedIndexedContiguousArray
from .subsampledarray import SubsampledArray
from .umarray import UMArray
from .xnetcdfarray import XnetcdfArray
from .zarrarray import ZarrArray
2 changes: 1 addition & 1 deletion cf/data/array/aggregatedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def __new__(cls, *args, **kwargs):
"""
# Override the inherited FragmentFileArray class
instance = super().__new__(cls)
instance._FragmentArray["uri"] = FragmentFileArray
instance._AggregatedArray__FragmentArray["uri"] = FragmentFileArray
return instance
21 changes: 10 additions & 11 deletions cf/data/array/h5netcdfarray.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import cfdm

from ...mixin_container import Container
from .mixin import ActiveStorageMixin


class H5netcdfArray(
ActiveStorageMixin,
Container,
cfdm.H5netcdfArray,
):
class H5netcdfArray:
"""A netCDF array accessed with `h5netcdf` using the `h5py` backend.

.. versionadded:: 3.16.3

"""

def __init__(self, *args, **kwargs):
class DeprecationError(Exception):
"""Deprecation error."""

raise DeprecationError(
f"{self.__class__.__name__} was deprecated at version NEXTVERSION "
"and is no longer available. Use XnetcdfArray instead."
)
19 changes: 9 additions & 10 deletions cf/data/array/netcdf4array.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import cfdm

from ...mixin_container import Container
from .mixin import ActiveStorageMixin
class NetCDF4Array:
"""A netCDF array accessed with `netCDF4`."""

def __init__(self, *args, **kwargs):
class DeprecationError(Exception):
"""Deprecation error."""

class NetCDF4Array(
ActiveStorageMixin,
Container,
cfdm.NetCDF4Array,
):
"""A netCDF array accessed with `netCDF4`."""
raise DeprecationError(
f"{self.__class__.__name__} was deprecated at version NEXTVERSION "
"and is no longer available. Use XnetcdfArray instead."
)
21 changes: 10 additions & 11 deletions cf/data/array/pyfivearray.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import cfdm

from ...mixin_container import Container
from .mixin import ActiveStorageMixin


class PyfiveArray(
ActiveStorageMixin,
Container,
cfdm.PyfiveArray,
):
class PyfiveArray:
"""A netCDF array accessed with `pyfive`.

.. versionadded:: 3.20.0

"""

def __init__(self, *args, **kwargs):
class DeprecationError(Exception):
"""Deprecation error."""

raise DeprecationError(
f"{self.__class__.__name__} was deprecated at version NEXTVERSION "
"and is no longer available. Use XnetcdfArray instead."
)
19 changes: 10 additions & 9 deletions cf/data/array/scipynetcdffilearray.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import cfdm

from ...mixin_container import Container


class ScipyNetcdfFileArray(
Container,
cfdm.ScipyNetcdfFileArray,
):
class ScipyNetcdfFileArray:
"""A netCDF-3 array accessed with `scipy.io.netcdf_file`.

.. versionadded:: 3.20.0

"""

def __init__(self, *args, **kwargs):
class DeprecationError(Exception):
"""Deprecation error."""

raise DeprecationError(
f"{self.__class__.__name__} was deprecated at version NEXTVERSION "
"and is no longer available. Use XnetcdfArray instead."
)
Loading