[metview] 04/20: upstream release 4.6.7

Alastair McKinstry mckinstry at moszumanska.debian.org
Sat Oct 29 13:50:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to tag debian/4.7.2-1
in repository metview.

commit b0a79a8f7d5a1b2c3e924b6aef56c3f3642a20d1
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Jul 7 20:59:52 2016 +0100

    upstream release 4.6.7
---
 CMakeLists.txt                                 |  25 ++-
 VERSION.cmake                                  |   2 +-
 bin/ecbuild                                    |  60 +++---
 cmake/VERSION.cmake                            |   4 +-
 cmake/ecbuild_add_c_flags.cmake                |  12 +-
 cmake/ecbuild_add_cxx_flags.cmake              |  12 +-
 cmake/ecbuild_add_fortran_flags.cmake          |  12 +-
 cmake/ecbuild_add_option.cmake                 |   3 +-
 cmake/ecbuild_check_functions.cmake            |   2 +
 cmake/ecbuild_check_os.cmake                   |  56 +++---
 cmake/ecbuild_config.h.in                      |   2 +
 cmake/ecbuild_find_lexyacc.cmake               |   5 +-
 cmake/ecbuild_find_python.cmake                |   2 +-
 scripts/CMakeLists.txt                         |  12 +-
 scripts/metview_base.in                        |  14 +-
 scripts/mv_flextra_run                         |   9 +
 share/metview/etc/ObjectList                   |   2 +-
 share/metview/etc/ecmwf.def                    |   5 +-
 share/metview/etc/tigge.def                    |  28 ++-
 share/metview/icons_mv5/FLEXTRA_FILE.svg       |  75 +++++---
 share/metview/icons_mv5/FLEXTRA_PREPARE.svg    |  63 +++---
 share/metview/icons_mv5/FLEXTRA_RUN.svg        | 257 +++++++++++++++++--------
 share/metview/icons_mv5/FLEXTRA_VISUALISER.svg | 215 +++++++++++++++------
 src/Desktop/MvQIconProvider.cc                 |  72 ++++---
 src/Desktop/MvQIconProvider.h                  |  10 +-
 src/Flextra/FlextraRun.cc                      |  20 +-
 src/Flextra/ObjectSpec.Flexpart                |   2 +-
 src/OgcClient/MvQWmsClient.cc                  |   2 +-
 src/libMarsClient/CMakeLists.txt               |   9 +-
 src/libMarsClient/dhsbase.c                    | 188 ++++++++++++------
 src/libMarsClient/nfdbbase.c                   |  44 ++---
 src/libMarsClient/request.c                    |  25 +++
 src/libMarsClient/rpcmars.x                    |   4 +-
 src/libMetview/MvGrid.cc                       |   7 +-
 src/libMetview/MvGrid.h                        |   1 +
 src/libMetview/MvRequest.cc                    |   4 +-
 src/libUtil/MvFlextra.cc                       |   2 +-
 src/uPlot/MagPlusBatchService.cc               |  12 +-
 src/uPlot/MvMain.cc                            |   6 +-
 39 files changed, 878 insertions(+), 407 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b8ab53..e9b0765 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -226,7 +226,17 @@ endif()
 
 # ecbuild_use_package( PROJECT eckit VERSION 0.3 REQUIRED )
 
-ecbuild_use_package( PROJECT grib_api VERSION 1.13.0 REQUIRED )
+ecbuild_add_option( FEATURE ECCODES DESCRIPTION "" DEFAULT OFF )
+
+if( HAVE_ECCODES )
+  ecbuild_use_package( PROJECT eccodes VERSION 0.14 REQUIRED )
+  set( GRIB_API_INCLUDE_DIRS ${ECCODES_INCLUDE_DIRS} )
+  set( GRIB_API_LIBRARIES    ${ECCODES_LIBRARIES} )
+  set( GRIB_API_DEFINITIONS  ${ECCODES_DEFINITIONS} )
+  set( grib_api_BASE_DIR     ${eccodes_BASE_DIR} )
+else()
+  ecbuild_use_package( PROJECT grib_api VERSION 1.13.0 REQUIRED )
+endif()
 
 
 if(ENABLE_ODB)
@@ -480,12 +490,13 @@ if( ENABLE_UI )
         ecbuild_critical("Metview does not support the Motif user interface with Qt5. Please set ENABLE_MOTIF=OFF in the CMake arguments")
       endif()
 
-      find_package(Qt5Widgets REQUIRED)
-      find_package(Qt5Gui REQUIRED)
-      find_package(Qt5Network REQUIRED)
-      find_package(Qt5Xml REQUIRED)
-      find_package(Qt5XmlPatterns REQUIRED)
+      find_package(Qt5Widgets      REQUIRED)
+      find_package(Qt5Gui          REQUIRED)
+      find_package(Qt5Network      REQUIRED)
+      find_package(Qt5Xml          REQUIRED)
+      find_package(Qt5XmlPatterns  REQUIRED)
       find_package(Qt5PrintSupport REQUIRED)
+      find_package(Qt5Svg          REQUIRED)
 
       #if( ENABLE_MOTIF )
         #find_package(Qt5X11Extras REQUIRED)
@@ -504,7 +515,7 @@ if( ENABLE_UI )
           ecbuild_critical("Qt5 was NOT found ...")
       endif()
   else( ENABLE_QT5 )
-    find_package(Qt4 4.6.2 REQUIRED QtCore QtNetwork QtGui QtXml QtXmlPatterns) #  QtWebKit QtHelp
+    find_package(Qt4 4.6.2 REQUIRED QtCore QtNetwork QtGui QtXml QtXmlPatterns QtSvg) #  QtWebKit QtHelp
     if( QT_FOUND )
         include( ${QT_USE_FILE} )
         set( METVIEW_QT 1)
diff --git a/VERSION.cmake b/VERSION.cmake
index 0f93ad4..c7fb432 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -1,5 +1,5 @@
 set(${PROJECT_NAME}_MAJOR_VERSION_STR    "4")
 set(${PROJECT_NAME}_MINOR_VERSION_STR    "6")
-set(${PROJECT_NAME}_REVISION_VERSION_STR "6")
+set(${PROJECT_NAME}_REVISION_VERSION_STR "7")
 
 set(${PROJECT_NAME}_VERSION_STR  "${${PROJECT_NAME}_MAJOR_VERSION_STR}.${${PROJECT_NAME}_MINOR_VERSION_STR}.${${PROJECT_NAME}_REVISION_VERSION_STR}")
diff --git a/bin/ecbuild b/bin/ecbuild
index d1ffff4..0ee4b13 100755
--- a/bin/ecbuild
+++ b/bin/ecbuild
@@ -2,8 +2,8 @@
 
 set -eua
 
-CMAKE_MIN_REQUIRED=2.8.10
-CMAKE_BUILD_VERSION=3.4.1
+CMAKE_MIN_REQUIRED=2.8.11
+CMAKE_BUILD_VERSION=3.5.2
 
 usage()
 {
@@ -93,10 +93,10 @@ Available values for "option":
           that this is only accelerating fresh builds, as cmake internally
           caches also. Therefore this option is *not* recommended.
 
-    --build-cmake
-          Automatically download and build CMake version $CMAKE_BUILD_VERSION if the CMake
-          version found does not meet the minimum requirements (version $CMAKE_MIN_REQUIRED
-          is required). Requires an internet connection and may take a while.
+    --build-cmake[=<prefix>]
+          Automatically download and build CMake version $CMAKE_BUILD_VERSION.
+          Requires an internet connection and may take a while. If no prefix
+          is given, install into $PWD.
 
     --dryrun
           Don't actually execute the cmake call, just print what would have
@@ -275,7 +275,7 @@ while test $# -gt 0; do
     case "$1" in
     --*=*)
       opt=`echo "$1" | sed 's/=.*//'`
-      val=`echo "$1" | sed 's/--[_a-zA-Z0-9]*=//'`
+      val=`echo "$1" | sed 's/--[_a-zA-Z0-9-]*=//'`
       ;;
     --*)
       opt=$1
@@ -336,6 +336,9 @@ while test $# -gt 0; do
         ;;
       --build-cmake)
         build_cmake="yes"
+        if [[ -n $val ]]; then
+          cmake_prefix="$val"
+        fi
         ;;
       --)
         shift
@@ -358,6 +361,7 @@ src=${srcARG:=""}
 cmake=${cmakebin:=cmake}
 dryrun=${dryrun:=no}
 build_cmake=${build_cmake:=""}
+cmake_prefix=${cmake_prefix:=$PWD}
 cmake_found=""
 cmake_version_sufficient=""
 
@@ -369,30 +373,13 @@ version_gte() {
     [  "$2" = "$(echo -e "$1\n$2" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | head -n1)" ]
 }
 
-# Check if the cmake version is sufficient
-check_cmake() {
-  # Check if cmake is available
-  if $(command -v $cmake >/dev/null 2>&1); then
-    cmake_found="yes"
-    cmake_version=$($cmake --version | head -n1 | awk '{ print $3 }')
-    echo "Found CMake version $cmake_version" >& 2
-    if version_gte $cmake_version $CMAKE_MIN_REQUIRED; then
-      cmake_version_sufficient="yes"
-    fi
-  fi
-}
-check_cmake
 # Use already built CMake if any
-if [[ ! $cmake_version_sufficient && -x bin/cmake ]]; then
-  echo "Using already built CMake in $PWD/bin/cmake" >&2
-  cmake=bin/cmake
-  check_cmake
-fi
-
+if [[ -x "${cmake_prefix}/bin/cmake" ]]; then
+  echo "Using already built CMake in ${cmake_prefix}/bin/cmake" >&2
+  cmake="${cmake_prefix}/bin/cmake"
 # Build CMake if requested and no sufficient version found
-if [[ ! $cmake_version_sufficient && $build_cmake ]]; then
-  echo "CMake version $CMAKE_MIN_REQUIRED is required but only $cmake_version was found." >&2
-  echo "Building CMake version ${CMAKE_BUILD_VERSION} ..." >&2
+elif [[ $build_cmake ]]; then
+  echo "Building CMake version ${CMAKE_BUILD_VERSION} and installing into ${cmake_prefix} ..." >&2
   tarball=cmake-${CMAKE_BUILD_VERSION}.tar.gz
   if [[ ! -r $tarball ]]; then
     url=http://www.cmake.org/files/v${CMAKE_BUILD_VERSION:0:3}/$tarball
@@ -411,10 +398,19 @@ if [[ ! $cmake_version_sufficient && $build_cmake ]]; then
   (
     mkdir -p build_cmake
     cd build_cmake
-    ../cmake-${CMAKE_BUILD_VERSION}/bootstrap --prefix=.. && make && make install
+    ../cmake-${CMAKE_BUILD_VERSION}/bootstrap --prefix="${cmake_prefix}" && make && make install
   )
-  cmake=bin/cmake
-  check_cmake
+  cmake="${cmake_prefix}/bin/cmake"
+fi
+
+# Check if the cmake version is sufficient
+if $(command -v $cmake >/dev/null 2>&1); then
+  cmake_found="yes"
+  cmake_version=$($cmake --version | head -n1 | awk '{ print $3 }')
+  echo "Found CMake version $cmake_version" >& 2
+  if version_gte $cmake_version $CMAKE_MIN_REQUIRED; then
+    cmake_version_sufficient="yes"
+  fi
 fi
 
 # Fail if we don't have a sufficient CMake
diff --git a/cmake/VERSION.cmake b/cmake/VERSION.cmake
index a65cc6d..ff7b93b 100644
--- a/cmake/VERSION.cmake
+++ b/cmake/VERSION.cmake
@@ -1,7 +1,7 @@
 set( ECBUILD_MAJOR_VERSION "2" )
-set( ECBUILD_MINOR_VERSION "2" )
+set( ECBUILD_MINOR_VERSION "3" )
 set( ECBUILD_PATCH_VERSION "0" )
 
