Next: , Previous: nc_def_var_deflate, Up: Variables


6.13 Learn About Deflate Parameters for a Variable: nc_inq_var_deflate

The function nc_inq_var_deflate returns the deflate settings for a variable in a netCDF-4 file.

Usage

     nc_inq_var_deflate(int ncid, int varid, int *shufflep,
                        int *deflatep, int *deflate_levelp);
ncid
NetCDF ID, from a previous call to nc_open or nc_create.
varid
Variable ID.
*shufflep
If this pointer is non-NULL, the nc_inq_var_deflate function will write a 1 if the shuffle filter is turned on for this variable, and a 0 otherwise.
*deflatep
If this pointer is non-NULL, the nc_inq_var_deflate function will write a 1 if the deflate filter is turned on for this variable, and a 0 otherwise.
*deflate_levelp
If this pointer is non-NULL, and the deflate filter is in use for this variable, the nc_inq_var_deflate function will write the deflate_level here.

Errors

nc_inq_var_deflate returns the value NC_NOERR if no errors occurred. Otherwise, the returned status indicates an error.

Possible return codes include:

NC_NOERR
No error.
NC_BADID
Bad ncid.
NC_ENOTNC4
Not a netCDF-4 file.
NC_ENOTVAR
Can't find this variable.

Example