Skip to content

Conversation

@treigerm
Copy link
Member

@treigerm treigerm commented Jan 17, 2025

This PR adds ZFP and Bitround compressors with the settings from the compression-lab-notebooks. We will probably want to fine-tune the settings at some point to optimize the compression performance but I wanted to get some code working at first.

The changes to the code are mostly adjustments that I had to make to get all the compressors working on both the CMIP6 and ERA5 sample data. The two main adjustments I had to do were:
1. ZFP can only compress 1-4D data so we currently manually loop over the ensemble dimension. I am then combining all the (de)compression performance measurements with the combine_measurements function which is a bit hacky. Is there a better/cleaner way to do it, @juntyr ?
2. I adjusted the performance measurements data structure to account for the fact that there might be multiple variables in a given zarr array.

@treigerm
Copy link
Member Author

Ah, I just saw you opened an issue about this in #2 !

@juntyr
Copy link
Collaborator

juntyr commented Jan 17, 2025

SZ3 technically also has the 4D Limitation but already has a builtin workaround for 0-size or 1-size dimensions. I will be adding it to ZFP in any case, so any ZFP-specific hacks should be avoided in this repo.

I think the ability of averaging over the ensemble dimension is useful in general, irrespective of the compressor

@juntyr juntyr mentioned this pull request Jan 17, 2025
@juntyr
Copy link
Collaborator

juntyr commented Jan 17, 2025

I just remembered that we also have a reshape codec, see #4 for an alternative for supporting ZFP

Copy link
Collaborator

@juntyr juntyr left a comment

Choose a reason for hiding this comment

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

I like most of the usability changes a lot and would like to merge them quickly.

However, I'd prefer to split out ZFP support (in favour of #4) and remove its specialized handling in this PR.

@treigerm
Copy link
Member Author

The approach in #4 seems a lot cleaner and avoids the workarounds in the code, so I definitely prefer that alternative! I've removed the special handling of ZFP from the PR now.

@juntyr juntyr changed the title Add ZFP and Bitround compressor Fix multi-variable compression stats Jan 20, 2025
Copy link
Collaborator

@juntyr juntyr left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @treigerm!

@juntyr juntyr merged commit 4dcc86c into main Jan 20, 2025
3 checks passed
@juntyr juntyr deleted the additional_compressors branch January 20, 2025 09:24
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