-set( ECBUILD_VERSION_STR  "2.2.0" )
+set( ECBUILD_VERSION_STR  "2.3.0" )
 
 set( ECBUILD_MACRO_VERSION "${ECBUILD_MAJOR_VERSION}.${ECBUILD_MINOR_VERSION}" )
diff --git a/cmake/ecbuild_add_c_flags.cmake b/cmake/ecbuild_add_c_flags.cmake
index e6923a9..098c254 100644
--- a/cmake/ecbuild_add_c_flags.cmake
+++ b/cmake/ecbuild_add_c_flags.cmake
@@ -16,7 +16,8 @@
 #
 #   ecbuild_add_c_flags( <flag1> [ <flag2> ... ]
 #                        [ BUILD <build> ]
-#                        [ NAME <name> ] )
+#                        [ NAME <name> ]
+#                        [ NO_FAIL ] )
 #
 # Options
 # -------
@@ -27,6 +28,9 @@
 # NAME : optional
 #   name of the check (if omitted, checks are enumerated)
 #
+# NO_FAIL : optional
+#   do not fail if the flag cannot be added
+#
 ##############################################################################
 
 macro( ecbuild_add_c_flags m_c_flags )
@@ -34,7 +38,7 @@ macro( ecbuild_add_c_flags m_c_flags )
   set( _flags ${m_c_flags} )
 
   if( _flags AND CMAKE_C_COMPILER_LOADED )
-    set( options )
+    set( options NO_FAIL )
     set( single_value_args BUILD NAME )
     set( multi_value_args )
 
@@ -75,8 +79,10 @@ macro( ecbuild_add_c_flags m_c_flags )
           set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" )
           ecbuild_debug( "C FLAG [${_flags}] added" )
         endif()
+      elseif( _PAR_NO_FAIL )
+        ecbuild_info( "Unrecognised C flag [${_flags}] -- skipping" )
       else()
-        ecbuild_warn( "Unrecognised C flag [${_flags}] -- skipping" )
+        ecbuild_error( "Unrecognised C flag [${_flags}]" )
       endif()
     endif()
     unset( _flags )
diff --git a/cmake/ecbuild_add_cxx_flags.cmake b/cmake/ecbuild_add_cxx_flags.cmake
index 63c442e..5104880 100644
--- a/cmake/ecbuild_add_cxx_flags.cmake
+++ b/cmake/ecbuild_add_cxx_flags.cmake
@@ -16,7 +16,8 @@
 #
 #   ecbuild_add_cxx_flags( <flag1> [ <flag2> ... ]
 #                          [ BUILD <build> ]
-#                          [ NAME <name> ] )
+#                          [ NAME <name> ]
+#                          [ NO_FAIL ] )
 #
 # Options
 # -------
@@ -27,13 +28,16 @@
 # NAME : optional
 #   name of the check (if omitted, checks are enumerated)
 #
+# NO_FAIL : optional
+#   do not fail if the flag cannot be added
+#
 ##############################################################################
 
 macro( ecbuild_add_cxx_flags m_cxx_flags )
 
   set( _flags ${m_cxx_flags} )
   if( _flags AND CMAKE_CXX_COMPILER_LOADED )
-    set( options )
+    set( options NO_FAIL )
     set( single_value_args BUILD NAME )
     set( multi_value_args )
 
@@ -75,8 +79,10 @@ macro( ecbuild_add_cxx_flags m_cxx_flags )
           set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" )
           ecbuild_debug( "C++ FLAG [${_flags}] added" )
         endif()
-      else()
+      elseif( _PAR_NO_FAIL )
         ecbuild_info( "Unrecognised CXX flag [${_flags}] -- skipping" )
+      else()
+        ecbuild_error( "Unrecognised CXX flag [${_flags}]" )
       endif()
     endif()
     unset( _flags )
diff --git a/cmake/ecbuild_add_fortran_flags.cmake b/cmake/ecbuild_add_fortran_flags.cmake
index 86cea83..17b9bf2 100644
--- a/cmake/ecbuild_add_fortran_flags.cmake
+++ b/cmake/ecbuild_add_fortran_flags.cmake
@@ -17,7 +17,8 @@
 #
 #   ecbuild_add_fortran_flags( <flag1> [ <flag2> ... ]
 #                              [ BUILD <build> ]
-#                              [ NAME <name> ] )
+#                              [ NAME <name> ]
+#                              [ NO_FAIL ] )
 #
 # Options
 # -------
@@ -29,6 +30,9 @@
 # NAME : optional
 #   name of the check (if omitted, checks are enumerated)
 #
+# NO_FAIL : optional
+#   do not fail if the flag cannot be added
+#
 ##############################################################################
 
 include( CheckFortranCompilerFlag )
@@ -38,7 +42,7 @@ macro( ecbuild_add_fortran_flags m_fortran_flags )
 
   if( _flags AND CMAKE_Fortran_COMPILER_LOADED )
 
-    set( options )
+    set( options NO_FAIL )
     set( single_value_args BUILD NAME )
     set( multi_value_args )
 
@@ -80,8 +84,10 @@ macro( ecbuild_add_fortran_flags m_fortran_flags )
           set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${_flags}" )
           ecbuild_debug( "Fortran FLAG [${_flags}] added" )
         endif()
-      else()
+      elseif( _PAR_NO_FAIL )
         ecbuild_info( "Unrecognised Fortran flag [${_flags}] -- skipping" )
+      else()
+        ecbuild_error( "Unrecognised Fortran flag [${_flags}]" )
       endif()
     endif()
 
diff --git a/cmake/ecbuild_add_option.cmake b/cmake/ecbuild_add_option.cmake
index c270517..8261bd4 100644
--- a/cmake/ecbuild_add_option.cmake
+++ b/cmake/ecbuild_add_option.cmake
@@ -282,7 +282,8 @@ macro( ecbuild_add_option )
         if( _${_p_FEATURE}_condition )
           ecbuild_critical( "Feature ${_p_FEATURE} cannot be enabled -- following required packages weren't found: ${_failed_to_find_packages}" )
         else()
-          ecbuild_critical( "Feature ${_p_FEATURE} cannot be enabled -- following condition was not met: ${_p_CONDITION}" )
+          string(REPLACE ";" " " _condition_msg "${_p_CONDITION}")
+          ecbuild_critical( "Feature ${_p_FEATURE} cannot be enabled -- following condition was not met: ${_condition_msg}" )
         endif()
       else()
         if( _${_p_FEATURE}_condition )
diff --git a/cmake/ecbuild_check_functions.cmake b/cmake/ecbuild_check_functions.cmake
index 7b850e9..88526b5 100644
--- a/cmake/ecbuild_check_functions.cmake
+++ b/cmake/ecbuild_check_functions.cmake
@@ -20,6 +20,8 @@ if( ENABLE_OS_FUNCTIONS_TEST )
     ecbuild_cache_check_symbol_exists( ftruncate    "sys/types.h;unistd.h"            EC_HAVE_FTRUNCATE  )
     ecbuild_cache_check_symbol_exists( open         "sys/types.h;sys/stat.h;fcntl.h"  EC_HAVE_OPEN   )
     ecbuild_cache_check_symbol_exists( fopen        "stdio.h"                         EC_HAVE_FOPEN  )
+    ecbuild_cache_check_symbol_exists( fmemopen     "stdio.h"                         EC_HAVE_FMEMOPEN )
+    ecbuild_cache_check_symbol_exists( funopen      "stdio.h"                         EC_HAVE_FUNOPEN )
     ecbuild_cache_check_symbol_exists( flock        "sys/file.h"                      EC_HAVE_FLOCK  )
     ecbuild_cache_check_symbol_exists( mmap         "sys/mman.h"                      EC_HAVE_MMAP   )
 
diff --git a/cmake/ecbuild_check_os.cmake b/cmake/ecbuild_check_os.cmake
index 7bbb344..8d325dc 100644
--- a/cmake/ecbuild_check_os.cmake
+++ b/cmake/ecbuild_check_os.cmake
@@ -245,33 +245,41 @@ set( EC_OS_NAME "UNKNOWN" )
 
 if( UNIX )
 
-	### APPLE ###
+  ### APPLE ###
 
