Hello,
I was recently trying to create a compressed variable through the F90
interface. However, nf90_def_var requires the shuffle option be present
before applying the deflate filter. Is this expected? The documentation
doesn't mention this:
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90/NF90_005fDEF_005fVAR.html
Taking a peek into the source code, netcdf4_variables.f90 includes the
following block in various places:
! Handle deflate and shuffle.
if (present(deflate_level)) then
if (deflate_level .gt. 0) then
if (present(shuffle)) then
if (shuffle) then
nf90_def_var_ManyDims = nf_def_var_deflate(ncid, varid, 1, 1,
deflate_level)
else
nf90_def_var_ManyDims = nf_def_var_deflate(ncid, varid, 0, 1,
deflate_level)
end if
end if
end if
endif
Maybe it should be something like:
! Handle deflate and shuffle.
if (present(deflate_level)) then
if (deflate_level .gt. 0) then
if (present(shuffle)) then
if (shuffle) then
nf90_def_var_ManyDims = nf_def_var_deflate(ncid, varid, 1, 1,
deflate_level)
else
nf90_def_var_ManyDims = nf_def_var_deflate(ncid, varid, 0, 1,
deflate_level)
end if
else
nf90_def_var_ManyDims = nf_def_var_deflate(ncid, varid, 0, 1,
deflate_level)
end if
end if
end if
Regards,
-Corey