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

Added test for EOF.

parent 5421cf76
......@@ -21060,7 +21060,7 @@ ac_config_files="$ac_config_files test/Comp.test test/Compc.test"
 
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/Vertint.test"
ac_config_files="$ac_config_files test/EOF.test test/Select.test test/Spectral.test test/Vertint.test"
 
ac_config_files="$ac_config_files test/Timstat.test test/Timselstat.test test/Seasstat.test test/Runstat.test test/Multiyearstat.test"
 
......@@ -22233,6 +22233,7 @@ do
"test/Gridarea.test") CONFIG_FILES="$CONFIG_FILES test/Gridarea.test" ;;
"test/Genweights.test") CONFIG_FILES="$CONFIG_FILES test/Genweights.test" ;;
"test/Remap.test") CONFIG_FILES="$CONFIG_FILES test/Remap.test" ;;
"test/EOF.test") CONFIG_FILES="$CONFIG_FILES test/EOF.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" ;;
......@@ -23763,6 +23764,7 @@ _LT_EOF
"test/Gridarea.test":F) chmod a+x "$ac_file" ;;
"test/Genweights.test":F) chmod a+x "$ac_file" ;;
"test/Remap.test":F) chmod a+x "$ac_file" ;;
"test/EOF.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" ;;
......
......@@ -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/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/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],[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"])
......
#! @SHELL@
#
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
export CDO_FILE_SUFFIX=NULL
export CDO_WEIGHT_MODE=off
#export CDO_SVD_MODE=danielson_lanczos
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT=""
NTEST=1
######################################################
IFILE=$DATAPATH/psl_DJF_anom.srv
RFILE1=$DATAPATH/eval_ref
RFILE2=$DATAPATH/eof_ref
RFILE3=$DATAPATH/pcoeff00000
OFILE1=eval_res
OFILE2=eof_res
OFILE3=res_pcoeff
#
for MODE in jacobi danielson_lanczos; do
export CDO_SVD_MODE=$MODE
RSTAT=0
CDOTEST="eof/eofcoeff - $MODE"
CDOCOMMAND="$CDO $FORMAT eof,1 $IFILE $OFILE1 $OFILE2"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
#
$CDO diff,1e-8 $OFILE1 $RFILE1 > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
#
$CDO diff,1e-7 -abs $OFILE2 -abs $RFILE2 > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
CDOCOMMAND="$CDO $FORMAT eofcoeff $OFILE2 $IFILE $OFILE3"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
#
$CDO diff,0.02 -abs ${OFILE3}00000 -abs $RFILE3 > $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 $OFILE1 $OFILE2 $OFILE3
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
......@@ -18,6 +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 \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test \
EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......
......@@ -85,21 +85,21 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Copy_netcdf.test.in $(srcdir)/Comp.test.in \
$(srcdir)/Compc.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)/Vertint.test.in \
$(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)/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
$(srcdir)/Remap.test.in $(srcdir)/EOF.test.in \
$(srcdir)/Select.test.in $(srcdir)/Spectral.test.in \
$(srcdir)/Vertint.test.in $(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)/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 \
......@@ -112,7 +112,7 @@ 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 Comp.test Compc.test Cat.test Gridarea.test \
Genweights.test Remap.test Select.test Spectral.test \
Genweights.test Remap.test EOF.test Select.test Spectral.test \
Vertint.test Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test Gridboxstat.test Vertstat.test \
Fldstat.test Fldpctl.test Ensstat.test Enspctl.test \
......@@ -535,6 +535,7 @@ TESTS = threads.test tsformat.test wildcard.test File.test Comp.test Compc.test
Vertstat.test Fldstat.test Fldpctl.test Merstat.test Zonstat.test \
Timstat.test Timselstat.test Seasstat.test \
Runstat.test Multiyearstat.test \
EOF.test \
Vertint.test Afterburner.test Arithc.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
......@@ -605,6 +606,8 @@ Genweights.test: $(top_builddir)/config.status $(srcdir)/Genweights.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Remap.test: $(top_builddir)/config.status $(srcdir)/Remap.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
EOF.test: $(top_builddir)/config.status $(srcdir)/EOF.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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
......
INPUTDATA = ts_mm_5years ts_6h_1mon ts_1d_1year hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data pl_data.grb detrend_data \
grib_testfile01.grb grib_testfile02.grb grib_testfile03.grb netcdf_testfile01.nc netcdf_testfile02.nc testfile01c.nc \
datar.nc datac.nc datau.nc datag.nc arith1.srv expr1.srv arithmask.srv
datar.nc datac.nc datau.nc datag.nc arith1.srv expr1.srv arithmask.srv psl_DJF_anom.srv
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
COMP_REF = comp_eqc_ref comp_gec_ref comp_gtc_ref comp_lec_ref comp_ltc_ref comp_nec_ref comptest.srv
EOF_REF = eval_ref eof_ref pcoeff00000
YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymonstd_ref ymonstd1_ref ymonvar_ref ymonvar1_ref
YSEASSTAT_REF = yseasmin_ref yseasmax_ref yseassum_ref yseasavg_ref yseasmean_ref yseasstd_ref yseasstd1_ref yseasvar_ref yseasvar1_ref
SEASSTAT_REF = seasmin_ref seasmax_ref seassum_ref seasavg_ref seasmean_ref seasstd_ref seasstd1_ref seasvar_ref seasvar1_ref
......@@ -32,4 +33,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) $(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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_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)
......@@ -287,12 +287,13 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INPUTDATA = ts_mm_5years ts_6h_1mon ts_1d_1year hl_l19.grb t21_geosp_tsurf.grb bathy4.grb pl_data pl_data.grb detrend_data \
grib_testfile01.grb grib_testfile02.grb grib_testfile03.grb netcdf_testfile01.nc netcdf_testfile02.nc testfile01c.nc \
datar.nc datac.nc datau.nc datag.nc arith1.srv expr1.srv arithmask.srv
datar.nc datac.nc datau.nc datag.nc arith1.srv expr1.srv arithmask.srv psl_DJF_anom.srv
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
COMP_REF = comp_eqc_ref comp_gec_ref comp_gtc_ref comp_lec_ref comp_ltc_ref comp_nec_ref comptest.srv
EOF_REF = eval_ref eof_ref pcoeff00000
YMONSTAT_REF = ymonmin_ref ymonmax_ref ymonsum_ref ymonavg_ref ymonmean_ref ymonstd_ref ymonstd1_ref ymonvar_ref ymonvar1_ref
YSEASSTAT_REF = yseasmin_ref yseasmax_ref yseassum_ref yseasavg_ref yseasmean_ref yseasstd_ref yseasstd1_ref yseasvar_ref yseasvar1_ref
SEASSTAT_REF = seasmin_ref seasmax_ref seassum_ref seasavg_ref seasmean_ref seasstd_ref seasstd1_ref seasvar_ref seasvar1_ref
......@@ -319,7 +320,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) $(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)
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(EOF_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,18 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# EOF
#
export CDO_FILE_SUFFIX=NULL
#export CDO_SVD_MODE=danielson_lanczos
export CDO_WEIGHT_MODE=off
#
IFILE=psl_DJF_anom.srv
cdo eof,1 $IFILE eval_ref eof_ref
cdo eofcoeff eof_ref $IFILE pcoeff
exit
########################################################################
#
# Vertstat
#
STATS="min max sum avg mean std std1 var var1 int"
......
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