-	if( APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
-		set( EC_OS_NAME "macosx" )
-	endif()
-
-	### Linux ###
-
-	if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
-
-		set( EC_OS_NAME "linux" )
+  if( APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
+    set( EC_OS_NAME "macosx" )
+  endif()
 
-		# recent linkers default to --enable-new-dtags
-		# which then adds both RPATH and RUNPATH to executables
-		# thus invalidating RPATH setting, and making LD_LIBRARY_PATH take precedence
-		# to be sure, use tool 'readelf -a <exe> | grep PATH' to see what paths are built-in
-		# see:
-		#  * http://blog.qt.digia.com/blog/2011/10/28/rpath-and-runpath
-		#  * http://www.cmake.org/Wiki/CMake_RPATH_handling
-		#  * man ld
-		#  * http://blog.tremily.us/posts/rpath
-		#  * http://fwarmerdam.blogspot.co.uk/2010/12/rpath-runpath-and-ldlibrarypath.html
-		set(CMAKE_EXE_LINKER_FLAGS     "${CMAKE_EXE_LINKER_FLAGS}    -Wl,--disable-new-dtags")
-		set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--disable-new-dtags")
-		set(CMAKE_MODULE_LINKER_FLAGS  "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--disable-new-dtags")
+  ### Linux ###
+
+  if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
+
+    set( EC_OS_NAME "linux" )
+
+    # The following option allows enabling the new dtags linker option
+    # (when set to OFF). ONLY SET TO OFF IF YOU KNOW WHAT YOU ARE DOING AND
+    # NEVER WHEN BUILDING PRODUCTION SOFTWARE. YOU HAVE BEEN WARNED!
+    option( ECBUILD_DISABLE_NEW_DTAGS "Set the linker flag --disable-new-dtags" ON )
+    mark_as_advanced( ECBUILD_DISABLE_NEW_DTAGS )
+
+    if( ECBUILD_DISABLE_NEW_DTAGS )
+      # recent linkers default to --enable-new-dtags
+      # which then adds both RPATH and RUNPATH to executables
+      # thus invalidating RPATH setting, and making LD_LIBRARY_PATH take precedence
+      # to be sure, use tool 'readelf -a <exe> | grep PATH' to see what paths are built-in
+      # see:
+      #  * http://blog.qt.digia.com/blog/2011/10/28/rpath-and-runpath
+      #  * http://www.cmake.org/Wiki/CMake_RPATH_handling
+      #  * man ld
+      #  * http://blog.tremily.us/posts/rpath
+      #  * http://fwarmerdam.blogspot.co.uk/2010/12/rpath-runpath-and-ldlibrarypath.html
+      set(CMAKE_EXE_LINKER_FLAGS     "${CMAKE_EXE_LINKER_FLAGS}    -Wl,--disable-new-dtags")
+      set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--disable-new-dtags")
+      set(CMAKE_MODULE_LINKER_FLAGS  "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--disable-new-dtags")
+    endif()
 
-	endif()
+  endif()
 
 	### Solaris ###
 
diff --git a/cmake/ecbuild_config.h.in b/cmake/ecbuild_config.h.in
index eef9b85..dd8e9cd 100644
--- a/cmake/ecbuild_config.h.in
+++ b/cmake/ecbuild_config.h.in
@@ -40,6 +40,8 @@
 #cmakedefine EC_HAVE_FTRUNCATE
 #cmakedefine EC_HAVE_OPEN
 #cmakedefine EC_HAVE_FOPEN
+#cmakedefine EC_HAVE_FMEMOPEN
+#cmakedefine EC_HAVE_FUNOPEN
 #cmakedefine EC_HAVE_FLOCK
 #cmakedefine EC_HAVE_MMAP
 
diff --git a/cmake/ecbuild_find_lexyacc.cmake b/cmake/ecbuild_find_lexyacc.cmake
index 628488f..5c13269 100644
--- a/cmake/ecbuild_find_lexyacc.cmake
+++ b/cmake/ecbuild_find_lexyacc.cmake
@@ -48,7 +48,10 @@ macro( ecbuild_find_lexyacc )
 
   if( NOT SKIP_BISON )
 
-    find_package( BISON 2.3 )
+    find_package( BISON )
+    if(BISON_FOUND AND BISON_VERSION VERSION_LESS 2.3 )
+        ecbuild_critical( "Bison found with version ${BISON_VERSION} is less than 2.3.\nPlease define BISON_EXECUTABLE to an appropriate version or define SKIP_BISON to try finding Yacc instead" )
+    endif()
     find_package( FLEX )
 
   endif()
diff --git a/cmake/ecbuild_find_python.cmake b/cmake/ecbuild_find_python.cmake
index 48ba28f..0273951 100644
--- a/cmake/ecbuild_find_python.cmake
+++ b/cmake/ecbuild_find_python.cmake
@@ -101,7 +101,7 @@ function( ecbuild_find_python )
         # find where python site-packages are ...
 
         if( PYTHON_EXECUTABLE )
-            execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+            execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
         endif()
         ecbuild_debug( "ecbuild_find_python: PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}" )
 
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index e39966f..62a30f2 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -51,7 +51,11 @@ list(REMOVE_ITEM GRIB_API_LIBRARIES_STR "debug")     # remove non-compiler items
 list(REMOVE_ITEM GRIB_API_LIBRARIES_STR "optimized") # remove non-compiler items from the string
 
 string (REPLACE ";"         " "           GRIB_API_LIBRARIES_STR    "${GRIB_API_LIBRARIES_STR}")
-string (REPLACE " grib_api" " -lgrib_api" GRIB_API_LIBRARIES_STR    "${GRIB_API_LIBRARIES_STR}")
+if( HAVE_ECCODES )
+  string (REPLACE " eccodes"  " -leccodes"  GRIB_API_LIBRARIES_STR  "${GRIB_API_LIBRARIES_STR}")
+else()
+  string (REPLACE " grib_api" " -lgrib_api" GRIB_API_LIBRARIES_STR  "${GRIB_API_LIBRARIES_STR}")
+endif()
 string (REPLACE ";"         " "           EMOS_LIBRARIES_STR        "${EMOS_LIB_PATH}")
 
 
@@ -75,8 +79,12 @@ set(GRIB_API_LIBRARIES_STR_ORIGINAL "${GRIB_API_LIBRARIES_STR}")       # keep a
 # GRIB_API_LIB_DIR will be added to METVIEW_LD_PATHS and used in compile.in.
 
 # first, if GRIB_API_PATH is not defined, then we need to compute the path
+set( grib_handling_pkg grib_api )
+if( HAVE_ECCODES )
+  set( grib_handling_pkg eccodes )
+endif()
 if(NOT GRIB_API_PATH)
-    get_property(GRIB_LIB_PATH TARGET grib_api PROPERTY LIBRARY_OUTPUT_DIRECTORY)
+    get_property(GRIB_LIB_PATH TARGET ${grib_handling_pkg} PROPERTY LIBRARY_OUTPUT_DIRECTORY)
     if(GRIB_LIB_PATH)
         set(GRIB_API_PATH ${GRIB_LIB_PATH}/..)
     else()
diff --git a/scripts/metview_base.in b/scripts/metview_base.in
index 644beac..f92c9f1 100755
--- a/scripts/metview_base.in
+++ b/scripts/metview_base.in
@@ -57,6 +57,12 @@ METVIEW_QT5=@METVIEW_QT5@
 unset BASH_ENV
 
 
+# on some systems, the locale is set in such a way that dots and commas within numbers
+# are 'the other way around' compared with what we expect; we can override this
+# without affecting the other aspects of the locale by just setting LC_NUMERIC
+# to "C", which should work on all systems. This setting is supposed to provide
+# a 'machine-friendly' locale and does not reply on a specific one such as en_GB.UTF-8.
+LC_NUMERIC="C"
 
 
 #
@@ -486,8 +492,8 @@ case $METVIEW_VERSION in
 
     if [ "x$MV_BUNDLE_TYPE" == "xMMG" -o "x$MV_BUNDLE_SRC" != "x" ]
     then
-        METVIEW_EXTRA_GRIB_DEFINITION_PATH="${METVIEW_DIR_DEV}/share/grib_api/definitions:${METVIEW_EXTRA_GRIB_DEFINITION_PATH}"
-        METVIEW_EXTRA_GRIB_SAMPLES_PATH="${METVIEW_DIR_DEV}/share/grib_api/samples"
+        METVIEW_EXTRA_GRIB_DEFINITION_PATH="${METVIEW_DIR_DEV}/share/@grib_handling_pkg@/definitions:${METVIEW_EXTRA_GRIB_DEFINITION_PATH}"
+        METVIEW_EXTRA_GRIB_SAMPLES_PATH="${METVIEW_DIR_DEV}/share/@grib_handling_pkg@/samples"
         GRIBAPI_DIR=${METVIEW_DIR_DEV}
     fi
 
@@ -638,12 +644,12 @@ fi
 
 METVIEW_EXTRA_GRIB_DEFINITION_PATH=${METVIEW_EXTRA_GRIB_DEFINITION_PATH:=""}
 if [ "x$METVIEW_EXTRA_GRIB_DEFINITION_PATH" != x -a "x$GRIBAPI_DIR" != x ] ; then
-  export GRIB_DEFINITION_PATH="${METVIEW_EXTRA_GRIB_DEFINITION_PATH}:${GRIBAPI_DIR}/share/grib_api/definitions"
+  export GRIB_DEFINITION_PATH="${METVIEW_EXTRA_GRIB_DEFINITION_PATH}:${GRIBAPI_DIR}/share/@grib_handling_pkg@/definitions"
 fi
 
 METVIEW_EXTRA_GRIB_SAMPLES_PATH=${METVIEW_EXTRA_GRIB_SAMPLES_PATH:=""}
 if [ "x$METVIEW_EXTRA_GRIB_SAMPLES_PATH" != x -a "x$GRIBAPI_DIR" != x ] ; then
-  export GRIB_SAMPLES_PATH="${METVIEW_EXTRA_GRIB_SAMPLES_PATH}:${GRIBAPI_DIR}/share/grib_api/samples"
+  export GRIB_SAMPLES_PATH="${METVIEW_EXTRA_GRIB_SAMPLES_PATH}:${GRIBAPI_DIR}/share/@grib_handling_pkg@/samples"
 fi
 
 # =============================================================
diff --git a/scripts/mv_flextra_run b/scripts/mv_flextra_run
index 344afa0..5323cb2 100644
--- a/scripts/mv_flextra_run
+++ b/scripts/mv_flextra_run
@@ -80,6 +80,15 @@ if [ ! -x $exe_FLEXTRA ] ; then
    exit 1
 fi
 
+f_PATHNAMES=pathnames
+if [ ! -r $f_PATHNAMES ] ; then
+   print_err "FLEXTRA pathnames file does not exist or cannot be read!"
+   exit 1
+fi
+
+echo "Content of pathnames file:"
+cat $f_PATHNAMES
+
 #-------------------------------
 #Run flextra
 #-------------------------------
diff --git a/share/metview/etc/ObjectList b/share/metview/etc/ObjectList
index cc67d63..618e790 100644
--- a/share/metview/etc/ObjectList
+++ b/share/metview/etc/ObjectList
@@ -1645,7 +1645,7 @@ state,
    service    = uPlotManager
 
 state,
-   class      = GRIB/GEOPOINTS/BUFR/ODB_DB/NETCDF/IMAGE,
+   class      = GRIB/GEOPOINTS/BUFR/ODB_DB/NETCDF/IMAGE/TABLE,
    action     = save,
    service    = savepool
 
diff --git a/share/metview/etc/ecmwf.def b/share/metview/etc/ecmwf.def
index cf7aeeb..d475d19 100755
--- a/share/metview/etc/ecmwf.def
+++ b/share/metview/etc/ecmwf.def
@@ -1094,6 +1094,7 @@ ATMS = (201)
 CRIS = (202)
 SMOS = (203)
 AMSR2_GC = (60)
+DMBO = (181/182)
 
 # FeedBack
 
@@ -1134,7 +1135,7 @@ FBWINDSAT = (156)
 
 # Type SSD (NSD)
 
-	SEA SURFACE DATA ; SSD  = ( 9/11/12/13/14/19/21/22/23/180 )
+	SEA SURFACE DATA ; SSD  = ( 9/11/12/13/14/19/21/22/23/180/181/182 )
 
 	SYNOP ABBREVIATED SHIP    ; SAB ; 9
 	SYNOP SHIP               ; SS   ; 11
@@ -1148,6 +1149,8 @@ FBWINDSAT = (156)
 	OSTIA                     ;       26
 	BUOY                      ;       27
 	BUFR SHIP SYNOP           ; BSS ; 180
+	BUFR MOORED BUOYS         ; BMB ; 181
+	BUFR DRIFTING BUOYS       ; BDB ; 182
 
 
 # Type VSNS (NSD)
diff --git a/share/metview/etc/tigge.def b/share/metview/etc/tigge.def
index 65c2ae4..53f295e 100755
--- a/share/metview/etc/tigge.def
+++ b/share/metview/etc/tigge.def
@@ -110,10 +110,29 @@ TIME INTEGRATED SURFACE NET SOLAR RADIATION DOWNWARDS       ;    SSRD ;     169
 TIME INTEGRATED SURFACE NET THERMAL RADIATION DOWNWARDS     ;    STRD ;     175
 
 # Additions for UERRA
-SPECIFIC CLOUD LIQUID WATER CONTENT      ;   CLWC   ;   246
-SPECIFIC CLOUD ICE WATER CONTENT         ;   CIWC   ;   247
-RELATIVE HUMIDITY                        ;      R   ;   157
-CLOUD COVER                              ;     CC   ;   248
+SPECIFIC CLOUD LIQUID WATER CONTENT      ;   CLWC   ;    246
+SPECIFIC CLOUD ICE WATER CONTENT         ;   CIWC   ;    247
+RELATIVE HUMIDITY                        ;      R   ;    157
+CLOUD COVER                              ;    CCL   ; 260257
+WIND SPEED                               ;     WS   ;     10
+WIND DIRECTION                           ;   WDIR   ;   3031
+PRESSURE                                 ;   PRES   ;     54
+SURFACE AIR RELATIVE HUMIDITY            ;     2R   ; 260242
+PERCOLATION                              ;   PERC   ; 260430
+ALBEDO                                   ;     AL   ; 260509
+EVAPORATION                              ;    EVA   ; 260259
+TIME-INTEGRATED SURFACE CLEAR-SKY SOLAR RADIATION DOWNWARDS   ; ADSWRF_CS  ; 260423
+TIME-INTEGRATED SURFACE CLEAR-SKY SOLAR RADIATION UPWARDS     ; AUSWRF_CS  ; 260427
+TIME-INTEGRATED SURFACE DIRECT SOLAR RADIATION                ; TIDIRSWRF  ; 260264
+TIME-INTEGRATED SURFACE CLEAR-SKY THERMAL RADIATION DOWNWARDS ; ADLWRF_CS ; 260428
+10 METRE WIND DIRECTION                  ;  10WDIR  ; 260260
+WIND GUST AT 10 METRES SINCE PREVIOUS POST-PROCESSING  ; 10FG   ;  49
+SURFACE AIR MAXIMUM TEMPERATURE SINCE PREVIOUS POST-PROCESSING  ; MX2T  ; 201
+SURFACE AIR MINIMUM TEMPERATURE SINCE PREVIOUS POST-PROCESSING  ; MN2T  ; 202
+LIQUID NON-FROZEN VOLUMETRIC SOIL WATER  ;  LIQVSM  ; 260210
+SOIL HEAT FLUX                           ;    SOHF  ; 260364
+SOIL DEPTH                               ;     SOD  ; 260367
+SNOW DEPTH                               ;     SDE  ;   3066
 
 		*
         /   
@@ -218,6 +237,7 @@ CLOUD COVER                              ;     CC   ;   248
         SURFACE               ; SFC
         PRESSURE LEVELS       ; PL
         MODEL LEVELS          ; ML
+		HEIGHT LEVELS         ; HL
 		ALL
     } = PL
     
diff --git a/share/metview/icons_mv5/FLEXTRA_FILE.svg b/share/metview/icons_mv5/FLEXTRA_FILE.svg
index 581f2fd..59224d3 100644
--- a/share/metview/icons_mv5/FLEXTRA_FILE.svg
+++ b/share/metview/icons_mv5/FLEXTRA_FILE.svg
@@ -14,7 +14,7 @@
    height="32"
    id="svg2"
    version="1.1"
-   inkscape:version="0.47 r22583"
+   inkscape:version="0.48.4 r9939"
    sodipodi:docname="FLEXTRA_FILE.svg"
    style="display:inline"
    inkscape:export-xdpi="360"
@@ -159,16 +159,16 @@
      inkscape:pageshadow="2"
      inkscape:zoom="28.4375"
      inkscape:cx="14.709653"
-     inkscape:cy="15.388584"
+     inkscape:cy="15.406166"
      inkscape:document-units="px"
-     inkscape:current-layer="layer7"
+     inkscape:current-layer="layer4"
      showgrid="true"
      width="64px"
      inkscape:snap-grids="false"
      inkscape:window-width="1620"
      inkscape:window-height="1096"
-     inkscape:window-x="2044"
-     inkscape:window-y="0"
+     inkscape:window-x="2638"
+     inkscape:window-y="125"
      inkscape:window-maximized="0">
     <inkscape:grid
        type="xygrid"
@@ -255,30 +255,6 @@
            y="-5.8902793" /></flowRegion><flowPara
          id="flowPara4697" /></flowRoot>    <text
        xml:space="preserve"
-       style="font-size:8.22735882px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:85.00000238%;writing-mode:lr-tb;text-anchor:start;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Arial Black;-inkscape-font-specification:'Arial Black, Bold'"
-       x="1.9132091"
-       y="42.483063"
-       id="text4681"
-       transform="scale(0.96637605,1.0347939)"
-       sodipodi:linespacing="85.000002%"><tspan
-         sodipodi:role="line"
-         id="tspan2907"
-         x="1.9132091"
-         y="42.483063">T</tspan><tspan
-         sodipodi:role="line"
-         id="tspan2909"
-         x="1.9132091"
-         y="49.476318">R</tspan><tspan
-         sodipodi:role="line"
-         id="tspan2911"
-         x="1.9132091"
-         y="56.469574">A</tspan><tspan
-         sodipodi:role="line"
-         id="tspan2913"
-         x="1.9132091"
-         y="63.462826" /></text>
-    <text
-       xml:space="preserve"
        style="font-size:8.34053326px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:94.99999881%;writing-mode:lr-tb;text-anchor:start;fill:#3737c8;fill-opacity:1;stroke:none;display:inline;font-family:Arial Black;-inkscape-font-specification:'Arial Black, Bold'"
        x="9.8165455"
        y="60.536304"
@@ -289,6 +265,47 @@
          id="tspan2915"
          x="9.8165455"
          y="60.536304" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8761462"
+       y="51.185665"
+       id="text3036-3"
+       sodipodi:linespacing="85.000002%"><tspan
+         sodipodi:role="line"
+         x="1.8761462"
+         y="51.185665"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-7">R</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="2.0295608"
+       y="44.02916"
+       id="text3036-8-0"
+       sodipodi:linespacing="85.000002%"><tspan
+         sodipodi:role="line"
+         x="2.0295608"
+         y="44.02916"
+         id="tspan3042-0-9"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black">T</tspan><tspan
+         sodipodi:role="line"
+         x="2.0295608"
+         y="51.02211"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-4-5" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.9555587"
+       y="58.422531"
+       id="text3036-6-9"
+       sodipodi:linespacing="85.000002%"><tspan
+         sodipodi:role="line"
+         x="1.9555587"
+         y="58.422531"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-5-5">A</tspan></text>
   </g>
   <g
      inkscape:groupmode="layer"
diff --git a/share/metview/icons_mv5/FLEXTRA_PREPARE.svg b/share/metview/icons_mv5/FLEXTRA_PREPARE.svg
index 7670e2b..8546013 100644
--- a/share/metview/icons_mv5/FLEXTRA_PREPARE.svg
+++ b/share/metview/icons_mv5/FLEXTRA_PREPARE.svg
@@ -14,7 +14,7 @@
    height="32"
    id="svg2"
    version="1.1"
-   inkscape:version="0.47 r22583"
+   inkscape:version="0.48.4 r9939"
    sodipodi:docname="FLEXTRA_PREPARE.svg"
    style="display:inline"
    inkscape:export-xdpi="360"
@@ -98,16 +98,16 @@
      inkscape:pageshadow="2"
      inkscape:zoom="28.340063"
      inkscape:cx="11.589162"
-     inkscape:cy="15.20477"
+     inkscape:cy="22.705775"
      inkscape:document-units="px"
-     inkscape:current-layer="layer6"
+     inkscape:current-layer="layer4"
      showgrid="true"
      width="64px"
      inkscape:snap-grids="false"
      inkscape:window-width="1620"
-     inkscape:window-height="1096"
-     inkscape:window-x="235"
-     inkscape:window-y="35"
+     inkscape:window-height="960"
+     inkscape:window-x="2216"
+     inkscape:window-y="26"
      inkscape:window-maximized="0">
     <inkscape:grid
        type="xygrid"
@@ -194,28 +194,45 @@
            y="-5.8902793" /></flowRegion><flowPara
          id="flowPara4697" /></flowRoot>    <text
        xml:space="preserve"
-       style="font-size:8.22735882px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:85.00000238%;writing-mode:lr-tb;text-anchor:start;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Arial Black;-inkscape-font-specification:'Arial Black, Bold'"
-       x="1.8615597"
-       y="42.352486"
-       id="text4681"
-       transform="scale(0.96637601,1.0347939)"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8233471"
+       y="51.202194"
+       id="text3036-3"
        sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2907"
-         x="1.8615597"
-         y="42.352486">T</tspan><tspan
+         x="1.8233471"
+         y="51.202194"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-7">R</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.9767618"
+       y="44.045689"
+       id="text3036-8-0"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2909"
-         x="1.8615597"
-         y="49.345741">R</tspan><tspan
+         x="1.9767618"
+         y="44.045689"
+         id="tspan3042-0-9"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black">T</tspan><tspan
          sodipodi:role="line"
-         id="tspan2911"
-         x="1.8615597"
-         y="56.338997">A</tspan><tspan
+         x="1.9767618"
+         y="51.038639"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-4-5" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.9027596"
+       y="58.43906"
+       id="text3036-6-9"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2913"
-         x="1.8615597"
-         y="63.332253" /></text>
+         x="1.9027596"
+         y="58.43906"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-5-5">A</tspan></text>
   </g>
   <g
      inkscape:groupmode="layer"
diff --git a/share/metview/icons_mv5/FLEXTRA_RUN.svg b/share/metview/icons_mv5/FLEXTRA_RUN.svg
index bcd4403..048ce5f 100644
--- a/share/metview/icons_mv5/FLEXTRA_RUN.svg
+++ b/share/metview/icons_mv5/FLEXTRA_RUN.svg
@@ -14,7 +14,7 @@
    height="32"
    id="svg2"
    version="1.1"
-   inkscape:version="0.47 r22583"
+   inkscape:version="0.48.4 r9939"
    sodipodi:docname="FLEXTRA_RUN.svg"
    style="display:inline"
    inkscape:export-xdpi="360"
@@ -126,6 +126,100 @@
        id="linearGradient4236"
        xlink:href="#linearGradient3622-95"
        inkscape:collect="always" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3648-8"
+       id="radialGradient3656-4"
+       cx="15.794774"
+       cy="23.04089"
+       fx="15.794774"
+       fy="23.04089"
+       r="1.5355394"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3648-8">
+      <stop
+         style="stop-color:#acc6d2;stop-opacity:1;"
+         offset="0"
+         id="stop3650-8" />
+      <stop
+         style="stop-color:#498ca2;stop-opacity:1;"
+         offset="1"
+         id="stop3652-2" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3700-5"
+       id="linearGradient3706-4"
+       x1="22.977591"
+       y1="16.533602"
+       x2="29.822767"
+       y2="16.274597"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.7675676,0,0,1,5.0632296,-0.88802268)" />
+    <linearGradient
+       id="linearGradient3700-5">
+      <stop
+         style="stop-color:#727272;stop-opacity:1;"
+         offset="0"
+         id="stop3702-5" />
+      <stop
+         style="stop-color:#a5a5a5;stop-opacity:1;"
+         offset="1"
+         id="stop3704-1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3708-1"
+       id="linearGradient3714-7"
+       x1="12.987333"
+       y1="40.467396"
+       x2="29.933771"
+       y2="40.467396"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.9235808,0,0,1,1.6029976,-32.888023)" />
+    <linearGradient
+       id="linearGradient3708-1">
+      <stop
+         style="stop-color:#838383;stop-opacity:1;"
+         offset="0"
+         id="stop3710-1" />
+      <stop
+         style="stop-color:#b3b3b3;stop-opacity:1;"
+         offset="1"
+         id="stop3712-5" />
+    </linearGradient>
+    <linearGradient
+       y2="51.049667"
+       x2="23.125591"
+       y1="51.049667"
+       x1="12.98733"
+       gradientTransform="matrix(0.91240876,0,0,1,3.4559832,-32.677214)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3965"
+       xlink:href="#linearGradient3716-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3716-7">
+      <stop
+         style="stop-color:#a5a5a5;stop-opacity:1;"
+         offset="0"
+         id="stop3718-6" />
+      <stop
+         style="stop-color:#bbbbbb;stop-opacity:1;"
+         offset="1"
+         id="stop3720-1" />
+    </linearGradient>
+    <linearGradient
+       y2="51.049667"
+       x2="23.125591"
+       y1="51.049667"
+       x1="12.98733"
+       gradientTransform="matrix(0.91240876,0,0,1,1.7480916,-32.888023)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient4645"
+       xlink:href="#linearGradient3716-7"
+       inkscape:collect="always" />
   </defs>
   <sodipodi:namedview
      id="base"
