Commit 163b053d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added test for Seasstat.

parent 687e9f08
......@@ -21060,7 +21060,7 @@ ac_config_files="$ac_config_files test/Cat.test test/Gridarea.test test/Genweigh
 
ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Vertint.test"
 
ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Runstat.test"
ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.test"
 
ac_config_files="$ac_config_files test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
 
......@@ -22234,6 +22234,7 @@ do
"test/Vertint.test") CONFIG_FILES="$CONFIG_FILES test/Vertint.test" ;;
"test/Timstat.test") CONFIG_FILES="$CONFIG_FILES test/Timstat.test" ;;
"test/Timselstat.test") CONFIG_FILES="$CONFIG_FILES test/Timselstat.test" ;;
"test/Seasstat.test") CONFIG_FILES="$CONFIG_FILES test/Seasstat.test" ;;
"test/Runstat.test") CONFIG_FILES="$CONFIG_FILES test/Runstat.test" ;;
"test/Ymonstat.test") CONFIG_FILES="$CONFIG_FILES test/Ymonstat.test" ;;
"test/Fldstat.test") CONFIG_FILES="$CONFIG_FILES test/Fldstat.test" ;;
......@@ -23759,6 +23760,7 @@ _LT_EOF
"test/Vertint.test":F) chmod a+x "$ac_file" ;;
"test/Timstat.test":F) chmod a+x "$ac_file" ;;
"test/Timselstat.test":F) chmod a+x "$ac_file" ;;
"test/Seasstat.test":F) chmod a+x "$ac_file" ;;
"test/Runstat.test":F) chmod a+x "$ac_file" ;;
"test/Ymonstat.test":F) chmod a+x "$ac_file" ;;
"test/Fldstat.test":F) chmod a+x "$ac_file" ;;
......
......@@ -250,7 +250,7 @@ AC_PROG_AWK
AC_CONFIG_FILES([test/File.test test/Read_grib.test test/Read_netcdf.test test/Copy_netcdf.test],[chmod a+x "$ac_file"])
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/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Timstat.test test/Timselstat.test test/Runstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.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"])
......
......@@ -13,8 +13,8 @@ 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 \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Timselstat.test Ymonstat.test \
Runstat.test \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Timselstat.test Seasstat.test \
Runstat.test Ymonstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......
......@@ -87,16 +87,17 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Remap.test.in $(srcdir)/Select.test.in \
$(srcdir)/Spectral.test.in $(srcdir)/Vertint.test.in \
$(srcdir)/Timstat.test.in $(srcdir)/Timselstat.test.in \
$(srcdir)/Runstat.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 \
$(srcdir)/Collgrid.test.in $(srcdir)/threads.test.in \
$(srcdir)/tsformat.test.in $(srcdir)/wildcard.test.in \
$(srcdir)/MapReduce.test.in $(srcdir)/Ninfo.test.in README
$(srcdir)/Seasstat.test.in $(srcdir)/Runstat.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 $(srcdir)/Collgrid.test.in \
$(srcdir)/threads.test.in $(srcdir)/tsformat.test.in \
$(srcdir)/wildcard.test.in $(srcdir)/MapReduce.test.in \
$(srcdir)/Ninfo.test.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
......@@ -110,11 +111,12 @@ CONFIG_HEADER = $(top_builddir)/src/config.h
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 Vertint.test Timstat.test \
Timselstat.test Runstat.test Ymonstat.test Fldstat.test \
Fldpctl.test Ensstat.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
Timselstat.test Seasstat.test Runstat.test Ymonstat.test \
Fldstat.test Fldpctl.test Ensstat.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@)
......@@ -525,8 +527,8 @@ 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 \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Timselstat.test Ymonstat.test \
Runstat.test \
Ensstat.test Enspctl.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test Timstat.test Timselstat.test Seasstat.test \
Runstat.test Ymonstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......@@ -603,6 +605,8 @@ Timstat.test: $(top_builddir)/config.status $(srcdir)/Timstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Timselstat.test: $(top_builddir)/config.status $(srcdir)/Timselstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Seasstat.test: $(top_builddir)/config.status $(srcdir)/Seasstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Runstat.test: $(top_builddir)/config.status $(srcdir)/Runstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Ymonstat.test: $(top_builddir)/config.status $(srcdir)/Ymonstat.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$$
TYPE=seas
STATS="min max sum avg mean std std1 var var1"
NTEST=1
#
IFILE=$DATAPATH/ts_mm_5years
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO ${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
......@@ -6,6 +6,7 @@ FILE_REF = file_F32_srv_ref
GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile02_sinfo_ref grib_testfile02_info_ref grib_testfile03_sinfo_ref grib_testfile03_info_ref
NETCDF_REF = netcdf_testfile01_sinfon_ref netcdf_testfile01_infon_ref netcdf_testfile02_sinfon_ref netcdf_testfile02_infon_ref
YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymonstd_ref ymonstd1_ref ymonvar_ref ymonvar1_ref
SEASSTAT_REF = seasmin_ref seasmax_ref seassum_ref seasavg_ref seasmean_ref seasstd_ref seasstd1_ref seasvar_ref seasvar1_ref
RUNSTAT_REF = runmin_ref runmax_ref runsum_ref runavg_ref runmean_ref runstd_ref runstd1_ref runvar_ref runvar1_ref
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
YEARSTAT_REF = yearmin_ref yearmax_ref yearsum_ref yearavg_ref yearmean_ref yearstd_ref yearstd1_ref yearvar_ref yearvar1_ref
......@@ -28,4 +29,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) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(SEASSTAT_REF) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_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)
......@@ -293,6 +293,7 @@ FILE_REF = file_F32_srv_ref
GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile02_sinfo_ref grib_testfile02_info_ref grib_testfile03_sinfo_ref grib_testfile03_info_ref
NETCDF_REF = netcdf_testfile01_sinfon_ref netcdf_testfile01_infon_ref netcdf_testfile02_sinfon_ref netcdf_testfile02_infon_ref
YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymonstd_ref ymonstd1_ref ymonvar_ref ymonvar1_ref
SEASSTAT_REF = seasmin_ref seasmax_ref seassum_ref seasavg_ref seasmean_ref seasstd_ref seasstd1_ref seasvar_ref seasvar1_ref
RUNSTAT_REF = runmin_ref runmax_ref runsum_ref runavg_ref runmean_ref runstd_ref runstd1_ref runvar_ref runvar1_ref
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
YEARSTAT_REF = yearmin_ref yearmax_ref yearsum_ref yearavg_ref yearmean_ref yearstd_ref yearstd1_ref yearvar_ref yearvar1_ref
......@@ -315,7 +316,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) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(SEASSTAT_REF) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_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:
......
......@@ -25,6 +25,12 @@ $CDO selyear,1991 $IFILE ts_1d_1year
STATS="min max sum avg mean std std1 var var1"
#
IFILE=ts_mm_5years
for STAT in $STATS; do
$CDO $FORMAT seas${STAT} $IFILE seas${STAT}_ref
done
exit
#
IFILE=ts_mm_5years
for STAT in $STATS; do
$CDO $FORMAT run${STAT},12 $IFILE run${STAT}_ref
done
......
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