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

test/Timstat: check srv grb and nc format.

parent fec9f582
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPES="ymon yday yhour yseas"
STATS="min max range sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
#
IFILE=$DATAPATH/ts_mm_5years
NTEST=1
......@@ -23,18 +25,21 @@ for TYPE in $TYPES; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT} $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPE=run
STATS="min max range sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
NTEST=1
#
IFILE=$DATAPATH/ts_mm_5years
......@@ -18,18 +20,21 @@ for STAT in $STATS; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT},12 $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT},12 $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPE=seas
STATS="min max range sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
NTEST=1
#
IFILE=$DATAPATH/ts_mm_5years
......@@ -18,18 +20,21 @@ for STAT in $STATS; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT} $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPE=timsel
STATS="min max range sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
NTEST=1
#
IFILE=$DATAPATH/ts_mm_5years
......@@ -18,18 +20,21 @@ for STAT in $STATS; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT},12 $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT},12 $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPES="tim year mon day"
STATS="min max range sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
NTEST=1
#
for TYPE in $TYPES; do
......@@ -25,18 +27,21 @@ for TYPE in $TYPES; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT} $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
......@@ -8,6 +8,8 @@ CDOOUT=cout$$
CDOERR=cerr$$
TYPES="ydrun"
STATS="min max sum avg mean std std1 var var1"
FMS="srv grb nc"
if [ "@ENABLE_NETCDF@" = no ] ; then FMS="srv grb"; fi
#
IFILE=$DATAPATH/ts_mm_5years
NTEST=1
......@@ -19,18 +21,21 @@ for TYPE in $TYPES; do
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${TYPE}${STAT},8 $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
for FM in $FMS; do
CDOCOMMAND="$CDO -f $FM ${TYPE}${STAT},8 $IFILE $OFILE"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,0.004 $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
......
Markdown is supported
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