Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set complevel for compressed float vars #162

Merged
merged 10 commits into from
Feb 28, 2023

Conversation

zmoon
Copy link
Collaborator

@zmoon zmoon commented Feb 23, 2023

We first noticed this in #160

In current netcdf-c (v4.9.1 when first noticed), it errors if you set compression for a variable-length dtype variable (such as string arrays with NumPy object dtype). With this PR, we only set compression for float vars.

See:


Summary:

  • in write_ncf, only supply complevel for float vars
  • add save/load to idealized example nb, which gets run in CI
  • only supply complevel for float vars in write_analysis_ncf
  • add some links/markup to the separate save/load example nbs
  • fix toggle buttons in some example notebooks by explicitly adding sphinx-togglebutton

in current netcdf-c, it errors if you try to apply to a variable-
length dtype variable (such as string vars with object dtype)
@zmoon
Copy link
Collaborator Author

zmoon commented Feb 23, 2023

@colin-harkins we may have to do this in write_analysis_ncf as well. Maybe we can add a test. ✔

@zmoon
Copy link
Collaborator Author

zmoon commented Feb 27, 2023

@colin-harkins I think this is ready for you to take a look. I added some links and such to your example nbs.

Copy link
Collaborator

@colin-harkins colin-harkins left a comment

Choose a reason for hiding this comment

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

@zmoon This looks good to me, thanks!

@zmoon zmoon merged commit e578a4c into NOAA-CSL:develop Feb 28, 2023
@zmoon zmoon deleted the hotfix/write_ncf_compress branch February 28, 2023 00:25
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.

2 participants