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

added test/Ymonstat.test.in

parent 3fb1875c
......@@ -701,6 +701,7 @@ test/Select.test.in -text
test/Spectral.test.in -text
test/Timstat.test.in -text
test/Vertint.test.in -text
test/Ymonstat.test.in -text
test/bm_Remap.sh -text
test/data/Makefile.am -text
test/data/Makefile.in -text
......@@ -762,6 +763,15 @@ test/data/timsum_ref -text
test/data/timvar1_ref -text
test/data/timvar_ref -text
test/data/ts_mm_5years -text
test/data/ymonavg_ref -text
test/data/ymonmax_ref -text
test/data/ymonmean_ref -text
test/data/ymonmin_ref -text
test/data/ymonstd1_ref -text
test/data/ymonstd_ref -text
test/data/ymonsum_ref -text
test/data/ymonvar1_ref -text
test/data/ymonvar_ref -text
test/grid_search/bisection_search.c -text
test/grid_search/bnd_circle.c -text
test/grid_search/bucket_search.c -text
......
......@@ -21232,7 +21232,7 @@ 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/Vertint.test"
ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Ymonstat.test test/Timstat.test test/Vertint.test"
 
ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arith.test test/Gradsdes.test"
 
......@@ -22397,6 +22397,7 @@ 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/Ymonstat.test") CONFIG_FILES="$CONFIG_FILES test/Ymonstat.test" ;;
"test/Timstat.test") CONFIG_FILES="$CONFIG_FILES test/Timstat.test" ;;
"test/Vertint.test") CONFIG_FILES="$CONFIG_FILES test/Vertint.test" ;;
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
......@@ -23906,6 +23907,7 @@ _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/Ymonstat.test":F) chmod a+x "$ac_file" ;;
"test/Timstat.test":F) chmod a+x "$ac_file" ;;
"test/Vertint.test":F) chmod a+x "$ac_file" ;;
"test/Afterburner.test":F) chmod a+x "$ac_file" ;;
......
......@@ -233,7 +233,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/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Ymonstat.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arith.test test/Gradsdes.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings])
......
......@@ -12,8 +12,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
TESTS = 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 Timstat.test Vertint.test Afterburner.test Arith.test \
Gradsdes.test wildcard.test
Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Vertint.test \
Afterburner.test Arith.test Gradsdes.test wildcard.test
# tests which should fail
XFAIL_TESTS =
......
......@@ -85,10 +85,11 @@ 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)/Vertint.test.in $(srcdir)/Afterburner.test.in \
$(srcdir)/Detrend.test.in $(srcdir)/Arith.test.in \
$(srcdir)/Gradsdes.test.in $(srcdir)/wildcard.test.in README
$(srcdir)/Spectral.test.in $(srcdir)/Ymonstat.test.in \
$(srcdir)/Timstat.test.in $(srcdir)/Vertint.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arith.test.in $(srcdir)/Gradsdes.test.in \
$(srcdir)/wildcard.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 \
......@@ -101,9 +102,9 @@ 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 Vertint.test \
Afterburner.test Detrend.test Arith.test Gradsdes.test \
wildcard.test
Remap.test Select.test Spectral.test Ymonstat.test \
Timstat.test Vertint.test Afterburner.test Detrend.test \
Arith.test Gradsdes.test wildcard.test
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
......@@ -513,8 +514,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
TESTS = 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 Timstat.test Vertint.test Afterburner.test Arith.test \
Gradsdes.test wildcard.test
Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Vertint.test \
Afterburner.test Arith.test Gradsdes.test wildcard.test
# $(top_srcdir)/test/test_Remap.sh \
......@@ -583,6 +584,8 @@ 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)/$@
Ymonstat.test: $(top_builddir)/config.status $(srcdir)/Ymonstat.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)/$@
Vertint.test: $(top_builddir)/config.status $(srcdir)/Vertint.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
STATS="min max sum avg mean std std1 var var1"
#
IFILE=$DATAPATH/ts_mm_5years
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/ymon${STAT}_ref
OFILE=ymon${STAT}_res
CDOTEST="ymon$STAT"
CDOCOMMAND="$CDO ymon${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
......@@ -4,6 +4,7 @@ INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data pl_da
FILE_REF = file_F32_srv_ref
GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile02_sinfo_ref grib_testfile02_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
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
......@@ -13,4 +14,4 @@ SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref
DETREND_REF = detrend_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
......@@ -291,6 +291,7 @@ INPUTDATA = ts_mm_5years hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data pl_da
FILE_REF = file_F32_srv_ref
GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile02_sinfo_ref grib_testfile02_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
TIMSTAT_REF = timmin_ref timmax_ref timsum_ref timavg_ref timmean_ref timstd_ref timstd1_ref timvar_ref timvar1_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
......@@ -300,7 +301,7 @@ REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_nn_
SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref
DETREND_REF = detrend_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
all: all-am
.SUFFIXES:
......
......@@ -6,6 +6,16 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Ymonstat
#
STATS="min max sum avg mean std std1 var var1"
IFILE=ts_mm_5years
for STAT in $STATS; do
$CDO $FORMAT ymon$STAT $IFILE ymon${STAT}_ref
done
exit
########################################################################
#
# Test File
#
$CDO $FORMAT cdiwrite,1,global_10,3,3,3 file_F32_srv_ref
......
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