Hi,
I found unexpected behavior for me on deflate argument of
nc_def_var_deflate in NetCDF 4.3.3.1.
The NetCDF C Interface Guide
(https://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/nc_005fdef_005fvar_005fdeflate.html)
says that 'deflate' argument is
'If non-zero, turn on the deflate filter at the level specified by
the deflate_level parameter. '
I expected that turn off the deflate filter
if deflate argument is zero with non-zero deflate_level value.
The current behavior is that, deflate filter turns on
with deflate=0 and deflate_level=1(non-zero).
nc_def_var_extra function in libsrc4/nc4var.c
849: /* Check compression options. */
850: if (deflate && !deflate_level)
851: return NC_EINVAL;
should be modified like following:
849: /* Check compression options. */
850: if (!deflate || !deflate_level)
851: return NC_EINVAL;
or the guide should be corrected.
Thank you,
----
Shin-ya Murakami
Institute of Space and Astronautical Science,
Japan Aerospace Exploration Agency.
email: murashin@xxxxxxxxxxxxxx