netcdf-c/nc_test4/ref_fillonly.cdl
Dennis Heimbigner 2f0a6d22e9 Fix error where not converting fill data
re: Github Issue https://github.com/Unidata/netcdf-c/issues/1826

It turns out that the common get code (NC4_get_vars) in libhdf5
(and libnczarr) has an optimization where it does not attempt to
read from the file if the file is all fill values. Rather it
just fills the output buffer with the fill value.  The problem
is that -- in that case -- it forgets that conversion might still be
needed.  So the conversion never occurs and the raw bits of
the fill data are stored directly into the memory space.

Solution: move some code around to properly do the
conversion no matter how the data was obtained.

Added a test cases nc_test4/test_fillonly.sh and
nczarr_test/test_fillonlyz.sh
2020-09-12 14:49:59 -06:00

19 lines
312 B
Plaintext

netcdf ref_fillonly {
dimensions:
x = UNLIMITED ; // (6 currently)
variables:
int i(x) ;
i:_Storage = "chunked" ;
i:_ChunkSizes = 6 ;
float f(x) ;
f:_FillValue = -9999.f ;
f:_Storage = "chunked" ;
f:_ChunkSizes = 6 ;
// global attributes:
:_Format = "netCDF-4" ;
data:
i = 1, 2, 3, 4, 5, 6 ;
}