Skip to content

Commit 73fc17d

Browse files
committed
dev
1 parent 0a4eb7e commit 73fc17d

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

cf/data/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6259,7 +6259,7 @@ def reshape(self, *shape, merge_chunks=True, limit=None, inplace=False):
62596259

62606260
# Clear cyclic axes, as we can't help but lose them in this
62616261
# operation
6262-
d._cyclic = _empty_set
6262+
del d._cyclic
62636263

62646264
return d
62656265

cf/read_write/read.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ class read(cfdm.read):
163163
============ ============================================
164164
file type Description
165165
============ ============================================
166-
``'netCDF'`` Binary netCDF-3 or netCDF-4 file
167-
``'CDL'`` Text CDL representations of a netCDF dataset
168-
``'Zarr'`` A Zarr v2 (xarray) or Zarr v3 hierarchy
169-
``'UM'`` UM fields file or PP file
166+
``'netCDF'`` A netCDF-3 or netCDF-4 dataset
167+
``'CDL'`` A text CDL file of a netCDF dataset
168+
``'Zarr'`` A Zarr v2 (xarray) or Zarr v3 dataset
169+
``'UM'`` A UM fields file or PP dataset
170170
============ ============================================
171171
172172
.. versionadded:: NEXTVERSION
@@ -566,14 +566,15 @@ def _finalise(self):
566566
# ----------------------------------------------------------------
567567
# Aggregate the output fields/domains
568568
# ----------------------------------------------------------------
569-
constructs = self.constructs
570-
if self.aggregate and len(constructs) > 1:
569+
if self.aggregate and len(self.constructs) > 1:
571570
aggregate_options = self.aggregate_options
572571
# Set defaults specific to UM fields
573572
if UM and "strict_units" not in aggregate_options:
574573
aggregate_options["relaxed_units"] = True
575574

576-
self.constructs = cf_aggregate(constructs, **aggregate_options)
575+
self.constructs = cf_aggregate(
576+
self.constructs, **aggregate_options
577+
)
577578

578579
# ----------------------------------------------------------------
579580
# Add standard names to UM/PP fields (after aggregation)
@@ -611,7 +612,7 @@ def _initialise(self):
611612
# Initialise the list of output constructs
612613
if self.field:
613614
self.constructs = FieldList()
614-
else:
615+
elif self.domain:
615616
self.constructs = DomainList()
616617

617618
# Recognised UM dataset formats
@@ -681,6 +682,7 @@ def _read(self, dataset):
681682
super()._read(dataset)
682683

683684
if self.dataset_contents is not None:
685+
# Successfully read the dataset
684686
return
685687

686688
# ------------------------------------------------------------
@@ -727,22 +729,23 @@ def _read(self, dataset):
727729
self.unique_dataset_categories.add("UM")
728730

729731
if self.dataset_contents is not None:
732+
# Successfully read the dataset
730733
return
731734

732735
# ------------------------------------------------------------
733736
# Try to read as a GRIB dataset
734737
#
735-
# Not yet available! The framework will be:
738+
# Not yet available! When (if) the time comes, the framework
739+
# will be:
736740
# ------------------------------------------------------------
741+
#
737742
# if dataset_type is None or dataset_type.intersection(
738743
# self.GRIB_dataset_types
739744
# ):
740745
# if not hasattr(self, "grib_read"):
741746
# # Initialise the GRIB read function
742747
# kwargs = self.kwargs
743-
# grib_kwargs = {
744-
# <ADD SOME CODE HERE>
745-
# }
748+
# grib_kwargs = ... # <ADD SOME CODE HERE>
746749
#
747750
# self.grib_read = partial(
748751
# GRIBRead(self.implementation).read, **grib_kwargs
@@ -759,4 +762,5 @@ def _read(self, dataset):
759762
# self.unique_dataset_categories.add("GRIB")
760763
#
761764
# if self.dataset_contents is not None:
765+
# # Successfully read the dataset
762766
# return

0 commit comments

Comments
 (0)