Commit 687e9f08 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added test for Runstat.

parent d3a54b85
......@@ -21058,7 +21058,9 @@ ac_config_files="$ac_config_files test/File.test test/Read_grib.test test/Read_n
 
ac_config_files="$ac_config_files test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test"
 
ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timstat.test test/Timselstat.test test/Vertint.test"
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/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
 
......@@ -22229,9 +22231,10 @@ do
"test/Remap.test") CONFIG_FILES="$CONFIG_FILES test/Remap.test" ;;
"test/Select.test") CONFIG_FILES="$CONFIG_FILES test/Select.test" ;;
"test/Spectral.test") CONFIG_FILES="$CONFIG_FILES test/Spectral.test" ;;
"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/Vertint.test") CONFIG_FILES="$CONFIG_FILES test/Vertint.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" ;;
"test/Fldpctl.test") CONFIG_FILES="$CONFIG_FILES test/Fldpctl.test" ;;
......@@ -23753,9 +23756,10 @@ _LT_EOF
"test/Remap.test":F) chmod a+x "$ac_file" ;;
"test/Select.test":F) chmod a+x "$ac_file" ;;
"test/Spectral.test":F) chmod a+x "$ac_file" ;;
"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/Vertint.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" ;;
"test/Fldpctl.test":F) chmod a+x "$ac_file" ;;
......
......@@ -249,7 +249,8 @@ 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/Timstat.test test/Timselstat.test test/Vertint.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/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"])
......
......@@ -14,6 +14,7 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
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 \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......
......@@ -85,18 +85,18 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Copy_netcdf.test.in $(srcdir)/Cat.test.in \
$(srcdir)/Gridarea.test.in $(srcdir)/Genweights.test.in \
$(srcdir)/Remap.test.in $(srcdir)/Select.test.in \
$(srcdir)/Spectral.test.in $(srcdir)/Timstat.test.in \
$(srcdir)/Timselstat.test.in $(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 $(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)/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
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 \
......@@ -109,8 +109,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
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 Timstat.test \
Timselstat.test Vertint.test Ymonstat.test Fldstat.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 \
......@@ -526,6 +526,7 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
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 \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......@@ -596,11 +597,13 @@ Select.test: $(top_builddir)/config.status $(srcdir)/Select.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Spectral.test: $(top_builddir)/config.status $(srcdir)/Spectral.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Vertint.test: $(top_builddir)/config.status $(srcdir)/Vertint.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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)/$@
Vertint.test: $(top_builddir)/config.status $(srcdir)/Vertint.test.in
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
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
......
#! @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=run
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},12 $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
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
MONSTAT_REF = monmin_ref monmax_ref monsum_ref monavg_ref monmean_ref monstd_ref monstd1_ref monvar_ref monvar1_ref
......@@ -27,4 +28,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) $(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) $(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
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
MONSTAT_REF = monmin_ref monmax_ref monsum_ref monavg_ref monmean_ref monstd_ref monstd1_ref monvar_ref monvar1_ref
......@@ -314,7 +315,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) $(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) $(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:
......
......@@ -6,7 +6,7 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Timstat
# Timstat Yearstat Monstat Daystat Runstat
#
IFILE=$HOME/data/cdt/cera/EH5_AMIP_1_TSURF_6H_1991-1995.grb
OFILE=ts_6h_5years
......@@ -25,6 +25,11 @@ $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 run${STAT},12 $IFILE run${STAT}_ref
done
#
IFILE=ts_mm_5years
for STAT in $STATS; do
$CDO $FORMAT tim$STAT $IFILE tim${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