1#!/bin/sh 2 3if test "x$srcdir" = x ; then srcdir=`pwd`; fi 4. ../test_common.sh 5 6# This shell script tests ncdump and ncgen on netCDF-4 variables with multiple 7# unlimited dimensions. 8 9set -e 10 11echo "" 12echo "*** Testing ncdump output for multiple unlimited dimensions" 13echo "*** creating netcdf file tst_mud4.nc from ref_tst_mud4.cdl ..." 14${NCGEN} -4 -b -o tst_mud4.nc $srcdir/ref_tst_mud4.cdl 15echo "*** creating tst_mud4.cdl from tst_mud4.nc ..." 16${NCDUMP} tst_mud4.nc > tst_mud4.cdl 17# echo "*** comparing tst_mud4.cdl with ref_tst_mud4.cdl..." 18diff -b tst_mud4.cdl $srcdir/ref_tst_mud4.cdl 19# echo "*** comparing annotation from ncdump -bc tst_mud4.nc with expected output..." 20${NCDUMP} -bc tst_mud4.nc > tst_mud4-bc.cdl 21diff -b tst_mud4-bc.cdl $srcdir/ref_tst_mud4-bc.cdl 22# Now test with char arrays instead of ints 23echo "*** creating netcdf file tst_mud4_chars.nc from ref_tst_mud4_chars.cdl ..." 24${NCGEN} -4 -b -o tst_mud4_chars.nc $srcdir/ref_tst_mud4_chars.cdl 25echo "*** creating tst_mud4_chars.cdl from tst_mud4_chars.nc ..." 26${NCDUMP} tst_mud4_chars.nc > tst_mud4_chars.cdl 27# echo "*** comparing tst_mud4_chars.cdl with ref_tst_mud4_chars.cdl..." 28diff -b tst_mud4_chars.cdl $srcdir/ref_tst_mud4_chars.cdl 29exit 0 30# unused 31# echo "*** comparing annotation from ncdump -bc tst_mud4_chars.nc with expected output..." 32${NCDUMP} -bc tst_mud4_chars.nc > tst_mud4_chars-bc.cdl 33# diff -b tst_mud4_chars-bc.cdl $srcdir/ref_tst_mud4_chars-bc.cdl 34echo "*** All ncdump test output for multiple unlimited dimensions passed!" 35exit 0 36