Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhassell committed Mar 21, 2024
2 parents e7c6f8e + d53e228 commit 2ba85c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ version NEXT
(https://github.com/NCAS-CMS/cf-python/issues/715)
* Improve `cf.Field.collapse` performance by lazily computing reduced
axis coordinates (https://github.com/NCAS-CMS/cf-python/issues/741)
* Reduce output CFA file size with by tailoring the HDF5 chunk sizes
to fit exactly the CFA instruction variables
* Reduce output CFA netCDF file size by setting the HDF5 chunksizes of
CFA variables to be no larger than required
(https://github.com/NCAS-CMS/cf-python/issues/739)
* Fix misleading error message when it is not possible to create area
weights requested from `cf.Field.collapse`
Expand Down
3 changes: 3 additions & 0 deletions cf/read_write/netcdf/netcdfwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ def _cfa_aggregation_instructions(self, data, cfvar):
aggregation_format = []
for indices in data.chunk_indices():
file_details = self._cfa_get_file_details(data[indices])

if len(file_details) != 1:
if file_details:
raise ValueError(
Expand Down Expand Up @@ -972,6 +973,8 @@ def _cfa_aggregation_instructions(self, data, cfvar):
):
n = n_trailing - len(filenames)
if n:
# This chunk has fewer fragment files than some
# others, so some padding is required.
pad = ("",) * n
aggregation_file[i] = filenames + pad
aggregation_format[i] = formats + pad
Expand Down

0 comments on commit 2ba85c1

Please sign in to comment.