From 45e7470e730c8d99728a4c8b4275b07a2b098ee5 Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 6 Dec 2018 12:48:58 -0500
Subject: [PATCH 01/37] adding searching for IRIS library and headers
---
configure | 435 ++++++++++++++++++++++++++++++++++++++++++++++++---
configure.in | 96 +++++++++++-
def.mk.in | 6 +
3 files changed, 516 insertions(+), 21 deletions(-)
diff --git a/configure b/configure
index 3101643a..a05f93b1 100755
--- a/configure
+++ b/configure
@@ -621,6 +621,12 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LD_PRINTOUT
+GOT_IRIS_LIB
+IRIS_LIB
+IRIS_CFLAG
+IRIS_LIBRARY_FLAG
+IRIS_INCLUDE_FLAG
+GOT_RSL_LIB
RSL_LIB
RSL_CFLAG
RSL_LIBRARY_FLAG
@@ -701,6 +707,7 @@ with_confuse
with_gsl
with_rsl
with_rave
+with_iris
'
ac_precious_vars='build_alias
host_alias
@@ -1323,6 +1330,7 @@ Optional Packages:
--with-gsl=DIR|INC,LIB The GSL (GNU Scientific Library) installation directory
--with-rsl=DIR The RSL root installation directory
--with-rave=ROOT The RAVE root installation directory
+ --with-iris=DIR The IRIS root installation directory
Some influential environment variables:
CC C compiler command
@@ -2845,25 +2853,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-LIBS=-lm
-
-
-CONFUSE_INCLUDE_DIR=
-CONFUSE_LIB_DIR=
-GOT_CONFUSE_INC=no
-GOT_CONFUSE_LIB=no
-CONFUSE_SUPPRESSED=no
-
-# Check whether --with-confuse was given.
-if test "${with_confuse+set}" = set; then :
- withval=$with_confuse;
-else
- withval=yes
-fi
-
-case $withval in
- yes)
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3002,6 +2991,26 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+LIBS=-lm
+
+
+CONFUSE_INCLUDE_DIR=
+CONFUSE_LIB_DIR=
+GOT_CONFUSE_INC=no
+GOT_CONFUSE_LIB=no
+CONFUSE_SUPPRESSED=no
+
+# Check whether --with-confuse was given.
+if test "${with_confuse+set}" = set; then :
+ withval=$with_confuse;
+else
+ withval=yes
+fi
+
+case $withval in
+ yes)
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if ${ac_cv_path_GREP+:} false; then :
@@ -4193,6 +4202,7 @@ RSL_LIBRARY_FLAG=${RSL_LIB_DIR}
RSL_INCLUDE_FLAG=${RSL_INCLUDE_DIR}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSL installation" >&5
$as_echo_n "checking for RSL installation... " >&6; }
+
if [ "$GOT_RSL_INC" = "yes" ]; then
if [ "$GOT_RSL_LIB" = "yes" ]; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -4208,6 +4218,7 @@ else
$as_echo "no" >&6; }
fi
+
RAVE_ROOT_DIR=
RAVE_INCLUDE_FLAG=
RAVE_LIB_FLAG=
@@ -4268,6 +4279,385 @@ as_fn_error $? "The RAVE installation does not contain def.mk. Is this an old in
See \`config.log' for more details" "$LINENO" 5; };
fi
+
+IRIS_INCLUDE_DIR=
+IRIS_LIB_DIR=
+IRIS_CFLAG=
+IRIS_LIB=
+GOT_IRIS_INC=no
+GOT_IRIS_LIB=no
+IRIS_SUPPRESSED=no
+
+# Check whether --with-iris was given.
+if test "${with_iris+set}" = set; then :
+ withval=$with_iris;
+else
+ withval=yes
+fi
+
+case $withval in
+ yes)
+ for ac_header in iris2odim.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
+if test "x$ac_cv_header_iris2odim_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IRIS2ODIM_H 1
+_ACEOF
+ GOT_IRIS_INC=yes
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
+$as_echo_n "checking for populateObject in -liris2odim... " >&6; }
+if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liris2odim $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char populateObject ();
+int
+main ()
+{
+return populateObject ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_iris2odim_populateObject=yes
+else
+ ac_cv_lib_iris2odim_populateObject=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iris2odim_populateObject" >&5
+$as_echo "$ac_cv_lib_iris2odim_populateObject" >&6; }
+if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
+ GOT_IRIS_LIB=yes
+fi
+
+ ;;
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS library" >&5
+$as_echo_n "checking for IRIS library... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
+$as_echo "suppressed" >&6; }
+ IRIS_SUPPRESSED=yes
+ ;;
+ *)
+ if [ "$withval" != "" ]; then
+ if [ "`echo $withval | grep ','`" = "" ]; then
+ iris_inc=$withval/include
+ iris_lib=$withval/lib
+ else
+ iris_inc="`echo $withval |cut -f1 -d,`"
+ iris_lib="`echo $withval |cut -f2 -d,`"
+ fi
+
+ if [ "$iris_inc" != "" ]; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$iris_inc"
+ echo FUCK!!!!
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ for ac_header in iris2odim.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
+if test "x$ac_cv_header_iris2odim_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IRIS2ODIM_H 1
+_ACEOF
+ GOT_IRIS_INC=yes
+fi
+
+done
+
+ echo $GOT_IRIS_INC
+ if [ "$GOT_IRIS_INC" = "yes" ]; then
+ IRIS_INCLUDE_DIR="-I$iris_inc"
+ else
+ CPPFLAGS="$saved_CPPFLAGS"
+ fi
+ else
+ for ac_header in iris2odim.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
+if test "x$ac_cv_header_iris2odim_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IRIS2ODIM_H 1
+_ACEOF
+ GOT_IRIS_INC=yes
+fi
+
+done
+
+ fi
+
+ if [ "$iris_lib" != "" ]; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$iris_lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
+$as_echo_n "checking for populateObject in -liris2odim... " >&6; }
+if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liris2odim $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char populateObject ();
+int
+main ()
+{
+return populateObject ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_iris2odim_populateObject=yes
+else
+ ac_cv_lib_iris2odim_populateObject=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iris2odim_populateObject" >&5
+$as_echo "$ac_cv_lib_iris2odim_populateObject" >&6; }
+if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
+ GOT_IRIS_LIB=yes
+fi
+
+ if [ "$GOT_IRIS_LIB" = "yes" ]; then
+ IRIS_LIB_DIR="-L$iris_lib"
+ else
+ LDFLAGS="$saved_LDFLAGS"
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
+$as_echo_n "checking for populateObject in -liris2odim... " >&6; }
+if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liris2odim $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char populateObject ();
+int
+main ()
+{
+return populateObject ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_iris2odim_populateObject=yes
+else
+ ac_cv_lib_iris2odim_populateObject=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iris2odim_populateObject" >&5
+$as_echo "$ac_cv_lib_iris2odim_populateObject" >&6; }
+if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
+ GOT_IRIS_LIB=yes
+fi
+
+ fi
+ else
+ as_fn_error $? "\"Odd argument passed for iris\"" "$LINENO" 5
+ fi
+ ;;
+esac
+
+IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
+IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS installation" >&5
+$as_echo_n "checking for IRIS installation... " >&6; }
+if [ "$GOT_IRIS_INC" = "yes" ]; then
+ if [ "$GOT_IRIS_LIB" = "yes" ]; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ IRIS_CFLAG=-DIRIS
+ IRIS_LIB=-iris2odim
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc compiler" >&5
$as_echo_n "checking for RAVE cc compiler... " >&6; }
RAVECC=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^CC=/p" | sed -n -e"s/^CC=[ \t]*\(.*\)/\1/p"`
@@ -4438,6 +4828,13 @@ fi
+
+
+
+
+
+
+
diff --git a/configure.in b/configure.in
index 0681c136..bc973e4e 100644
--- a/configure.in
+++ b/configure.in
@@ -14,6 +14,7 @@ if test "${localstatedir}" = "\${prefix}/var"; then
fi
AC_PROG_CC
+AC_PROG_CPP
LIBS=-lm
@@ -50,14 +51,14 @@ case $withval in
if [[ "$confuse_inc" != "" ]]; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$confuse_inc"
- AC_CHECK_HEADERS(confuse.h,GOT_CONFUSE_INC=yes)
+ AC_CHECK_HEADERS([confuse.h],GOT_CONFUSE_INC=yes)
if [[ "$GOT_CONFUSE_INC" = "yes" ]]; then
CONFUSE_INCLUDE_DIR="-I$confuse_inc"
else
CPPFLAGS="$saved_CPPFLAGS"
fi
else
- AC_CHECK_HEADERS(confuse.h,GOT_CONFUSE_INC=yes)
+ AC_CHECK_HEADERS([confuse.h],GOT_CONFUSE_INC=yes)
fi
if [[ "$confuse_lib" != "" ]]; then
@@ -230,6 +231,7 @@ esac
RSL_LIBRARY_FLAG=${RSL_LIB_DIR}
RSL_INCLUDE_FLAG=${RSL_INCLUDE_DIR}
AC_MSG_CHECKING(for RSL installation)
+
if [[ "$GOT_RSL_INC" = "yes" ]]; then
if [[ "$GOT_RSL_LIB" = "yes" ]]; then
AC_MSG_RESULT(yes)
@@ -242,6 +244,7 @@ else
AC_MSG_RESULT(no)
fi
+
dnl First verify that we have a proper rave installation. We can not live without it
dnl
RAVE_ROOT_DIR=
@@ -289,6 +292,88 @@ else
AC_MSG_FAILURE(The RAVE installation does not contain def.mk. Is this an old installation);
fi
+
+dnl Check that we have Vaisala IRIS library installed as part of RAVE
+dnl
+IRIS_INCLUDE_DIR=
+IRIS_LIB_DIR=
+IRIS_CFLAG=
+IRIS_LIB=
+GOT_IRIS_INC=no
+GOT_IRIS_LIB=no
+IRIS_SUPPRESSED=no
+AC_ARG_WITH(iris,[ --with-iris=DIR The IRIS root installation directory],
+ ,withval=yes)
+case $withval in
+ yes)
+ AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ ;;
+ no)
+ AC_MSG_CHECKING(for IRIS library)
+ AC_MSG_RESULT(suppressed)
+ IRIS_SUPPRESSED=yes
+ ;;
+ *)
+ if [[ "$withval" != "" ]]; then
+ if [[ "`echo $withval | grep ','`" = "" ]]; then
+ iris_inc=$withval/include
+ iris_lib=$withval/lib
+ else
+ iris_inc="`echo $withval |cut -f1 -d,`"
+ iris_lib="`echo $withval |cut -f2 -d,`"
+ fi
+
+ if [[ "$iris_inc" != "" ]]; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$iris_inc"
+ AC_PROG_CPP
+ AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
+ echo $GOT_IRIS_INC
+ if [[ "$GOT_IRIS_INC" = "yes" ]]; then
+ IRIS_INCLUDE_DIR="-I$iris_inc"
+ else
+ CPPFLAGS="$saved_CPPFLAGS"
+ fi
+ else
+ AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
+ fi
+
+ if [[ "$iris_lib" != "" ]]; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$iris_lib"
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
+ IRIS_LIB_DIR="-L$iris_lib"
+ else
+ LDFLAGS="$saved_LDFLAGS"
+ fi
+ else
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ fi
+ else
+ AC_MSG_ERROR("Odd argument passed for iris")
+ fi
+ ;;
+esac
+
+IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
+IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
+AC_MSG_CHECKING(for IRIS installation)
+if [[ "$GOT_IRIS_INC" = "yes" ]]; then
+ if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
+ AC_MSG_RESULT(yes)
+ IRIS_CFLAG=-DIRIS
+ IRIS_LIB=-iris2odim
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+
+
dnl Now we should extract some variables from raves def.mk file to give user a possibility to change
dnl then when necessary
AC_MSG_CHECKING(for RAVE cc compiler)
@@ -431,6 +516,13 @@ AC_SUBST(RSL_LIBRARY_FLAG)
AC_SUBST(RSL_CFLAG)
AC_SUBST(RSL_LIB)
AC_SUBST(GOT_RSL_LIB)
+AC_SUBST(IRIS_INCLUDE_FLAG)
+AC_SUBST(IRIS_LIBRARY_FLAG)
+AC_SUBST(IRIS_CFLAG)
+AC_SUBST(IRIS_LIB)
+AC_SUBST(GOT_IRIS_LIB)
+
+
AC_SUBST(LD_PRINTOUT)
AC_CONFIG_FILES(def.mk)
diff --git a/def.mk.in b/def.mk.in
index e7ecc174..9915f767 100644
--- a/def.mk.in
+++ b/def.mk.in
@@ -48,6 +48,12 @@ RSL_INCLUDE_FLAG=@RSL_INCLUDE_FLAG@
RSL_CFLAG=@RSL_CFLAG@
RSL_LIB=@RSL_LIB@
+# IRIS
+IRIS_LIBRARY_FLAG=@IRIS_LIBRARY_FLAG@
+IRIS_INCLUDE_FLAG=@IRIS_INCLUDE_FLAG@
+IRIS_CFLAG=@IRIS_CFLAG@
+IRIS_LIB=@IRIS_LIB@
+
# Special flag to be used for printouts of the necessary LD_LIBRARY_PATH
#
LD_PRINTOUT= @LD_PRINTOUT@
From 9ba6120395ef20def1ac90893dfafd418b6f3f67 Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 13:12:59 -0500
Subject: [PATCH 02/37] testing on linux
---
configure | 169 +++++++--------------------------------------------
configure.in | 19 +++---
2 files changed, 32 insertions(+), 156 deletions(-)
diff --git a/configure b/configure
index a05f93b1..2a9097df 100755
--- a/configure
+++ b/configure
@@ -681,6 +681,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -756,6 +757,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1008,6 +1010,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1145,7 +1156,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1298,6 +1309,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -2852,7 +2864,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4280,6 +4291,7 @@ See \`config.log' for more details" "$LINENO" 5; };
fi
+
IRIS_INCLUDE_DIR=
IRIS_LIB_DIR=
IRIS_CFLAG=
@@ -4351,11 +4363,11 @@ fi
;;
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS library" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS library" >&5
$as_echo_n "checking for IRIS library... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; }
- IRIS_SUPPRESSED=yes
+ IRIS_SUPPRESSED=yes
;;
*)
if [ "$withval" != "" ]; then
@@ -4370,144 +4382,6 @@ $as_echo "suppressed" >&6; }
if [ "$iris_inc" != "" ]; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$iris_inc"
- echo FUCK!!!!
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
for ac_header in iris2odim.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
@@ -4520,7 +4394,6 @@ fi
done
- echo $GOT_IRIS_INC
if [ "$GOT_IRIS_INC" = "yes" ]; then
IRIS_INCLUDE_DIR="-I$iris_inc"
else
@@ -4627,12 +4500,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iris2odim_populateObject" >&5
$as_echo "$ac_cv_lib_iris2odim_populateObject" >&6; }
if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
- GOT_IRIS_LIB=yes
+ GOT_RSL_LIB=yes
fi
fi
else
- as_fn_error $? "\"Odd argument passed for iris\"" "$LINENO" 5
+ as_fn_error $? "\"Odd argument passed for IRIS\"" "$LINENO" 5
fi
;;
esac
@@ -4641,12 +4514,13 @@ IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS installation" >&5
$as_echo_n "checking for IRIS installation... " >&6; }
+
if [ "$GOT_IRIS_INC" = "yes" ]; then
if [ "$GOT_IRIS_LIB" = "yes" ]; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
IRIS_CFLAG=-DIRIS
- IRIS_LIB=-iris2odim
+ IRIS_LIB=-liris2odim
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -4656,6 +4530,7 @@ else
$as_echo "no" >&6; }
fi
+echo "PROBLEMS!!!"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc compiler" >&5
diff --git a/configure.in b/configure.in
index bc973e4e..c672b286 100644
--- a/configure.in
+++ b/configure.in
@@ -293,6 +293,7 @@ else
fi
+
dnl Check that we have Vaisala IRIS library installed as part of RAVE
dnl
IRIS_INCLUDE_DIR=
@@ -303,16 +304,16 @@ GOT_IRIS_INC=no
GOT_IRIS_LIB=no
IRIS_SUPPRESSED=no
AC_ARG_WITH(iris,[ --with-iris=DIR The IRIS root installation directory],
- ,withval=yes)
+ ,withval=yes)
case $withval in
yes)
AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
;;
no)
- AC_MSG_CHECKING(for IRIS library)
- AC_MSG_RESULT(suppressed)
- IRIS_SUPPRESSED=yes
+ AC_MSG_CHECKING(for IRIS library)
+ AC_MSG_RESULT(suppressed)
+ IRIS_SUPPRESSED=yes
;;
*)
if [[ "$withval" != "" ]]; then
@@ -327,9 +328,7 @@ case $withval in
if [[ "$iris_inc" != "" ]]; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$iris_inc"
- AC_PROG_CPP
AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- echo $GOT_IRIS_INC
if [[ "$GOT_IRIS_INC" = "yes" ]]; then
IRIS_INCLUDE_DIR="-I$iris_inc"
else
@@ -349,10 +348,10 @@ case $withval in
LDFLAGS="$saved_LDFLAGS"
fi
else
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_RSL_LIB=yes)
fi
else
- AC_MSG_ERROR("Odd argument passed for iris")
+ AC_MSG_ERROR("Odd argument passed for IRIS")
fi
;;
esac
@@ -360,11 +359,12 @@ esac
IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
AC_MSG_CHECKING(for IRIS installation)
+
if [[ "$GOT_IRIS_INC" = "yes" ]]; then
if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
AC_MSG_RESULT(yes)
IRIS_CFLAG=-DIRIS
- IRIS_LIB=-iris2odim
+ IRIS_LIB=-liris2odim
else
AC_MSG_RESULT(no)
fi
@@ -372,6 +372,7 @@ else
AC_MSG_RESULT(no)
fi
+echo "PROBLEMS!!!"
dnl Now we should extract some variables from raves def.mk file to give user a possibility to change
From b5b1cb18483c9e47c580c7343b01d305bbc4086e Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 6 Dec 2018 16:58:01 -0500
Subject: [PATCH 03/37] updated configure.in to detect iris and rainbow rave
modules
---
configure | 475 +++++++++++++++++++++++++++++----------------------
configure.in | 185 ++++++++++----------
def.mk.in | 6 +-
3 files changed, 371 insertions(+), 295 deletions(-)
diff --git a/configure b/configure
index 2a9097df..0eae52fd 100755
--- a/configure
+++ b/configure
@@ -621,11 +621,12 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LD_PRINTOUT
+GOT_RAINBOW_LIB
+RAINBOW_LIB
+RAINBOW_CFLAG
GOT_IRIS_LIB
IRIS_LIB
IRIS_CFLAG
-IRIS_LIBRARY_FLAG
-IRIS_INCLUDE_FLAG
GOT_RSL_LIB
RSL_LIB
RSL_CFLAG
@@ -681,7 +682,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -709,6 +709,7 @@ with_gsl
with_rsl
with_rave
with_iris
+with_rainbow
'
ac_precious_vars='build_alias
host_alias
@@ -757,7 +758,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1010,15 +1010,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1156,7 +1147,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1309,7 +1300,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1342,7 +1332,8 @@ Optional Packages:
--with-gsl=DIR|INC,LIB The GSL (GNU Scientific Library) installation directory
--with-rsl=DIR The RSL root installation directory
--with-rave=ROOT The RAVE root installation directory
- --with-iris=DIR The IRIS root installation directory
+ --with-iris Add Vaisala IRIS support using iris2odim rave module
+ --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module
Some influential environment variables:
CC C compiler command
@@ -3004,7 +2995,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LIBS=-lm
-
CONFUSE_INCLUDE_DIR=
CONFUSE_LIB_DIR=
GOT_CONFUSE_INC=no
@@ -4291,9 +4281,129 @@ See \`config.log' for more details" "$LINENO" 5; };
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc compiler" >&5
+$as_echo_n "checking for RAVE cc compiler... " >&6; }
+RAVECC=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^CC=/p" | sed -n -e"s/^CC=[ \t]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECC" >&5
+$as_echo "$RAVECC" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc options" >&5
+$as_echo_n "checking for RAVE cc options... " >&6; }
+RAVECCOPTS=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^OPTS=/p" | sed -n -e"s/^OPTS=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECCOPTS" >&5
+$as_echo "$RAVECCOPTS" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpp options" >&5
+$as_echo_n "checking for cpp options... " >&6; }
+CPPOPTS=`echo "$RAVECCOPTS" | sed -e "s/-Wstrict-prototypes//"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPOPTS" >&5
+$as_echo "$CPPOPTS" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE ld flags" >&5
+$as_echo_n "checking for RAVE ld flags... " >&6; }
+RAVELDFLAGS=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^LDFLAGS=/p" | sed -n -e"s/^LDFLAGS=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVELDFLAGS" >&5
+$as_echo "$RAVELDFLAGS" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE shared flag" >&5
+$as_echo_n "checking for RAVE shared flag... " >&6; }
+RAVECCSHARED=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^CCSHARED=/p" | sed -n -e"s/^CCSHARED=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECCSHARED" >&5
+$as_echo "$RAVECCSHARED" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include flag" >&5
+$as_echo_n "checking for Python include flag... " >&6; }
+PYTHON_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^INCLUDE_PYTHON=/p" | sed -n -e"s/^INCLUDE_PYTHON=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INCLUDE_PYTHON" >&5
+$as_echo "$INCLUDE_PYTHON" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for numpy include flag" >&5
+$as_echo_n "checking for numpy include flag... " >&6; }
+NUMPY_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^NUMPY_INCLUDE_DIR=/p" | sed -n -e"s/^NUMPY_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
+$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj include flag used by RAVE" >&5
+$as_echo_n "checking for proj include flag used by RAVE... " >&6; }
+PROJ_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^PROJ_INCLUDE_DIR=/p" | sed -n -e"s/^PROJ_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
+$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj library flag used by RAVE" >&5
+$as_echo_n "checking for proj library flag used by RAVE... " >&6; }
+PROJ_LIBRARY_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^PROJ_LIB_DIR=/p" | sed -n -e"s/^PROJ_LIB_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
+$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat include flag used by RAVE" >&5
+$as_echo_n "checking for expat include flag used by RAVE... " >&6; }
+EXPAT_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_INCLUDE_DIR=/p" | sed -n -e"s/^EXPAT_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_INCLUDE_FLAG" >&5
+$as_echo "$EXPAT_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat library flag used by RAVE" >&5
+$as_echo_n "checking for expat library flag used by RAVE... " >&6; }
+EXPAT_LIBRARY_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_LIB_DIR=/p" | sed -n -e"s/^EXPAT_LIB_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_INCLUDE_FLAG" >&5
+$as_echo "$EXPAT_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if expat is supressed" >&5
+$as_echo_n "checking if expat is supressed... " >&6; }
+EXPAT_SUPPRESSED=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_SUPPRESSED=/p" | sed -n -e"s/^EXPAT_SUPPRESSED=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_SUPPRESSED" >&5
+$as_echo "$EXPAT_SUPPRESSED" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf include flag used by RAVE" >&5
+$as_echo_n "checking for hlhdf include flag used by RAVE... " >&6; }
+HLHDF_INCLUDE_FLAG=-I`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_INCLUDE_DIR=/p" | sed -n -e"s/^HLHDF_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_INCLUDE_FLAG" >&5
+$as_echo "$HLHDF_INCLUDE_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf library flag used by RAVE" >&5
+$as_echo_n "checking for hlhdf library flag used by RAVE... " >&6; }
+HLHDF_LIBRARY_FLAG=-L`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_LIB_DIR=/p" | sed -n -e"s/^HLHDF_LIB_DIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_LIBRARY_FLAG" >&5
+$as_echo "$HLHDF_LIBRARY_FLAG" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf config file" >&5
+$as_echo_n "checking for hlhdf config file... " >&6; }
+HLHDF_MK_FILE=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_HLDEF_MK_FILE=/p" | sed -n -e"s/^HLHDF_HLDEF_MK_FILE=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_MK_FILE" >&5
+$as_echo "$HLHDF_MK_FILE" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf ld shared" >&5
+$as_echo_n "checking for hlhdf ld shared... " >&6; }
+HLHDFLDSHARED=`cat $HLHDF_MK_FILE | sed -n "/^LDSHARED=/p" | sed -n -e"s/^LDSHARED=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDFLDSHARED" >&5
+$as_echo "$HLHDFLDSHARED" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ ld shared options" >&5
+$as_echo_n "checking for g++ ld shared options... " >&6; }
+LDCPPSHARED=`echo "$HLHDFLDSHARED" | awk '{$1=""}1'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDCPPSHARED" >&5
+$as_echo "$LDCPPSHARED" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdf5 software used by hlhdf" >&5
+$as_echo_n "checking for hdf5 software used by hlhdf... " >&6; }
+HLHDF_HDF5_LIB=`cat $HLHDF_MK_FILE | sed -n "/^HDF5_LIBDIR=/p" | sed -n -e"s/^HDF5_LIBDIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_HDF5_LIB" >&5
+$as_echo "$HLHDF_HDF5_LIB" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib software used by hlhdf" >&5
+$as_echo_n "checking for zlib software used by hlhdf... " >&6; }
+HLHDF_ZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^ZLIB_LIBDIR=/p" | sed -n -e"s/^ZLIB_LIBDIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_ZLIB_LIB" >&5
+$as_echo "$HLHDF_ZLIB_LIB" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib software used by hlhdf" >&5
+$as_echo_n "checking for szlib software used by hlhdf... " >&6; }
+HLHDF_SZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^SZLIB_LIBDIR=/p" | sed -n -e"s/^SZLIB_LIBDIR=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_SZLIB_LIB" >&5
+$as_echo "$HLHDF_SZLIB_LIB" >&6; }
+
+LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
+CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
-IRIS_INCLUDE_DIR=
-IRIS_LIB_DIR=
IRIS_CFLAG=
IRIS_LIB=
GOT_IRIS_INC=no
@@ -4363,44 +4473,17 @@ fi
;;
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS library" >&5
-$as_echo_n "checking for IRIS library... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iris2odim rave module" >&5
+$as_echo_n "checking for iris2odim rave module... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
$as_echo "suppressed" >&6; }
IRIS_SUPPRESSED=yes
;;
*)
if [ "$withval" != "" ]; then
- if [ "`echo $withval | grep ','`" = "" ]; then
- iris_inc=$withval/include
- iris_lib=$withval/lib
- else
- iris_inc="`echo $withval |cut -f1 -d,`"
- iris_lib="`echo $withval |cut -f2 -d,`"
- fi
-
- if [ "$iris_inc" != "" ]; then
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$iris_inc"
- for ac_header in iris2odim.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
-if test "x$ac_cv_header_iris2odim_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IRIS2ODIM_H 1
-_ACEOF
- GOT_IRIS_INC=yes
-fi
-
-done
-
- if [ "$GOT_IRIS_INC" = "yes" ]; then
- IRIS_INCLUDE_DIR="-I$iris_inc"
- else
- CPPFLAGS="$saved_CPPFLAGS"
- fi
- else
- for ac_header in iris2odim.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"iris2odim should be installed as a library module of RAVE - ignoring specified path '$withval'\"" >&5
+$as_echo "$as_me: WARNING: \"iris2odim should be installed as a library module of RAVE - ignoring specified path '$withval'\"" >&2;}
+ for ac_header in iris2odim.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "iris2odim.h" "ac_cv_header_iris2odim_h" "$ac_includes_default"
if test "x$ac_cv_header_iris2odim_h" = xyes; then :
@@ -4412,12 +4495,7 @@ fi
done
- fi
-
- if [ "$iris_lib" != "" ]; then
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -L$iris_lib"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
$as_echo_n "checking for populateObject in -liris2odim... " >&6; }
if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
@@ -4457,19 +4535,66 @@ if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
GOT_IRIS_LIB=yes
fi
- if [ "$GOT_IRIS_LIB" = "yes" ]; then
- IRIS_LIB_DIR="-L$iris_lib"
- else
- LDFLAGS="$saved_LDFLAGS"
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -liris2odim" >&5
-$as_echo_n "checking for populateObject in -liris2odim... " >&6; }
-if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
+ else
+ as_fn_error $? "\"Odd argument passed for iris\"" "$LINENO" 5
+ fi
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Vaisala IRIS support" >&5
+$as_echo_n "checking for Vaisala IRIS support... " >&6; }
+
+if [ "$GOT_IRIS_INC" = "yes" ]; then
+ if [ "$GOT_IRIS_LIB" = "yes" ]; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ IRIS_CFLAG=-DIRIS
+ IRIS_LIB=-liris2odim
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+RAINBOW_CFLAG=
+RAINBOW_LIB=
+GOT_RAINBOW_INC=no
+GOT_RAINBOW_LIB=no
+RAINBOW_SUPPRESSED=no
+
+# Check whether --with-rainbow was given.
+if test "${with_rainbow+set}" = set; then :
+ withval=$with_rainbow;
+else
+ withval=yes
+fi
+
+case $withval in
+ yes)
+ for ac_header in rb52odim.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "rb52odim.h" "ac_cv_header_rb52odim_h" "$ac_includes_default"
+if test "x$ac_cv_header_rb52odim_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RB52ODIM_H 1
+_ACEOF
+ GOT_RAINBOW_INC=yes
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -lrb52odim" >&5
+$as_echo_n "checking for populateObject in -lrb52odim... " >&6; }
+if ${ac_cv_lib_rb52odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-liris2odim $LIBS"
+LIBS="-lrb52odim $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4489,38 +4614,99 @@ return populateObject ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_iris2odim_populateObject=yes
+ ac_cv_lib_rb52odim_populateObject=yes
else
- ac_cv_lib_iris2odim_populateObject=no
+ ac_cv_lib_rb52odim_populateObject=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iris2odim_populateObject" >&5
-$as_echo "$ac_cv_lib_iris2odim_populateObject" >&6; }
-if test "x$ac_cv_lib_iris2odim_populateObject" = xyes; then :
- GOT_RSL_LIB=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rb52odim_populateObject" >&5
+$as_echo "$ac_cv_lib_rb52odim_populateObject" >&6; }
+if test "x$ac_cv_lib_rb52odim_populateObject" = xyes; then :
+ GOT_RAINBOW_LIB=yes
+fi
+
+ ;;
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb52odim rave module" >&5
+$as_echo_n "checking for rb52odim rave module... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
+$as_echo "suppressed" >&6; }
+ IRIS_SUPPRESSED=yes
+ ;;
+ *)
+ if [ "$withval" != "" ]; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"rb52odim should be installed as a library module of RAVE - ignoring specified path '$withval'\"" >&5
+$as_echo "$as_me: WARNING: \"rb52odim should be installed as a library module of RAVE - ignoring specified path '$withval'\"" >&2;}
+ for ac_header in rb52odim.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "rb52odim.h" "ac_cv_header_rb52odim_h" "$ac_includes_default"
+if test "x$ac_cv_header_rb52odim_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RB52ODIM_H 1
+_ACEOF
+ GOT_RAINBOW_INC=yes
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for populateObject in -lrb52odim" >&5
+$as_echo_n "checking for populateObject in -lrb52odim... " >&6; }
+if ${ac_cv_lib_rb52odim_populateObject+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrb52odim $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char populateObject ();
+int
+main ()
+{
+return populateObject ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rb52odim_populateObject=yes
+else
+ ac_cv_lib_rb52odim_populateObject=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rb52odim_populateObject" >&5
+$as_echo "$ac_cv_lib_rb52odim_populateObject" >&6; }
+if test "x$ac_cv_lib_rb52odim_populateObject" = xyes; then :
+ GOT_RAINBOW_LIB=yes
fi
- fi
else
- as_fn_error $? "\"Odd argument passed for IRIS\"" "$LINENO" 5
+ as_fn_error $? "\"Odd argument passed for rainbow\"" "$LINENO" 5
fi
;;
esac
-IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
-IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IRIS installation" >&5
-$as_echo_n "checking for IRIS installation... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SELEX Rainbow support" >&5
+$as_echo_n "checking for SELEX Rainbow support... " >&6; }
-if [ "$GOT_IRIS_INC" = "yes" ]; then
- if [ "$GOT_IRIS_LIB" = "yes" ]; then
+if [ "$GOT_RAINBOW_INC" = "yes" ]; then
+ if [ "$GOT_RAINBOW_LIB" = "yes" ]; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- IRIS_CFLAG=-DIRIS
- IRIS_LIB=-liris2odim
+ RAINBOW_CFLAG=-DRAINBOW
+ RAINBOW_LIB=-lrb52odim
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -4530,129 +4716,6 @@ else
$as_echo "no" >&6; }
fi
-echo "PROBLEMS!!!"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc compiler" >&5
-$as_echo_n "checking for RAVE cc compiler... " >&6; }
-RAVECC=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^CC=/p" | sed -n -e"s/^CC=[ \t]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECC" >&5
-$as_echo "$RAVECC" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE cc options" >&5
-$as_echo_n "checking for RAVE cc options... " >&6; }
-RAVECCOPTS=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^OPTS=/p" | sed -n -e"s/^OPTS=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECCOPTS" >&5
-$as_echo "$RAVECCOPTS" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpp options" >&5
-$as_echo_n "checking for cpp options... " >&6; }
-CPPOPTS=`echo "$RAVECCOPTS" | sed -e "s/-Wstrict-prototypes//"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPOPTS" >&5
-$as_echo "$CPPOPTS" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE ld flags" >&5
-$as_echo_n "checking for RAVE ld flags... " >&6; }
-RAVELDFLAGS=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^LDFLAGS=/p" | sed -n -e"s/^LDFLAGS=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVELDFLAGS" >&5
-$as_echo "$RAVELDFLAGS" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE shared flag" >&5
-$as_echo_n "checking for RAVE shared flag... " >&6; }
-RAVECCSHARED=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^CCSHARED=/p" | sed -n -e"s/^CCSHARED=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVECCSHARED" >&5
-$as_echo "$RAVECCSHARED" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include flag" >&5
-$as_echo_n "checking for Python include flag... " >&6; }
-PYTHON_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^INCLUDE_PYTHON=/p" | sed -n -e"s/^INCLUDE_PYTHON=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INCLUDE_PYTHON" >&5
-$as_echo "$INCLUDE_PYTHON" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for numpy include flag" >&5
-$as_echo_n "checking for numpy include flag... " >&6; }
-NUMPY_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^NUMPY_INCLUDE_DIR=/p" | sed -n -e"s/^NUMPY_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
-$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj include flag used by RAVE" >&5
-$as_echo_n "checking for proj include flag used by RAVE... " >&6; }
-PROJ_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^PROJ_INCLUDE_DIR=/p" | sed -n -e"s/^PROJ_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
-$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj library flag used by RAVE" >&5
-$as_echo_n "checking for proj library flag used by RAVE... " >&6; }
-PROJ_LIBRARY_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^PROJ_LIB_DIR=/p" | sed -n -e"s/^PROJ_LIB_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROJ_INCLUDE_FLAG" >&5
-$as_echo "$PROJ_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat include flag used by RAVE" >&5
-$as_echo_n "checking for expat include flag used by RAVE... " >&6; }
-EXPAT_INCLUDE_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_INCLUDE_DIR=/p" | sed -n -e"s/^EXPAT_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_INCLUDE_FLAG" >&5
-$as_echo "$EXPAT_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat library flag used by RAVE" >&5
-$as_echo_n "checking for expat library flag used by RAVE... " >&6; }
-EXPAT_LIBRARY_FLAG=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_LIB_DIR=/p" | sed -n -e"s/^EXPAT_LIB_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_INCLUDE_FLAG" >&5
-$as_echo "$EXPAT_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if expat is supressed" >&5
-$as_echo_n "checking if expat is supressed... " >&6; }
-EXPAT_SUPPRESSED=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^EXPAT_SUPPRESSED=/p" | sed -n -e"s/^EXPAT_SUPPRESSED=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPAT_SUPPRESSED" >&5
-$as_echo "$EXPAT_SUPPRESSED" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf include flag used by RAVE" >&5
-$as_echo_n "checking for hlhdf include flag used by RAVE... " >&6; }
-HLHDF_INCLUDE_FLAG=-I`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_INCLUDE_DIR=/p" | sed -n -e"s/^HLHDF_INCLUDE_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_INCLUDE_FLAG" >&5
-$as_echo "$HLHDF_INCLUDE_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf library flag used by RAVE" >&5
-$as_echo_n "checking for hlhdf library flag used by RAVE... " >&6; }
-HLHDF_LIBRARY_FLAG=-L`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_LIB_DIR=/p" | sed -n -e"s/^HLHDF_LIB_DIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_LIBRARY_FLAG" >&5
-$as_echo "$HLHDF_LIBRARY_FLAG" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf config file" >&5
-$as_echo_n "checking for hlhdf config file... " >&6; }
-HLHDF_MK_FILE=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^HLHDF_HLDEF_MK_FILE=/p" | sed -n -e"s/^HLHDF_HLDEF_MK_FILE=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_MK_FILE" >&5
-$as_echo "$HLHDF_MK_FILE" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hlhdf ld shared" >&5
-$as_echo_n "checking for hlhdf ld shared... " >&6; }
-HLHDFLDSHARED=`cat $HLHDF_MK_FILE | sed -n "/^LDSHARED=/p" | sed -n -e"s/^LDSHARED=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDFLDSHARED" >&5
-$as_echo "$HLHDFLDSHARED" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ ld shared options" >&5
-$as_echo_n "checking for g++ ld shared options... " >&6; }
-LDCPPSHARED=`echo "$HLHDFLDSHARED" | awk '{$1=""}1'`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDCPPSHARED" >&5
-$as_echo "$LDCPPSHARED" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hdf5 software used by hlhdf" >&5
-$as_echo_n "checking for hdf5 software used by hlhdf... " >&6; }
-HLHDF_HDF5_LIB=`cat $HLHDF_MK_FILE | sed -n "/^HDF5_LIBDIR=/p" | sed -n -e"s/^HDF5_LIBDIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_HDF5_LIB" >&5
-$as_echo "$HLHDF_HDF5_LIB" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib software used by hlhdf" >&5
-$as_echo_n "checking for zlib software used by hlhdf... " >&6; }
-HLHDF_ZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^ZLIB_LIBDIR=/p" | sed -n -e"s/^ZLIB_LIBDIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_ZLIB_LIB" >&5
-$as_echo "$HLHDF_ZLIB_LIB" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for szlib software used by hlhdf" >&5
-$as_echo_n "checking for szlib software used by hlhdf... " >&6; }
-HLHDF_SZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^SZLIB_LIBDIR=/p" | sed -n -e"s/^SZLIB_LIBDIR=[ ]*\(.*\)/\1/p"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_SZLIB_LIB" >&5
-$as_echo "$HLHDF_SZLIB_LIB" >&6; }
LD_PRINTOUT=$prefix/lib
if [ "$RAVE_LIB_FLAG" != "" ]; then
diff --git a/configure.in b/configure.in
index c672b286..bddb0da6 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,6 @@ AC_PROG_CPP
LIBS=-lm
-
dnl Check that we have libconfuse installed
dnl
CONFUSE_INCLUDE_DIR=
@@ -293,88 +292,6 @@ else
fi
-
-dnl Check that we have Vaisala IRIS library installed as part of RAVE
-dnl
-IRIS_INCLUDE_DIR=
-IRIS_LIB_DIR=
-IRIS_CFLAG=
-IRIS_LIB=
-GOT_IRIS_INC=no
-GOT_IRIS_LIB=no
-IRIS_SUPPRESSED=no
-AC_ARG_WITH(iris,[ --with-iris=DIR The IRIS root installation directory],
- ,withval=yes)
-case $withval in
- yes)
- AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
- ;;
- no)
- AC_MSG_CHECKING(for IRIS library)
- AC_MSG_RESULT(suppressed)
- IRIS_SUPPRESSED=yes
- ;;
- *)
- if [[ "$withval" != "" ]]; then
- if [[ "`echo $withval | grep ','`" = "" ]]; then
- iris_inc=$withval/include
- iris_lib=$withval/lib
- else
- iris_inc="`echo $withval |cut -f1 -d,`"
- iris_lib="`echo $withval |cut -f2 -d,`"
- fi
-
- if [[ "$iris_inc" != "" ]]; then
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$iris_inc"
- AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- if [[ "$GOT_IRIS_INC" = "yes" ]]; then
- IRIS_INCLUDE_DIR="-I$iris_inc"
- else
- CPPFLAGS="$saved_CPPFLAGS"
- fi
- else
- AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- fi
-
- if [[ "$iris_lib" != "" ]]; then
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -L$iris_lib"
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
- if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
- IRIS_LIB_DIR="-L$iris_lib"
- else
- LDFLAGS="$saved_LDFLAGS"
- fi
- else
- AC_CHECK_LIB(iris2odim,populateObject,GOT_RSL_LIB=yes)
- fi
- else
- AC_MSG_ERROR("Odd argument passed for IRIS")
- fi
- ;;
-esac
-
-IRIS_LIBRARY_FLAG=${IRIS_LIB_DIR}
-IRIS_INCLUDE_FLAG=${IRIS_INCLUDE_DIR}
-AC_MSG_CHECKING(for IRIS installation)
-
-if [[ "$GOT_IRIS_INC" = "yes" ]]; then
- if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
- AC_MSG_RESULT(yes)
- IRIS_CFLAG=-DIRIS
- IRIS_LIB=-liris2odim
- else
- AC_MSG_RESULT(no)
- fi
-else
- AC_MSG_RESULT(no)
-fi
-
-echo "PROBLEMS!!!"
-
-
dnl Now we should extract some variables from raves def.mk file to give user a possibility to change
dnl then when necessary
AC_MSG_CHECKING(for RAVE cc compiler)
@@ -447,7 +364,6 @@ AC_MSG_CHECKING(for g++ ld shared options)
LDCPPSHARED=`echo "$HLHDFLDSHARED" | awk '{$1=""}1'`
AC_MSG_RESULT($LDCPPSHARED)
-
AC_MSG_CHECKING(for hdf5 software used by hlhdf)
HLHDF_HDF5_LIB=`cat $HLHDF_MK_FILE | sed -n "/^HDF5_LIBDIR=/p" | sed -n -e"s/^HDF5_LIBDIR=[[ ]]*\(.*\)/\1/p"`
AC_MSG_RESULT($HLHDF_HDF5_LIB)
@@ -460,6 +376,101 @@ AC_MSG_CHECKING(for szlib software used by hlhdf)
HLHDF_SZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^SZLIB_LIBDIR=/p" | sed -n -e"s/^SZLIB_LIBDIR=[[ ]]*\(.*\)/\1/p"`
AC_MSG_RESULT($HLHDF_SZLIB_LIB)
+dnl Update LDFLAGS and CPPFLAGS with those obtained from RAVE
+LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
+CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
+
+dnl Check that we have Vaisala IRIS library installed as part of RAVE
+dnl
+IRIS_CFLAG=
+IRIS_LIB=
+GOT_IRIS_INC=no
+GOT_IRIS_LIB=no
+IRIS_SUPPRESSED=no
+AC_ARG_WITH(iris,[ --with-iris Add Vaisala IRIS support using iris2odim rave module],
+ ,withval=yes)
+case $withval in
+ yes)
+ AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ ;;
+ no)
+ AC_MSG_CHECKING(for iris2odim rave module)
+ AC_MSG_RESULT(suppressed)
+ IRIS_SUPPRESSED=yes
+ ;;
+ *)
+ if [[ "$withval" != "" ]]; then
+ AC_MSG_WARN("iris2odim should be installed as a library module of RAVE - ignoring specified path '$withval'")
+ AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ else
+ AC_MSG_ERROR("Odd argument passed for iris")
+ fi
+ ;;
+esac
+
+AC_MSG_CHECKING(for Vaisala IRIS support)
+
+if [[ "$GOT_IRIS_INC" = "yes" ]]; then
+ if [[ "$GOT_IRIS_LIB" = "yes" ]]; then
+ AC_MSG_RESULT(yes)
+ IRIS_CFLAG=-DIRIS
+ IRIS_LIB=-liris2odim
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+
+
+dnl Check that we have SELEX Rainbow library installed as part of RAVE
+dnl
+RAINBOW_CFLAG=
+RAINBOW_LIB=
+GOT_RAINBOW_INC=no
+GOT_RAINBOW_LIB=no
+RAINBOW_SUPPRESSED=no
+AC_ARG_WITH(rainbow,[ --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module],
+ ,withval=yes)
+case $withval in
+ yes)
+ AC_CHECK_HEADERS(rb52odim.h,GOT_RAINBOW_INC=yes)
+ AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes)
+ ;;
+ no)
+ AC_MSG_CHECKING(for rb52odim rave module)
+ AC_MSG_RESULT(suppressed)
+ IRIS_SUPPRESSED=yes
+ ;;
+ *)
+ if [[ "$withval" != "" ]]; then
+ AC_MSG_WARN("rb52odim should be installed as a library module of RAVE - ignoring specified path '$withval'")
+ AC_CHECK_HEADERS(rb52odim.h,GOT_RAINBOW_INC=yes)
+ AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes)
+ else
+ AC_MSG_ERROR("Odd argument passed for rainbow")
+ fi
+ ;;
+esac
+
+AC_MSG_CHECKING(for SELEX Rainbow support)
+
+if [[ "$GOT_RAINBOW_INC" = "yes" ]]; then
+ if [[ "$GOT_RAINBOW_LIB" = "yes" ]]; then
+ AC_MSG_RESULT(yes)
+ RAINBOW_CFLAG=-DRAINBOW
+ RAINBOW_LIB=-lrb52odim
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+
dnl Generate the ld library printout
dnl
LD_PRINTOUT=$prefix/lib
@@ -517,12 +528,12 @@ AC_SUBST(RSL_LIBRARY_FLAG)
AC_SUBST(RSL_CFLAG)
AC_SUBST(RSL_LIB)
AC_SUBST(GOT_RSL_LIB)
-AC_SUBST(IRIS_INCLUDE_FLAG)
-AC_SUBST(IRIS_LIBRARY_FLAG)
AC_SUBST(IRIS_CFLAG)
AC_SUBST(IRIS_LIB)
AC_SUBST(GOT_IRIS_LIB)
-
+AC_SUBST(RAINBOW_CFLAG)
+AC_SUBST(RAINBOW_LIB)
+AC_SUBST(GOT_RAINBOW_LIB)
AC_SUBST(LD_PRINTOUT)
diff --git a/def.mk.in b/def.mk.in
index 9915f767..3a57cd1f 100644
--- a/def.mk.in
+++ b/def.mk.in
@@ -49,11 +49,13 @@ RSL_CFLAG=@RSL_CFLAG@
RSL_LIB=@RSL_LIB@
# IRIS
-IRIS_LIBRARY_FLAG=@IRIS_LIBRARY_FLAG@
-IRIS_INCLUDE_FLAG=@IRIS_INCLUDE_FLAG@
IRIS_CFLAG=@IRIS_CFLAG@
IRIS_LIB=@IRIS_LIB@
+# RAINBOW
+RAINBOW_CFLAG=@RAINBOW_CFLAG@
+RAINBOW_LIB=@RAINBOW_LIB@
+
# Special flag to be used for printouts of the necessary LD_LIBRARY_PATH
#
LD_PRINTOUT= @LD_PRINTOUT@
From bab7364081c1f36912aad7082c7e6457a999a512 Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 6 Dec 2018 17:41:34 -0500
Subject: [PATCH 04/37] fix typo
---
configure | 1 -
configure.in | 1 -
2 files changed, 2 deletions(-)
diff --git a/configure b/configure
index 0eae52fd..61b76db9 100755
--- a/configure
+++ b/configure
@@ -4783,7 +4783,6 @@ fi
ac_config_files="$ac_config_files def.mk"
-# lib/config.h)
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
diff --git a/configure.in b/configure.in
index bddb0da6..1d7bf6e0 100644
--- a/configure.in
+++ b/configure.in
@@ -538,6 +538,5 @@ AC_SUBST(GOT_RAINBOW_LIB)
AC_SUBST(LD_PRINTOUT)
AC_CONFIG_FILES(def.mk)
-# lib/config.h)
AC_OUTPUT
From 40d5f155ef7016e7399b5aaa363187bd5bc502e1 Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 17:43:29 -0500
Subject: [PATCH 05/37] run autoconf on linux
---
configure | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 0eae52fd..f970a087 100755
--- a/configure
+++ b/configure
@@ -682,6 +682,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -758,6 +759,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1010,6 +1012,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1147,7 +1158,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1300,6 +1311,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
From fa8cf568c03670b75acfd31c66b380bf115ee028 Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 17:50:45 -0500
Subject: [PATCH 06/37] debugging
---
configure | 5 ++++-
configure.in | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 1d286a2c..ecd49bf8 100755
--- a/configure
+++ b/configure
@@ -1345,7 +1345,7 @@ Optional Packages:
--with-rsl=DIR The RSL root installation directory
--with-rave=ROOT The RAVE root installation directory
--with-iris Add Vaisala IRIS support using iris2odim rave module
- --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module
+ --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module
Some influential environment variables:
CC C compiler command
@@ -4416,6 +4416,9 @@ $as_echo "$HLHDF_SZLIB_LIB" >&6; }
LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
+echo SHITSHOW
+echo $LDFLAGS
+
IRIS_CFLAG=
IRIS_LIB=
GOT_IRIS_INC=no
diff --git a/configure.in b/configure.in
index 1d7bf6e0..0cc4a3a2 100644
--- a/configure.in
+++ b/configure.in
@@ -380,6 +380,9 @@ dnl Update LDFLAGS and CPPFLAGS with those obtained from RAVE
LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
+echo PRINTING LDFLAGS:
+echo $LDFLAGS
+
dnl Check that we have Vaisala IRIS library installed as part of RAVE
dnl
IRIS_CFLAG=
@@ -433,7 +436,7 @@ RAINBOW_LIB=
GOT_RAINBOW_INC=no
GOT_RAINBOW_LIB=no
RAINBOW_SUPPRESSED=no
-AC_ARG_WITH(rainbow,[ --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module],
+AC_ARG_WITH(rainbow,[ --with-rainbow Add SELEX Rainbow 5 support using rb52odim rave module],
,withval=yes)
case $withval in
yes)
From cc6b494d83048c47144aaa949a3fd900dbcda92b Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 17:51:48 -0500
Subject: [PATCH 07/37] debugging
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index ecd49bf8..1140a8f1 100755
--- a/configure
+++ b/configure
@@ -4416,7 +4416,7 @@ $as_echo "$HLHDF_SZLIB_LIB" >&6; }
LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
-echo SHITSHOW
+echo PRINTING LDFLAGS:
echo $LDFLAGS
IRIS_CFLAG=
From 287c4421a8fe0660e8f2d27defe81c84bc8c2b4d Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 18:11:13 -0500
Subject: [PATCH 08/37] debugging
---
configure | 4 +++-
configure.in | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1140a8f1..144bba0c 100755
--- a/configure
+++ b/configure
@@ -3005,7 +3005,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-LIBS=-lm
+LIBS=-lm -liris2odim
CONFUSE_INCLUDE_DIR=
CONFUSE_LIB_DIR=
@@ -4418,6 +4418,8 @@ CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
echo PRINTING LDFLAGS:
echo $LDFLAGS
+echo $CPPFLAGS
+echo $LIBS
IRIS_CFLAG=
IRIS_LIB=
diff --git a/configure.in b/configure.in
index 0cc4a3a2..6f6f881a 100644
--- a/configure.in
+++ b/configure.in
@@ -382,6 +382,8 @@ CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
echo PRINTING LDFLAGS:
echo $LDFLAGS
+echo $CPPFLAGS
+echo $LIBS
dnl Check that we have Vaisala IRIS library installed as part of RAVE
dnl
From 335e67f86f69f07b04540492fb4affd17b70975f Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 18:25:35 -0500
Subject: [PATCH 09/37] adding other-libraries argument to AC_CHECK_LIB
---
configure | 18 ++++++++++--------
configure.in | 14 +++++++-------
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/configure b/configure
index 144bba0c..951e2f29 100755
--- a/configure
+++ b/configure
@@ -3005,7 +3005,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-LIBS=-lm -liris2odim
+LIBS=-lm
CONFUSE_INCLUDE_DIR=
CONFUSE_LIB_DIR=
@@ -4413,14 +4413,16 @@ HLHDF_SZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^SZLIB_LIBDIR=/p" | sed -n -e"s/^
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HLHDF_SZLIB_LIB" >&5
$as_echo "$HLHDF_SZLIB_LIB" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAVE module libraries" >&5
+$as_echo_n "checking for RAVE module libraries... " >&6; }
+RAVE_MODULE_LIBRARIES=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^RAVE_MODULE_LIBRARIES=/p" | sed -n -e"s/^RAVE_MODULE_LIBRARIES=[ ]*\(.*\)/\1/p"`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAVE_MODULE_LIBRARIES" >&5
+$as_echo "$RAVE_MODULE_LIBRARIES" >&6; }
+
+
LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
-echo PRINTING LDFLAGS:
-echo $LDFLAGS
-echo $CPPFLAGS
-echo $LIBS
-
IRIS_CFLAG=
IRIS_LIB=
GOT_IRIS_INC=no
@@ -4454,7 +4456,7 @@ if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-liris2odim $LIBS"
+LIBS="-liris2odim $RAVE_MODULE_LIBRARIES $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4518,7 +4520,7 @@ if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-liris2odim $LIBS"
+LIBS="-liris2odim $RAVE_MODULE_LIBARIES $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/configure.in b/configure.in
index 6f6f881a..60e8b309 100644
--- a/configure.in
+++ b/configure.in
@@ -376,15 +376,15 @@ AC_MSG_CHECKING(for szlib software used by hlhdf)
HLHDF_SZLIB_LIB=`cat $HLHDF_MK_FILE | sed -n "/^SZLIB_LIBDIR=/p" | sed -n -e"s/^SZLIB_LIBDIR=[[ ]]*\(.*\)/\1/p"`
AC_MSG_RESULT($HLHDF_SZLIB_LIB)
+AC_MSG_CHECKING(for RAVE module libraries)
+RAVE_MODULE_LIBRARIES=`cat $RAVE_ROOT_DIR/mkf/def.mk | sed -n "/^RAVE_MODULE_LIBRARIES=/p" | sed -n -e"s/^RAVE_MODULE_LIBRARIES=[[ ]]*\(.*\)/\1/p"`
+AC_MSG_RESULT($RAVE_MODULE_LIBRARIES)
+
+
dnl Update LDFLAGS and CPPFLAGS with those obtained from RAVE
LDFLAGS="$LDFLAGS $RAVE_LIB_FLAG $HLHDF_LIBRARY_FLAG $PROJ_LIBRARY_FLAG"
CPPFLAGS="$CPPFLAGS $RAVE_INCLUDE_FLAG $HLHDF_INCLUDE_FLAG $PROJ_INCLUDE_FLAG"
-echo PRINTING LDFLAGS:
-echo $LDFLAGS
-echo $CPPFLAGS
-echo $LIBS
-
dnl Check that we have Vaisala IRIS library installed as part of RAVE
dnl
IRIS_CFLAG=
@@ -397,7 +397,7 @@ AC_ARG_WITH(iris,[ --with-iris Add Vaisala IRIS support using iris2odim rave
case $withval in
yes)
AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes,,[$RAVE_MODULE_LIBRARIES])
;;
no)
AC_MSG_CHECKING(for iris2odim rave module)
@@ -408,7 +408,7 @@ case $withval in
if [[ "$withval" != "" ]]; then
AC_MSG_WARN("iris2odim should be installed as a library module of RAVE - ignoring specified path '$withval'")
AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes)
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes,,[$RAVE_MODULE_LIBARIES])
else
AC_MSG_ERROR("Odd argument passed for iris")
fi
From 6d1668c5fe16479270105299eb32d7015be199c0 Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 6 Dec 2018 19:20:30 -0500
Subject: [PATCH 10/37] dirty fix for rb52odim
---
configure | 15 ++-------------
configure.in | 5 ++++-
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/configure b/configure
index 951e2f29..d21e78f1 100755
--- a/configure
+++ b/configure
@@ -682,7 +682,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -759,7 +758,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1012,15 +1010,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1158,7 +1147,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1311,7 +1300,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4579,6 +4567,7 @@ $as_echo "no" >&6; }
fi
+CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
RAINBOW_CFLAG=
RAINBOW_LIB=
diff --git a/configure.in b/configure.in
index 60e8b309..5c33347b 100644
--- a/configure.in
+++ b/configure.in
@@ -430,9 +430,12 @@ else
fi
-
dnl Check that we have SELEX Rainbow library installed as part of RAVE
dnl
+dnl rb52odim depends on libxml, including it here hard-coded
+dnl TODO: add explicit checking for presence of xml2
+CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+
RAINBOW_CFLAG=
RAINBOW_LIB=
GOT_RAINBOW_INC=no
From 9785695fdd2047a55e1a1eed7a73a97a007f1f1b Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 19:35:15 -0500
Subject: [PATCH 11/37] debugging linux
---
configure | 20 ++++++++++++++++----
configure.in | 6 +++---
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index d21e78f1..8fbf8582 100755
--- a/configure
+++ b/configure
@@ -682,6 +682,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -758,6 +759,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1010,6 +1012,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1147,7 +1158,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1300,6 +1311,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4508,7 +4520,7 @@ if ${ac_cv_lib_iris2odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-liris2odim $RAVE_MODULE_LIBARIES $LIBS"
+LIBS="-liris2odim $RAVE_MODULE_LIBRARIES $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4602,7 +4614,7 @@ if ${ac_cv_lib_rb52odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrb52odim $LIBS"
+LIBS="-lrb52odim $RAVE_MODULE_LIBRARIES -lxml2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4666,7 +4678,7 @@ if ${ac_cv_lib_rb52odim_populateObject+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrb52odim $LIBS"
+LIBS="-lrb52odim $RAVE_MODULE_LIBRARIES -lxml2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/configure.in b/configure.in
index 5c33347b..7e8a1cdd 100644
--- a/configure.in
+++ b/configure.in
@@ -408,7 +408,7 @@ case $withval in
if [[ "$withval" != "" ]]; then
AC_MSG_WARN("iris2odim should be installed as a library module of RAVE - ignoring specified path '$withval'")
AC_CHECK_HEADERS(iris2odim.h,GOT_IRIS_INC=yes)
- AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes,,[$RAVE_MODULE_LIBARIES])
+ AC_CHECK_LIB(iris2odim,populateObject,GOT_IRIS_LIB=yes,,[$RAVE_MODULE_LIBRARIES])
else
AC_MSG_ERROR("Odd argument passed for iris")
fi
@@ -446,7 +446,7 @@ AC_ARG_WITH(rainbow,[ --with-rainbow Add SELEX Rainbow 5 support using rb52od
case $withval in
yes)
AC_CHECK_HEADERS(rb52odim.h,GOT_RAINBOW_INC=yes)
- AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes)
+ AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes,,[$RAVE_MODULE_LIBRARIES -lxml2])
;;
no)
AC_MSG_CHECKING(for rb52odim rave module)
@@ -457,7 +457,7 @@ case $withval in
if [[ "$withval" != "" ]]; then
AC_MSG_WARN("rb52odim should be installed as a library module of RAVE - ignoring specified path '$withval'")
AC_CHECK_HEADERS(rb52odim.h,GOT_RAINBOW_INC=yes)
- AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes)
+ AC_CHECK_LIB(rb52odim,populateObject,GOT_RAINBOW_LIB=yes,,[$RAVE_MODULE_LIBRARIES -lxml2])
else
AC_MSG_ERROR("Odd argument passed for rainbow")
fi
From 79d3d06e1e2addf9dda35e857e56c8ccfb9e74b2 Mon Sep 17 00:00:00 2001
From: Adriaan Dokter
Date: Thu, 6 Dec 2018 19:45:01 -0500
Subject: [PATCH 12/37] debugging
---
configure | 2 +-
configure.in | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 8fbf8582..e0f19049 100755
--- a/configure
+++ b/configure
@@ -4579,7 +4579,7 @@ $as_echo "no" >&6; }
fi
-CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
RAINBOW_CFLAG=
RAINBOW_LIB=
diff --git a/configure.in b/configure.in
index 7e8a1cdd..d814b133 100644
--- a/configure.in
+++ b/configure.in
@@ -434,7 +434,8 @@ dnl Check that we have SELEX Rainbow library installed as part of RAVE
dnl
dnl rb52odim depends on libxml, including it here hard-coded
dnl TODO: add explicit checking for presence of xml2
-CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+dnl BUG: this solution works on Mac OSX but not on linux
+CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
RAINBOW_CFLAG=
RAINBOW_LIB=
From ad6c87f87607382fdb44903c10c03adf577d3777 Mon Sep 17 00:00:00 2001
From: adokter
Date: Wed, 12 Dec 2018 18:36:51 -0500
Subject: [PATCH 13/37] vol2bird now reads polar volumes in IRIS RAW format
---
lib/Makefile | 4 +--
lib/libvol2bird.c | 73 +++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 72 insertions(+), 5 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index 026236e5..dc2f835c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -18,7 +18,7 @@
# use gcc if not set already
CC ?= gcc
#CFLAGS += ${RSL_CFLAG} -fPIC -x c -DFPRINTFON
-CFLAGS += ${RSL_CFLAG} -fPIC -g -x c
+CFLAGS += ${RSL_CFLAG} ${IRIS_CFLAG} -fPIC -g -x c
LDFLAGS += -shared -Wall
# define where the vol2bird stuff is
@@ -48,7 +48,7 @@ libvol2bird.so : $(LIBVOL2BIRD_DEPS)
$(SRC_VOL2BIRD_DIR)/libdealias.c \
$(SRC_VOL2BIRD_DIR)/librsl.c \
$(LDFLAGS) \
- -Wall -o libvol2bird.so $(RAVE_MODULE_LIBRARIES) -lconfuse -lgsl -lgslcblas $(RSL_LIB) -lm
+ -Wall -o libvol2bird.so $(RAVE_MODULE_LIBRARIES) -lconfuse -lgsl -lgslcblas $(RSL_LIB) ${IRIS_LIB} -lm
.PHONY : install
install : libvol2bird.so
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index 9915cd4d..9e84caae 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -36,6 +36,10 @@
#include "librsl.h"
#endif
+#ifdef IRIS
+#include "iris2odim.h"
+#endif
+
// non-public function prototypes (local to this file/translation unit)
@@ -131,7 +135,9 @@ static void updateFlagFieldsInPointsArray(const float* yObs, const float* yFitte
static int updateMap(PolarScan_t* scan, CELLPROP *cellProp, const int nCells, vol2bird_t* alldata);
-
+#ifdef IRIS
+PolarVolume_t* vol2birdGetIRISVolume(char* filename, float rangeMax, int small);
+#endif
// non-public function declarations (local to this file/translation unit)
@@ -4191,6 +4197,14 @@ PolarVolume_t* vol2birdGetVolume(char* filename, float rangeMax, int small){
PolarVolume_t* volume = NULL;
+ #ifdef IRIS
+ // test whether the file is in IRIS format
+ if (isIRIS(filename)==0){
+ volume = vol2birdGetIRISVolume(filename, rangeMax, small);
+ goto done;
+ }
+ #endif
+
RaveIO_t* raveio = RaveIO_open(filename);
// check that a valid RaveIO_t pointer was returned
@@ -4211,15 +4225,68 @@ PolarVolume_t* vol2birdGetVolume(char* filename, float rangeMax, int small){
// not a rave complient file, attempt to read the file with the RSL library instead
#ifdef RSL
else{
- volume = vol2birdGetRSLVolume(filename, rangeMax, small);
+ volume = vol2birdGetRSLVolume(filename, rangeMax, small);
}
#endif
RAVE_OBJECT_RELEASE(raveio);
- return volume;
+ done:
+ return volume;
}
+#ifdef IRIS
+PolarVolume_t* vol2birdGetIRISVolume(char* filename, float rangeMax, int small) {
+
+ // initialize a polar volume to return
+ PolarVolume_t* volume = NULL;
+
+ // initialize the rave object type of filename
+ int rot = Rave_ObjectType_UNDEFINED;
+
+ int ret = 0;
+
+ // read the iris file
+ file_element_s* file_element_p = readIRIS(filename);
+
+ if(file_element_p == NULL){
+ fprintf(stderr, "Error: could not read IRIS file.\n");
+ return volume;
+ }
+
+ rot = objectTypeFromIRIS(file_element_p);
+
+ if (rot == Rave_ObjectType_PVOL) {
+ volume = RAVE_OBJECT_NEW(&PolarVolume_TYPE);
+
+ if (volume == NULL) {
+ RAVE_CRITICAL0("Error: failed to create polarvolume instance");
+ goto done;
+ }
+ }
+ else{
+ fprintf(stderr, "Error: IRIS file does not contain a polar volume.\n");
+ goto done;
+ }
+
+ // read iris data into rave polar volume object
+ ret = populateObject((RaveCoreObject*) volume, file_element_p);
+
+ if( ret != 0) {
+ fprintf(stderr, "Error: could not populate IRIS data into a polar volume object\n");
+ RAVE_OBJECT_RELEASE(volume);
+ volume = (PolarVolume_t*) NULL;
+ }
+
+ // clean up
+ if(file_element_p != NULL) {
+ free_IRIS(&file_element_p);
+ }
+
+ done:
+ return volume;
+}
+#endif
RaveIO_t* vol2birdIO_open(const char* filename)
From 7a4c5c726a94863d861b6c76832b02298142d579 Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 13 Dec 2018 12:32:32 -0500
Subject: [PATCH 14/37] added github links to repo
---
README.md | 7 +++++++
docs/index.html | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 1b5419c3..4fa061a8 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,13 @@ Dokter AM, Desmet P, Spaaks JH, van Hoey S, Veen L, Verlinden L, Nilsson C, Haas
Ecography, 2018, DOI [10.1111/ecog.04028](https://doi.org/10.1111/ecog.04028)
### repository contents
+
+Browse source code at:
+[https://github.com/adokter/vol2bird](https://github.com/adokter/vol2bird)
+
+Report a bug at:
+[https://github.com/adokter/vol2bird/issues](https://github.com/adokter/vol2bird/issues)
+
* `data` contains two polar volume radar files for testing
* `doc` documentation on ODIM hdf5 data format
* `docs` html pages of this documentation
diff --git a/docs/index.html b/docs/index.html
index 5e39d872..bb8b03bb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -52,6 +52,10 @@
Dokter AM, Desmet P, Spaaks JH, van Hoey S, Veen L, Verlinden L, Nilsson C, Haase G, Leijnse H, Farnsworth A, Bouten W, Shamoun-Baranes J.
Ecography, 2018, DOI 10.1111/ecog.04028
repository contents
+Browse source code at:
+https://github.com/adokter/vol2bird
+Report a bug at:
+https://github.com/adokter/vol2bird/issues
data
contains two polar volume radar files for testing
doc
documentation on ODIM hdf5 data format
From 44c692bd43227de766c453ed71f833a86a33ba1a Mon Sep 17 00:00:00 2001
From: adokter
Date: Thu, 3 Jan 2019 12:18:15 +0100
Subject: [PATCH 15/37] match default nlayer in options.conf match hard-coded
default
---
etc/options.conf | 2 +-
src/vol2bird.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/etc/options.conf b/etc/options.conf
index b635b641..225ab4ee 100644
--- a/etc/options.conf
+++ b/etc/options.conf
@@ -1,6 +1,6 @@
# the number of layers in an altitude profile
-NLAYER = 20
+NLAYER = 25
# the width/thickness of a layer [m]
HLAYER = 200.0
diff --git a/src/vol2bird.c b/src/vol2bird.c
index 3c9c84bd..ec34df6b 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -42,6 +42,7 @@ int main(int argc, char** argv) {
// cfg_t* cfg;
vol2bird_t alldata;
+ // make sure executable and library version match
if (strcmp(VERSION,libvol2bird_version()) != 0){
fprintf(stderr,"Error: incorrect vol2bird installation: executable version (%s) has to match shared library version (%s).\n",VERSION,libvol2bird_version());
return -1;
From c2a02d80923d965cbc6e6fdc44d4963255ac6526 Mon Sep 17 00:00:00 2001
From: adokter
Date: Mon, 7 Jan 2019 15:26:42 +0100
Subject: [PATCH 16/37] fix brackets Makefile
---
lib/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Makefile b/lib/Makefile
index dc2f835c..a9824631 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -48,7 +48,7 @@ libvol2bird.so : $(LIBVOL2BIRD_DEPS)
$(SRC_VOL2BIRD_DIR)/libdealias.c \
$(SRC_VOL2BIRD_DIR)/librsl.c \
$(LDFLAGS) \
- -Wall -o libvol2bird.so $(RAVE_MODULE_LIBRARIES) -lconfuse -lgsl -lgslcblas $(RSL_LIB) ${IRIS_LIB} -lm
+ -Wall -o libvol2bird.so $(RAVE_MODULE_LIBRARIES) -lconfuse -lgsl -lgslcblas $(RSL_LIB) $(IRIS_LIB) -lm
.PHONY : install
install : libvol2bird.so
From 0ce8f36b645b418e442a8c7a89290982e85a9994 Mon Sep 17 00:00:00 2001
From: adokter
Date: Mon, 7 Jan 2019 15:28:43 +0100
Subject: [PATCH 17/37] fix brackets Makefile
---
lib/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index a9824631..d16aee85 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -17,8 +17,8 @@
# use gcc if not set already
CC ?= gcc
-#CFLAGS += ${RSL_CFLAG} -fPIC -x c -DFPRINTFON
-CFLAGS += ${RSL_CFLAG} ${IRIS_CFLAG} -fPIC -g -x c
+#CFLAGS += $(RSL_CFLAG) -fPIC -x c -DFPRINTFON
+CFLAGS += $(RSL_CFLAG) $(IRIS_CFLAG) -fPIC -g -x c
LDFLAGS += -shared -Wall
# define where the vol2bird stuff is
From 68733ba7cb74f5896ac1bbfb5c03de481dec9af2 Mon Sep 17 00:00:00 2001
From: adokter
Date: Mon, 7 Jan 2019 15:38:10 +0100
Subject: [PATCH 18/37] fix iris library in vol2bird binary source makefile
---
src/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 77622201..4ae5415d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -51,7 +51,7 @@ vol2bird : ../lib/libvol2bird.so $(VOL2BIRD_DEPS)
$(RAVE_MODULE_LDFLAGS) \
$(PROJ_LIBRARY_FLAG) \
$(RSL_LIBRARY_FLAG) \
- -lvol2bird $(RAVE_MODULE_LIBRARIES) -lm $(RSL_LIB) -o vol2bird $(LDFLAGS)
+ -lvol2bird $(RAVE_MODULE_LIBRARIES) -lm $(RSL_LIB) $(IRIS_LIB) -o vol2bird $(LDFLAGS)
rsl2odim : ../lib/libvol2bird.so $(RSL2ODIM_DEPS)
#
@@ -65,7 +65,8 @@ rsl2odim : ../lib/libvol2bird.so $(RSL2ODIM_DEPS)
$(RAVE_MODULE_LDFLAGS) \
$(PROJ_LIBRARY_FLAG) \
$(RSL_LIBRARY_FLAG) \
- -lvol2bird $(RAVE_MODULE_LIBRARIES) -lm $(RSL_LIB) -o rsl2odim $(LDFLAGS)
+ $(IRIS_LIBRARY_FLAG) \
+ -lvol2bird $(RAVE_MODULE_LIBRARIES) -lm $(RSL_LIB) $(IRIS_LIB) -o rsl2odim $(LDFLAGS)
#
# (You may still have to change your LD_LIBRARY_PATH)
From c1aaa5b40702e8410c03ac72d7b72e024f5f0897 Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 12 Mar 2019 17:46:40 -0400
Subject: [PATCH 19/37] prototype getopt options
---
lib/constants.h | 2 +
src/vol2bird.c | 193 ++++++++++++++++++++++++++++++++++++++----------
2 files changed, 158 insertions(+), 37 deletions(-)
diff --git a/lib/constants.h b/lib/constants.h
index 279703dd..460b5b75 100644
--- a/lib/constants.h
+++ b/lib/constants.h
@@ -82,6 +82,8 @@
// other hard-coded options //
//-------------------------------------------------------//
+// maximum number of input files
+#define INPUTFILESMAX 50
// Raw value used for gates or layers void of data (never ra-diated)
#define UNDETECT -999
// Raw value used for gates or layers when below the measurement detection threshold
diff --git a/src/vol2bird.c b/src/vol2bird.c
index ec34df6b..04903e42 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -30,6 +30,7 @@
#include
#include
+#include
#include "rave_io.h"
#include "polarvolume.h"
#include "libvol2bird.h"
@@ -38,19 +39,12 @@
#include "hlhdf_debug.h"
#include "rave_debug.h"
-int main(int argc, char** argv) {
-// cfg_t* cfg;
- vol2bird_t alldata;
-
- // make sure executable and library version match
- if (strcmp(VERSION,libvol2bird_version()) != 0){
- fprintf(stderr,"Error: incorrect vol2bird installation: executable version (%s) has to match shared library version (%s).\n",VERSION,libvol2bird_version());
- return -1;
- }
+void usage(char* programName, int verbose){
+ fprintf(stderr,"usage: %s [ []]\n",programName);
+ fprintf(stderr,"usage: %s -i [-i [-i ] ...] [-o [-p ]]\n",programName);
+ fprintf(stderr,"usage: %s --help\n", programName);
- // print default message when no input arguments
- if (argc == 1) {
- fprintf(stderr,"usage: %s [ []]\n",argv[0]);
+ if(verbose){
fprintf(stderr," Version %s (%s)\n", VERSION, VERSIONDATE);
fprintf(stderr," expects OPERA ODIM hdf5 input format, see \n");
fprintf(stderr," or input formats compatible with RSL, see \n\n");
@@ -75,49 +69,174 @@ int main(int argc, char** argv) {
fprintf(stderr," n_dbz_all - number of points total reflectivity estimate (DBZH)\n\n");
fprintf(stderr," Report bugs to: a.m.dokter@uva.nl or on http://github.com/adokter/vol2bird/issues \n");
fprintf(stderr," vol2bird home page: \n");
+ }
+}
+
+int main(int argc, char** argv) {
+// cfg_t* cfg;
+ vol2bird_t alldata;
+
+ // make sure executable and library version match
+ if (strcmp(VERSION,libvol2bird_version()) != 0){
+ fprintf(stderr,"Error: incorrect vol2bird installation: executable version (%s) has to match shared library version (%s).\n",VERSION,libvol2bird_version());
return -1;
}
- // check to see if we have the right number of input arguments
- if (argc > 4) {
- fprintf(stderr, "Up to three arguments are allowed\n");
+
+ // print default message when no input arguments
+ if (argc == 1) {
+ usage(argv[0], 0);
return -1;
}
- // ------------------------------------------------------------- //
- // initialization of variables //
- // ------------------------------------------------------------- //
-
+ // number of input files specified on command line
+ int nInputFiles = 0;
// the polar volume file that the user provided as input
- char* fileVolIn = argv[1];
+ char* fileVolIn[INPUTFILESMAX];
// the (optional) vertical profile file that the user specified as output
- const char* fileVpOut;
+ const char* fileVpOut = NULL;
// the (optional) vertical profile file that the user specified as output
- const char* fileVolOut;
-
- if (argc == 3){
- fileVpOut = argv[2];
- fileVolOut = NULL;
+ const char* fileVolOut = NULL;
+
+ // determine whether we deal with legacy command line format (0) or getopt command line format (1)
+ int commandLineFormat = 0;
+ for (int i=0; i 4) {
+ fprintf(stderr, "Error: Invalid command line arguments\n");
+ usage(argv[0], 0);
+ return -1;
+ }
+
+ // ------------------------------------------------------------- //
+ // initialization of variables //
+ // ------------------------------------------------------------- //
+
+ // the polar volume file that the user provided as input
+ fileVolIn[0] = argv[1];
+ nInputFiles = 1;
+
+ if (argc == 3){
+ fileVpOut = argv[2];
+ fileVolOut = NULL;
+ }
+ else if (argc == 4){
+ fileVpOut = argv[2];
+ fileVolOut = argv[3];
+ }
+ else{
+ fileVpOut = NULL;
+ fileVolOut = NULL;
+ }
}
- else{
- fileVpOut = NULL;
- fileVolOut = NULL;
+ else{ // interpret command line input using getopt library
+
+ int c;
+
+ while (1) {
+ static struct option long_options[] =
+ {
+ /* These options don’t set a flag.
+ We distinguish them by their indices. */
+ {"help", no_argument, 0, 'h'},
+ {"version", no_argument, 0, 'v'},
+ {"input", required_argument, 0, 'i'},
+ {"output", required_argument, 0, 'o'},
+ {"pvol", required_argument, 0, 'p'},
+ {0, 0, 0, 0}
+ };
+
+ /* getopt_long stores the option index here. */
+ int option_index = 0;
+
+ c = getopt_long (argc, argv, "hvi:o:p:",
+ long_options, &option_index);
+
+ /* Detect the end of the options. */
+ if (c == -1) break;
+
+ switch (c){
+ case 0:
+ /* If this option set a flag, do nothing else now. */
+ if (long_options[option_index].flag != 0)
+ break;
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case 'h':
+ usage(argv[0],1);
+ return -1;
+ break;
+
+ case 'v':
+ fprintf(stderr,"%s version %s (%s)\n", argv[0], VERSION, VERSIONDATE);
+ return -1;
+ break;
+
+ case 'i':
+ printf ("option -i with value `%s'\n", optarg);
+ fileVolIn[nInputFiles] = optarg;
+ nInputFiles++;
+ break;
+
+ case 'o':
+ printf ("option -o with value `%s'\n", optarg);
+ fileVpOut = optarg;
+ break;
+
+ case 'p':
+ printf ("option -p with value `%s'\n", optarg);
+ fileVolOut = optarg;
+ break;
+
+ case '?':
+ /* getopt_long already printed an error message. */
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ /* Print any remaining command line arguments (not options). */
+ if (optind < argc) {
+ printf ("unknown function argument(s): ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ putchar ('\n');
+ }
+ printf("%i input files found\n",nInputFiles);
+ printf("vp output file: %s\n",fileVpOut);
+ printf("pvol output file: %s\n",fileVolOut);
+
}
+
// Initialize hlhdf library
HL_init();
- //HL_setDebugLevel(HLHDF_SPEWDEBUG);
- // Make rave library print debugging error messages
+ // Make rave and hlhdf library print debugging error messages
+ //HL_setDebugLevel(HLHDF_SPEWDEBUG);
//Rave_initializeDebugger();
//Rave_setDebugLevel(RAVE_WARNING);
//Rave_setDebugLevel(RAVE_INFO);
// store the input filename
- strcpy(alldata.misc.filename_pvol,fileVolIn);
+ strcpy(alldata.misc.filename_pvol,fileVolIn[0]);
if (fileVpOut != NULL){
strcpy(alldata.misc.filename_vp,fileVpOut);
}
@@ -134,7 +253,7 @@ int main(int argc, char** argv) {
// we do not read in the full volume for speed/memory
PolarVolume_t* volume = NULL;
- volume = vol2birdGetVolume(fileVolIn, alldata.misc.rCellMax,1);
+ volume = vol2birdGetVolume(fileVolIn[0], alldata.misc.rCellMax,1);
if (volume == NULL) {
fprintf(stderr,"Error: failed to read radar volume\n");
@@ -199,7 +318,7 @@ int main(int argc, char** argv) {
fprintf(stdout, "# vol2bird Vertical Profile of Birds (VPB)\n");
fprintf(stdout, "# source: %s\n",source);
- fprintf(stdout, "# polar volume input: %s\n",fileVolIn);
+ fprintf(stdout, "# polar volume input: %s\n",fileVolIn[0]);
if (alldata.misc.vcp > 0) fprintf(stdout, "# volume coverage pattern (VCP): %i\n", alldata.misc.vcp);
printf("# date time HGHT u v w ff dd sd_vvp gap dbz eta dens DBZH n n_dbz n_all n_dbz_all\n");
From d1ab49db9fc3c45601b7aa5402a450d6d2b68daa Mon Sep 17 00:00:00 2001
From: adokter
Date: Wed, 13 Mar 2019 18:31:55 -0400
Subject: [PATCH 20/37] testing for file existence. radarDataFormat struct
added
---
lib/libvol2bird.c | 10 +++++++++-
lib/libvol2bird.h | 10 ++++++++++
src/vol2bird.c | 38 ++++++++++++++++++++++++--------------
3 files changed, 43 insertions(+), 15 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index fb8caf65..a4a393d9 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
#include
#include "rave_io.h"
@@ -2642,7 +2643,14 @@ static int includeGate(const int iProfileType, const int iQuantityType, const un
} // includeGate
-
+/**
+ * Function name: isRegularFile
+ * Intent: determines whether the given path is to a regular file
+ * Note: also returns true on existing directories
+ */
+int isRegularFile(const char *path) {
+ return (access(path, F_OK) != -1);
+} /* end function is_regular_file */
static int readUserConfigOptions(cfg_t** cfg, const char * optsConfFilename) {
diff --git a/lib/libvol2bird.h b/lib/libvol2bird.h
index 858ff315..26f20f9f 100644
--- a/lib/libvol2bird.h
+++ b/lib/libvol2bird.h
@@ -381,10 +381,20 @@ struct vol2bird {
};
typedef struct vol2bird vol2bird_t;
+typedef enum radarDataFormat {
+ radarDataFormat_UNKNOWN = 0,
+ radarDataFormat_ODIM = 1, /** Opera Data Information Model (ODIM) */
+ radarDataFormat_RSL = 2, /** TRMM radar solftware library (including NEXRAD) */
+ radarDataFormat_IRIS = 3 /** Vaisala IRIS */
+} radarDataFormat;
+
+
// *****************************************************************************
// Public function prototypes
// *****************************************************************************
+int isRegularFile(const char *path);
+
void vol2birdCalcProfiles(vol2bird_t* alldata);
float* vol2birdGetProfile(int iProfileType, vol2bird_t* alldata);
diff --git a/src/vol2bird.c b/src/vol2bird.c
index 04903e42..0eee1d79 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include "rave_io.h"
#include "polarvolume.h"
#include "libvol2bird.h"
@@ -91,7 +92,7 @@ int main(int argc, char** argv) {
// number of input files specified on command line
int nInputFiles = 0;
// the polar volume file that the user provided as input
- char* fileVolIn[INPUTFILESMAX];
+ char* fileIn[INPUTFILESMAX];
// the (optional) vertical profile file that the user specified as output
const char* fileVpOut = NULL;
// the (optional) vertical profile file that the user specified as output
@@ -124,7 +125,7 @@ int main(int argc, char** argv) {
// ------------------------------------------------------------- //
// the polar volume file that the user provided as input
- fileVolIn[0] = argv[1];
+ fileIn[0] = argv[1];
nInputFiles = 1;
if (argc == 3){
@@ -140,6 +141,7 @@ int main(int argc, char** argv) {
fileVolOut = NULL;
}
}
+
else{ // interpret command line input using getopt library
int c;
@@ -188,18 +190,15 @@ int main(int argc, char** argv) {
break;
case 'i':
- printf ("option -i with value `%s'\n", optarg);
- fileVolIn[nInputFiles] = optarg;
+ fileIn[nInputFiles] = optarg;
nInputFiles++;
break;
case 'o':
- printf ("option -o with value `%s'\n", optarg);
fileVpOut = optarg;
break;
case 'p':
- printf ("option -p with value `%s'\n", optarg);
fileVolOut = optarg;
break;
@@ -219,12 +218,23 @@ int main(int argc, char** argv) {
printf ("%s ", argv[optind++]);
putchar ('\n');
}
- printf("%i input files found\n",nInputFiles);
- printf("vp output file: %s\n",fileVpOut);
- printf("pvol output file: %s\n",fileVolOut);
+
+ printf("%i input files found in command line\n",nInputFiles);
+ for (int i=0; i 0) fprintf(stdout, "# volume coverage pattern (VCP): %i\n", alldata.misc.vcp);
printf("# date time HGHT u v w ff dd sd_vvp gap dbz eta dens DBZH n n_dbz n_all n_dbz_all\n");
From 9d085adb1e1cdfdd172c1d57cc032e0684863659 Mon Sep 17 00:00:00 2001
From: adokter
Date: Mon, 18 Mar 2019 15:08:56 -0400
Subject: [PATCH 21/37] added determineRadarFormat() function
---
lib/librsl.h | 1 +
lib/libvol2bird.c | 29 +++++++++++++++++++++++++++++
lib/libvol2bird.h | 2 ++
src/vol2bird.c | 17 ++++++++---------
4 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/lib/librsl.h b/lib/librsl.h
index 30bc65a9..303a3f72 100644
--- a/lib/librsl.h
+++ b/lib/librsl.h
@@ -1,5 +1,6 @@
#ifdef RSL
+#include "rsl.h"
PolarVolume_t* vol2birdGetRSLVolume(char* filename, float rangeMax, int small);
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index a4a393d9..d101ac16 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -40,6 +40,7 @@
#include "libdealias.h"
#ifdef RSL
+#include "rsl.h"
#include "librsl.h"
#endif
@@ -3335,6 +3336,34 @@ static void sortCellsByArea(CELLPROP *cellProp, const int nCells) {
+radarDataFormat determineRadarFormat(char* filename){
+
+#ifdef IRIS
+ if (isIRIS(filename)==0){
+ return radarDataFormat_ODIM;
+ }
+#endif
+
+#ifdef RSL
+ if(RSL_filetype(filename) != UNKNOWN){
+ return radarDataFormat_RSL;
+ }
+#endif
+
+ // try to load the file using Rave
+ // unfortunately this loads the entire file into memory,
+ // but no other file type check function available in Rave.
+ RaveIO_t* raveio = RaveIO_open(filename);
+
+ // check that a valid RaveIO_t pointer was returned
+ if (raveio != (RaveIO_t*) NULL){
+ RAVE_OBJECT_RELEASE(raveio);
+ return radarDataFormat_ODIM;
+ }
+
+ return radarDataFormat_UNKNOWN;
+}
+
static int removeDroppedCells(CELLPROP *cellProp, const int nCells) {
int iCell;
diff --git a/lib/libvol2bird.h b/lib/libvol2bird.h
index 26f20f9f..6cc3b0da 100644
--- a/lib/libvol2bird.h
+++ b/lib/libvol2bird.h
@@ -393,6 +393,8 @@ typedef enum radarDataFormat {
// Public function prototypes
// *****************************************************************************
+radarDataFormat determineRadarFormat(char* filename);
+
int isRegularFile(const char *path);
void vol2birdCalcProfiles(vol2bird_t* alldata);
diff --git a/src/vol2bird.c b/src/vol2bird.c
index 0eee1d79..90d8205b 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -217,15 +217,7 @@ int main(int argc, char** argv) {
while (optind < argc)
printf ("%s ", argv[optind++]);
putchar ('\n');
- }
-
- printf("%i input files found in command line\n",nInputFiles);
- for (int i=0; i
Date: Mon, 18 Mar 2019 15:44:07 -0400
Subject: [PATCH 22/37] prepare vol2birdGetVolume() to take an array of files
as input
---
lib/libvol2bird.c | 12 ++++++------
lib/libvol2bird.h | 2 +-
src/rsl2odim.c | 2 +-
src/vol2bird.c | 11 ++++++++---
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index d101ac16..253359ab 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -1920,7 +1920,7 @@ static int getListOfSelectedGates(PolarScan_t* scan, vol2birdScanUse_t scanUse,
int vol2birdLoadClutterMap(PolarVolume_t* volume, char* file, float rangeMax){
PolarVolume_t* clutVol = NULL;
- clutVol = vol2birdGetVolume(file, rangeMax,1);
+ clutVol = vol2birdGetVolume(&file, 1, rangeMax,1);
if(clutVol == NULL){
fprintf(stderr, "Error: function loadClutterMap: failed to load file '%s'\n",file);
@@ -4236,19 +4236,19 @@ void printProfile(vol2bird_t* alldata) {
// reads a polar volume from file and returns it as a RAVE polar volume object
// remember to release the polar volume object when done with it
-PolarVolume_t* vol2birdGetVolume(char* filename, float rangeMax, int small){
+PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float rangeMax, int small){
PolarVolume_t* volume = NULL;
#ifdef IRIS
// test whether the file is in IRIS format
- if (isIRIS(filename)==0){
- volume = vol2birdGetIRISVolume(filename, rangeMax, small);
+ if (isIRIS(filenames[0])==0){
+ volume = vol2birdGetIRISVolume(filenames[0], rangeMax, small);
goto done;
}
#endif
- RaveIO_t* raveio = RaveIO_open(filename);
+ RaveIO_t* raveio = RaveIO_open(filenames[0]);
// check that a valid RaveIO_t pointer was returned
if (raveio != (RaveIO_t*) NULL){
@@ -4268,7 +4268,7 @@ PolarVolume_t* vol2birdGetVolume(char* filename, float rangeMax, int small){
// not a rave complient file, attempt to read the file with the RSL library instead
#ifdef RSL
else{
- volume = vol2birdGetRSLVolume(filename, rangeMax, small);
+ volume = vol2birdGetRSLVolume(filenames[0], rangeMax, small);
}
#endif
diff --git a/lib/libvol2bird.h b/lib/libvol2bird.h
index 6cc3b0da..1ceaf01a 100644
--- a/lib/libvol2bird.h
+++ b/lib/libvol2bird.h
@@ -401,7 +401,7 @@ void vol2birdCalcProfiles(vol2bird_t* alldata);
float* vol2birdGetProfile(int iProfileType, vol2bird_t* alldata);
-PolarVolume_t* vol2birdGetVolume(char* filename, float rangeMax, int small);
+PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float rangeMax, int small);
PolarVolume_t* PolarVolume_resample(PolarVolume_t* volume, double rscale_proj, long nbins_proj, long nrays_proj);
diff --git a/src/rsl2odim.c b/src/rsl2odim.c
index 5d442e09..f5745103 100644
--- a/src/rsl2odim.c
+++ b/src/rsl2odim.c
@@ -34,7 +34,7 @@ int main(int argc, char** argv) {
// read in data up to a distance of alldata.misc.rCellMax
// we do not read in the full volume for speed/memory
PolarVolume_t* volume = NULL;
- volume = vol2birdGetVolume(fileVolIn, 1000000, 0);
+ volume = vol2birdGetVolume(&fileVolIn, 1, 1000000, 0);
if (volume == NULL) {
fprintf(stderr,"Error: failed to read radar volume\n");
diff --git a/src/vol2bird.c b/src/vol2bird.c
index 90d8205b..c464cbc8 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -190,8 +190,13 @@ int main(int argc, char** argv) {
break;
case 'i':
- fileIn[nInputFiles] = optarg;
- nInputFiles++;
+ if (nInputFiles < INPUTFILESMAX){
+ fileIn[nInputFiles] = optarg;
+ nInputFiles++;
+ }
+ else{
+ fprintf(stderr, "Warning: too many input files, ignoring file %s ...\n", optarg);
+ }
break;
case 'o':
@@ -262,7 +267,7 @@ int main(int argc, char** argv) {
// we do not read in the full volume for speed/memory
PolarVolume_t* volume = NULL;
- volume = vol2birdGetVolume(fileIn[0], alldata.misc.rCellMax,1);
+ volume = vol2birdGetVolume(fileIn, nInputFiles, alldata.misc.rCellMax,1);
if (volume == NULL) {
fprintf(stderr,"Error: failed to read radar volume\n");
From 5d89a119c33c98c8c5ddaf4b18b416bf228494a7 Mon Sep 17 00:00:00 2001
From: adokter
Date: Mon, 18 Mar 2019 20:01:21 -0400
Subject: [PATCH 23/37] new code to read and merge multiple IRIS scans into a
polar volume (issue #116)
---
lib/libvol2bird.c | 142 ++++++++++++++++++++++++++++++++++------------
1 file changed, 106 insertions(+), 36 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index 253359ab..9b747f01 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -144,7 +144,7 @@ static void updateFlagFieldsInPointsArray(const float* yObs, const float* yFitte
static int updateMap(PolarScan_t* scan, CELLPROP *cellProp, const int nCells, vol2bird_t* alldata);
#ifdef IRIS
-PolarVolume_t* vol2birdGetIRISVolume(char* filename, float rangeMax, int small);
+PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles, float rangeMax, int small);
#endif
// non-public function declarations (local to this file/translation unit)
@@ -4243,7 +4243,7 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
#ifdef IRIS
// test whether the file is in IRIS format
if (isIRIS(filenames[0])==0){
- volume = vol2birdGetIRISVolume(filenames[0], rangeMax, small);
+ volume = vol2birdGetIRISVolume(filenames, nInputFiles, rangeMax, small);
goto done;
}
#endif
@@ -4279,55 +4279,125 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
}
#ifdef IRIS
-PolarVolume_t* vol2birdGetIRISVolume(char* filename, float rangeMax, int small) {
-
+PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles, float rangeMax, int small) {
// initialize a polar volume to return
PolarVolume_t* volume = NULL;
-
+ PolarVolume_t* output = NULL;
+ PolarScan_t* scan = NULL;
+
+ int outputInitialised = FALSE;
+
// initialize the rave object type of filename
int rot = Rave_ObjectType_UNDEFINED;
int ret = 0;
+
+ file_element_s* file_element_p;
- // read the iris file
- file_element_s* file_element_p = readIRIS(filename);
-
- if(file_element_p == NULL){
- fprintf(stderr, "Error: could not read IRIS file.\n");
- return volume;
- }
-
- rot = objectTypeFromIRIS(file_element_p);
-
- if (rot == Rave_ObjectType_PVOL) {
- volume = RAVE_OBJECT_NEW(&PolarVolume_TYPE);
+ for (int i=0; i
Date: Mon, 18 Mar 2019 20:11:47 -0400
Subject: [PATCH 24/37] also add source attribute of first scan to volume
---
lib/libvol2bird.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index 9b747f01..ca8a5eec 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -144,7 +144,7 @@ static void updateFlagFieldsInPointsArray(const float* yObs, const float* yFitte
static int updateMap(PolarScan_t* scan, CELLPROP *cellProp, const int nCells, vol2bird_t* alldata);
#ifdef IRIS
-PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles, float rangeMax, int small);
+PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles);
#endif
// non-public function declarations (local to this file/translation unit)
@@ -4243,7 +4243,7 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
#ifdef IRIS
// test whether the file is in IRIS format
if (isIRIS(filenames[0])==0){
- volume = vol2birdGetIRISVolume(filenames, nInputFiles, rangeMax, small);
+ volume = vol2birdGetIRISVolume(filenames, nInputFiles);
goto done;
}
#endif
@@ -4279,10 +4279,11 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
}
#ifdef IRIS
-PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles, float rangeMax, int small) {
+PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles) {
// initialize a polar volume to return
- PolarVolume_t* volume = NULL;
PolarVolume_t* output = NULL;
+ // initialize helper volume and scan to store intermediate file reads
+ PolarVolume_t* volume = NULL;
PolarScan_t* scan = NULL;
int outputInitialised = FALSE;
@@ -4374,6 +4375,7 @@ PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles, float r
PolarVolume_setLatitude(output, PolarScan_getLatitude(scan));
PolarVolume_setLongitude(output, PolarScan_getLongitude(scan));
PolarVolume_setHeight(output, PolarScan_getHeight(scan));
+ PolarVolume_setSource(output, PolarScan_getSource(scan));
outputInitialised = TRUE;
}
From c1d3fb5fb95409b9af5a6bf09a541abe18991958 Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 19 Mar 2019 12:28:30 -0400
Subject: [PATCH 25/37] add functionality to read and merge multiple ODIM
scans.
---
lib/libvol2bird.c | 149 ++++++++++++++++++++++++++++++++++++++--------
src/vol2bird.c | 7 ++-
2 files changed, 128 insertions(+), 28 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index ca8a5eec..018f1b3d 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -147,6 +147,8 @@ static int updateMap(PolarScan_t* scan, CELLPROP *cellProp, const int nCells, vo
PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles);
#endif
+PolarVolume_t* vol2birdGetODIMVolume(char* filenames[], int nInputFiles);
+
// non-public function declarations (local to this file/translation unit)
static int analyzeCells(PolarScan_t *scan, vol2birdScanUse_t scanUse, const int nCells, int dualpol, vol2bird_t *alldata) {
@@ -4248,31 +4250,19 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
}
#endif
- RaveIO_t* raveio = RaveIO_open(filenames[0]);
-
- // check that a valid RaveIO_t pointer was returned
- if (raveio != (RaveIO_t*) NULL){
- // check that the Rave object is a polar volume
- if (RaveIO_getObjectType(raveio) == Rave_ObjectType_PVOL) {
-
- // the if statement above tests whether we are dealing with a
- // PVOL object, so we can safely cast the generic object to
- // the PolarVolume_t type:
-
- volume = (PolarVolume_t*) RaveIO_getObject(raveio);
- }
- else{
- fprintf(stderr,"Error: ODIM HDF5 file is not a polar volume\n");
- }
- }
// not a rave complient file, attempt to read the file with the RSL library instead
#ifdef RSL
- else{
- volume = vol2birdGetRSLVolume(filenames[0], rangeMax, small);
+ if(RSL_filetype(filenames[0]) != UNKNOWN){
+ if (nInputFiles > 1){
+ fprintf(stderr,"Multiple input files detected in RSL format. \
+ Only single polar volume file import supported, using file %s only.\n", filenames[0]);
+ }
+ volume = vol2birdGetRSLVolume(filenames[0], rangeMax, small);
+ goto done;
}
#endif
- RAVE_OBJECT_RELEASE(raveio);
+ volume = vol2birdGetODIMVolume(filenames, nInputFiles);
done:
return volume;
@@ -4293,7 +4283,7 @@ PolarVolume_t* vol2birdGetIRISVolume(char* filenames[], int nInputFiles) {
int ret = 0;
- file_element_s* file_element_p;
+ file_element_s* file_element_p = NULL;
for (int i=0; i\n");
- fprintf(stderr," or input formats compatible with RSL, see \n\n");
+ fprintf(stderr," or input formats compatible with RSL, see \n");
+ fprintf(stderr," or Vaisala Sigmet IRIS format, see \n\n");
fprintf(stderr," Output fields to stdout:\n");
fprintf(stderr," date - date [UTC]\n");
fprintf(stderr," time - time [UTC]\n");
@@ -68,7 +69,7 @@ void usage(char* programName, int verbose){
fprintf(stderr," n_dbz - number of points bird density estimate (dbz,eta,dens)\n");
fprintf(stderr," n_all - number of points VVP st.dev. estimate (sd_vvp)\n");
fprintf(stderr," n_dbz_all - number of points total reflectivity estimate (DBZH)\n\n");
- fprintf(stderr," Report bugs to: a.m.dokter@uva.nl or on http://github.com/adokter/vol2bird/issues \n");
+ fprintf(stderr," Report bugs at: http://github.com/adokter/vol2bird/issues \n");
fprintf(stderr," vol2bird home page: \n");
}
}
From 72e8ff622a7917f42b430d76efe50e9a8bf7dee8 Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 19 Mar 2019 12:34:43 -0400
Subject: [PATCH 26/37] updates to help message
---
src/vol2bird.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/vol2bird.c b/src/vol2bird.c
index 33624fd8..c574e5eb 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -41,15 +41,16 @@
#include "rave_debug.h"
void usage(char* programName, int verbose){
- fprintf(stderr,"usage: %s [ []]\n",programName);
- fprintf(stderr,"usage: %s -i [-i [-i ] ...] [-o [-p ]]\n",programName);
- fprintf(stderr,"usage: %s --help\n", programName);
+ fprintf(stderr,"vol2bird version %s (%s)\n", VERSION, VERSIONDATE);
+ fprintf(stderr," usage: %s [ []]\n",programName);
+ fprintf(stderr," usage: %s -i [-i [-i ] ...] [-o [-p ]]\n",programName);
+ fprintf(stderr," usage: %s --help\n", programName);
if(verbose){
- fprintf(stderr,"\n Version %s (%s)\n", VERSION, VERSIONDATE);
- fprintf(stderr," expects OPERA ODIM hdf5 input format, see \n");
- fprintf(stderr," or input formats compatible with RSL, see \n");
- fprintf(stderr," or Vaisala Sigmet IRIS format, see \n\n");
+ fprintf(stderr,"\n Supported radar data formats:\n");
+ fprintf(stderr," * OPERA ODIM hdf5 input format, see \n");
+ fprintf(stderr," * input formats compatible with RSL, see \n");
+ fprintf(stderr," * Vaisala Sigmet IRIS format, see \n\n");
fprintf(stderr," Output fields to stdout:\n");
fprintf(stderr," date - date [UTC]\n");
fprintf(stderr," time - time [UTC]\n");
From fb3b7b2aac2be982b4acb211e2ed266d07af18af Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 19 Mar 2019 13:05:42 -0400
Subject: [PATCH 27/37] minor cosmetic changes
---
lib/libvol2bird.c | 7 +++----
lib/libvol2bird.h | 2 +-
src/vol2bird.c | 7 -------
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/lib/libvol2bird.c b/lib/libvol2bird.c
index 018f1b3d..5d3b69cf 100644
--- a/lib/libvol2bird.c
+++ b/lib/libvol2bird.c
@@ -88,7 +88,7 @@ static int hasAzimuthGap(const float *points_local, const int nPoints, vol2bird_
static int includeGate(const int iProfileType, const int iQuantityType, const unsigned int gateCode, vol2bird_t* alldata);
-const char* libvol2bird_version();
+const char* libvol2bird_version(void);
static int verticalProfile_AddCustomField(VerticalProfile_t* self, RaveField_t* field, const char* quantity);
@@ -2418,7 +2418,7 @@ static int hasAzimuthGap(const float* points_local, const int nPoints, vol2bird_
} // hasAzimuthGap
-const char* libvol2bird_version(){
+const char* libvol2bird_version(void){
return VERSION;
};
@@ -4254,8 +4254,7 @@ PolarVolume_t* vol2birdGetVolume(char* filenames[], int nInputFiles, float range
#ifdef RSL
if(RSL_filetype(filenames[0]) != UNKNOWN){
if (nInputFiles > 1){
- fprintf(stderr,"Multiple input files detected in RSL format. \
- Only single polar volume file import supported, using file %s only.\n", filenames[0]);
+ fprintf(stderr,"Multiple input files detected in RSL format. Only single polar volume file import supported, using file %s only.\n", filenames[0]);
}
volume = vol2birdGetRSLVolume(filenames[0], rangeMax, small);
goto done;
diff --git a/lib/libvol2bird.h b/lib/libvol2bird.h
index 1ceaf01a..2055e26a 100644
--- a/lib/libvol2bird.h
+++ b/lib/libvol2bird.h
@@ -433,4 +433,4 @@ float nanify(float value);
int saveToODIM(RaveCoreObject* object, const char* filename);
-const char* libvol2bird_version();
+const char* libvol2bird_version(void);
diff --git a/src/vol2bird.c b/src/vol2bird.c
index c574e5eb..fd2fd050 100644
--- a/src/vol2bird.c
+++ b/src/vol2bird.c
@@ -233,13 +233,6 @@ int main(int argc, char** argv) {
fprintf(stderr, "Error: input file '%s' does not exist.\n", fileIn[i]);
return -1;
}
- else{
- radarDataFormat format = determineRadarFormat(fileIn[i]);
- if (format == radarDataFormat_RSL) fprintf(stderr, "File %s file type: RSL\n",fileIn[i]);
- if (format == radarDataFormat_ODIM) fprintf(stderr, "File %s file type: ODIM\n",fileIn[i]);
- if (format == radarDataFormat_IRIS) fprintf(stderr, "File %s file type: IRIS\n",fileIn[i]);
- if (format == radarDataFormat_UNKNOWN) fprintf(stderr, "File %s file type: UNKNOWN\n",fileIn[i]);
- }
}
// Initialize hlhdf library
From 8cb01153c532bc170792b32ed1ab6d865753b892 Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 19 Mar 2019 13:14:40 -0400
Subject: [PATCH 28/37] added NEWS.md
---
NEWS.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 NEWS.md
diff --git a/NEWS.md b/NEWS.md
new file mode 100644
index 00000000..5ff349ef
--- /dev/null
+++ b/NEWS.md
@@ -0,0 +1,12 @@
+# vol2bird 0.4.0
+
+All issues included in this release can be found [here](https://github.com/adokter/vol2bird/milestone/2?closed=1).
+
+* added Vaisala Sigmet IRIS support, a widely used weather radar data format (e.g. in Canada) (#112)
+
+* added functionality to read files containing single scans (sweeps) and merge them into polar volumes (#116)
+
+# vol2bird 0.3.20 and older
+
+All issues included in this release can be found [here](https://github.com/adokter/bioRad/milestone/3?closed=1).
+
From dc5ccdc958c8f168758e0237464ffa01cfb90292 Mon Sep 17 00:00:00 2001
From: adokter
Date: Tue, 19 Mar 2019 14:54:22 -0400
Subject: [PATCH 29/37] generated site with doxygen
---
docs/globals.html | 54 ++++++++++++++++++++++++++++++++++++++++++
docs/globals_func.html | 54 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 108 insertions(+)
create mode 100644 docs/globals.html
create mode 100644 docs/globals_func.html
diff --git a/docs/globals.html b/docs/globals.html
new file mode 100644
index 00000000..fcfc6617
--- /dev/null
+++ b/docs/globals.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+vol2bird: File Members
+
+
+
+
+
+
+
+
+
+
+
+
+ vol2bird
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Here is a list of all documented file members with links to the documentation:
+
+
+
+
+
diff --git a/docs/globals_func.html b/docs/globals_func.html
new file mode 100644
index 00000000..0529cb12
--- /dev/null
+++ b/docs/globals_func.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+vol2bird: File Members
+
+
+
+
+
+
+
+
+
+
+
+
+ vol2bird
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From d610ca5952d4f9798dd023dc748a525bcf2a4ba0 Mon Sep 17 00:00:00 2001
From: adokter
Date: Wed, 20 Mar 2019 21:42:12 -0400
Subject: [PATCH 30/37] rsl2odim can now read iris format (renaming of rsl2odim
needed in future)
---
docs/constants_8h_source.html | 2 +-
docs/librsl_8h_source.html | 2 +-
docs/libvol2bird_8c.html | 46 +++++++--
docs/libvol2bird_8h_source.html | 3 +-
docs/menudata.js | 5 +-
docs/vol2bird_8c.html | 5 +
src/rsl2odim.c | 168 +++++++++++++++++++++++++++++---
7 files changed, 206 insertions(+), 25 deletions(-)
diff --git a/docs/constants_8h_source.html b/docs/constants_8h_source.html
index a1e702e9..c4e5da48 100644
--- a/docs/constants_8h_source.html
+++ b/docs/constants_8h_source.html
@@ -46,7 +46,7 @@
constants.h
-
13 #define CLUTPERCCELL 0.5 15 #define CLUTTERVALUEMIN 0.1 18 #define FRINGEDIST 5000.0 42 #define REFRACTIVE_INDEX_OF_WATER 0.964 46 #define RCELLMAX_OFFSET 5000.0f 69 #define RSL_OFFSET_DBZ 0 70 #define RSL_GAIN_DBZ 1 71 #define RSL_OFFSET_VRAD 0 72 #define RSL_GAIN_VRAD 1 73 #define RSL_OFFSET_RHOHV 0 74 #define RSL_GAIN_RHOHV 1 77 #define RSL_NODATA -1000 78 #define RSL_UNDETECT -999 91 #define TEXNAME "VTEX" 93 #define CELLNAME "CELL" 95 #define CLUTNAME "OCCULT" 97 #define PROGRAM "vol2bird" 99 #define VERSION "0.3.20" 101 #define VERSIONDATE "24-Oct-2018" 110 #define HLAYER 200.0f 112 #define RANGEMIN 5000.0f 114 #define RANGEMAX 25000.0f 118 #define AZIMMAX 360.0f 122 #define ELEVMAX 90.0f 124 #define RADAR_WAVELENGTH_CM 5.3f 126 #define USE_CLUTTERMAP 0 128 #define CLUTTERMAP "" 130 #define PRINT_OPTIONS 0 132 #define OPTIONS_CONF "OPTIONS_CONF" 134 #define OPTIONS_FILE "options.conf" 136 #define VERBOSE_OUTPUT_REQUIRED 0 140 #define PRINT_DEALIAS 0 144 #define PRINT_RHOHV 0 148 #define PRINT_CELL_PROP 0 150 #define PRINT_TEXTURE 0 154 #define PRINT_PROFILE 0 156 #define PRINT_POINTS_ARRAY 0 160 #define EXPORT_BIRD_PROFILE_AS_JSON 0 162 #define MIN_NYQUIST_VELOCITY 5.0f 164 #define MAX_NYQUIST_DEALIAS 25.0f 168 #define STDEV_CELL 5.0f 170 #define STDEV_BIRD 2.0f 172 #define SIGMA_BIRD 11.0f 174 #define ETACELL 11500.0f 176 #define ETAMAX 36000.0f 180 #define DBZTYPE "DBZH" 182 #define REQUIRE_VRAD 0 184 #define DEALIAS_VRAD 1 186 #define DEALIAS_RECYCLE 1 188 #define DEALIAS_VMAX 50.0 190 #define DEALIAS_VAF 15.0 192 #define DEALIAS_NF 12.0 194 #define EXPORT_BIRD_PROFILE_AS_JSON 0 200 #define RHOHVMIN 0.95f 204 #define RESAMPLE_RSCALE 500.0f 206 #define RESAMPLE_NBINS 100 208 #define RESAMPLE_NRAYS 360
+ 13 #define CLUTPERCCELL 0.5 15 #define CLUTTERVALUEMIN 0.1 18 #define FRINGEDIST 5000.0 42 #define REFRACTIVE_INDEX_OF_WATER 0.964 46 #define RCELLMAX_OFFSET 5000.0f 69 #define RSL_OFFSET_DBZ 0 70 #define RSL_GAIN_DBZ 1 71 #define RSL_OFFSET_VRAD 0 72 #define RSL_GAIN_VRAD 1 73 #define RSL_OFFSET_RHOHV 0 74 #define RSL_GAIN_RHOHV 1 77 #define RSL_NODATA -1000 78 #define RSL_UNDETECT -999 86 #define INPUTFILESMAX 50 93 #define TEXNAME "VTEX" 95 #define CELLNAME "CELL" 97 #define CLUTNAME "OCCULT" 99 #define PROGRAM "vol2bird" 101 #define VERSION "0.3.20" 103 #define VERSIONDATE "24-Oct-2018" 112 #define HLAYER 200.0f 114 #define RANGEMIN 5000.0f 116 #define RANGEMAX 25000.0f 120 #define AZIMMAX 360.0f 124 #define ELEVMAX 90.0f 126 #define RADAR_WAVELENGTH_CM 5.3f 128 #define USE_CLUTTERMAP 0 130 #define CLUTTERMAP "" 132 #define PRINT_OPTIONS 0 134 #define OPTIONS_CONF "OPTIONS_CONF" 136 #define OPTIONS_FILE "options.conf" 138 #define VERBOSE_OUTPUT_REQUIRED 0 142 #define PRINT_DEALIAS 0 146 #define PRINT_RHOHV 0 150 #define PRINT_CELL_PROP 0 152 #define PRINT_TEXTURE 0 156 #define PRINT_PROFILE 0 158 #define PRINT_POINTS_ARRAY 0 162 #define EXPORT_BIRD_PROFILE_AS_JSON 0 164 #define MIN_NYQUIST_VELOCITY 5.0f 166 #define MAX_NYQUIST_DEALIAS 25.0f 170 #define STDEV_CELL 5.0f 172 #define STDEV_BIRD 2.0f 174 #define SIGMA_BIRD 11.0f 176 #define ETACELL 11500.0f 178 #define ETAMAX 36000.0f 182 #define DBZTYPE "DBZH" 184 #define REQUIRE_VRAD 0 186 #define DEALIAS_VRAD 1 188 #define DEALIAS_RECYCLE 1 190 #define DEALIAS_VMAX 50.0 192 #define DEALIAS_VAF 15.0 194 #define DEALIAS_NF 12.0 196 #define EXPORT_BIRD_PROFILE_AS_JSON 0 202 #define RHOHVMIN 0.95f 206 #define RESAMPLE_RSCALE 500.0f 208 #define RESAMPLE_NBINS 100 210 #define RESAMPLE_NRAYS 360