Skip to content

Commit 6849ef8

Browse files
committed
dev
1 parent 73fc17d commit 6849ef8

File tree

7 files changed

+32
-29
lines changed

7 files changed

+32
-29
lines changed

Changelog.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version NEXTVERSION
2+
----------------
3+
4+
**2025-??-??**
5+
6+
* Read Zarr datasets with `cf.read`
7+
(https://github.com/NCAS-CMS/cf-python/issues/863)
8+
* Changed dependency: ``cfdm>=1.12.2.0, <1.12.3.0``
9+
10+
----
11+
112
version 3.17.0
213
--------------
314

cf/data/array/zarrarray.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
from ...mixin_container import Container
44

5+
# Uncomment when we can use active storage on Zarr datasets:
56
# from .mixin import ActiveStorageMixin
67

78

89
class ZarrArray(
9-
# ActiveStorageMixin,
10+
# Uncomment when we can use active storage on Zarr datasets:
11+
# ActiveStorageMixin,
1012
Container,
1113
cfdm.ZarrArray,
1214
):

cf/data/mixin/deprecations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,14 @@ def dumps(self):
437437
def HDF_chunks(self, *chunks):
438438
"""Get or set HDF chunk sizes.
439439
440-
The HDF chunk sizes may be used by external code that allows
441-
`Data` objects to be written to netCDF files.
442-
443440
Deprecated at version 3.14.0 and is no longer available. Use
444441
the methods `nc_clear_dataset_chunksizes`,
445442
`nc_dataset_chunksizes`, and `nc_set_dataset_chunksizes`
446443
instead.
447444
445+
The HDF chunk sizes may be used by external code that allows
446+
`Data` objects to be written to netCDF files.
447+
448448
.. seealso:: `nc_clear_dataset_chunksizes`,
449449
`nc_dataset_chunksizes`,
450450
`nc_set_dataset_chunksizes`

cf/field.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13991,11 +13991,12 @@ def field(
1399113991
) # pragma: no cover
1399213992

1399313993
def HDF_chunks(self, *chunksizes):
13994-
"""Deprecated at version 3.0.0.
13994+
"""Get or set HDF chunk sizes.
1399513995

13996-
Use methods 'Data.nc_dataset_chunksizes',
13997-
'Data.nc_set_dataset_chunksizes',
13998-
'Data.nc_clear_dataset_chunksizes' instead.
13996+
Deprecated at version 3.0.0 and is no longer available. Use
13997+
methods `Data.nc_dataset_chunksizes`,
13998+
`Data.nc_set_dataset_chunksizes`,
13999+
`Data.nc_clear_dataset_chunksizes` instead.
1399914000

1400014001
"""
1400114002
_DEPRECATION_ERROR_METHOD(

cf/read_write/read.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class read(cfdm.read):
146146
147147
{{read datasets: (arbitrarily nested sequence of) `str`}}
148148
149+
{{read recursive: `bool`, optional}}
150+
151+
{{read followlinks: `bool`, optional}}
152+
149153
{{read cdl_string: `bool`, optional}}
150154
151155
{{read external: (sequence of) `str`, optional}}
@@ -165,7 +169,7 @@ class read(cfdm.read):
165169
============ ============================================
166170
``'netCDF'`` A netCDF-3 or netCDF-4 dataset
167171
``'CDL'`` A text CDL file of a netCDF dataset
168-
``'Zarr'`` A Zarr v2 (xarray) or Zarr v3 dataset
172+
``'Zarr'`` A Zarr v2 (xarray-style) or Zarr v3 dataset
169173
``'UM'`` A UM fields file or PP dataset
170174
============ ============================================
171175
@@ -276,24 +280,6 @@ class read(cfdm.read):
276280
select='air_temperature')`` is equivalent to ``fl =
277281
cf.read(file).select_by_identity('air_temperature')``.
278282
279-
recursive: `bool`, optional
280-
If True then recursively read sub-directories of any
281-
directories specified with the *files* parameter.
282-
283-
followlinks: `bool`, optional
284-
If True, and *recursive* is True, then also search for
285-
files in sub-directories which resolve to symbolic
286-
links. By default directories which resolve to symbolic
287-
links are ignored. Ignored of *recursive* is False. Files
288-
which are symbolic links are always followed.
289-
290-
Note that setting ``recursive=True, followlinks=True`` can
291-
lead to infinite recursion if a symbolic link points to a
292-
parent directory of itself.
293-
294-
This parameter replaces the deprecated *follow_symlinks*
295-
parameter.
296-
297283
{{read warn_valid: `bool`, optional}}
298284
299285
.. versionadded:: 3.4.0

cf/test/test_read_write.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@ def test_read_write_domain(self):
798798

799799
e = cf.read(tmpfile, domain=True, verbose=1)
800800
self.assertEqual(len(e), 1)
801-
print(type(e))
802801
self.assertIsInstance(e, cf.DomainList)
803802
e = e[0]
804803
self.assertIsInstance(e, cf.Domain)

docs/source/tutorial.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ The following file types can be read:
131131

132132
..
133133
134-
* Datasets in `Zarr v2 (xarray) <https://docs.xarray.dev/en/latest/internals/zarr-encoding-spec.html>`_ and `Zarr v3 <https://zarr-specs.readthedocs.io/en/latest/v3/core/index.html>`_ formats.
134+
* Datasets in `Zarr v2 (xarray-style)
135+
<https://docs.xarray.dev/en/latest/internals/zarr-encoding-spec.html>`_
136+
and `Zarr v3
137+
<https://zarr-specs.readthedocs.io/en/latest/v3/core/index.html>`_
138+
formats.
135139

136140
..
137141

0 commit comments

Comments
 (0)