mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-12 15:45:21 +08:00
d15f277252
NetCDF-c Github issue #185 The code in libsrc/dim.c has not been upgraded to support CDF-5 format. Rule we are implementing sets the max dimension sizes as follows: Classic: CDF-1 NC_MAX_INT - 3 = 2147483647 - 3 64 bit Offset: CDF-2 NC_MAX_UINT - 3 = 4294967295 - 3 64 bit Data: CDF-5 NC_MAX_UINT64 - 3 = 18446744073709551615 - 3 The -3 is to handle rounding.
52 lines
1.1 KiB
Bash
52 lines
1.1 KiB
Bash
#!/bin/sh
|
|
set -x
|
|
if test "x$SETX" = x1 ; then echo "file=$0"; set -x ; fi
|
|
# This shell script tests max dimension sizes X mode
|
|
|
|
RETURN=0
|
|
|
|
if test "x$srcdir" = "x"; then
|
|
srcdir=`dirname $0`;
|
|
fi
|
|
# add hack for sunos
|
|
export srcdir;
|
|
|
|
echo ""
|
|
|
|
rm -f tst_dimsize_classic.nc tst_dimsize_64offset.nc tst_dimsize_64data.nc
|
|
|
|
echo "*** Generate: tst_dimsize_classic.nc tst_dimsize_64offset.nc tst_dimsize_64data.nc"
|
|
./tst_dimsizes
|
|
|
|
echo "*** Verify that ncdump can read dimsizes"
|
|
|
|
rm -fr ./tmp
|
|
if test ../ncdump/ncdump -h tst_dimsize_classic.nc > ./tmp ; then
|
|
echo "*** PASS: ncdump tst_dimsize_classic.nc"
|
|
else
|
|
echo "*** FAIL: ncdump tst_dimsize_classic.nc"
|
|
RETURN=1
|
|
fi
|
|
|
|
rm -fr ./tmp
|
|
if test ../ncdump/ncdump -h tst_dimsize_64offset.nc > ./tmp ; then
|
|
echo "*** PASS: ncdump tst_dimsize_64offset.nc"
|
|
else
|
|
echo "*** FAIL: ncdump tst_dimsize_64offset.nc"
|
|
RETURN=1
|
|
fi
|
|
|
|
rm -fr ./tmp
|
|
if test ../ncdump/ncdump -h tst_dimsize_64data.nc > ./tmp ; then
|
|
echo "*** PASS: ncdump tst_dimsize_64data.nc"
|
|
else
|
|
echo "*** FAIL: ncdump tst_dimsize_64data.nc"
|
|
RETURN=1
|
|
fi
|
|
|
|
# Cleanup
|
|
rm -f tst_dimsize_classic.nc tst_dimsize_64offset.nc tst_dimsize_64data.nc
|
|
|
|
exit $RETURN
|
|
|