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

test/Genweights.test.in: added netCDF check

parent 4e2373ab
......@@ -241,6 +241,7 @@ ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
ENABLE_IEG = @ENABLE_IEG@
ENABLE_NETCDF = @ENABLE_NETCDF@
ENABLE_SERVICE = @ENABLE_SERVICE@
EXEEXT = @EXEEXT@
FCFLAGS = @FCFLAGS@
......
......@@ -650,6 +650,7 @@ JASPER_LIBS
NETCDF_LIBS
NETCDF_INCLUDE
NETCDF_ROOT
ENABLE_NETCDF
NC_CONFIG
HDF5_LIBS
HDF5_INCLUDE
......@@ -18477,6 +18478,7 @@ fi
 
# ----------------------------------------------------------------------
# Compile application with netcdf
ENABLE_NETCDF=no
NETCDF_ROOT=''
NETCDF_INCLUDE=''
NETCDF_LIBS=''
......@@ -18558,6 +18560,7 @@ if test "$ac_res" != no; then :
 
$as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h
 
ENABLE_NETCDF=yes
else
as_fn_error $? "Could not link to netcdf library" "$LINENO" 5
fi
......@@ -18701,6 +18704,7 @@ if test "$ac_res" != no; then :
 
$as_echo "#define HAVE_LIBNETCDF 1" >>confdefs.h
 
ENABLE_NETCDF=yes
else
as_fn_error $? "Could not link to netcdf library" "$LINENO" 5
fi
......@@ -18805,6 +18809,7 @@ fi
 
 
 
# ----------------------------------------------------------------------
# Link application with JASPER library (needed for GRIB2 compression)
JASPER_LIBS=''
......
......@@ -153,6 +153,7 @@ ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
ENABLE_IEG = @ENABLE_IEG@
ENABLE_NETCDF = @ENABLE_NETCDF@
ENABLE_SERVICE = @ENABLE_SERVICE@
EXEEXT = @EXEEXT@
FCFLAGS = @FCFLAGS@
......
......@@ -135,6 +135,7 @@ AC_SUBST([HDF5_INCLUDE])
AC_SUBST([HDF5_LIBS])
# ----------------------------------------------------------------------
# Compile application with netcdf
ENABLE_NETCDF=no
NETCDF_ROOT=''
NETCDF_INCLUDE=''
NETCDF_LIBS=''
......@@ -146,7 +147,8 @@ AC_ARG_WITH([netcdf],
[yes],[AC_CHECK_HEADERS([netcdf.h])
AC_SEARCH_LIBS([nc_open],
[netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])
ENABLE_NETCDF=yes],
[AC_MSG_ERROR([Could not link to netcdf library])])
NETCDF_LIBS=" -lnetcdf"
AC_CHECK_PROG(NC_CONFIG,nc-config,nc-config)
......@@ -167,7 +169,8 @@ AC_ARG_WITH([netcdf],
AC_CHECK_HEADERS([netcdf.h])
AC_SEARCH_LIBS([nc_open],
[netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])
ENABLE_NETCDF=yes],
[AC_MSG_ERROR([Could not link to netcdf library])])
NETCDF_LIBS=" -L$NETCDF_ROOT/lib -lnetcdf"
NETCDF_INCLUDE=" -I$NETCDF_ROOT/include"
......@@ -191,6 +194,7 @@ AC_ARG_WITH([netcdf],
[AC_MSG_NOTICE([$with_netcdf is not a directory! NETCDF suppressed])])])],
[AC_MSG_CHECKING([for NETCDF library])
AC_MSG_RESULT([suppressed])])
AC_SUBST([ENABLE_NETCDF])
AC_SUBST([NETCDF_ROOT])
AC_SUBST([NETCDF_INCLUDE])
AC_SUBST([NETCDF_LIBS])
......
......@@ -415,6 +415,7 @@ ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
ENABLE_IEG = @ENABLE_IEG@
ENABLE_NETCDF = @ENABLE_NETCDF@
ENABLE_SERVICE = @ENABLE_SERVICE@
EXEEXT = @EXEEXT@
FCFLAGS = @FCFLAGS@
......
......@@ -28,22 +28,26 @@ for GRIDTYPE in "regular" "curvilinear" "unstructured"; do
CDOTEST="gen${RMOD} $GRID $GRIDTYPE"
CDOCOMMAND="$CDO $FORMAT gen${RMOD},$GRID $SETGRID $IFILE remapweights"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
if [ "@ENABLE_NETCDF@" = yes ] ; then
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT++
$CDOCOMMAND
test $? -eq 0 || let RSTAT++
$CDO $FORMAT remap,$GRID,remapweights $SETGRID $IFILE ${OFILE}
test $? -eq 0 || let RSTAT++
$CDO $FORMAT remap,$GRID,remapweights $SETGRID $IFILE ${OFILE}
test $? -eq 0 || let RSTAT++
$CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT++
test -s $CDOOUT && let RSTAT++
cat $CDOOUT $CDOERR
$CDO diff,$ABSLIM $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT++
test -s $CDOOUT && let RSTAT++
cat $CDOOUT $CDOERR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
else
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST # SKIP netCDF not enabled"
fi
let NTEST++
rm -f $OFILE
......
......@@ -358,6 +358,7 @@ ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
ENABLE_IEG = @ENABLE_IEG@
ENABLE_NETCDF = @ENABLE_NETCDF@
ENABLE_SERVICE = @ENABLE_SERVICE@
EXEEXT = @EXEEXT@
FCFLAGS = @FCFLAGS@
......
......@@ -152,6 +152,7 @@ ENABLE_DATA = @ENABLE_DATA@
ENABLE_EXTRA = @ENABLE_EXTRA@
ENABLE_GRIB = @ENABLE_GRIB@
ENABLE_IEG = @ENABLE_IEG@
ENABLE_NETCDF = @ENABLE_NETCDF@
ENABLE_SERVICE = @ENABLE_SERVICE@
EXEEXT = @EXEEXT@
FCFLAGS = @FCFLAGS@
......
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