Commit ce5f4f04 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added test/test_Select.sh

parent 195b1726
......@@ -640,6 +640,7 @@ test/test_Arithc.py -text
test/test_Cat.sh -text
test/test_Gridarea.sh -text
test/test_Remap.sh -text
test/test_Select.sh -text
test/test_Selvar.py -text
test/test_Spectral.sh -text
test/test_Timstat.sh -text
......
2014-01-03 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Added test/test_Select.sh
2014-01-02 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gradsdes: changed LCC to LCCR in PDEF definition [Bug #4344]
......
......@@ -7,6 +7,7 @@ TESTS = $(top_srcdir)/test/test_Gridarea.sh \
$(top_srcdir)/test/test_Cat.sh \
$(top_srcdir)/test/test_Spectral.sh \
$(top_srcdir)/test/test_Timstat.sh \
$(top_srcdir)/test/test_Select.sh \
$(top_srcdir)/test/test_Vertint.sh
# $(top_srcdir)/test/test_info.py
......
......@@ -256,6 +256,7 @@ TESTS = $(top_srcdir)/test/test_Gridarea.sh \
$(top_srcdir)/test/test_Cat.sh \
$(top_srcdir)/test/test_Spectral.sh \
$(top_srcdir)/test/test_Timstat.sh \
$(top_srcdir)/test/test_Select.sh \
$(top_srcdir)/test/test_Vertint.sh
......
......@@ -240,7 +240,7 @@ TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_laf_ref n16_nn_ref n32_bic_ref n32_bil_ref n32_con_ref n32_laf_ref n32_nn_ref
SELECT_REF = select1_ref select2_ref select3_ref
SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref
EXTRA_DIST = $(INPUTDATA) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF)
all: all-am
......
......@@ -19,6 +19,7 @@ RFILE=catdata_ref
OFILE=catdata
#
cp $IFILE ${RFILE}
chmod u+w ${RFILE}
cat $IFILE >> ${RFILE}
#
rm -f ${OFILE}
......
#!/bin/sh
#
CDODEBUG=0
#
if [ "$CDODEBUG" = 0 ]; then CDO="$CDO -s"; fi
CDOOUT=cout
CDOERR=cerr
FORMAT="-f srv -b 32"
RSTAT=0;
#
IFILE=$DATAPATH/pl_data.grb
#
TNUM=0
#
for SELECT in "code=130,152" "code=130,152,level=9000,90" "code=130,152,level=9000,90,timestep=2,3,5" "code=130" "level=90000"; do
TNUM=`expr $TNUM + 1`
RFILE=$DATAPATH/select${TNUM}_ref
OFILE=select${TNUM}_res
$CDO select,${SELECT} $IFILE $OFILE > $CDOOUT 2> $CDOERR
if [ $? != 0 ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
if [ $? != 0 ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
rm -f $OFILE
#
rm -f $CDOOUT $CDOERR
done
#
TNUM=0
#
for DELETE in "code=129" "code=129,130,level=90000,900" "code=129,130,level=90000,900,timestep=1,4"; do
TNUM=`expr $TNUM + 1`
RFILE=$DATAPATH/select${TNUM}_ref
OFILE=delete${TNUM}_res
$CDO delete,${DELETE} $IFILE $OFILE > $CDOOUT 2> $CDOERR
if [ $? != 0 ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
if [ $? != 0 ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ -s $CDOOUT ] ; then RSTAT=`expr $RSTAT + 1`; fi
if [ "$CDODEBUG" = 1 ]; then cat $CDOOUT $CDOERR; fi
rm -f $OFILE
#
rm -f $CDOOUT $CDOERR
done
#
if [ "$CDODEBUG" = 1 ]; then
echo "rstat: $RSTAT"
fi
#
exit $RSTAT
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