Do not try to compress variable-sized varaibles by lesserwhirls · Pull Request #1424 · Unidata/netcdf-java

@lesserwhirls

Fixes #1420

Description of Changes

Starting with netCDF-C 4.9.0, trying to apply a filter to a variable-sized variable results in an error (previous behavior was to ignore the filter). See Unidata/netcdf-c#2716 for details. This PR does changes Nc4ChunkingStrategy.java to skip setting a deflate level if the variable is:

  1. of data type String
  2. variable length
  3. a structure containing a variable that is 1. or 2.

Fixes #1420

PR Checklist

  • Link to any issues that the PR addresses
  • Add labels
  • Open as a draft PR
    until ready for review
  • Make sure GitHub tests pass
  • Mark PR as "Ready for Review"

@lesserwhirls

@lesserwhirls

Tests passed on GitHub using netCDF-C 4.8.1 / HDF5 1.12.1, and on Jenkins using netCDF-C 4.8.1 / HDF5 1.12.1 and netCDF-C 4.9.2 / HDF5 1.14.6. Running GitHub test again, but this time using the new thredds-test-environment image, which uses netCDF-C 4.9.2 / HDF5 1.14.6.