forked from Unidata/netcdf-c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some bugs in the blosc filter wrapper
re: Issue Unidata#2458 The above Github Issue revealed some bugs in the file netcdf-c/plugins/H5Zblosc.c. Fixed and added a testcase. Also discovered that the Blosc LZ sub-compressors do not work well with small datasets. Misc. Other Change(s): I noticed that the file "dap4_test/baselinethredds/GOES16_CONUS_20170821_020218_0.47_1km_33.3N_91.4W.nc4.thredds" is still causing tar errors during "make distcheck", so I made some changes to do rename at test-time.
- Loading branch information
1 parent
64033e3
commit 3623e17
Showing
14 changed files
with
222 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
netcdf x3 { | ||
dimensions: | ||
time = 10 ; | ||
lat = 2 ; | ||
lon = 4 ; | ||
variables: | ||
float three_dmn_rec_var(time, lat, lon) ; | ||
three_dmn_rec_var:long_name = "three dimensional record variable" ; | ||
three_dmn_rec_var:units = "watt meter-2" ; | ||
three_dmn_rec_var:_FillValue = -99.f ; | ||
data: | ||
|
||
three_dmn_rec_var = | ||
1, 2, 3, 4, | ||
5, 6, 7, 8, | ||
9, 10, 11, 12, | ||
13, 14, 15, 16, | ||
17, 18, 19, 20, | ||
21, 22, 23, 24, | ||
25, 26, 27, 28, | ||
29, 30, 31, 32, | ||
33, 34, 35, 36, | ||
37, 38, 39, 40, | ||
41, 42, 43, 44, | ||
45, 46, 47, 48, | ||
49, 50, 51, 52, | ||
53, 54, 55, 56, | ||
57, 58, 59, 60, | ||
61, 62, 63, 64, | ||
65, 66, 67, 68, | ||
69, 70, 71, 72, | ||
73, 74, 75, 76, | ||
77, 78, 79, 80 ; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
set -e | ||
|
||
# Load the findplugins function | ||
. ${builddir}/findplugin.sh | ||
echo "findplugin.sh loaded" | ||
|
||
# Function to remove selected -s attributes from file; | ||
# These attributes might be platform dependent | ||
sclean() { | ||
cat $1 \ | ||
| sed -e '/:_IsNetcdf4/d' \ | ||
| sed -e '/:_Endianness/d' \ | ||
| sed -e '/_NCProperties/d' \ | ||
| sed -e '/_SuperblockVersion/d' \ | ||
| cat > $2 | ||
} | ||
|
||
# Function to extract _Filter attribute from a file | ||
# These attributes might be platform dependent | ||
getfilterattr() { | ||
sed -e '/var.*:_Filter/p' -ed <$1 >$2 | ||
} | ||
|
||
trimleft() { | ||
sed -e 's/[ ]*\([^ ].*\)/\1/' <$1 >$2 | ||
} | ||
|
||
if test "x$TESTNCZARR" = x1 ; then | ||
. "$srcdir/test_nczarr.sh" | ||
fi | ||
|
||
if ! avail blosc; then echo "Blosc compressor not found"; exit 0; fi | ||
|
||
# Locate the plugin dir and the library names; argument order is critical | ||
# Find bzip2 and capture | ||
findplugin h5blosc | ||
BLOSCLIB="${HDF5_PLUGIN_LIB}" | ||
BLOSCDIR="${HDF5_PLUGIN_DIR}/${BZIP2LIB}" | ||
|
||
echo "final HDF5_PLUGIN_DIR=${HDF5_PLUGIN_DIR}" | ||
export HDF5_PLUGIN_DIR | ||
export HDF5_PLUGIN_PATH="$HDF5_PLUGIN_DIR" | ||
|
||
localclean() { | ||
rm -f ./tmp_bloscx3.nc ./tmp_bloscx4.nc ./tmp_bloscx4_fail.nc | ||
} | ||
|
||
# Execute the specified tests | ||
|
||
echo "*** Testing dynamic filters using API" | ||
localclean | ||
${NCGEN} -3 -o tmp_bloscx3.nc ${srcdir}/ref_bloscx.cdl | ||
# This should pass | ||
${NCCOPY} -4 -V three_dmn_rec_var -F *,32001,0,0,0,0,1,1,0 ./tmp_bloscx3.nc ./tmp_bloscx4.nc | ||
# This should fail because shuffle is off | ||
if ${NCCOPY} -4 -V three_dmn_rec_var -F *,32001,0,0,0,0,1,0,0 ./tmp_bloscx3.nc ./tmp_bloscx4_fail.nc ; then | ||
echo "*** not xfail: nccopy " | ||
exit 1; | ||
else | ||
echo "*** xfail: nccopy " | ||
fi | ||
|
||
localclean | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.