file compression
Added by Jay Su about 6 years ago
How do we do file compression?
For netCDF4 files, simply using "-z zip_4" does not work:
['/builddir/anaconda3/bin/cdo', '-s', '-L', '-f', 'nc4', '-z zip_4', '-sellonlatbox,0.0,90.0,0.0,90.0', '/tmp/input.nc4', '/tmp/output.nc4']
Operator >z zip_4< not found!
I understand the default chunksize is the grid size, but we only have three options: auto, grid or lines. right? Does it work in chain commands? example?
Thanks,
Replies (1)
RE: file compression - Added by Karin Meier-Fleischer about 6 years ago
Hi Jay,
it should work with
/builddir/anaconda3/bin/cdo -s -L -f nc4 -z zip_4 -sellonlatbox,0.0,90.0,0.0,90.0 /tmp/input.nc4 /tmp/output.nc4
Are you calling from python? I'm not quite sure but I think you probably missed the ', ' between -z and zip_4.
['/builddir/anaconda3/bin/cdo', '-s', '-L', '-f', 'nc4', '-z', 'zip_4', '-sellonlatbox,0.0,90.0,0.0,90.0', '/tmp/input.nc4', '/tmp/output.nc4']
If you don't know which compression is the best just make a test and loop through all zip_[1-9] and compare the file sizes.
-Karin