Commit 5421cf76 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added test for Vertstat.

parent 1e91fa9a
......@@ -21064,7 +21064,7 @@ ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Verti
 
ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.test test/Multiyearstat.test"
 
ac_config_files="$ac_config_files test/Gridboxstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
ac_config_files="$ac_config_files test/Gridboxstat.test test/Vertstat.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"
 
......@@ -22242,6 +22242,7 @@ do
"test/Runstat.test") CONFIG_FILES="$CONFIG_FILES test/Runstat.test" ;;
"test/Multiyearstat.test") CONFIG_FILES="$CONFIG_FILES test/Multiyearstat.test" ;;
"test/Gridboxstat.test") CONFIG_FILES="$CONFIG_FILES test/Gridboxstat.test" ;;
"test/Vertstat.test") CONFIG_FILES="$CONFIG_FILES test/Vertstat.test" ;;
"test/Fldstat.test") CONFIG_FILES="$CONFIG_FILES test/Fldstat.test" ;;
"test/Fldpctl.test") CONFIG_FILES="$CONFIG_FILES test/Fldpctl.test" ;;
"test/Ensstat.test") CONFIG_FILES="$CONFIG_FILES test/Ensstat.test" ;;
......@@ -23771,6 +23772,7 @@ _LT_EOF
"test/Runstat.test":F) chmod a+x "$ac_file" ;;
"test/Multiyearstat.test":F) chmod a+x "$ac_file" ;;
"test/Gridboxstat.test":F) chmod a+x "$ac_file" ;;
"test/Vertstat.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" ;;
"test/Ensstat.test":F) chmod a+x "$ac_file" ;;
......
......@@ -252,7 +252,7 @@ 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],[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/Seasstat.test test/Runstat.test test/Multiyearstat.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gridboxstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gridboxstat.test test/Vertstat.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"])
......
......@@ -312,8 +312,7 @@ void *Maggraph(void *argument);
#define DiffOperators {"diff", "diffp", "diffn", "diffc"}
#define DistgridOperators {"distgrid"}
#define DuplicateOperators {"duplicate"}
#define Echam5iniOperators {"import_e5ml", "import_e5res", \
"export_e5ml", "export_e5res"}
#define Echam5iniOperators {"import_e5ml", "import_e5res", "export_e5ml", "export_e5res"}
#define EnlargeOperators {"enlarge"}
#define EnlargegridOperators {"enlargegrid"}
#define EnsstatOperators {"ensmin", "ensmax", "enssum", "ensmean", "ensavg", "ensvar", "ensvar1", "ensstd", "ensstd1", "enspctl"}
......
......@@ -14,7 +14,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.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 Gridboxstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Ensstat.test Enspctl.test Gridboxstat.test \
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
......
......@@ -90,15 +90,16 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Timstat.test.in $(srcdir)/Timselstat.test.in \
$(srcdir)/Seasstat.test.in $(srcdir)/Runstat.test.in \
$(srcdir)/Multiyearstat.test.in $(srcdir)/Gridboxstat.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)/Vertstat.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 \
......@@ -113,11 +114,12 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Copy_netcdf.test Comp.test Compc.test Cat.test Gridarea.test \
Genweights.test Remap.test Select.test Spectral.test \
Vertint.test Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Gridboxstat.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
Runstat.test Multiyearstat.test Gridboxstat.test Vertstat.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@)
......@@ -529,7 +531,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.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 Gridboxstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Ensstat.test Enspctl.test Gridboxstat.test \
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
......@@ -620,6 +623,8 @@ Multiyearstat.test: $(top_builddir)/config.status $(srcdir)/Multiyearstat.test.i
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Gridboxstat.test: $(top_builddir)/config.status $(srcdir)/Gridboxstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Vertstat.test: $(top_builddir)/config.status $(srcdir)/Vertstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Fldstat.test: $(top_builddir)/config.status $(srcdir)/Fldstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Fldpctl.test: $(top_builddir)/config.status $(srcdir)/Fldpctl.test.in
......
#! @SHELL@
echo 1..10 # 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=vert
STATS="min max sum avg mean std std1 var var1 int"
#
IFILE=$DATAPATH/pl_data.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
......@@ -14,6 +14,7 @@ TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_re
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
DAYSTAT_REF = daymin_ref daymax_ref daysum_ref dayavg_ref daymean_ref daystd_ref daystd1_ref dayvar_ref dayvar1_ref
VERTSTAT_REF = vertmin_ref vertmax_ref vertsum_ref vertavg_ref vertmean_ref vertstd_ref vertstd1_ref vertvar_ref vertvar1_ref vertint_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
......@@ -31,4 +32,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) $(COMP_REF) $(YMONSTAT_REF) $(YSEASSTAT_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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(COMP_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_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)
......@@ -301,6 +301,7 @@ TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_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
DAYSTAT_REF = daymin_ref daymax_ref daysum_ref dayavg_ref daymean_ref daystd_ref daystd1_ref dayvar_ref dayvar1_ref
VERTSTAT_REF = vertmin_ref vertmax_ref vertsum_ref vertavg_ref vertmean_ref vertstd_ref vertstd1_ref vertvar_ref vertvar1_ref vertint_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
......@@ -318,7 +319,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) $(COMP_REF) $(YMONSTAT_REF) $(YSEASSTAT_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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(COMP_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) $(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_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,6 +6,16 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Vertstat
#
STATS="min max sum avg mean std std1 var var1 int"
IFILE=pl_data.grb
for STAT in $STATS; do
$CDO $FORMAT vert$STAT $IFILE vert${STAT}_ref
done
exit
########################################################################
#
# Comparision
#
STATS="eqc nec lec ltc gec gtc"
......
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