Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
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
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ repos:
# https://google.github.io/styleguide/pyguide.html#381-docstrings) as much
# as possible (see https://github.com/myint/docformatter for docs, with
# configuration as below)
- repo: https://github.com/myint/docformatter
rev: v1.4
# - repo: https://github.com/myint/docformatter
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.6
hooks:
- id: docformatter
# These arguments act as the configuration for docformatter. They:
Expand All @@ -48,7 +49,7 @@ repos:
# be detected by the 'pydocstyle' checker
# (see http://www.pydocstyle.org/en/stable/index.html for
# docs and see the cfdm .pydocstyle.ini file for our custom configuration)
- repo: https://github.com/pycqa/pydocstyle
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
Expand All @@ -67,7 +68,7 @@ repos:
# (see https://pycqa.github.io/isort/ for documentation). It is fully
# compatible with 'black' with the lines set to ensure so in the repo's
# pyproject.toml. Other than that and the below, no extra config is required.
- repo: https://github.com/pycqa/isort
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
Expand Down
9 changes: 9 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ Version NEXTVERSION

**2025-??-??**

* Read Zarr datasets with `cfdm.read`
(https://github.com/NCAS-CMS/cfdm/issues/335)
* Read multiple datasets simultaneausly with `cfdm.read`
(https://github.com/NCAS-CMS/cfdm/issues/336)
* New keyword parameters to `cfdm.read`: ``recursive``,
``followlinks`` (https://github.com/NCAS-CMS/cfdm/issues/336)
* New keyword parameters to `cfdm.read`: ``cdl_string``
(https://github.com/NCAS-CMS/cfdm/issues/337)
* Update CF aggregation keywords
(https://github.com/NCAS-CMS/cfdm/issues/341)
* Set new minimum version of `dask`: ``2025.5.1``
(https://github.com/NCAS-CMS/cfdm/issues/339)
* New dependency: ``zarr>=3.0.8``
* Changed dependency: ``dask>=2025.5.1``

----
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ inspecting it:

The ``cfdm`` package can:

* read field and domain constructs from netCDF and CDL datasets with a
choice of netCDF backends,and in local, http, and s3 locations,
* read field and domain constructs from netCDF, CDL, and Zarr datasets
with a choice of netCDF backends, and in local, http, and s3 locations,
* be fully flexible with respect to HDF5 chunking,
* create new field and domain constructs in memory,
* write and append field and domain constructs to netCDF datasets on disk,
Expand Down
19 changes: 17 additions & 2 deletions cfdm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""cfdm is a reference implementation of the CF data model.
"""Cfdm is a reference implementation of the CF data model.

It identifies the fundamental elements of the CF conventions and
shows how they relate to each other, independently of the netCDF
Expand All @@ -18,7 +18,7 @@

The cfdm package can:

* read field constructs from netCDF and CDL datasets,
* read field constructs from netCDF, CDL, and Zarr datasets,
* create new field constructs in memory,
* write and append field constructs to netCDF datasets on disk,
* read, write, and create datasets containing hierarchical groups,
Expand Down Expand Up @@ -54,6 +54,7 @@
"dask",
"scipy",
"h5netcdf",
"zarr",
"s3fs",
"uritools",
"cfunits",
Expand Down Expand Up @@ -113,6 +114,19 @@
f"Got {h5py.__version__} at {h5py.__file__}"
)

# Check the version of zarr
try:
import zarr
except ImportError as error1:
raise ImportError(_error0 + str(error1))
else:
_minimum_vn = "3.0.8"
if Version(zarr.__version__) < Version(_minimum_vn):
raise ValueError(
f"Bad zarr version: cfdm requires zarr>={_minimum_vn}. "
f"Got {zarr.__version__} at {zarr.__file__}"
)

# Check the version of s3fs
try:
import s3fs
Expand Down Expand Up @@ -244,6 +258,7 @@
RaggedIndexedContiguousArray,
SparseArray,
SubsampledArray,
ZarrArray,
)

from .data import (
Expand Down
2 changes: 1 addition & 1 deletion cfdm/auxiliarycoordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AuxiliaryCoordinate(

{{netCDF UGRID node coordinate}}

{{netCDF HDF5 chunks}}
{{netCDF dataset chunks}}

.. versionadded:: (cfdm) 1.7.0

Expand Down
2 changes: 1 addition & 1 deletion cfdm/bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Bounds(

{{netCDF variable group}}

{{netCDF HDF5 chunks}}
{{netCDF dataset chunks}}

.. versionadded:: (cfdm) 1.7.0

Expand Down
2 changes: 2 additions & 0 deletions cfdm/cellconnectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class CellConnectivity(

{{netCDF variable}}

{{netCDF dataset chunks}}

.. versionadded:: (cfdm) 1.11.0.0

"""
Expand Down
2 changes: 1 addition & 1 deletion cfdm/cellmeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CellMeasure(

{{netCDF global attributes}}

{{netCDF HDF5 chunks}}
{{netCDF dataset chunks}}

.. versionadded:: (cfdm) 1.7.0

Expand Down
Loading