Commit 993fc371 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added Mergetime.test.in.

parent 790645a6
...@@ -22395,7 +22395,7 @@ ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Se ...@@ -22395,7 +22395,7 @@ ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Se
   
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/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" ac_config_files="$ac_config_files test/Merstat.test test/Zonstat.test test/Mergetime.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/Afterburner.test test/Detrend.test test/Arithc.test test/Arith.test test/Expr.test"
   
...@@ -23585,6 +23585,7 @@ do ...@@ -23585,6 +23585,7 @@ do
"test/Enspctl.test") CONFIG_FILES="$CONFIG_FILES test/Enspctl.test" ;; "test/Enspctl.test") CONFIG_FILES="$CONFIG_FILES test/Enspctl.test" ;;
"test/Merstat.test") CONFIG_FILES="$CONFIG_FILES test/Merstat.test" ;; "test/Merstat.test") CONFIG_FILES="$CONFIG_FILES test/Merstat.test" ;;
"test/Zonstat.test") CONFIG_FILES="$CONFIG_FILES test/Zonstat.test" ;; "test/Zonstat.test") CONFIG_FILES="$CONFIG_FILES test/Zonstat.test" ;;
"test/Mergetime.test") CONFIG_FILES="$CONFIG_FILES test/Mergetime.test" ;;
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;; "test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;; "test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arithc.test") CONFIG_FILES="$CONFIG_FILES test/Arithc.test" ;; "test/Arithc.test") CONFIG_FILES="$CONFIG_FILES test/Arithc.test" ;;
...@@ -25118,6 +25119,7 @@ _LT_EOF ...@@ -25118,6 +25119,7 @@ _LT_EOF
"test/Enspctl.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/Merstat.test":F) chmod a+x "$ac_file" ;;
"test/Zonstat.test":F) chmod a+x "$ac_file" ;; "test/Zonstat.test":F) chmod a+x "$ac_file" ;;
"test/Mergetime.test":F) chmod a+x "$ac_file" ;;
"test/Afterburner.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/Detrend.test":F) chmod a+x "$ac_file" ;;
"test/Arithc.test":F) chmod a+x "$ac_file" ;; "test/Arithc.test":F) chmod a+x "$ac_file" ;;
......
...@@ -264,7 +264,7 @@ AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Rema ...@@ -264,7 +264,7 @@ AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Rema
AC_CONFIG_FILES([test/EOF.test test/Select.test test/Spectral.test test/Vertint.test],[chmod a+x "$ac_file"]) AC_CONFIG_FILES([test/EOF.test 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 test/Ydrunstat.test],[chmod a+x "$ac_file"]) AC_CONFIG_FILES([test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.test test/Multiyearstat.test test/Ydrunstat.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/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/Merstat.test test/Zonstat.test test/Mergetime.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/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/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"]) AC_CONFIG_FILES([test/MapReduce.test test/Ninfo.test],[chmod a+x "$ac_file"])
......
...@@ -18,7 +18,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test ...@@ -18,7 +18,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \ Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \ Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Ydrunstat.test \ Runstat.test Multiyearstat.test Ydrunstat.test \
EOF.test \ Mergetime.test EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \ Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......
...@@ -95,12 +95,13 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ...@@ -95,12 +95,13 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \ $(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \
$(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \ $(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \
$(srcdir)/Merstat.test.in $(srcdir)/Zonstat.test.in \ $(srcdir)/Merstat.test.in $(srcdir)/Zonstat.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \ $(srcdir)/Mergetime.test.in $(srcdir)/Afterburner.test.in \
$(srcdir)/Arithc.test.in $(srcdir)/Arith.test.in \ $(srcdir)/Detrend.test.in $(srcdir)/Arithc.test.in \
$(srcdir)/Expr.test.in $(srcdir)/Gradsdes.test.in \ $(srcdir)/Arith.test.in $(srcdir)/Expr.test.in \
$(srcdir)/Collgrid.test.in $(srcdir)/threads.test.in \ $(srcdir)/Gradsdes.test.in $(srcdir)/Collgrid.test.in \
$(srcdir)/tsformat.test.in $(srcdir)/wildcard.test.in \ $(srcdir)/threads.test.in $(srcdir)/tsformat.test.in \
$(srcdir)/MapReduce.test.in $(srcdir)/Ninfo.test.in README $(srcdir)/wildcard.test.in $(srcdir)/MapReduce.test.in \
$(srcdir)/Ninfo.test.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
...@@ -120,9 +121,9 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \ ...@@ -120,9 +121,9 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Seasstat.test Runstat.test Multiyearstat.test Ydrunstat.test \ Seasstat.test Runstat.test Multiyearstat.test Ydrunstat.test \
Gridboxstat.test Vertstat.test Fldstat.test Fldpctl.test \ Gridboxstat.test Vertstat.test Fldstat.test Fldpctl.test \
Ensstat.test Enspctl.test Merstat.test Zonstat.test \ Ensstat.test Enspctl.test Merstat.test Zonstat.test \
Afterburner.test Detrend.test Arithc.test Arith.test Expr.test \ Mergetime.test Afterburner.test Detrend.test Arithc.test \
Gradsdes.test Collgrid.test threads.test tsformat.test \ Arith.test Expr.test Gradsdes.test Collgrid.test threads.test \
wildcard.test MapReduce.test Ninfo.test tsformat.test wildcard.test MapReduce.test Ninfo.test
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
...@@ -541,7 +542,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test ...@@ -541,7 +542,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \ Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \ Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Ydrunstat.test \ Runstat.test Multiyearstat.test Ydrunstat.test \
EOF.test \ Mergetime.test EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \ Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
...@@ -650,6 +651,8 @@ Merstat.test: $(top_builddir)/config.status $(srcdir)/Merstat.test.in ...@@ -650,6 +651,8 @@ Merstat.test: $(top_builddir)/config.status $(srcdir)/Merstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Zonstat.test: $(top_builddir)/config.status $(srcdir)/Zonstat.test.in Zonstat.test: $(top_builddir)/config.status $(srcdir)/Zonstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Mergetime.test: $(top_builddir)/config.status $(srcdir)/Mergetime.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Afterburner.test: $(top_builddir)/config.status $(srcdir)/Afterburner.test.in Afterburner.test: $(top_builddir)/config.status $(srcdir)/Afterburner.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
......
#! @BASH@
echo 1..2 # 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"
#
IFILE1=$DATAPATH/mergetime_y2
IFILE2=$DATAPATH/mergetime_y12
#
NTEST=1
#
for X in 1 2; do
RSTAT=0
RFILE=$DATAPATH/mergetime_ref
OFILE=mergetime_res
CDOTEST="mergetime"
if [ "$X" = "1" ] ; then
CDOCOMMAND="$CDO $FORMAT mergetime $IFILE1 $IFILE2 $OFILE"
else
CDOCOMMAND="$CDO $FORMAT mergetime $IFILE2 $IFILE1 $OFILE"
fi
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
env SKIP_SAME_TIME=1 $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
...@@ -38,8 +38,9 @@ THREAD_REF = thread1_ref tsformat1_ref ...@@ -38,8 +38,9 @@ THREAD_REF = thread1_ref tsformat1_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
MERGETIME = mergetime_ref mergetime_y1 mergetime_y2 mergetime_12
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \ EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \
$(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_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) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \ $(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(MERGETIME)
...@@ -332,10 +332,11 @@ THREAD_REF = thread1_ref tsformat1_ref ...@@ -332,10 +332,11 @@ THREAD_REF = thread1_ref tsformat1_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp GRADSDES_REF = pl_data.ctl pl_data.gmp
ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref ARITH_REF = arithadd_ref arithsub_ref arithmul_ref arithdiv_ref
MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell MAPREDUCE = r18x9_grid icon_cell_grid griddes.r18x9 griddes.icon_cell
MERGETIME = mergetime_ref mergetime_y1 mergetime_y2 mergetime_12
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \ EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_REF) $(COMP_REF) $(YDRUNSTAT_REF) $(YMONSTAT_REF) $(YSEASSTAT_REF) $(SEASSTAT_REF) \
$(RUNSTAT_REF) $(TIMSTAT_REF) $(YEARSTAT_REF) $(MONSTAT_REF) $(DAYSTAT_REF) $(VERTSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_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) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \ $(MERSTAT_REF) $(ZONSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(REMAP2_REF) $(SELECT_REF) $(DETREND_REF) \
$(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(THREAD_REF) $(EXPR_REF) $(GRADSDES_REF) $(ARITH_REF) $(MAPREDUCE) $(MERGETIME)
all: all-am all: all-am
......
...@@ -5,6 +5,16 @@ CDO=cdo ...@@ -5,6 +5,16 @@ CDO=cdo
FORMAT="-f srv -b F32" FORMAT="-f srv -b F32"
######################################################################## ########################################################################
# #
# Mergetime
#
$CDO $FORMAT settaxis,2001-01-01,,1year -const,1,r1x1 mergetime_y1
$CDO $FORMAT settaxis,2002-01-01,,1year -const,2,r1x1 mergetime_y2
$CDO $FORMAT mergetime mergetime_y1 mergetime_y2 mergetime_y12
env SKIP_SAME_TIME=1 cdo mergetime mergetime_y2 mergetime_y12 mergetime_ref
env SKIP_SAME_TIME=1 cdo mergetime mergetime_y12 mergetime_y2 mergetime_ref2
exit
########################################################################
#
# Timstat Yearstat Monstat Daystat Runstat # Timstat Yearstat Monstat Daystat Runstat
# #
IFILE=$HOME/data/cdt/cera/EH5_AMIP_1_TSURF_6H_1991-1995.grb IFILE=$HOME/data/cdt/cera/EH5_AMIP_1_TSURF_6H_1991-1995.grb
......
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