Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 1.1
-----------

**2026-04-24**

* Fixed incorrect minumum chunk size when using the -d option
(https://github.com/NCAS-CMS/cmip7_repack/issues/29)

Version 1.0
-----------

Expand Down
12 changes: 6 additions & 6 deletions cmip7_repack/cmip7repack
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# https://github.com/NCAS-CMS/cmip7repack/issues
#
# ====================================================================
vn=1.0
release_date="2026-03-03"
vn=1.1
release_date="2026-04-24"

iam_path=$(which "$0")
iam=$(basename "$iam_path")
Expand Down Expand Up @@ -451,7 +451,7 @@ do
echo -e "$usage" >&2
exit 2
fi
if [ "$size" -lt 419430 ]; then
if [ "$size" -lt 4194304 ]; then
echo "Option -d requires an argument of at least 4194304 (i.e. 4 MiB)" >&2
echo -e $"$usage" >&2
exit 2
Expand Down Expand Up @@ -660,14 +660,14 @@ do
n=$((n + 1))
done

# Find the new chunk size in bytes
new_chunk_size=$wordsize
# Find the new chunk size in bytes
new_chunk_size=$wordsize
for n in "${!new_chunk_shape[@]}"
do
new_chunk_size=$((new_chunk_size * new_chunk_shape[n] ))
done

if [ "$new_chunk_size" -gt "$original_chunk_size" ]; then
if [ "$new_chunk_size" -gt "$original_chunk_size" ]; then
# Rechunk to the data variable when the new chunk
# size is strictly greater than the original
# chunks size
Expand Down
Loading