NetCDF: Filter error: undefined filter encountered
Added by Pauline Millet about 1 month ago
Hello,
By reading messages on the forum1, I discovered the --filter option for compressing files. I wanted to give it a try on one of my climate data file, but I encountered the following error:
export HDF5_PLUGIN_PATH=/work/kv0653/spack-flo/netcdf-c-4.9.0-7katv4/plugin
cdo -f nc4 --filter 32001,0,0,0,0,4,2,1 copy myinputfile.nc mycompressedfile.nc
cdi cdf_def_var_filter: filterId=32000 numParams=7
cdi error (cdf_def_var_filter): nc_def_var_filter failed; NetCDF: Filter error: undefined filter encountered
Can you help me with this?
Thanks in advance,
Pauline
[1] https://code.mpimet.mpg.de/boards/2/topics/16150?r=16151#message-16151
Replies (1)
RE: NetCDF: Filter error: undefined filter encountered - Added by Uwe Schulzweida about 1 month ago
Dear Pauline,
I’m assuming you’re working on the levante system. It seems that the plugins no longer work under HDF5_PLUGIN_PATH=/work/kv0653/spack-flo/netcdf-c-4.9.0-7katv4/plugins, that was just one example. Generally, on Levante, the HDF5_PLUGIN_PATH is set automatically when loading CDO. So setting this path here is not necessary.
If you are not working on levante, then you will need to find the path to the plugins yourself. If the plugins are not present, you will need to install them yourself. The easiest way to do this is via Python:
pip install hdf5plugin export HDF5_PLUGIN_PATH=$(python -c "import hdf5plugin; print(hdf5plugin.PLUGIN_PATH)") cdo -f nc4 --filter 32001,0,0,0,0,4,2,1 copy myinputfile.nc mycompressedfile.ncSee also: https://docs.unidata.ucar.edu/netcdf-c/4.9.2/filters.html#filters_Process
Cheers,
Uwe