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

Added test/Timselpctl.test.in.

parent 3fb5393a
......@@ -280,7 +280,7 @@ AC_CONFIG_FILES([test/File.test test/Read_grib.test test/Read_netcdf.test test/C
AC_CONFIG_FILES([test/Comp.test test/Compc.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test test/Remap2.test test/Remap3.test test/Remapgrid.test test/Remapeta.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/EOF.test test/Select.test test/Spectral.test test/Inttime.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Timstat.test test/Timstat2.test test/Yearmonstat.test test/Timselstat.test test/Seasstat.test test/Timpctl.test test/Runstat.test test/Runpctl.test test/Multiyearstat.test test/Ydrunstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Timstat.test test/Timstat2.test test/Yearmonstat.test test/Timselstat.test test/Seasstat.test test/Timpctl.test test/Timselpctl.test test/Runstat.test test/Runpctl.test test/Multiyearstat.test test/Ydrunstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gridboxstat.test test/Vertstat.test test/Varsstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Merstat.test test/Zonstat.test test/Mergetime.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Monarith.test test/Ymonarith.test test/Expr.test],[chmod a+x "$ac_file"])
......
......@@ -56,6 +56,7 @@ TESTS =\
Smooth.test \
Spectral.test \
Timpctl.test \
Timselpctl.test \
Timselstat.test \
Timstat.test \
Timstat2.test \
......
......@@ -4,17 +4,12 @@ echo 1..8 # Number of tests to be executed.
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
#
FORMAT="-f srv -b 32"
#
TYPES="seas tim year mon day yseas ymon yday"
PCTL=50
#
NTEST=1
#
for TYPE in $TYPES; do
if [ $TYPE = day ] ; then
......@@ -42,15 +37,11 @@ for TYPE in $TYPES; do
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
#
exit 0
#! @BASH@
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
#
FORMAT="-f srv -b 32"
#
TYPE="timsel"
PCTL=50
#
NTEST=1
#
IFILE=$DATAPATH/ts_mm_5years
#
for NSETS in 12 60; do
#
if [ $NSETS -eq 12 ] ; then
RTYPE=year
elif [ $NSETS -eq 60 ] ; then
RTYPE=tim
fi
RSTAT=0
RFILE=$DATAPATH/${TYPE}${NSETS}pctl${PCTL}_ref
OFILE=${TYPE}${NSETS}pctl${PCTL}_res
CDOTEST="${TYPE}pctl nsets=${NSETS}"
CDOCOMMAND="$CDO $FORMAT ${TYPE}pctl,${PCTL},${NSETS} $IFILE $DATAPATH/${RTYPE}min_ref $DATAPATH/${RTYPE}max_ref $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
exit 0
......@@ -16,6 +16,7 @@ YSEASSTAT = yseasmin_ref yseasmax_ref yseassum_ref yseasavg_ref yseasmean_ref
SEASSTAT = seasmin_ref seasmax_ref seassum_ref seasavg_ref seasmean_ref seasstd_ref seasstd1_ref seasvar_ref seasvar1_ref seasrange_ref
SEASMSTAT = seasmmin_ref seasmmax_ref seasmsum_ref seasmavg_ref seasmmean_ref seasmstd_ref seasmstd1_ref seasmvar_ref seasmvar1_ref seasmrange_ref
TIMPCTL = seaspctl50_ref timpctl50_ref yearpctl50_ref monpctl50_ref daypctl50_ref yseaspctl50_ref ymonpctl50_ref ydaypctl50_ref
TIMSELPCTL = timpsel12ctl50_ref timpsel60ctl50_ref
RUNSTAT = runmin_ref runmax_ref runsum_ref runavg_ref runmean_ref runstd_ref runstd1_ref runvar_ref runvar1_ref runrange_ref
RUNMSTAT = runmmin_ref runmmax_ref runmsum_ref runmavg_ref runmmean_ref runmstd_ref runmstd1_ref runmvar_ref runmvar1_ref runmrange_ref
RUNPCTL = runpctl1_ref runpctl20_ref runpctl25_ref runpctl33_ref runpctl50_ref runpctl66_ref runpctl75_ref runpctl80_ref runpctl99_ref runpctl100_ref
......
......@@ -282,6 +282,14 @@ for PCTL in $PCTLS; do
done
#
IFILE=ts_mm_5years
for PCTL in $PCTLS; do
$CDO $FORMAT timselpctl,$PCTL,12 $IFILE yearmin_ref yearmax_ref timsel12pctl${PCTL}_ref
done
for PCTL in $PCTLS; do
$CDO $FORMAT timselpctl,$PCTL,60 $IFILE timmin_ref timmax_ref timsel60pctl${PCTL}_ref
done
#
IFILE=ts_mm_5years
for PCTL in $PCTLS; do
$CDO $FORMAT yearpctl,$PCTL $IFILE yearmin_ref yearmax_ref yearpctl${PCTL}_ref
done
......
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