@@ -135,16 +229,16 @@
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
      inkscape:zoom="27.026333"
-     inkscape:cx="9.4025213"
-     inkscape:cy="14.763428"
+     inkscape:cx="19.040495"
+     inkscape:cy="18.082753"
      inkscape:document-units="px"
      inkscape:current-layer="layer2"
      showgrid="true"
      width="64px"
      inkscape:snap-grids="false"
      inkscape:window-width="1620"
-     inkscape:window-height="1171"
-     inkscape:window-x="204"
+     inkscape:window-height="1132"
+     inkscape:window-x="2031"
      inkscape:window-y="0"
      inkscape:window-maximized="0">
     <inkscape:grid
@@ -258,95 +352,90 @@
          y="6.0131869" /></text>
     <text
        xml:space="preserve"
-       style="font-size:8.22735882px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:85.00000238%;writing-mode:lr-tb;text-anchor:start;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Arial Black;-inkscape-font-specification:'Arial Black, Bold'"
-       x="1.8785396"
-       y="42.424026"
-       id="text4681"
-       transform="scale(0.96637601,1.0347939)"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8130463"
+       y="51.289948"
+       id="text3036-3"
        sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2907"
-         x="1.8785396"
-         y="42.424026">T</tspan><tspan
+         x="1.8130463"
+         y="51.289948"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-7">R</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.9664611"
+       y="44.133442"
+       id="text3036-8-0"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2909"
-         x="1.8785396"
-         y="49.417282">R</tspan><tspan
+         x="1.9664611"
+         y="44.133442"
+         id="tspan3042-0-9"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black">T</tspan><tspan
          sodipodi:role="line"
