Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
143 stars 68 forks source link

Don't open all zips as zarr #1320

Closed tdrwenski closed 3 months ago

tdrwenski commented 3 months ago

Description of Changes

Fixes https://github.com/Unidata/netcdf-java/issues/1319.

Currently, the ZarrIosp opens all files that have the Raf type RandomAccessDirectory. The Raf is assigned this type for in the case MFiles.create(location).isDirectory() == true.

For a single zipped file, we would like Zarr to not be used. So we need the Raf to not be a RandomAccessDirectory. Then, as without the zarr code, the compressed file will get uncompressed and the uncompressed file will be assigned a normal RandomAccessFile Raf.

This PR fixes this issue by not classifying single zipped files as "directories".

tdrwenski commented 3 months ago

Jenkins tests passing: https://jenkins-aws.unidata.ucar.edu/view/Users/job/tara-netcdf-java/52/