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

Added test for Merstat and Zonstat.

parent b41330b5
......@@ -21062,6 +21062,8 @@ ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timst
 
ac_config_files="$ac_config_files test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
 
ac_config_files="$ac_config_files test/Merstat.test test/Zonstat.test"
ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Expr.test"
 
ac_config_files="$ac_config_files test/Gradsdes.test test/Collgrid.test test/threads.test test/tsformat.test test/wildcard.test"
......@@ -22234,6 +22236,8 @@ do
"test/Fldpctl.test") CONFIG_FILES="$CONFIG_FILES test/Fldpctl.test" ;;
"test/Ensstat.test") CONFIG_FILES="$CONFIG_FILES test/Ensstat.test" ;;
"test/Enspctl.test") CONFIG_FILES="$CONFIG_FILES test/Enspctl.test" ;;
"test/Merstat.test") CONFIG_FILES="$CONFIG_FILES test/Merstat.test" ;;
"test/Zonstat.test") CONFIG_FILES="$CONFIG_FILES test/Zonstat.test" ;;
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arithc.test") CONFIG_FILES="$CONFIG_FILES test/Arithc.test" ;;
......@@ -23755,6 +23759,8 @@ _LT_EOF
"test/Fldpctl.test":F) chmod a+x "$ac_file" ;;
"test/Ensstat.test":F) chmod a+x "$ac_file" ;;
"test/Enspctl.test":F) chmod a+x "$ac_file" ;;
"test/Merstat.test":F) chmod a+x "$ac_file" ;;
"test/Zonstat.test":F) chmod a+x "$ac_file" ;;
"test/Afterburner.test":F) chmod a+x "$ac_file" ;;
"test/Detrend.test":F) chmod a+x "$ac_file" ;;
"test/Arithc.test":F) chmod a+x "$ac_file" ;;
......
......@@ -251,6 +251,7 @@ AC_CONFIG_FILES([test/File.test test/Read_grib.test test/Read_netcdf.test test/C
AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Ymonstat.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],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Expr.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gradsdes.test test/Collgrid.test test/threads.test test/tsformat.test test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/MapReduce.test test/Ninfo.test],[chmod a+x "$ac_file"])
......
......@@ -8,6 +8,7 @@ CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
#
TYPE=fld
STATS="min max sum avg mean std std1 var var1"
#
IFILE=$DATAPATH/t21_geosp_tsurf.grb
......@@ -16,11 +17,11 @@ NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/fld${STAT}_ref
OFILE=fld${STAT}_res
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
CDOTEST="fld$STAT"
CDOCOMMAND="$CDO $FORMAT fld${STAT} $IFILE $OFILE"
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
......
......@@ -12,8 +12,9 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
TESTS = threads.test tsformat.test wildcard.test File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test \
Detrend.test Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Ensstat.test \
Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Detrend.test Genweights.test Remap.test Select.test Spectral.test \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Ymonstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
# tests which should fail
......
......@@ -89,6 +89,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Vertint.test.in $(srcdir)/Ymonstat.test.in \
$(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \
$(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \
$(srcdir)/Merstat.test.in $(srcdir)/Zonstat.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arithc.test.in $(srcdir)/Arith.test.in \
$(srcdir)/Expr.test.in $(srcdir)/Gradsdes.test.in \
......@@ -109,9 +110,10 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Copy_netcdf.test Cat.test Gridarea.test Genweights.test \
Remap.test Select.test Spectral.test Timstat.test Vertint.test \
Ymonstat.test Fldstat.test Fldpctl.test Ensstat.test \
Enspctl.test Afterburner.test Detrend.test Arithc.test \
Arith.test Expr.test Gradsdes.test Collgrid.test threads.test \
tsformat.test wildcard.test MapReduce.test Ninfo.test
Enspctl.test Merstat.test Zonstat.test Afterburner.test \
Detrend.test Arithc.test Arith.test Expr.test Gradsdes.test \
Collgrid.test threads.test tsformat.test wildcard.test \
MapReduce.test Ninfo.test
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
......@@ -521,8 +523,9 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
TESTS = threads.test tsformat.test wildcard.test File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test \
Detrend.test Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Ensstat.test \
Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Detrend.test Genweights.test Remap.test Select.test Spectral.test \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Ymonstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......@@ -606,6 +609,10 @@ Ensstat.test: $(top_builddir)/config.status $(srcdir)/Ensstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Enspctl.test: $(top_builddir)/config.status $(srcdir)/Enspctl.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Merstat.test: $(top_builddir)/config.status $(srcdir)/Merstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Zonstat.test: $(top_builddir)/config.status $(srcdir)/Zonstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Afterburner.test: $(top_builddir)/config.status $(srcdir)/Afterburner.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
......
#! @SHELL@
echo 1..9 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
#
TYPE=mer
STATS="min max sum avg mean std std1 var var1"
#
IFILE=$DATAPATH/t21_geosp_tsurf.grb
#
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
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
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
#! @SHELL@
echo 1..9 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
#
TYPE=zon
STATS="min max sum avg mean std std1 var var1"
#
IFILE=$DATAPATH/t21_geosp_tsurf.grb
#
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
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
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
......@@ -9,6 +9,8 @@ YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymon
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
FLDSTAT_REF = fldmin_ref fldmax_ref fldsum_ref fldavg_ref fldmean_ref fldstd_ref fldstd1_ref fldvar_ref fldvar1_ref
FLDPSTAT_REF = fldpctl1_ref fldpctl20_ref fldpctl25_ref fldpctl33_ref fldpctl50_ref fldpctl66_ref fldpctl75_ref fldpctl80_ref fldpctl99_ref fldpctl100_ref
MERSTAT_REF = mermin_ref mermax_ref mersum_ref meravg_ref mermean_ref merstd_ref merstd1_ref mervar_ref mervar1_ref
ZONSTAT_REF = zonmin_ref zonmax_ref zonsum_ref zonavg_ref zonmean_ref zonstd_ref zonstd1_ref zonvar_ref zonvar1_ref
ENSPSTAT_REF = enspctl1_ref enspctl20_ref enspctl25_ref enspctl33_ref enspctl50_ref enspctl66_ref enspctl75_ref enspctl80_ref enspctl99_ref enspctl100_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
......@@ -22,4 +24,4 @@ GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
......@@ -296,6 +296,8 @@ YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymon
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
FLDSTAT_REF = fldmin_ref fldmax_ref fldsum_ref fldavg_ref fldmean_ref fldstd_ref fldstd1_ref fldvar_ref fldvar1_ref
FLDPSTAT_REF = fldpctl1_ref fldpctl20_ref fldpctl25_ref fldpctl33_ref fldpctl50_ref fldpctl66_ref fldpctl75_ref fldpctl80_ref fldpctl99_ref fldpctl100_ref
MERSTAT_REF = mermin_ref mermax_ref mersum_ref meravg_ref mermean_ref merstd_ref merstd1_ref mervar_ref mervar1_ref
ZONSTAT_REF = zonmin_ref zonmax_ref zonsum_ref zonavg_ref zonmean_ref zonstd_ref zonstd1_ref zonvar_ref zonvar1_ref
ENSPSTAT_REF = enspctl1_ref enspctl20_ref enspctl25_ref enspctl33_ref enspctl50_ref enspctl66_ref enspctl75_ref enspctl80_ref enspctl99_ref enspctl100_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
......@@ -309,7 +311,7 @@ THREAD_REF = thread1_ref tsformat1_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE)
all: all-am
.SUFFIXES:
......
......@@ -7,6 +7,26 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Zonstat
#
STATS="min max sum avg mean std std1 var var1"
IFILE=t21_geosp_tsurf.grb
for STAT in $STATS; do
$CDO $FORMAT zon$STAT $IFILE zon${STAT}_ref
done
exit
########################################################################
#
# Merstat
#
STATS="min max sum avg mean std std1 var var1"
IFILE=t21_geosp_tsurf.grb
for STAT in $STATS; do
$CDO $FORMAT mer$STAT $IFILE mer${STAT}_ref
done
exit
########################################################################
#
# MapReduce
#
for grid in r18x9 icon_cell; do
......
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