Commit 334cd317 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added test/Enspctlstat.test.in

parent b1500603
......@@ -687,6 +687,7 @@ test/Arith.test.in -text
test/Cat.test.in -text
test/Copy_netcdf.test.in -text
test/Detrend.test.in -text
test/Enspctl.test.in -text
test/Ensstat.test.in -text
test/File.test.in -text
test/Genweights.test.in -text
......
#! @SHELL@
echo 1..1 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout
CDOERR=cerr
PCTLS="1 20 25 33 50 66 75 80 99 100"
#
IFILE=$DATAPATH/ts_mm_5years
export CDO_FILE_SUFFIX=NULL
$CDO splityear $IFILE ts_year
IFILE="ts_year????"
#
NTEST=1
RSTAT=0
echo "Running test: $NTEST"
#
for PCTL in $PCTLS; do
RFILE=$DATAPATH/enspctl${PCTL}_ref
OFILE=enspctl${STAT}_res
CDOTEST="enspctl"
CDOCOMMAND="$CDO enspctl,${PCTL} $IFILE $OFILE"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
# let NTEST+=1
rm -f $OFILE
done
#
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
#
rm -f $CDOOUT $CDOERR
rm -f $IFILE
#
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment