Skip to content

Commit 2ba85c1

Browse files
committed
dev
2 parents e7c6f8e + d53e228 commit 2ba85c1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ version NEXT
1111
(https://github.com/NCAS-CMS/cf-python/issues/715)
1212
* Improve `cf.Field.collapse` performance by lazily computing reduced
1313
axis coordinates (https://github.com/NCAS-CMS/cf-python/issues/741)
14-
* Reduce output CFA file size with by tailoring the HDF5 chunk sizes
15-
to fit exactly the CFA instruction variables
14+
* Reduce output CFA netCDF file size by setting the HDF5 chunksizes of
15+
CFA variables to be no larger than required
1616
(https://github.com/NCAS-CMS/cf-python/issues/739)
1717
* Fix misleading error message when it is not possible to create area
1818
weights requested from `cf.Field.collapse`

cf/read_write/netcdf/netcdfwrite.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,7 @@ def _cfa_aggregation_instructions(self, data, cfvar):
914914
aggregation_format = []
915915
for indices in data.chunk_indices():
916916
file_details = self._cfa_get_file_details(data[indices])
917+
917918
if len(file_details) != 1:
918919
if file_details:
919920
raise ValueError(
@@ -972,6 +973,8 @@ def _cfa_aggregation_instructions(self, data, cfvar):
972973
):
973974
n = n_trailing - len(filenames)
974975
if n:
976+
# This chunk has fewer fragment files than some
977+
# others, so some padding is required.
975978
pad = ("",) * n
976979
aggregation_file[i] = filenames + pad
977980
aggregation_format[i] = formats + pad

0 commit comments

Comments
 (0)