-         id="tspan2911"
-         x="1.8785396"
-         y="56.410538">A</tspan><tspan
+         x="1.9664611"
+         y="51.126392"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-4-5" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8924588"
+       y="58.526814"
+       id="text3036-6-9"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2913"
-         x="1.8785396"
-         y="63.403793" /></text>
+         x="1.8924588"
+         y="58.526814"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-5-5">A</tspan></text>
   </g>
   <g
      inkscape:groupmode="layer"
      id="layer2"
      inkscape:label="server"
      style="display:inline">
-    <g
-       id="g4388"
-       transform="matrix(0.1517954,0,0,0.1444919,-3.6601239,-0.37919708)"
-       style="display:inline">
-      <g
-         id="g4572"
-         transform="matrix(3.2881343,0,0,3.2881343,-142.60085,-210.03517)">
-        <path
-           id="path4582"
-           d="m 78.12815,120.177 0,-35.100414 21.09672,0 0,35.100414 -21.09672,0 z"
-           style="fill:url(#linearGradient3739);fill-opacity:1" />
-        <path
-           id="path4596"
-           d="M 85.777742,78.679005 76.886261,84.507778 98.799667,84.420458 107.77827,78.59168 85.777742,78.679 z"
-           style="fill:url(#linearGradient3755);fill-opacity:1"
-           sodipodi:nodetypes="ccccc" />
-        <path
-           id="path4600"
-           d="m 107.56892,115.25014 -9.044924,5.71268 0.08732,-36.750184 8.957604,-5.588749 0,36.626253 z"
-           style="fill:url(#linearGradient3747);fill-opacity:1"
-           sodipodi:nodetypes="ccccc" />
-        <path
-           id="path4604"
-           d="m 107.29929,78.615545 0,36.711945"
-           style="fill:#000000;stroke:#76769d;stroke-width:1.64281785;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-        <path
-           style="fill:#000000;stroke:#000000;stroke-width:3.0802834;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-           d="m 80.975225,91.767747 c 13.18592,0 13.18592,0 13.18592,0"
-           id="path4666" />
-        <path
-           style="fill:#000000;stroke:#000000;stroke-width:3.0802834;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
-           d="m 80.967985,99.626076 c 13.11308,0 13.11308,0 13.11308,0"
-           id="path4666-2" />
-        <path
-           id="path4584"
-           d="m 77.373321,120.27806 0,-35.890473 21.26287,0 0,35.890473 -21.26287,0"
-           style="fill:none;stroke:#76769d;stroke-width:1.64281785;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-        <path
-           style="fill:none;stroke:#76769d;stroke-width:2.05352211px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
-           d="m 77.265046,84.433308 c 8.818789,-5.850087 8.906104,-5.937402 8.906104,-5.937402"
-           id="path4712" />
-        <path
-           style="fill:none;stroke:#76769d;stroke-width:1.64281785;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-           d="m 98.744473,84.520623 c 8.469537,-5.500829 8.469537,-5.500829 8.469537,-5.500829"
-           id="path4714" />
-        <path
-           style="fill:none;stroke:#76769d;stroke-width:1.64281785;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-           d="m 85.559948,78.495906 c 22.701832,-0.17463 22.701832,-0.17463 22.701832,-0.17463"
-           id="path4718" />
-        <path
-           style="fill:none;stroke:#76769d;stroke-width:1.64281785;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-           d="m 99.050573,120.34641 c 8.643177,-5.92978 8.643177,-5.92978 8.643177,-5.92978"
-           id="path4722" />
-        <rect
-           style="fill:#74f030;fill-opacity:1;fill-rule:evenodd;stroke:#2e9c41;stroke-width:1.02676105;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
-           id="rect4724"
-           width="5.9374022"
-           height="5.5881438"
-           x="81.456161"
-           y="107.22245" />
-      </g>
-    </g>
+    <path
+       style="fill:url(#linearGradient4645);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="m 13.597846,8.2823913 c 0,0 2.380431,0.969574 3.91227,1.282181 1.531839,0.3126058 5.27045,0.4958127 5.27045,0.4958127 l 0.06752,17.980513 c 0,0 -3.772018,-0.256764 -5.61367,-0.685905 -1.244221,-0.289928 -3.636568,-1.267745 -3.636568,-1.267745 l 0,-17.8048567 z"
+       id="rect2870-42"
+       sodipodi:nodetypes="czccacc"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:url(#linearGradient3714-7);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="m 22.243711,5.0263073 7.005543,1.2599809 -6.492942,3.8461498 c 0,0 -3.713429,-0.2615439 -5.242549,-0.5826297 -1.529121,-0.321086 -3.915914,-1.223016 -3.915914,-1.223016 l 8.645862,-3.300485 z"
+       id="rect2870-4-3"
+       sodipodi:nodetypes="ccczcc"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:url(#linearGradient3706-4);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="m 22.700087,10.095437 6.401161,-3.7370958 -0.0852,17.1684428 -6.259161,4.440114 -0.0568,-17.871461 z"
+       id="rect3690-2"
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:type="arc"
+       style="fill:url(#radialGradient3656-4);fill-opacity:1;fill-rule:evenodd;stroke:#335596;stroke-width:0.39196318;stroke-miterlimit:3.29999995;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       id="path3724-2"
+       sodipodi:cx="16.631927"
+       sodipodi:cy="23.101271"
+       sodipodi:rx="1.5355394"
+       sodipodi:ry="1.5355394"
+       d="m 18.167467,23.101271 a 1.5355394,1.5355394 0 1 1 -3.071079,0 1.5355394,1.5355394 0 1 1 3.071079,0 z"
+       transform="matrix(1.1400126,-0.10213105,0.12685752,1.4160157,-4.3527264,-9.0773861)" />
+    <path
+       style="fill:#3771c8;stroke:none;display:inline"
+       d="m 13.59785,10.57645 c 0,0 2.693952,1.050538 4.218108,1.369035 1.524156,0.318497 4.921126,0.518014 4.921126,0.518014 l -1e-6,1.59104 c 0,0 -3.620824,-0.225659 -5.143132,-0.555014 -1.522308,-0.329354 -3.959101,-1.295033 -3.959101,-1.295033 l -0.037,-1.628042 z"
+       id="path3726-1"
+       sodipodi:nodetypes="czcczcc"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:nodetypes="czcczcc"
+       id="path3728-6"
+       d="m 13.59785,13.943536 c 0,0 2.693952,1.050538 4.218108,1.369035 1.524156,0.318497 4.921126,0.518014 4.921126,0.518014 l -1e-6,1.59104 c 0,0 -3.620824,-0.225659 -5.143132,-0.555014 -1.522308,-0.329354 -3.959101,-1.295033 -3.959101,-1.295033 l -0.037,-1.628042 z"
+       style="fill:#3771c8;stroke:none;display:inline"
+       inkscape:connector-curvature="0" />
   </g>
 </svg>
diff --git a/share/metview/icons_mv5/FLEXTRA_VISUALISER.svg b/share/metview/icons_mv5/FLEXTRA_VISUALISER.svg
index 2d69532..f06712a 100644
--- a/share/metview/icons_mv5/FLEXTRA_VISUALISER.svg
+++ b/share/metview/icons_mv5/FLEXTRA_VISUALISER.svg
@@ -14,7 +14,7 @@
    height="32"
    id="svg2"
    version="1.1"
-   inkscape:version="0.47 r22583"
+   inkscape:version="0.48.4 r9939"
    sodipodi:docname="FLEXTRA_VISUALISER.svg"
    style="display:inline"
    inkscape:export-xdpi="360"
@@ -63,6 +63,68 @@
        id="linearGradient4590"
        xlink:href="#linearGradient3622-3"
        inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4026"
+       id="linearGradient4032"
+       x1="16.804222"
+       y1="14.95285"
+       x2="27.970543"
+       y2="14.95285"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0951557,0,0,1,-16.546772,-5.4935131)" />
+    <linearGradient
+       id="linearGradient4026">
+      <stop
+         style="stop-color:#f30e1e;stop-opacity:1;"
+         offset="0"
+         id="stop4028" />
+      <stop
+         style="stop-color:#ba2f39;stop-opacity:1;"
+         offset="1"
+         id="stop4030" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3975"
+       id="linearGradient3981"
+       x1="21.350325"
+       y1="20.322937"
+       x2="23.313965"
+       y2="20.322939"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.135239,0,0,1.0828856,-16.606068,-5.9410348)" />
+    <linearGradient
+       id="linearGradient3975">
+      <stop
+         style="stop-color:#565c64;stop-opacity:1;"
+         offset="0"
+         id="stop3977" />
+      <stop
+         style="stop-color:#99a4b4;stop-opacity:1;"
+         offset="1"
+         id="stop3979" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3975"
+       id="linearGradient4382"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.135239,0,0,1.0828856,-4.1735548,0.73621401)"
+       x1="21.350325"
+       y1="20.322937"
+       x2="23.313965"
+       y2="20.322939" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4026"
+       id="linearGradient4384"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0951557,0,0,1,-4.1142586,1.1837357)"
+       x1="16.804222"
+       y1="14.95285"
+       x2="27.970543"
+       y2="14.95285" />
   </defs>
   <sodipodi:namedview
      id="base"
@@ -75,14 +137,14 @@
      inkscape:cx="13.89257"
      inkscape:cy="15.440296"
      inkscape:document-units="px"
-     inkscape:current-layer="layer6"
+     inkscape:current-layer="layer4"
      showgrid="true"
      width="64px"
      inkscape:snap-grids="false"
      inkscape:window-width="1620"
-     inkscape:window-height="1171"
-     inkscape:window-x="275"
-     inkscape:window-y="0"
+     inkscape:window-height="1132"
+     inkscape:window-x="338"
+     inkscape:window-y="56"
      inkscape:window-maximized="0">
     <inkscape:grid
        type="xygrid"
@@ -134,6 +196,57 @@
        height="31.261541"
        x="0.38681135"
        y="0.33406448" />
