![]() |
NetCDF 4.9.3-rc2
|
For full Filters documentation, see Appendix D. NetCDF-4 Filter Support.
The libnetcdf.so library cannot talk to plugin libraries directly. Instead, it requires an "interface" library, which acts as a go-between. The interface libraries are built by the netCDF libraries, when the underlying plugin libraries are detected during configure/build.
When configuring netcdf via either the configure script or via cmake, you'll need to specify the location to install the interface libraries, as follows:
--enable-plugins --with-plugin-dir=$NCPLUGIN_DIR-DPLUGIN_INSTALL_DIR=$NCPLUGIN_DIRwhere $NCPLUGIN_DIR is the path to the user-defined directory, e.g. /usr/local/nc-plugins
After compiling and installing libnetcdf, the interface libraries for those filters detected will be installed in the user-specified NCPLUGIN_DIR.
nc-config --plugindirwill return the location where plugins were installed.
For historical reasons, libnetcdf uses the environmental variable HDF5_PLUGIN_PATH to locate the interface libraries at run-time. This location should be set to the $NCPLUGIN_DIR specified when building and installing libnetcdf.
From scratch, the steps to get this to work are as follows, and assumes libhdf5 was installed.
--enable-plugins and --with-plugin-dir=$HOME/netcdf-pluginsblosc is specified in the generated libnetcdf.settings file. Once built and installed, set the environmental variable HDF5_PLUGIN_PATH=$HOME/netcdf-plugins.
The reason this works is because:
ncdump knows where to find the interface library because HDF5_PLUGIN_PATH is set.