Commit 3c9f3501 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added Remapstat.test.in.

parent 2040e548
Pipeline #3824 passed with stages
in 15 minutes and 25 seconds
......@@ -322,16 +322,22 @@ case "${HOSTNAME}" in
F77=pgf90 \
CXX=pgc++ CXXFLAGS="-g -fast -D_REENTRANT" \
CC=pgcc CFLAGS="-g -fast -D_REENTRANT"
elif test "$COMP" = clang ; then
${CONFPATH}configure --disable-fortran \
$CDOLIBS LIBS=-lm \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
CXX=clang++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2' \
CC=clang CFLAGS='-g -Wall -O3 -march=native -mavx2'
elif test "$COMP" = gnu_pic ; then
${CONFPATH}configure --prefix=$HOME/local \
$CDOLIBS \
${CONFPATH}configure \
$CDOLIBS LIBS=-lm \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
F77=gfortran FFLAGS="-g -O2" \
CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2 -fPIC' \
CC=gcc CFLAGS='-g -Wall -O3 -march=native -mavx2 -fPIC'
else
${CONFPATH}configure --prefix=$HOME/local \
$CDOLIBS \
$CDOLIBS LIBS=-lm \
LDFLAGS="-Wl,-rpath,/sw/rhel6-x64/eccodes/eccodes-2.6.0-gcc64/lib" \
F77=gfortran FFLAGS="-g -O2" \
CXX=g++ CXXFLAGS='-g -Wall -O3 -march=native -mavx2' \
......
......@@ -234,6 +234,7 @@ AC_CONFIG_FILES([
test/Remap3.test
test/Remapeta.test
test/Remapgrid.test
test/Remapstat.test
test/Runpctl.test
test/Runstat.test
test/Seasstat.test
......
......@@ -54,6 +54,7 @@ TESTS =\
Remap3.test \
Remapeta.test \
Remapgrid.test \
Remapstat.test \
Runpctl.test \
Runstat.test \
Seasstat.test \
......
#! @BASH@
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
#
HAS_NETCDF=`${CDO} --config has-nc`
#
REMAPSTATDIR=xxxremapstat
#
if [ -d "$CDOTESTDATA/$REMAPSTATDIR" ]; then
echo 1..94 # Number of tests to be executed.
else
echo 1..36 # Number of tests to be executed.
fi
#
REFDATAPATH=$DATAPATH
#
ABSLIMMAX=0.001
RELLIMMAX=0.001
RELLIMSKEW=0.03
RELLIMKURT=0.01
#
FORMAT="-f nc -b 32"
#
NTEST=1
#
function remapfunc()
{
RSTAT=0
REMAP=${2}
SRCGRID=`echo ${3} | sed -e "s|file:|${REFDATAPATH}/|"`
TGTGRID=`echo ${4} | sed -e "s|file:|${REFDATAPATH}/|"`
REMAP_EXTRAPOLATE=off
SRCGRIDNAME=`echo ${3} | sed -e "s/file://"`
TGTGRIDNAME=`echo ${4} | sed -e "s/file://"`
CDOTEST="remap${2} ${SRCGRIDNAME} to ${TGTGRIDNAME}"
ABSLIM=$ABSLIMMAX
RELLIM=$RELLIMMAX
if [ $REMAP = skew ]; then RELLIM=$RELLIMSKEW; fi
if [ $REMAP = kurt ]; then RELLIM=$RELLIMKURT; fi
if [ "${HAS_NETCDF}" = yes ] ; then
OFILE=temp_remap${2}_${SRCGRIDNAME}_to_${TGTGRIDNAME}$$
RFILE=$REFDATAPATH/temp_remap${2}_${SRCGRIDNAME}_to_${TGTGRIDNAME}_ref
$CDO -f nc temp,${SRCGRID} tmpgriddata
CDOCOMMAND="$CDO $FORMAT $1${REMAP},${TGTGRID} tmpgriddata ${OFILE}"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,abslim=$ABSLIM,rellim=$RELLIM $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
rm -f tmpgriddata
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
if [ $REMAP = dis ]; then
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST # TODO check depends on optimization"
else
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
fi
else
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST # SKIP netCDF not enabled"
fi
let NTEST+=1
rm -f $OFILE
}
#
#################################################
# small remap tests
#
OPERTYPES="remap"
STATS="min max range sum avg mean std std1 var var1 skew kurt"
#
for STAT in $STATS; do
remapfunc $OPERTYPES $STAT global_2 global_5
done
#
for STAT in $STATS; do
remapfunc $OPERTYPES $STAT global_5 global_2
done
#
for STAT in $STATS; do
remapfunc $OPERTYPES $STAT global_5 global_5
done
#
#################################################
#
REFDATAPATH=$CDOTESTDATA/$REMAPGRIDDIR
#
#################################################
#
if [ -d "$CDOTESTDATA/$REMAPSTATDIR" ]; then
#
for REMAP in dis nn con scon laf; do
remapfunc $OPERTYPES $REMAP file:R2B4.nc global_2
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP global_0.5 global_2
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP global_2 global_2
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP global_2 global_0.5
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP global_2 file:R2B6.nc
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP global_1 file:R2B6.nc
done
#
for REMAP in dis nn con scon laf; do
remapfunc $OPERTYPES $REMAP file:R2B6.nc global_1
done
#
for REMAP in dis nn con laf; do
remapfunc $OPERTYPES $REMAP file:R2B6.nc file:R2B6.nc
done
#
for REMAP in dis nn con laf; do
remapfunc $OPERTYPES $REMAP file:R2B4.nc file:R2B6.nc
done
#
for REMAP in dis nn con laf; do
remapfunc $OPERTYPES $REMAP file:R2B6.nc file:R2B4.nc
done
#
for REMAP in $STATS; do
remapfunc $OPERTYPES $REMAP file:TP10s.nc global_2
done
#
fi
#
exit 0
......@@ -50,6 +50,18 @@ REMAPGRID = temp_bic_global_2_to_global_5_ref temp_con2_global_2_to_global_5
temp_bil_global_5_to_global_2_ref temp_scon_global_5_to_global_2_ref temp_laf_global_5_to_global_2_ref temp_con_global_5_to_global_2_ref \
temp_bic_global_5_to_global_5_ref temp_con2_global_5_to_global_5_ref temp_dis_global_5_to_global_5_ref temp_nn_global_5_to_global_5_ref \
temp_bil_global_5_to_global_5_ref temp_con_global_5_to_global_5_ref temp_laf_global_5_to_global_5_ref temp_scon_global_5_to_global_5_ref
REMAPSTAT = temp_remapavg_global_2_to_global_5_ref temp_remapmin_global_2_to_global_5_ref temp_remapstd_global_2_to_global_5_ref \
temp_remapavg_global_5_to_global_2_ref temp_remapmin_global_5_to_global_2_ref temp_remapstd_global_5_to_global_2_ref \
temp_remapavg_global_5_to_global_5_ref temp_remapmin_global_5_to_global_5_ref temp_remapstd_global_5_to_global_5_ref \
temp_remapkurt_global_2_to_global_5_ref temp_remaprange_global_2_to_global_5_ref temp_remapsum_global_2_to_global_5_ref \
temp_remapkurt_global_5_to_global_2_ref temp_remaprange_global_5_to_global_2_ref temp_remapsum_global_5_to_global_2_ref \
temp_remapkurt_global_5_to_global_5_ref temp_remaprange_global_5_to_global_5_ref temp_remapsum_global_5_to_global_5_ref \
temp_remapmax_global_2_to_global_5_ref temp_remapskew_global_2_to_global_5_ref temp_remapvar1_global_2_to_global_5_ref \
temp_remapmax_global_5_to_global_2_ref temp_remapskew_global_5_to_global_2_ref temp_remapvar1_global_5_to_global_2_ref \
temp_remapmax_global_5_to_global_5_ref temp_remapskew_global_5_to_global_5_ref temp_remapvar1_global_5_to_global_5_ref \
temp_remapmean_global_2_to_global_5_ref temp_remapstd1_global_2_to_global_5_ref temp_remapvar_global_2_to_global_5_ref \
temp_remapmean_global_5_to_global_2_ref temp_remapstd1_global_5_to_global_2_ref temp_remapvar_global_5_to_global_2_ref \
temp_remapmean_global_5_to_global_5_ref temp_remapstd1_global_5_to_global_5_ref temp_remapvar_global_5_to_global_5_ref
REMAP = n16_bic_ref n16_bil_ref n16_scon_ref n16_con2_ref n16_con_ref n16_laf_ref n16_nn_ref n16_dis_ref \
n32_bic_ref n32_bil_ref n32_scon_ref n32_con2_ref n32_con_ref n32_laf_ref n32_nn_ref n32_dis_ref
REMAP2 = tsurf_spain_bic_def_ref tsurf_spain_bic_off_ref tsurf_spain_bic_on_ref \
......@@ -89,5 +101,5 @@ EXTRA_DIST = $(INPUTDATA) $(FILE) $(GRIB) $(NETCDF) $(EOF) $(COMP) $(YDRUNSTAT)
$(RUNSTAT) $(RUNMSTAT) $(RUNPCTL) $(TIMSTAT2) $(YEARMONSTAT) $(VERTSTAT) $(VARSSTAT) $(FLDSTAT) $(FLDPSTAT) \
$(ISOSURFACE) \
$(TIMSTAT) $(YEARSTAT) $(MONSTAT) $(DAYSTAT) $(TIMMSTAT) $(YEARMSTAT) $(MONMSTAT) $(DAYMSTAT) \
$(MERSTAT) $(ZONSTAT) $(ENSSTAT) $(ENSMSTAT) $(ENSPCTL) $(SPECTRAL) $(WIND) $(INTTIME) $(VERTINT) $(REMAPGRID) $(REMAP) $(REMAP2) $(REMAP3) $(SELECT) $(DETREND) \
$(MERSTAT) $(ZONSTAT) $(ENSSTAT) $(ENSMSTAT) $(ENSPCTL) $(SPECTRAL) $(WIND) $(INTTIME) $(VERTINT) $(REMAPGRID) $(REMAPSTAT) $(REMAP) $(REMAP2) $(REMAP3) $(SELECT) $(DETREND) \
$(THREAD) $(EXPR) $(GRADSDES) $(ARITH) $(MONARITH) $(YEARARITH) $(YMONARITH) $(MAPREDUCE) $(MERGETIME) $(REMAPETA) $(SMOOTH) $(SETMISS) $(FILTER)
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