+    <path
+       sodipodi:type="arc"
+       style="fill:#939dac;fill-opacity:1;fill-rule:evenodd;stroke:#123b7d;stroke-width:0.28685689;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.29999995;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+       id="path3869"
+       sodipodi:cx="-3.3759081"
+       sodipodi:cy="15.175204"
+       sodipodi:rx="2.6094856"
+       sodipodi:ry="1.2408743"
+       d="m -0.76642251,15.175204 a 2.6094856,1.2408743 0 1 1 -5.21897129,0 2.6094856,1.2408743 0 1 1 5.21897129,0 z"
+       transform="matrix(1.7971318,0.34159025,-0.37101268,1.6200355,31.573908,1.4112182)" />
+    <path
+       style="fill:url(#linearGradient4382);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="m 17.876431,19.980535 c 0,0 0.257868,1.326588 1.996868,1.665105 1.739004,0.338517 2.420066,-0.806817 2.420066,-0.806817 l -0.0062,4.057523 c 0,0 -0.680348,0.8151 -2.436815,0.561448 -1.496348,-0.216089 -2.015341,-1.135695 -2.015341,-1.135695 l 0.04144,-4.341564 2.8e-5,0 z"
+       id="rect2870-42"
+       sodipodi:nodetypes="czccsccc"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#6f7c91;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="m 15.558676,6.6772488 c 0,0 3.208652,1.0687276 5.56385,1.3803788 2.3552,0.3116513 8.318581,0.260686 8.318581,0.260686 l -1.17551,1.7541394 c 0,0 -5.796507,-0.0066 -8.83197,-0.4333152 C 16.398164,9.2123994 12.432513,7.6033685 12.432513,7.6033685 l 3.126163,-0.9261197 z"
+       id="rect2870-4-3-8"
+       sodipodi:nodetypes="czcczcc"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#373e48;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+       d="M 28.195688,9.9138208 29.48397,8.3172957 29.46879,20.861991 28.275188,22.383809 28.195688,9.9138208 z"
+       id="rect3690-2-0"
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#dbe2e3;fill-opacity:1;fill-rule:evenodd;stroke:#0c2248;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.29999995;stroke-opacity:1;stroke-dashoffset:0;display:inline"
+       d="m 12.73299,7.9934662 c 0,0 2.955238,1.2768375 6.851552,1.8575016 3.896315,0.5806642 8.394286,0.3556922 8.394286,0.3556922 l 0.04538,11.895917 c 0,0 -5.032626,0.291789 -8.514194,-0.243177 -3.481568,-0.534966 -6.715432,-2.161573 -6.715432,-2.161573 l -0.0616,-11.7043608 z"
+       id="rect3828-2"
+       sodipodi:nodetypes="czcczcc" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#6c5b5d;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="m 14.311513,17.43558 c 1.825257,0.632676 3.250822,1.483391 5.475771,1.788319 0.839425,0.182748 3.035471,0.413693 7.034567,0.145985"
+       id="path3996-1"
+       sodipodi:nodetypes="ccc" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#6c5b5d;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+       d="M 18.588211,20.647255 18.468303,10.464786"
+       id="path3998-0" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:url(#linearGradient4384);stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;display:inline"
+       d="m 14.836559,15.27246 c 0,0 0.839489,2.702497 1.251996,2.148768 1.609019,-2.159868 3.463916,-5.927736 3.781734,-5.425425 0.704791,1.113917 1.201134,4.983495 2.066852,6.515474 0.351413,0.621863 2.466197,-2.729574 2.466197,-2.729574 l 1.566925,4.541256"
+       id="path3992"
+       sodipodi:nodetypes="cssscc" />
   </g>
   <g
      inkscape:groupmode="layer"
@@ -155,72 +268,50 @@
      inkscape:label="text1">
     <text
        xml:space="preserve"
-       style="font-size:8.22735882px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:85.00000238%;writing-mode:lr-tb;text-anchor:start;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Arial Black;-inkscape-font-specification:'Arial Black, Bold'"
-       x="1.8805583"
-       y="11.413416"
-       id="text4681"
-       transform="scale(0.96637601,1.0347939)"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.735487"
+       y="19.185667"
+       id="text3036-3"
        sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2907"
-         x="1.8805583"
-         y="11.413416">T</tspan><tspan
+         x="1.735487"
+         y="19.185667"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-7">R</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8889017"
+       y="12.02916"
+       id="text3036-8-0"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2909"
-         x="1.8805583"
-         y="18.406672">R</tspan><tspan
+         x="1.8889017"
+         y="12.02916"
+         id="tspan3042-0-9"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black">T</tspan><tspan
          sodipodi:role="line"
-         id="tspan2911"
-         x="1.8805583"
-         y="25.399927">A</tspan><tspan
+         x="1.8889017"
+         y="19.02211"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-4-5" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:9px;font-style:normal;font-weight:normal;line-height:85.00000238%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#216778;fill-opacity:1;stroke:none;display:inline;font-family:Courier New KOI-8;-inkscape-font-specification:Courier New KOI-8"
+       x="1.8148994"
+       y="26.422531"
+       id="text3036-6-9"
+       sodipodi:linespacing="85.000002%"><tspan
          sodipodi:role="line"
-         id="tspan2913"
-         x="1.8805583"
-         y="32.393181" /></text>
+         x="1.8148994"
+         y="26.422531"
+         style="font-size:8.22700024px;line-height:85.00000238%;writing-mode:lr-tb;fill:#216778;font-family:Arial Black;-inkscape-font-specification:Arial Black"
+         id="tspan3054-5-5">A</tspan></text>
   </g>
   <g
      inkscape:groupmode="layer"
      id="layer6"
      inkscape:label="item"
      transform="translate(0,-32)"
-     style="display:inline">
-    <rect
-       style="fill:#e7e4e0;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:1.00858581;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
-       id="rect4231"
-       width="15.596395"
-       height="11.160296"
-       x="12.705956"
-       y="40.864311"
-       ry="1.1240586" />
-    <rect
-       style="fill:#b6c6cc;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.95900005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
-       id="rect4233"
-       width="14.461813"
-       height="2.4989576"
-       x="13.368137"
-       y="53.497963"
-       ry="1.1285614" />
-    <rect
-       style="fill:#666666;fill-opacity:1;fill-rule:evenodd;stroke:#10140d;stroke-width:0.8581652;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
-       id="rect4235"
-       width="3.0842593"
-       height="1.3806968"
-       x="19.132833"
-       y="52.001503"
-       ry="0.69034839"
-       rx="0" />
-    <path
-       style="fill:none;stroke:#e52626;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;display:inline"
-       d="m 16.784314,48.258214 2.884772,-5.400974 0.986897,4.111189 2.163579,-1.934678 c 0.847718,0.76581 1.450869,1.271924 2.543154,2.29743"
-       id="path5224"
-       sodipodi:nodetypes="ccccc" />
-    <path
-       style="fill:none;stroke:#1f283c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
-       d="m 14.506864,42.413877 c 0.03794,7.617789 0.03794,7.698401 0.03794,7.698401"
-       id="path5226" />
-    <path
-       style="fill:none;stroke:#1f283c;stroke-width:1.00666595px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
-       d="m 14.130118,50.230192 12.748068,-0.0343"
-       id="path5228" />
-  </g>
+     style="display:inline" />
 </svg>
diff --git a/src/Desktop/MvQIconProvider.cc b/src/Desktop/MvQIconProvider.cc
index d66a773..5aff3af 100644
--- a/src/Desktop/MvQIconProvider.cc
+++ b/src/Desktop/MvQIconProvider.cc
@@ -24,7 +24,7 @@
 //This array defines the avaiable icon sizes
 static int sizeArr[]={12,16,24,32,48,64,96};
 
-static MvQIcon unknownIcon(":/desktop/unknown.svg");
+static MvQUnknownIcon unknownIcon(":/desktop/unknown.svg");
 static MvQIcon linkIcon(":/desktop/link.svg");
 static MvQIcon linkBrokenIcon(":/desktop/link_broken.svg");
 static MvQIcon lockIcon(":/desktop/padlock.svg");
@@ -57,7 +57,7 @@ QPixmap MvQIcon::pixmap(int size)
 	 {
 	   	QPixmap pix;
 		QImageReader imgR(path_);
-		if(imgR.canRead())
+        if(imgR.canRead())
 		{
 			imgR.setScaledSize(QSize(size,size));
 			QImage img=imgR.read();
@@ -65,7 +65,7 @@ QPixmap MvQIcon::pixmap(int size)
 		}
 		else
 		{
-		  	qDebug() << path_;
+            qDebug() << "MvQIcon::pixmap() could not find icon=" << path_;
 		  	pix=unknownIcon.pixmap(size);		
 		} 
 		
@@ -74,24 +74,6 @@ QPixmap MvQIcon::pixmap(int size)
 	 }
 	 return QPixmap();
 }	 
-  
-/*QPixmap MvQIcon::fadedPixmap(int size)
-{
- 	 map<int,QPixmap>::iterator it=fadedPixmaps_.find(size);
-	 if(it != fadedPixmaps_.end())
-	   	return it->second;
-	 else
-	 {	   	
-	   	QPixmap pix=pixmap(size);
-		QImage img=pix.toImage();
-		greyOut(img);
-		pix=QPixmap::fromImage(img);
-		fadedPixmaps_[size]=pix;
-		return pix;
-	 }
-	 return QPixmap();
-}*/	 
-
 
 QPixmap MvQIcon::pixmap(IconObject *obj,int size,bool checkEmbedded)
 {  	
@@ -189,6 +171,52 @@ void MvQIcon::greyOut(QImage &img)
 		}	
 }	
 
+MvQUnknownIcon::MvQUnknownIcon(QString n) : MvQIcon(n)
+{
+}
+
+//We must serve back a valid pixmap all the time!!! The MvQIcon pixmap() method
+//calls this a fallback!!!
+QPixmap MvQUnknownIcon::pixmap(int size)
+{
+    map<int,QPixmap>::iterator it=pixmaps_.find(size);
+    if(it != pixmaps_.end())
+       return it->second;
+    else
+    {
+        QImageReader imgR(path_);
+        if(imgR.canRead())
+        {
+            return MvQIcon::pixmap(size);
+        }
+        else
+        {
+            QPixmap pix(size,size);
+            pix.fill(QColor(210,210,210));
+
+            QPainter painter(&pix);
+            painter.setPen(Qt::black);
+            QRect r(0,0,size,size);
+            QFont f;
+            float reqFontSize=4+72.0*0.75*static_cast<float>(size)/96.; //estimate with 96 dpi
+            f.setPointSize(reqFontSize);
+            QFontMetrics fm(f);
+            while(fm.height() > 3*size/4 && f.pointSize() > 8)
+            {
+                f.setPointSize(f.pointSize()-1);
+                fm=QFontMetrics(f);
+            }
+            painter.setFont(f);
+            painter.drawText(r,Qt::AlignCenter,"?");
+            pixmaps_[size]=pix;
+
+            return pix;
+        }
+    }
+
+    return QPixmap(size,size);
+}
+
 //===========================================
 // 
 // MvQIconProvider
@@ -290,4 +318,4 @@ QPixmap MvQIconProvider::errorPixmap(int size)
 	 return errorIcon.pixmap(size);  
 } 
 
-static MvQIconProvider	iconProvider;	
\ No newline at end of file
+static MvQIconProvider	iconProvider;	
diff --git a/src/Desktop/MvQIconProvider.h b/src/Desktop/MvQIconProvider.h
index 569cff0..9562320 100644
--- a/src/Desktop/MvQIconProvider.h
+++ b/src/Desktop/MvQIconProvider.h
@@ -30,7 +30,7 @@ class MvQIcon
 {
 public:  
   	MvQIcon(QString);
-	QPixmap pixmap(int);
+    virtual QPixmap pixmap(int);
 	QPixmap pixmap(IconObject*,int,bool checkEmbedded=false);
 	QPixmap greyedOutPixmap(IconObject*,int);
 	
@@ -42,6 +42,12 @@ protected:
 	std::map<int,QPixmap> fadedPixmaps_;
 };  
 
