Skip to content

Conversation

@treigerm
Copy link
Member

This adds the option to compress the data with chunk sizes computed by Bryan's chunking algorithm: https://github.com/NCAS-CMS/cfs3/blob/390ee593bfea1d926d6b814636b02fb4c430f91e/cfs3/cfchunking.py .

ds[v], TARGET_CHUNK_SIZE, word_size=word_size
)
ds[v] = ds[v].chunk(optimal_chunks)
# ds = ds.unify_chunks()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will only affect the coordinates of the dataset. I found that for the CMIP6 ta data this lead to some issue when trying to write the dataset back to disk so I just avoided rechunking the coordinates because it doesn't affect the compression process anyway.

@treigerm treigerm merged commit 372d011 into main Dec 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants