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

added test/Enspctlstat.test.in

parent ccc02a4e
......@@ -687,6 +687,7 @@ test/Arith.test.in -text
test/Cat.test.in -text
test/Copy_netcdf.test.in -text
test/Detrend.test.in -text
test/Ensstat.test.in -text
test/File.test.in -text
test/Genweights.test.in -text
test/Gradsdes.test.in -text
......@@ -708,6 +709,16 @@ test/data/Makefile.in -text
test/data/bathy4.grb -text
test/data/detrend_data -text
test/data/detrend_ref -text
test/data/enspctl100_ref -text
test/data/enspctl1_ref -text
test/data/enspctl20_ref -text
test/data/enspctl25_ref -text
test/data/enspctl33_ref -text
test/data/enspctl50_ref -text
test/data/enspctl66_ref -text
test/data/enspctl75_ref -text
test/data/enspctl80_ref -text
test/data/enspctl99_ref -text
test/data/file_F32_srv_ref -text
test/data/gen_refdata.sh -text
test/data/gp2sp_ref -text
......
......@@ -21232,7 +21232,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/Ymonstat.test test/Timstat.test test/Vertint.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/Ymonstat.test test/Ensstat.test test/Enspctl.test"
 
ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arith.test test/Gradsdes.test"
 
......@@ -22397,9 +22399,11 @@ 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/Ymonstat.test") CONFIG_FILES="$CONFIG_FILES test/Ymonstat.test" ;;
"test/Ensstat.test") CONFIG_FILES="$CONFIG_FILES test/Ensstat.test" ;;
"test/Enspctl.test") CONFIG_FILES="$CONFIG_FILES test/Enspctl.test" ;;
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arith.test") CONFIG_FILES="$CONFIG_FILES test/Arith.test" ;;
......@@ -23907,9 +23911,11 @@ _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/Ymonstat.test":F) chmod a+x "$ac_file" ;;
"test/Ensstat.test":F) chmod a+x "$ac_file" ;;
"test/Enspctl.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/Arith.test":F) chmod a+x "$ac_file" ;;
......
......@@ -233,7 +233,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/Ymonstat.test test/Timstat.test test/Vertint.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/Ymonstat.test test/Ensstat.test test/Enspctl.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])
......
#! @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
export CDO_FILE_SUFFIX=NULL
$CDO splityear $IFILE ts_year
IFILE="ts_year????"
#
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/ymon${STAT}_ref
OFILE=ens${STAT}_res
CDOTEST="ens$STAT"
CDOCOMMAND="$CDO ens${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
rm -f $IFILE
#
exit 0
......@@ -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 Ymonstat.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 Ensstat.test \
Enspctl.test Vertint.test Afterburner.test Arith.test Gradsdes.test wildcard.test
# tests which should fail
XFAIL_TESTS =
......
......@@ -85,8 +85,9 @@ 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)/Ymonstat.test.in \
$(srcdir)/Timstat.test.in $(srcdir)/Vertint.test.in \
$(srcdir)/Spectral.test.in $(srcdir)/Timstat.test.in \
$(srcdir)/Vertint.test.in $(srcdir)/Ymonstat.test.in \
$(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arith.test.in $(srcdir)/Gradsdes.test.in \
$(srcdir)/wildcard.test.in README
......@@ -102,9 +103,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 Ymonstat.test \
Timstat.test Vertint.test Afterburner.test Detrend.test \
Arith.test Gradsdes.test wildcard.test
Remap.test Select.test Spectral.test Timstat.test Vertint.test \
Ymonstat.test Ensstat.test Enspctl.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@)
......@@ -514,8 +515,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 Ymonstat.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 Ensstat.test \
Enspctl.test Vertint.test Afterburner.test Arith.test Gradsdes.test wildcard.test
# $(top_srcdir)/test/test_Remap.sh \
......@@ -584,12 +585,16 @@ 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
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Ymonstat.test: $(top_builddir)/config.status $(srcdir)/Ymonstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Ensstat.test: $(top_builddir)/config.status $(srcdir)/Ensstat.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Enspctl.test: $(top_builddir)/config.status $(srcdir)/Enspctl.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Afterburner.test: $(top_builddir)/config.status $(srcdir)/Afterburner.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
......
......@@ -6,6 +6,7 @@ GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile0
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
ENSSTAT_REF = enspctl1_ref enspctl20_ref enspctl25_ref enspctl33_ref enspctl50_ref enspctl66_ref enspctl75_ref enspctl80_ref enspctl99_ref enspctl100_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_nn_ref n16_dis_ref \
......@@ -14,4 +15,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) $(YMONSTAT_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) $(ENSSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
......@@ -293,6 +293,7 @@ GRIB_REF = grib_testfile01_sinfo_ref grib_testfile01_info_ref grib_testfile02_si
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
ENSSTAT_REF = enspctl1_ref enspctl20_ref enspctl25_ref enspctl33_ref enspctl50_ref enspctl66_ref enspctl75_ref enspctl80_ref enspctl99_ref enspctl100_ref
SPECTRAL_REF = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
VERTINT_REF = ml2pl_ref
REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_nn_ref n16_dis_ref \
......@@ -301,7 +302,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) $(YMONSTAT_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) $(ENSSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF)
all: all-am
.SUFFIXES:
......
......@@ -6,6 +6,20 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Enspctl
#
IFILE=ts_mm_5years
export CDO_FILE_SUFFIX=NULL
$CDO splityear $IFILE ts_year
IFILE="ts_year????"
PCTLS="1 20 25 33 50 66 75 80 99 100"
for PCTL in $PCTLS; do
$CDO $FORMAT enspctl,$PCTL $IFILE enspctl${PCTL}_ref
done
rm -f $IFILE
exit
########################################################################
#
# Ymonstat
#
STATS="min max sum avg mean std std1 var var1"
......
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