+class MvQUnknownIcon : public MvQIcon
+{
+public:
+    MvQUnknownIcon(QString);
+    QPixmap pixmap(int);
+};
 
 class MvQIconProvider
 {
@@ -71,4 +77,4 @@ private:
 	static std::map<string,Folder*> folders_; 	
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/Flextra/FlextraRun.cc b/src/Flextra/FlextraRun.cc
index 409f51f..a590f1a 100644
--- a/src/Flextra/FlextraRun.cc
+++ b/src/Flextra/FlextraRun.cc
@@ -294,6 +294,7 @@ bool FlextraRun::getParamValue(vector<string>& value,MvRequest& in,string parNam
 bool FlextraRun::generatePathnamesFile(const string& fPathnames,MvRequest& in,const string& optionsPath,const string& outPath)
 {
 	string inPath,fAvailable;
+    string errTxt;
 		
 	const char *input_mode=in("FLEXTRA_INPUT_MODE");	
 	if(!input_mode)
@@ -320,10 +321,21 @@ bool FlextraRun::generatePathnamesFile(const string& fPathnames,MvRequest& in,co
 	}	
 	else if(strcmp(input_mode,"PATH") == 0) 
 	{
-	  	FLEXTRA_CHK(getParamValue(inPath,in,"FLEXTRA_INPUT_PATH"));
-		FLEXTRA_CHK(getParamValue(fAvailable,in,"FLEXTRA_AVAILABLE_FILE_PATH"));
-
-		if(fAvailable == "SAME_AS_INPUT_PATH")
+        if(!in.getPath("FLEXTRA_INPUT_PATH",inPath,false,errTxt))
+        {
+            marslog(LOG_EROR,"No parameter FLEXTRA_INPUT_PATH is specified!");
+            setError(13);
+            return false;
+        }
+
+        if(!in.getPath("FLEXTRA_AVAILABLE_FILE_PATH",fAvailable,false,errTxt))
+        {
+            marslog(LOG_EROR,"No parameter FLEXTRA_AVAILABLE_FILE_PATH is specified!");
+            setError(13);
+            return false;
+        }
+
+        if(fAvailable.find("SAME_AS_INPUT_PATH") != string::npos)
 		{
 			fAvailable = inPath + "/AVAILABLE";
 		}	
diff --git a/src/Flextra/ObjectSpec.Flexpart b/src/Flextra/ObjectSpec.Flexpart
index c5c2a77..cd9cf7b 100644
--- a/src/Flextra/ObjectSpec.Flexpart
+++ b/src/Flextra/ObjectSpec.Flexpart
@@ -10,7 +10,7 @@
 
 object,
 	class               = FLEXPART_RUN,
- 	can_be_created      = True,
+    can_be_created      = False,
  	definition_file     = '$METVIEW_DIR_SHARE/etc/FlexpartRunDef',
 	rules_file          = '$METVIEW_DIR_SHARE/etc/FlexpartRunRules',
 	default_name        = 'Flexpart Run',		
diff --git a/src/OgcClient/MvQWmsClient.cc b/src/OgcClient/MvQWmsClient.cc
index 32269cb..bab814f 100644
--- a/src/OgcClient/MvQWmsClient.cc
+++ b/src/OgcClient/MvQWmsClient.cc
@@ -1511,7 +1511,7 @@ void MvQWmsUiClient::slotReplyPreview(QNetworkReply* reply)
 			QString eMsg(ba);
 		
 			log->error(eMsg.toStdString() + "\n");
-			emit legendLoaded(QString());
+            emit previewLoaded(QString());
 			emit statusMessage(tr("Load preview <font color=red>(FAILED)</font>"));
 		}
 		else
diff --git a/src/libMarsClient/CMakeLists.txt b/src/libMarsClient/CMakeLists.txt
index dca4423..685ec8d 100644
--- a/src/libMarsClient/CMakeLists.txt
+++ b/src/libMarsClient/CMakeLists.txt
@@ -144,6 +144,13 @@ add_custom_command(
 add_custom_target(marsxdr DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rpcmars.h ${CMAKE_CURRENT_BINARY_DIR}/marsxdr.c)
 add_custom_target(marslex DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/langy.c ${CMAKE_CURRENT_BINARY_DIR}/langl.c)
 
+#### TODO: Mechanism to choose ecCodes over grib_api -- REVIEW
+set( grib_handling_pkg grib_api )
+if( HAVE_ECCODES )
+    set( grib_handling_pkg eccodes )
+endif()
+####
+
 ecbuild_add_library(
 	TARGET      mars
     TYPE        STATIC
@@ -154,7 +161,7 @@ ecbuild_add_library(
         ${GRIB_API_INCLUDE_DIRS}
         ${CURL_INCLUDE_DIRS}
     DEFINITIONS ${GRIB_API_DEFINITIONS}
-    LIBS        grib_api ${MARS_FEATURE_LIBRARIES} ${CURL_LIBRARIES} ${CMATH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
+    LIBS        ${grib_handling_pkg} ${MARS_FEATURE_LIBRARIES} ${CURL_LIBRARIES} ${CMATH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
 
 set_directory_properties( ADDITIONAL_MAKE_CLEAN_FILES rpcmars.h marsxdr.c langl.c langy.c )
 
diff --git a/src/libMarsClient/dhsbase.c b/src/libMarsClient/dhsbase.c
index bac6e4c..41a69de 100644
--- a/src/libMarsClient/dhsbase.c
+++ b/src/libMarsClient/dhsbase.c
@@ -92,6 +92,10 @@ typedef struct dhsdata {
 	mars_grib_index* head_idx;
 	mars_grib_index* tail_idx;
 
+	boolean          mars2mars;
+	request*         othermars;
+	long             expect;
+
 } dhsdata;
 
 static option opts[] = {
@@ -2305,6 +2309,10 @@ static err dhs_send(dhsdata *dhs,request *r,request *e)
 	/* send id */
 	stream_write_ulonglong(&dhs->s,0);
 
+	if(dhs->mars2mars) {
+		set_value(r, "_expect", "%d", dhs->expect);
+	}
+
 	/* Send requests */
 
 	send_request(&dhs->s,r);
@@ -2323,15 +2331,36 @@ static err dhs_send(dhsdata *dhs,request *r,request *e)
 
 	/* Send datahandle */
 
-	stream_write_start(&dhs->s,"MarsHandle");
+	if(dhs->mars2mars) {
+		request* req = empty_request("RETRIEVE");
+		stream_write_start(&dhs->s,"Mars2MarsHandle");
 
-	stream_write_string(&dhs->s,addr);
-	stream_write_int(&dhs->s,port);
-	stream_write_ulonglong(&dhs->s,dhs->id);
+		
+		reqcpy_no_underscores(req, r);
+		send_request(&dhs->s, req);
+		free_all_requests(req);
 
-	stream_write_int(&dhs->s,mars.crc);
+		send_request(&dhs->s, dhs->othermars);
+
+		stream_write_string(&dhs->s, no_quotes(get_value(r, "SOURCE", 0)) + 7);
+
+		stream_write_end(&dhs->s);
+
+	}
+	else {
+
+		stream_write_start(&dhs->s,"MarsHandle");
+
+		stream_write_string(&dhs->s,addr);
+		stream_write_int(&dhs->s,port);
+		stream_write_ulonglong(&dhs->s,dhs->id);
+
+		stream_write_int(&dhs->s,mars.crc);
+
+		stream_write_end(&dhs->s);
+
+	}
 
-	stream_write_end(&dhs->s);
 
 	stream_write_end(&dhs->s);
 
@@ -2438,65 +2467,110 @@ static err  dhs_open(void *data,request *r,request *e,int mode)
 			return -5;
 		}
 
-		if((error = sanity_check(dhs->req)) != NOERR)
-			return error;
+		if(strncmp(s, "mars://", 7) == 0) {
 
-		if((error = check_file_sizes(dhs->req) != NOERR))
-			return error;
+			request *setup = mars.setup;
+
+			dhs->expect = count_fields(r);
+			marslog(LOG_INFO,"Using MARS to MARS third party transfer, archiving %ld field(s)", dhs->expect);
+			if(count_values(r, "SOURCE") != 1) {
+				marslog(LOG_EROR,"Multi-source not supported for third party transfer");
+				return -5;
+			}
+
+            while(setup && !dhs->othermars) {
+                int i;
+                for(i=0; i<count_values(setup,"name"); i++) {
+                    if(EQ(get_value(setup, "name", i), s+7)) {
+                        dhs->othermars = setup;
+                    }
+                }
+				setup = setup->next;
+			}
+
+			if(!dhs->othermars || !EQ(get_value(dhs->othermars,"class", 0), "dhsbase")) {
+				marslog(LOG_EROR, "Invalid database for third party transfer: %s", s+7);
+				marslog(LOG_EROR, "Possible values are:");
+				setup = mars.setup;
+				while(setup) {
+					if(EQ(get_value(setup, "class", 0), "dhsbase")) {
+                        int i;
+                        for(i=0; i<count_values(setup,"name"); i++) {
+                            marslog(LOG_EROR, "  %s", get_value(setup, "name", i));
+                        }
+					}
+					setup = setup->next;
+				}
+				return -5;
+			}
+
+
+			dhs->mars2mars = true;
 
-		if(observation(r))
-		{
-			if((error = dhs_obs_check(dhs,r)))
-				return error;
-		}
-		/* Images should be checked as other GRIB, from grib_api 1.10.0 */
-		else if (image(r))
-		{
-			if( (error = dhs_image_check(dhs)) )
-				return error;
-		}
-		else if (feedback(r))
-		{
-			if( (error = dhs_fb_check(dhs,r)) )
-				return error;
-		}
-		else if (bias(r))
-		{
-			if( (error = dhs_bias_check(dhs,r)) )
-				return error;
-		}
-		else if (track(r))
-		{
-			if( (error = dhs_track_check(dhs,r)) )
-				return error;
 		}
-		else if (is_odb(r))
-		{
-			if( (error = dhs_odb_check(dhs,r)) )
+		else {
+
+			if((error = sanity_check(dhs->req)) != NOERR)
 				return error;
-		}
-		else
-		{
-			if( (error = dhs_grib_check(dhs,r)) )
+
+			if((error = check_file_sizes(dhs->req) != NOERR))
 				return error;
-		}
 
-		if(getenv("MARS_NO_ARCH"))
-		{
-			marslog(LOG_WARN,"'MARS_NO_ARCH' selected. Skipping archive");
-			dhs->finished = true;
-			return 0;
-		}
+			if(observation(r))
+			{
+				if((error = dhs_obs_check(dhs,r)))
+					return error;
+			}
+			/* Images should be checked as other GRIB, from grib_api 1.10.0 */
+			else if (image(r))
+			{
+				if( (error = dhs_image_check(dhs)) )
+					return error;
+			}
+			else if (feedback(r))
+			{
+				if( (error = dhs_fb_check(dhs,r)) )
+					return error;
+			}
+			else if (bias(r))
+			{
+				if( (error = dhs_bias_check(dhs,r)) )
+					return error;
+			}
+			else if (track(r))
+			{
+				if( (error = dhs_track_check(dhs,r)) )
+					return error;
+			}
+			else if (is_odb(r))
+			{
+				if( (error = dhs_odb_check(dhs,r)) )
+					return error;
+			}
+			else
+			{
+				if( (error = dhs_grib_check(dhs,r)) )
+					return error;
+			}
 
-		if(!mars.fields_are_ok)
-		{
-			FILE *f = mail_open(mars.dhsmail,"Mars ARCHIVE failure (dhsbase)");
-			mail_request(f,"MARS Request:",r);
-			mail_request(f,"MARS Environment:",e);
-			mail_close(f);
+			if(getenv("MARS_NO_ARCH"))
+			{
+				marslog(LOG_WARN,"'MARS_NO_ARCH' selected. Skipping archive");
+				dhs->finished = true;
+				return 0;
+			}
+
+			if(!mars.fields_are_ok)
+			{
+				FILE *f = mail_open(mars.dhsmail,"Mars ARCHIVE failure (dhsbase)");
+				mail_request(f,"MARS Request:",r);
+				mail_request(f,"MARS Environment:",e);
+				mail_close(f);
+
+				marslog(LOG_EROR,"Some of the fields are rejected by the new mars server");
+				return -1;
+			}
 
-			marslog(LOG_EROR,"Some of the fields are rejected by the new mars server");
-			return -1;
 		}
 
 	}
diff --git a/src/libMarsClient/nfdbbase.c b/src/libMarsClient/nfdbbase.c
index b355885..4708d9e 100644
--- a/src/libMarsClient/nfdbbase.c
+++ b/src/libMarsClient/nfdbbase.c
@@ -1,9 +1,9 @@
 /*
  * © Copyright 1996-2012 ECMWF.
- * 
+ *
  * This software is licensed under the terms of the Apache Licence Version 2.0
- * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
- * In applying this licence, ECMWF does not waive the privileges and immunities 
+ * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
+ * In applying this licence, ECMWF does not waive the privileges and immunities
  * granted to it by virtue of its status as an intergovernmental organisation nor
  * does it submit to any jurisdiction.
  */
@@ -11,7 +11,7 @@
 #include "mars.h"
 #define HYPERCUBE
 
-#if defined(ECMWF) && !defined(NOFDB)
+#if !defined(NOFDB)
 
 #define PARAM_U  131
 #define PARAM_V  132
@@ -130,7 +130,7 @@ static err timed_readfdb(int *ref, void *buffer, int *length, timer *t)
 	return e;
 }
 
-/* 
+/*
    n=100000 for step range or fcperiod
    n=1000 for quantile
 */
@@ -148,7 +148,7 @@ static long range2fdb(const char *r, long n)
 		{
 			++p;
 			sr.to   = atol(p);
-			break;	
+			break;
 		}
 		--p;
 	}
@@ -198,7 +198,7 @@ static err  nfdb_open(void *data,request *r,request *ev,int mode)
 	fdb->expect_any = (p && (atol(p) == 0));
 
 	if(fdb->expect)
-		if(count_values(r,"DATABASE") == 1)	
+		if(count_values(r,"DATABASE") == 1)
 			marslog(LOG_INFO,"Trying to retrieve %d fields from the fdb",
 				fdb->expect);
 
@@ -512,7 +512,7 @@ static err setallvalues(fdbdata *fdb,request *s)
 	{
 		if(get_value(r,p->name,0) == 0)
 			valcpy(r,s,p->name,p->name);
-			
+
 		p = p->next;
 	}
 
@@ -591,7 +591,7 @@ static err setallvalues(fdbdata *fdb,request *s)
 				if(isrange(q))
 				{
 					char buf[12];
-					/* Once FP in FDB is like EFI (ranges), we can remove 
+					/* Once FP in FDB is like EFI (ranges), we can remove
 					   next test and only set ranges as p1*100000+p2 */
 					if(!fp)
 					{
@@ -663,7 +663,7 @@ static err setallvalues(fdbdata *fdb,request *s)
 					int n = 4-strlen(q);
 					strcpy(buf,q);
 					while(n-->0) strcat(buf,"0");
-				}	
+				}
 				setvalsfdb(&fdb->ref,"levelist",buf);
 			}
 		}
@@ -801,40 +801,40 @@ void request_to_fdb(int ref,request *r,int y2k)
 
 	while(p)
 	{
-		if((p->name[0] == '_') || 
+		if((p->name[0] == '_') ||
 			(strcmp(p->name,"REPRES") == 0))
 		{
 			/* Skip */
 		}
 		else if(strcmp(p->name,"STREAM") == 0)
 		{
-		 	if(strcmp(p->values->name,"DA") == 0) 
+		 	if(strcmp(p->values->name,"DA") == 0)
 				SETVALFDB(&ref,"stream","oper");
 			else
-		 	if(strcmp(p->values->name,"SD") == 0) 
+		 	if(strcmp(p->values->name,"SD") == 0)
 				SETVALFDB(&ref,"stream","supd");
 			else
-		 	if(strcmp(p->values->name,"WAVE") == 0) 
+		 	if(strcmp(p->values->name,"WAVE") == 0)
 			{
 				if(strcmp(get_value(r,"TYPE",0),"FG") == 0)
 					wave_fg = true;
 				SETVALFDB(&ref,"stream","wave");
 			}
 			else
-		 	if(strcmp(p->values->name,"SCWV") == 0) 
+		 	if(strcmp(p->values->name,"SCWV") == 0)
 			{
 				if(strcmp(get_value(r,"TYPE",0),"FG") == 0)
 					wave_fg = true;
 				SETVALFDB(&ref,"stream","scwv");
 			}
 			else
-		 	if(strcmp(p->values->name,"EF") == 0) 
+		 	if(strcmp(p->values->name,"EF") == 0)
 				SETVALFDB(&ref,"stream","enfo");
 			else
-		 	if(strcmp(p->values->name,"SF") == 0) 
+		 	if(strcmp(p->values->name,"SF") == 0)
 				SETVALFDB(&ref,"stream","sens");
 			else
-		 	if(strcmp(p->values->name,"MO") == 0) 
+		 	if(strcmp(p->values->name,"MO") == 0)
 			{
 				SETVALFDB(&ref,"stream","mnth");
 			}
@@ -883,7 +883,7 @@ void request_to_fdb(int ref,request *r,int y2k)
 				strcpy(buf,p->values->name);
 				while(n-->0) strcat(buf,"0");
 
-			}	
+			}
 			SETVALFDB(&ref,"levelist",buf);
 		}
 		else
@@ -974,7 +974,7 @@ static err  _nfdb_read(void *data,request *r,void *buffer,long *length)
 	request *z = get_cubelet(fdb->h,fdb->index++);
 	fdb->w = z;
 #endif
-	
+
 	if(fdb->retrieve)
 	{
 		long64 total = 0;
@@ -1006,7 +1006,7 @@ static err  _nfdb_read(void *data,request *r,void *buffer,long *length)
 #if 0
 	if(!fdb->leg_done)
 	{
-		if(isfdb_attribute(&ref,"leg")) 
+		if(isfdb_attribute(&ref,"leg"))
 			SETVALFDB(&ref,"leg","off");
 		fdb->leg_done = true;
 	}
@@ -1041,7 +1041,7 @@ static err  _nfdb_read(void *data,request *r,void *buffer,long *length)
 		}
 	}
 
-	if((ret == -1  || ret == -2) && (fdb->expect != 0 || fdb->expect_any)) 
+	if((ret == -1  || ret == -2) && (fdb->expect != 0 || fdb->expect_any))
 	    return -42;
 
 	if(ret == 0 && r && !observation(r) && !track(r))
diff --git a/src/libMarsClient/request.c b/src/libMarsClient/request.c
index c3531be..94ffe0a 100644
--- a/src/libMarsClient/request.c
+++ b/src/libMarsClient/request.c
@@ -2279,6 +2279,31 @@ void reqcpy(request *a,const request *b)
 	}
 }
 
+void reqcpy_no_underscores(request *a,const request *b)
+{
+	if(a && b)
+	{
+		parameter *p = b->params;
+
+		while(p)
+		{
+			if(*p->name != '_') {
+				boolean b = false;
+				value *v = p->values;
+
+				while(v)
+				{
+					put_value(a,p->name,v->name,b,false,false);
+					b = true;
+					v = v->next;
+				}
+			}
+
+			p = p->next;
+		}
+	}
+}
+
 static void _reqmerge(parameter *pa,const parameter *pb,request *a)
 {
 	const value *vb = pb->values;
diff --git a/src/libMarsClient/rpcmars.x b/src/libMarsClient/rpcmars.x
index 1b94271..0b4865b 100644
--- a/src/libMarsClient/rpcmars.x
+++ b/src/libMarsClient/rpcmars.x
@@ -2,7 +2,7 @@
 %#include <rpc/xdr.h>
 #ifdef RPC_HDR
 %typedef char *cache_t;
-%typedef void *void_t;
+%typedef void *voidp_t;
 #endif
 
 struct value {
@@ -31,7 +31,7 @@ struct request {
 	cache_t         kind;
 
 #ifdef RPC_HDR
-	void_t           data; /* user data */
+	voidp_t          data; /* user data */
 	long             order;
 #endif
 
diff --git a/src/libMetview/MvGrid.cc b/src/libMetview/MvGrid.cc
index 2a4eedc..9aaf59d 100644
--- a/src/libMetview/MvGrid.cc
+++ b/src/libMetview/MvGrid.cc
@@ -1480,6 +1480,9 @@ MvLambertGrid::MvLambertGrid( field* myfield
        return;
    }
 
+   long jPositive = getLong("jScansPositively");      //-- points scan in +j dir
+   jPositive_ = (jPositive == 1);
+
    earthRadius_ = cEarthRadius;
 
    gridTanLat_ = getDouble("Latin1InDegrees") * 1000; // sec2_[cInterSecLat1];
@@ -1510,7 +1513,7 @@ MvLambertGrid::MvLambertGrid( field* myfield
    }
 
    earthRadiusPerDx_ = earthRadius_ / dx_;
-   cout << "R, dx, R/dx:\t" << earthRadius_ << "\t" << dx_ << "\t" << earthRadiusPerDx_ << endl;
+   //cout << "R, dx, R/dx:\t" << earthRadius_ << "\t" << dx_ << "\t" << earthRadiusPerDx_ << endl;
 
    hemiSphere_ = gridTanLat_ > 0 ? 1 : 0;
    gridTanLat_ = (gridTanLat_ / cGridScaling) * cToRadians;  //--aki cGridScaling--//
@@ -1613,7 +1616,7 @@ MvLambertGrid::computeLatLon( int ip, int jp )
 //--   PRGMMR: STACKPOLE        ORG: NMC42       DATE:88-11-28
 
     double XX = (double)ip - poleI_;
-    double YY = poleJ_ - (double)jp;
+    double YY = (jPositive_) ? poleJ_ - (double)jp : poleJ_ - (double)(1+horisLines_-jp);
     double R2 = XX*XX + YY*YY;
 //
 //        CHECK THAT THE REQUESTED I,J IS NOT IN THE FORBIDDEN ZONE
diff --git a/src/libMetview/MvGrid.h b/src/libMetview/MvGrid.h
index 9f1c8b5..bd7c4cd 100644
--- a/src/libMetview/MvGrid.h
+++ b/src/libMetview/MvGrid.h
@@ -437,6 +437,7 @@ class MvLambertGrid : public MvGridBase
 	double       theThing_;
 	int          currentI_;
 	int          currentJ_;
+	bool         jPositive_;
 };
 
 
diff --git a/src/libMetview/MvRequest.cc b/src/libMetview/MvRequest.cc
index a4bd26e..891d661 100644
--- a/src/libMetview/MvRequest.cc
+++ b/src/libMetview/MvRequest.cc
@@ -940,8 +940,8 @@ bool MvRequest::getPath(const char* par,string &resPath,bool canBeEmpty,string &
 			if(callerIcon)
 			{
 	  			string callerDir(callerIcon);	  	
-		        	char *mvudir=getenv("METVIEW_USER_DIRECTORY");
-		        	if(mvudir)  
+                char *mvudir=getenv("METVIEW_USER_DIRECTORY");
+                if(mvudir)
 				{
 	  				callerDir=string(mvudir) + "/" + callerDir;
 				}	
diff --git a/src/libUtil/MvFlextra.cc b/src/libUtil/MvFlextra.cc
index 34dc5e6..1795da3 100644
--- a/src/libUtil/MvFlextra.cc
+++ b/src/libUtil/MvFlextra.cc
@@ -682,7 +682,7 @@ void MvFlextra::decode()
 		string comment=blocks_[i]->comment();	
 		bool cstep=blocks_[i]->constantStep();
 		
-		pair<string,bool> p=make_pair<string,bool>(comment,cstep);
+		pair<string,bool> p=make_pair(comment,cstep);
 		
 		bool newRef=true;
 		for(unsigned int j=0; j < ref.size(); j++)
diff --git a/src/uPlot/MagPlusBatchService.cc b/src/uPlot/MagPlusBatchService.cc
index f5b88ae..a479422 100644
--- a/src/uPlot/MagPlusBatchService.cc
+++ b/src/uPlot/MagPlusBatchService.cc
@@ -8,6 +8,7 @@
  ***************************** LICENSE END *************************************/
 
 #include "MagPlusBatchService.h"
+#include "PlotMod.h"
 
 void
 MagPlusBatchService::CallMagPlus ( MvRequest& in )
@@ -17,7 +18,16 @@ MagPlusBatchService::CallMagPlus ( MvRequest& in )
 
     MvMagRequest request(in);
 
-	magplus_->execute(request);
+    try
+    {
+	    magplus_->execute(request);
+    }
+    catch (exception e)
+    {
+        std::string errorMsg("Could not produce plot: ");
+        errorMsg += e.what();
+        PlotMod::Instance().MetviewError ("errorMsg","Error");
+    }
 	//thread_.render(in,magplus_);
 
 	// the Magics log messages are not broadcast until the next log event - therefore, the
diff --git a/src/uPlot/MvMain.cc b/src/uPlot/MvMain.cc
index e516135..15ff397 100644
--- a/src/uPlot/MvMain.cc
+++ b/src/uPlot/MvMain.cc
@@ -134,7 +134,11 @@ string GetProcessName (string& mode)
    if ( mode == PLOT_STAND_ALONE )
       name = "uPlot";
    else
-      name = "uPlot%ld" + (long int)getpid();
+   {
+      char cname[64];
+      sprintf(cname,"uPlot%ld",(long int)getpid());
+      name = string(cname);
+   }
 
    return name;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/metview.git



More information about the debian-science-commits mailing list