[metview] 02/15: Metview-4.6.5-Source
Alastair McKinstry
mckinstry at moszumanska.debian.org
Mon Jun 20 07:51:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to tag debian/4.6.5-3
in repository metview.
commit 217eef2e7764f50ee13ec5bed600d95fc1ca3a69
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Thu Mar 17 10:05:41 2016 +0000
Metview-4.6.5-Source
---
CMakeLists.txt | 15 +-
INSTALL | 2 +-
VERSION.cmake | 2 +-
VERSION.cmake => VERSION.cmake.orig | 6 +-
bin/ecbuild | 32 +-
cmake/FindLibGFortran.cmake | 14 +-
cmake/FindNetCDF.cmake | 44 +-
cmake/FindPango.cmake | 14 +-
cmake/FindPangoCairo.cmake | 12 +-
cmake/FindProj4.cmake | 10 +-
cmake/FindREADLINE.cmake | 4 +-
cmake/Findgrib_api.cmake | 42 +-
cmake/VERSION.cmake | 6 +-
cmake/compiler_flags/Clang_C.cmake | 13 +
cmake/compiler_flags/Clang_CXX.cmake | 13 +
cmake/compiler_flags/Cray_C.cmake | 14 +
cmake/compiler_flags/Cray_CXX.cmake | 14 +
cmake/compiler_flags/Cray_Fortran.cmake | 15 +
cmake/compiler_flags/GNU_C.cmake | 18 +
cmake/compiler_flags/GNU_CXX.cmake | 18 +
cmake/compiler_flags/GNU_Fortran.cmake | 21 +
cmake/compiler_flags/Intel_C.cmake | 13 +
cmake/compiler_flags/Intel_CXX.cmake | 13 +
cmake/compiler_flags/Intel_Fortran.cmake | 14 +
cmake/compiler_flags/PGI_C.cmake | 11 +
cmake/compiler_flags/PGI_CXX.cmake | 11 +
cmake/compiler_flags/PGI_Fortran.cmake | 11 +
cmake/contrib/FindNetCDF4.cmake | 14 +-
cmake/contrib/GetGitRevisionDescription.cmake.in | 6 +-
cmake/ecbuild_add_c_flags.cmake | 58 +-
cmake/ecbuild_add_cxx_flags.cmake | 58 +-
cmake/ecbuild_add_executable.cmake | 162 +++-
cmake/ecbuild_add_extra_search_paths.cmake | 10 +-
cmake/ecbuild_add_fortran_flags.cmake | 60 +-
cmake/ecbuild_add_library.cmake | 143 +++-
cmake/ecbuild_add_option.cmake | 37 +-
cmake/ecbuild_add_persistent.cmake | 12 +-
cmake/ecbuild_add_test.cmake | 29 +-
cmake/ecbuild_bundle.cmake | 36 +-
cmake/ecbuild_check_compiler.cmake | 7 +-
cmake/ecbuild_check_cxx_source_return.cmake | 40 +-
cmake/ecbuild_check_functions.cmake | 14 +-
cmake/ecbuild_check_os.cmake | 43 +-
cmake/ecbuild_compiler_flags.cmake | 97 +++
cmake/ecbuild_debug_var.cmake | 47 --
cmake/ecbuild_declare_project.cmake | 22 +-
cmake/ecbuild_define_build_types.cmake | 78 --
cmake/ecbuild_define_libs_and_execs_target.cmake | 29 +
...get.cmake => ecbuild_define_links_target.cmake} | 8 +-
cmake/ecbuild_define_options.cmake | 10 +-
cmake/ecbuild_echo_targets.cmake | 6 +-
cmake/ecbuild_enable_fortran.cmake | 9 +-
cmake/ecbuild_features.cmake | 51 +-
cmake/ecbuild_find_lexyacc.cmake | 18 +-
cmake/ecbuild_find_omp.cmake | 7 +
cmake/ecbuild_find_package.cmake | 6 +-
cmake/ecbuild_find_python.cmake | 132 ++--
cmake/ecbuild_generate_fortran_interfaces.cmake | 115 +++
cmake/ecbuild_generate_yy.cmake | 28 +-
cmake/ecbuild_get_resources.cmake | 14 +-
cmake/ecbuild_get_test_data.cmake | 24 +-
cmake/ecbuild_git.cmake | 8 +-
cmake/ecbuild_install_project.cmake | 79 +-
cmake/ecbuild_list_add_pattern.cmake | 102 +++
cmake/ecbuild_list_exclude_pattern.cmake | 88 +++
cmake/ecbuild_list_extra_search_paths.cmake | 10 +-
cmake/ecbuild_list_macros.cmake | 38 +-
cmake/ecbuild_log.cmake | 90 ++-
cmake/ecbuild_policies.cmake | 8 +-
cmake/ecbuild_print_summary.cmake | 6 +-
cmake/ecbuild_project_files.cmake | 8 +-
cmake/ecbuild_remove_fortran_flags.cmake | 61 ++
cmake/ecbuild_separate_sources.cmake | 8 +-
cmake/ecbuild_setup_test_framework.cmake | 6 +-
cmake/ecbuild_source_flags.cmake | 30 +
cmake/ecbuild_system.cmake | 62 +-
cmake/ecbuild_use_package.cmake | 23 +-
cmake/gen_source_flags.py | 84 ++
cmake/project-config.cmake.in | 49 +-
scripts/CMakeLists.txt | 38 +-
scripts/{CMakeLists.txt => CMakeLists.txt.orig} | 98 ++-
scripts/MarsOdbWrapper | 2 +-
scripts/MarsTiggeWrapper | 2 +-
scripts/ObstatToolWrapper | 2 +-
scripts/compile.in | 31 +-
scripts/compile.src | 2 +-
scripts/dump | 2 +-
scripts/find_from_libs | 2 +-
scripts/generate_video | 4 +-
scripts/logrun | 2 +-
scripts/metgram.py | 134 ++++
scripts/metview-mail | 2 +-
scripts/metview_base.in | 47 +-
scripts/metview_create_user_dir | 7 +-
scripts/metview_help | 4 +
scripts/mv_compress | 2 +-
scripts/mv_dots | 2 +-
scripts/mv_flexpart_run | 2 +-
scripts/mv_flextra_prep | 2 +-
scripts/mv_flextra_run | 4 +-
scripts/mv_grib_dump | 2 +-
scripts/mv_mail | 2 +-
scripts/mv_obstat | 2 +-
scripts/mv_odbsql | 2 +-
scripts/mv_rttov_run | 2 +-
scripts/mv_scm_run | 2 +-
scripts/mv_uniquename | 4 +-
scripts/mv_vapor_gui | 2 +-
scripts/mvrun | 2 +-
scripts/mvrun_c | 2 +-
scripts/mvrun_lnx | 2 +-
scripts/mvusage | 2 +-
scripts/select_mars_config | 2 +-
scripts/set_mars_env | 2 +-
share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake | 56 +-
share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake | 50 +-
share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake | 44 +-
.../app-defaults/LayerKeyProfile_default.xml | 3 +-
share/metview/app-defaults/Sample_Drawers.tar.gz | Bin 2133 -> 5016 bytes
share/metview/app-defaults/User_Dir_Frame.tar.gz | Bin 403101 -> 448836 bytes
share/metview/etc/MagicsColors.h | 1 +
share/metview/etc/MarsRules | 8 +-
share/metview/etc/ObsFilterDef | 7 +-
share/metview/etc/PageFrameDef | 2 +-
share/metview/etc/ecmwf.def | 12 +-
share/metview/etc/mars.chk | 8 +-
share/metview/etc/tigge.def | 2 +
share/metview/icons/fix_last_line | 2 +-
src/AppMod/checkdisplay.cc | 4 +-
src/Hovmoeller/HovArea.cc | 21 +-
src/Hovmoeller/HovHeight.cc | 16 +
src/Hovmoeller/HovLine.cc | 17 +
src/Hovmoeller/HovToolkit.cc | 100 +--
src/Hovmoeller/HovToolkit.h | 3 +
src/Macro/extern.cc | 7 +-
src/MacroEditor/ShellHelper.cc | 2 +-
src/Meteogram/CMakeLists.txt | 10 -
src/Meteogram/MetPlus.cc | 42 +-
src/Meteogram/MetPlusDef | 12 +-
src/Meteogram/ObjectSpec.Meteogram | 2 +-
src/Stations/CMakeLists.txt | 3 +-
src/Stations/stat.fmt | 877 +++++++++++----------
src/Thermo/BufrThermo.cc | 107 ++-
src/Thermo/GribThermo.cc | 58 +-
src/Thermo/Thermo.cc | 26 +
src/Thermo/Thermo.h | 4 +
src/Thermo/ThermoDataDef | 1 +
src/XSection/Average.cc | 38 +-
src/XSection/CrossS.cc | 27 +-
src/XSection/MVProfileDef | 8 +-
src/XSection/MVProfileRules | 6 +-
src/XSection/MVProfileViewDef | 8 +-
src/XSection/MVProfileViewRules | 4 +-
src/XSection/MXAverageViewDef | 4 +-
src/XSection/VertProfDef | 8 +-
src/XSection/VertProfRules | 4 +-
src/XSection/VertProfViewDef | 8 +-
src/XSection/VertProfViewRules | 4 +-
src/XSection/Vprofile.cc | 41 +-
src/XSection/Xsect.cc | 24 +-
src/XSection/Xsect.h | 4 +
src/libFTimeUtil/CMakeLists.txt | 1 +
src/libMetview/CMakeLists.txt | 1 +
src/libMetview/MvRequest.cc | 128 ++-
src/libMetview/MvRequest.h | 4 +-
src/libMvMotif/CMakeLists.txt | 1 +
src/libMvNetCDF/CMakeLists.txt | 1 +
src/libMvQtGui/CMakeLists.txt | 1 +
src/libMvQtUtil/CMakeLists.txt | 1 +
src/libUtil/CMakeLists.txt | 1 +
.../{CMakeLists.txt => CMakeLists.txt.orig} | 5 +
src/libUtil/MvMiscelaneous.cc | 8 +-
src/libUtil/MvPath.cc | 54 +-
src/libUtil/MvPath.hpp | 2 +-
src/uPlot/AverageView.cc | 27 +-
src/uPlot/AverageView.h | 3 +
src/uPlot/CommonXSectView.cc | 62 +-
src/uPlot/CommonXSectView.h | 5 +-
src/uPlot/HovmoellerView.cc | 404 +++++-----
src/uPlot/HovmoellerView.h | 21 +-
src/uPlot/MacroConverter.cc | 92 ++-
src/uPlot/MapView.cc | 16 +-
src/uPlot/MatchingCriteria.cc | 34 +-
src/uPlot/MatchingCriteria.h | 10 +-
src/uPlot/MvGribDecoder.cc | 56 +-
src/uPlot/MvMain.cc | 230 ++++--
src/uPlot/MvQLayerContentsIcon.cc | 2 +-
src/uPlot/ObjectInfo.cc | 122 ++-
src/uPlot/ObjectList.cc | 50 +-
src/uPlot/ObjectList.h | 2 +-
src/uPlot/Presentable.cc | 45 +-
src/uPlot/ThermoView.cc | 59 +-
src/uPlot/VertProfView.cc | 70 +-
src/uPlot/VertProfView.h | 3 +
src/uPlot/XSectView.cc | 21 +-
src/uPlot/XSectView.h | 4 +
196 files changed, 4052 insertions(+), 2202 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 006d9b8..4fb076f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -312,8 +312,12 @@ if(ENABLE_PLOTTING)
set(MAGICS_LIB_DIR "${magics_BASE_DIR}/lib")
- if(NOT MAGICS_HAVE_METVIEW)
- message(FATAL_ERROR "Magics must be built with Metview support!")
+ if(ENABLE_UI AND (NOT MAGICS_HAVE_METVIEW))
+ message(FATAL_ERROR "Magics must be built with Metview and Qt support!")
+ endif()
+
+ if((NOT ENABLE_UI) AND (NOT MAGICS_HAVE_METVIEW_NO_QT))
+ message(FATAL_ERROR "No UI: Magics must be built with Metview but no Qt support!")
endif()
if(NOT MAGICS_HAVE_NETCDF)
@@ -457,8 +461,11 @@ endif()
find_library(GDBM_LIB gdbm )
-if(GDBM_LIB)
- message(STATUS "gdbm found: ${GDBM_LIB}")
+find_path( GDBM_INCLUDE gdbm.h )
+if(GDBM_LIB AND GDBM_INCLUDE)
+ message(STATUS "gdbm found")
+ message(STATUS " library: ${GDBM_LIB}")
+ message(STATUS " include: ${GDBM_INCLUDE}")
else()
message(FATAL_ERROR "library gdbm not found")
endif()
diff --git a/INSTALL b/INSTALL
index ab6b82e..5b193bd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Metview - ECMWF meteorological workstation software
Installation and usage instructions can be found at:
-https://software.ecmwf.int/metview/Installation
+https://software.ecmwf.int/metview/Installation+Guide
=============
QUICK INSTALL
diff --git a/VERSION.cmake b/VERSION.cmake
index 05233b2..892031e 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 "1")
+set(${PROJECT_NAME}_REVISION_VERSION_STR "5")
set(${PROJECT_NAME}_VERSION_STR "${${PROJECT_NAME}_MAJOR_VERSION_STR}.${${PROJECT_NAME}_MINOR_VERSION_STR}.${${PROJECT_NAME}_REVISION_VERSION_STR}")
diff --git a/VERSION.cmake b/VERSION.cmake.orig
similarity index 64%
copy from VERSION.cmake
copy to VERSION.cmake.orig
index 05233b2..26d3b78 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake.orig
@@ -1,5 +1,9 @@
set(${PROJECT_NAME}_MAJOR_VERSION_STR "4")
set(${PROJECT_NAME}_MINOR_VERSION_STR "6")
-set(${PROJECT_NAME}_REVISION_VERSION_STR "1")
+<<<<<<< HEAD
+set(${PROJECT_NAME}_REVISION_VERSION_STR "4")
+=======
+set(${PROJECT_NAME}_REVISION_VERSION_STR "5")
+>>>>>>> release/4.6.5
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 b327cde..d1ffff4 100755
--- a/bin/ecbuild
+++ b/bin/ecbuild
@@ -3,7 +3,7 @@
set -eua
CMAKE_MIN_REQUIRED=2.8.10
-CMAKE_BUILD_VERSION=3.2.3
+CMAKE_BUILD_VERSION=3.4.1
usage()
{
@@ -70,13 +70,13 @@ Available values for "option":
Build static libraries.
Equivalent to "-DBUILD_SHARED_LIBS=OFF"
- --dynamic
+ --dynamic, --shared
Build dynamic libraries (usually the default).
Equivalent to "-DBUILD_SHARED_LIBS=ON"
- --shared (same option as --dynamic)
- Build dynamic libraries (usually the default).
- Equivalent to "-DBUILD_SHARED_LIBS=ON"
+ --config=<config>
+ Configuration file using CMake syntax that gets included
+ Equivalent to cmake argument "-DECBUILD_CONFIG=<config-file>"
--toolchain=<toolchain>
Use a platform specific toolchain, containing settings such
@@ -188,7 +188,7 @@ version()
log()
{
- log_level=$(sed 's/.*/\U&/' <<< "$1")
+ log_level=$(tr "[a-z]" "[A-Z]" <<< "$1")
ADD_ECBUILD_OPTIONS="$ADD_ECBUILD_OPTIONS -DECBUILD_LOG_LEVEL=${log_level}"
}
@@ -213,6 +213,20 @@ prefix()
ADD_ECBUILD_OPTIONS="$ADD_ECBUILD_OPTIONS -DCMAKE_INSTALL_PREFIX=${1/#\~\//$HOME/}"
}
+config()
+{
+ arg=${1/#\~\//$HOME/}
+ if [ -f $arg ]; then
+ config_file=$arg
+ config_file="$( cd $( dirname "${config_file}" ) && pwd -P )/$( basename ${config_file} )"
+ else
+ echo "Error:"
+ echo " Config file [$arg] is not found or is not a file."
+ exit 1
+ fi
+ ADD_ECBUILD_OPTIONS="$ADD_ECBUILD_OPTIONS -DECBUILD_CONFIG=${config_file}"
+}
+
toolchain()
{
arg=${1/#\~\//$HOME/}
@@ -237,7 +251,8 @@ cache()
{
arg=$1
if [ -f $arg ]; then
- cache_file=$( cd "$arg" && pwd -P )
+ cache_file=$arg
+ cache_file="$( cd $( dirname "${cache_file}" ) && pwd -P )/$( basename ${cache_file} )"
else
echo "Error:"
echo " Cache file [$arg] is not found or is not a file."
@@ -313,6 +328,9 @@ while test $# -gt 0; do
--toolchain)
toolchain $val
;;
+ --config)
+ config $val
+ ;;
--cache)
cache $val
;;
diff --git a/cmake/FindLibGFortran.cmake b/cmake/FindLibGFortran.cmake
index 200ffcb..95b6036 100644
--- a/cmake/FindLibGFortran.cmake
+++ b/cmake/FindLibGFortran.cmake
@@ -1,8 +1,8 @@
# © Copyright 1996-2015 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.
@@ -23,16 +23,16 @@ if( GFORTRAN_EXECUTABLE )
ERROR_VARIABLE _GFORTRAN_ERROR_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE)
-# debug_var(_GFORTRAN_SEARCH_SUCCESS)
-# debug_var(_GFORTRAN_VALUES_OUTPUT)
-# debug_var(_GFORTRAN_ERROR_VALUE)
+# ecbuild_debug_var(_GFORTRAN_SEARCH_SUCCESS)
+# ecbuild_debug_var(_GFORTRAN_VALUES_OUTPUT)
+# ecbuild_debug_var(_GFORTRAN_ERROR_VALUE)
if(_GFORTRAN_SEARCH_SUCCESS MATCHES 0)
string(REGEX REPLACE ".*libraries: =(.*)" "\\1" _result ${_GFORTRAN_VALUES_OUTPUT})
string(REGEX REPLACE ":" ";" _gfortran_hints ${_result} )
endif()
- debug_var( _gfortran_hints )
+ ecbuild_debug_var( _gfortran_hints )
endif()
diff --git a/cmake/FindNetCDF.cmake b/cmake/FindNetCDF.cmake
index 89af114..822ecf0 100644
--- a/cmake/FindNetCDF.cmake
+++ b/cmake/FindNetCDF.cmake
@@ -76,7 +76,7 @@ if( PREFER_NETCDF4 )
## hdf5
- # Note: Only the HDF5 C-library is required for NetCDF
+ # Note: Only the HDF5 C-library is required for NetCDF
# ( even for Fortan and CXX bindings)
find_package( HDF5 COMPONENTS C QUIET )
@@ -87,24 +87,24 @@ if( PREFER_NETCDF4 )
# Find NetCDF4
# message( "NETCDF CMAKE_PREFIX_PATH = [${CMAKE_PREFIX_PATH}]")
- # debug_var( NETCDF_ROOT )
- # debug_var( NETCDF_FIND_COMPONENTS )
- # debug_var( NETCDF_FIND_QUIETLY )
- # debug_var( NETCDF_FIND_REQUIRED )
+ # ecbuild_debug_var( NETCDF_ROOT )
+ # ecbuild_debug_var( NETCDF_FIND_COMPONENTS )
+ # ecbuild_debug_var( NETCDF_FIND_QUIETLY )
+ # ecbuild_debug_var( NETCDF_FIND_REQUIRED )
find_package( NetCDF4 COMPONENTS ${NETCDF_FIND_COMPONENTS} )
- # debug_var( NETCDF4_FOUND )
- # debug_var( NETCDF_FOUND )
- # debug_var( NETCDF_LIBRARIES )
- # debug_var( NETCDF_INCLUDE_DIRS )
+ # ecbuild_debug_var( NETCDF4_FOUND )
+ # ecbuild_debug_var( NETCDF_FOUND )
+ # ecbuild_debug_var( NETCDF_LIBRARIES )
+ # ecbuild_debug_var( NETCDF_INCLUDE_DIRS )
list( APPEND NETCDF_Fortran_LIBRARIES ${NETCDF_FORTRAN_LIBRARIES} ${NETCDF_F90_LIBRARIES} )
if( NETCDF_Fortran_LIBRARIES )
list( REMOVE_DUPLICATES NETCDF_Fortran_LIBRARIES )
endif()
- # debug_var( NETCDF_Fortran_LIBRARIES )
- # debug_var( NETCDF_C_LIBRARIES )
- # debug_var( NETCDF_CXX_LIBRARIES )
+ # ecbuild_debug_var( NETCDF_Fortran_LIBRARIES )
+ # ecbuild_debug_var( NETCDF_C_LIBRARIES )
+ # ecbuild_debug_var( NETCDF_CXX_LIBRARIES )
set_package_properties( NetCDF4 PROPERTIES TYPE RECOMMENDED PURPOSE "support for NetCDF4 file format" )
@@ -115,13 +115,13 @@ if( PREFER_NETCDF4 )
list( APPEND NETCDF_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} )
endif()
- #debug_var( NETCDF_FOUND )
- #debug_var( NETCDF_LIBRARIES )
- #debug_var( NETCDF_INCLUDE_DIRS )
- #debug_var( HDF5_FOUND )
- #debug_var( HDF5_INCLUDE_DIRS )
- #debug_var( HDF5_HL_LIBRARIES )
- #debug_var( HDF5_LIBRARIES )
+ #ecbuild_debug_var( NETCDF_FOUND )
+ #ecbuild_debug_var( NETCDF_LIBRARIES )
+ #ecbuild_debug_var( NETCDF_INCLUDE_DIRS )
+ #ecbuild_debug_var( HDF5_FOUND )
+ #ecbuild_debug_var( HDF5_INCLUDE_DIRS )
+ #ecbuild_debug_var( HDF5_HL_LIBRARIES )
+ #ecbuild_debug_var( HDF5_LIBRARIES )
endif()
@@ -131,9 +131,9 @@ if( PREFER_NETCDF3 )
ecbuild_debug( "FindNetCDF: looking for NetCDF3" )
- # debug_var( NetCDF_FIND_COMPONENTS )
- # debug_var( NetCDF_FIND_QUIETLY )
- # debug_var( NetCDF_FIND_REQUIRED )
+ # ecbuild_debug_var( NetCDF_FIND_COMPONENTS )
+ # ecbuild_debug_var( NetCDF_FIND_QUIETLY )
+ # ecbuild_debug_var( NetCDF_FIND_REQUIRED )
list(FIND NetCDF_FIND_COMPONENTS "CXX" _index)
if(${_index} GREATER -1)
diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake
index 811cdf9..9f183b9 100644
--- a/cmake/FindPango.cmake
+++ b/cmake/FindPango.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -17,10 +17,10 @@ find_package(PkgConfig)
pkg_check_modules(PC_LIBPANGO QUIET pango)
-debug_var( PC_LIBPANGO_FOUND )
-debug_var( PC_LIBPANGO_VERSION )
-debug_var( PC_LIBPANGO_LIBRARIES )
-debug_var( PC_LIBPANGO_INCLUDE_DIRS )
+ecbuild_debug_var( PC_LIBPANGO_FOUND )
+ecbuild_debug_var( PC_LIBPANGO_VERSION )
+ecbuild_debug_var( PC_LIBPANGO_LIBRARIES )
+ecbuild_debug_var( PC_LIBPANGO_INCLUDE_DIRS )
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( pango DEFAULT_MSG PC_LIBPANGO_LIBRARIES PC_LIBPANGO_INCLUDE_DIRS )
diff --git a/cmake/FindPangoCairo.cmake b/cmake/FindPangoCairo.cmake
index 7445754..7d7750e 100644
--- a/cmake/FindPangoCairo.cmake
+++ b/cmake/FindPangoCairo.cmake
@@ -18,12 +18,12 @@ find_package(PkgConfig)
pkg_check_modules(PC_LIBPANGOCAIRO QUIET pangocairo)
-#debug_var( PC_LIBPANGOCAIRO_FOUND )
-#debug_var( PC_LIBPANGOCAIRO_VERSION )
-#debug_var( PC_LIBPANGOCAIRO_LIBRARIES )
-#debug_var( PC_LIBPANGOCAIRO_LDFLAGS )
-#debug_var( PC_LIBPANGOCAIRO_LDFLAGS_OTHER )
-#debug_var( PC_LIBPANGOCAIRO_INCLUDE_DIRS )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_FOUND )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_VERSION )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_LIBRARIES )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_LDFLAGS )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_LDFLAGS_OTHER )
+#ecbuild_debug_var( PC_LIBPANGOCAIRO_INCLUDE_DIRS )
if(PC_LIBPANGOCAIRO_FOUND)
diff --git a/cmake/FindProj4.cmake b/cmake/FindProj4.cmake
index 6774b6e..64eab79 100644
--- a/cmake/FindProj4.cmake
+++ b/cmake/FindProj4.cmake
@@ -38,9 +38,9 @@ if( NOT PROJ4_PATH )
endif()
-# debug_var( PKG_CONFIG_FOUND )
-# debug_var( PKPROJ4_FOUND )
-# debug_var( PROJ4_MIN_VERSION )
+# ecbuild_debug_var( PKG_CONFIG_FOUND )
+# ecbuild_debug_var( PKPROJ4_FOUND )
+# ecbuild_debug_var( PROJ4_MIN_VERSION )
endif()
@@ -55,8 +55,8 @@ find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h PATHS PATH_SUFFIXES proj4 )
find_library( PROJ4_LIBRARY NAMES proj PATHS PATH_SUFFIXES proj4 )
-# debug_var( PROJ4_INCLUDE_DIR )
-# debug_var( PROJ4_LIBRARY )
+# ecbuild_debug_var( PROJ4_INCLUDE_DIR )
+# ecbuild_debug_var( PROJ4_LIBRARY )
# handle the QUIETLY and REQUIRED arguments and set GRIBAPI_FOUND
include(FindPackageHandleStandardArgs)
diff --git a/cmake/FindREADLINE.cmake b/cmake/FindREADLINE.cmake
index bbabe15..c6ae778 100644
--- a/cmake/FindREADLINE.cmake
+++ b/cmake/FindREADLINE.cmake
@@ -47,8 +47,8 @@ cmake_push_check_state()
cmake_pop_check_state()
-# debug_var( readline_version )
-# debug_var( __readline_version_out )
+# ecbuild_debug_var( readline_version )
+# ecbuild_debug_var( __readline_version_out )
set( __readline_fail 0 )
if( __readline_version_out )
diff --git a/cmake/Findgrib_api.cmake b/cmake/Findgrib_api.cmake
index 8b6cb43..3150039 100644
--- a/cmake/Findgrib_api.cmake
+++ b/cmake/Findgrib_api.cmake
@@ -20,16 +20,16 @@ option( GRIB_API_JPG "use jpg with grib_api" ON )
if( NOT grib_api_FOUND AND NOT NO_GRIB_API_BINARIES )
if( GRIB_API_JPG ) # jpeg support
-
+
find_package( JPEG QUIET ) # grib_api might be a static .a library in which
-
+
if( NOT "$ENV{JASPER_PATH}" STREQUAL "" )
list( APPEND CMAKE_PREFIX_PATH "$ENV{JASPER_PATH}" )
endif()
find_package( Jasper QUIET ) # case we don't know if which jpeg library was used
-
- find_package( OpenJPEG QUIET ) # so we try to find all jpeg libs and link to them
-
+
+ find_package( OpenJPEG QUIET ) # so we try to find all jpeg libs and link to them
+
if(JPEG_FOUND)
list( APPEND _grib_api_jpg_incs ${JPEG_INCLUDE_DIR} )
list( APPEND _grib_api_jpg_libs ${JPEG_LIBRARIES} )
@@ -44,18 +44,18 @@ if( NOT grib_api_FOUND AND NOT NO_GRIB_API_BINARIES )
endif()
endif()
-
+
if( GRIB_API_PNG ) # png support
-
+
find_package(PNG)
-
+
if( DEFINED PNG_PNG_INCLUDE_DIR AND NOT DEFINED PNG_INCLUDE_DIRS )
set( PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} CACHE INTERNAL "PNG include dirs" )
endif()
if( DEFINED PNG_LIBRARY AND NOT DEFINED PNG_LIBRARIES )
set( PNG_LIBRARIES ${PNG_LIBRARY} CACHE INTERNAL "PNG libraries" )
endif()
-
+
if(PNG_FOUND)
list( APPEND _grib_api_png_defs ${PNG_DEFINITIONS} )
list( APPEND _grib_api_png_incs ${PNG_INCLUDE_DIRS} )
@@ -85,22 +85,22 @@ if( NOT grib_api_FOUND AND NOT NO_GRIB_API_BINARIES )
find_library(GRIB_API_LIB_F77 NAMES grib_api_f77 PATHS ${GRIB_API_PATH} ${GRIB_API_PATH}/lib PATH_SUFFIXES grib_api NO_DEFAULT_PATH)
find_program(GRIB_API_INFO NAMES grib_info PATHS ${GRIB_API_PATH} ${GRIB_API_PATH}/bin PATH_SUFFIXES grib_api NO_DEFAULT_PATH)
endif()
-
+
find_path(GRIB_API_INCLUDE_DIR NAMES grib_api.h PATHS PATH_SUFFIXES grib_api )
find_library( GRIB_API_LIBRARY NAMES grib_api PATHS PATH_SUFFIXES grib_api )
find_library( GRIB_API_LIB_F90 NAMES grib_api_f90 PATHS PATH_SUFFIXES grib_api )
find_library( GRIB_API_LIB_F77 NAMES grib_api_f77 PATHS PATH_SUFFIXES grib_api )
find_program(GRIB_API_INFO NAMES grib_info PATHS PATH_SUFFIXES grib_api )
-
+
list( APPEND GRIB_API_LIBRARIES ${GRIB_API_LIBRARY} ${GRIB_API_LIB_F90} ${GRIB_API_LIB_F77} )
set( GRIB_API_INCLUDE_DIRS ${GRIB_API_INCLUDE_DIR} )
if( GRIB_API_INFO )
-
+
execute_process( COMMAND ${GRIB_API_INFO} -v OUTPUT_VARIABLE _grib_info_out ERROR_VARIABLE _grib_info_err OUTPUT_STRIP_TRAILING_WHITESPACE )
-
- # debug_var( _grib_info_out )
-
+
+ # ecbuild_debug_var( _grib_info_out )
+
string( REPLACE "." " " _version_list ${_grib_info_out} ) # dots to spaces
separate_arguments( _version_list )
@@ -108,22 +108,22 @@ if( NOT grib_api_FOUND AND NOT NO_GRIB_API_BINARIES )
list( GET _version_list 1 GRIB_API_MINOR_VERSION )
list( GET _version_list 2 GRIB_API_PATCH_VERSION )
- set( GRIB_API_VERSION "${GRIB_API_MAJOR_VERSION}.${GRIB_API_MINOR_VERSION}.${GRIB_API_PATCH_VERSION}" )
+ set( GRIB_API_VERSION "${GRIB_API_MAJOR_VERSION}.${GRIB_API_MINOR_VERSION}.${GRIB_API_PATCH_VERSION}" )
set( GRIB_API_VERSION_STR "${_grib_info_out}" )
- set( grib_api_VERSION "${GRIB_API_VERSION}" )
+ set( grib_api_VERSION "${GRIB_API_VERSION}" )
set( grib_api_VERSION_STR "${GRIB_API_VERSION_STR}" )
endif()
-
+
include(FindPackageHandleStandardArgs)
-
+
# handle the QUIETLY and REQUIRED arguments and set GRIB_API_FOUND to TRUE
find_package_handle_standard_args( grib_api DEFAULT_MSG
GRIB_API_LIBRARY GRIB_API_INCLUDE_DIR GRIB_API_INFO )
-
+
mark_as_advanced( GRIB_API_INCLUDE_DIR GRIB_API_LIBRARY GRIB_API_INFO )
-
+
list( APPEND GRIB_API_DEFINITIONS ${_grib_api_jpg_defs} ${_grib_api_png_defs} )
list( APPEND GRIB_API_INCLUDE_DIRS ${_grib_api_jpg_incs} ${_grib_api_png_incs} )
list( APPEND GRIB_API_LIBRARIES ${_grib_api_jpg_libs} ${_grib_api_png_libs} )
diff --git a/cmake/VERSION.cmake b/cmake/VERSION.cmake
index a07bd4a..e7ac9ad 100644
--- a/cmake/VERSION.cmake
+++ b/cmake/VERSION.cmake
@@ -1,7 +1,7 @@
-set( ECBUILD_MAJOR_VERSION "1" )
-set( ECBUILD_MINOR_VERSION "9" )
+set( ECBUILD_MAJOR_VERSION "2" )
+set( ECBUILD_MINOR_VERSION "0" )
set( ECBUILD_PATCH_VERSION "0" )
-set( ECBUILD_VERSION_STR "1.9.0" )
+set( ECBUILD_VERSION_STR "2.0.0" )
set( ECBUILD_MACRO_VERSION "${ECBUILD_MAJOR_VERSION}.${ECBUILD_MINOR_VERSION}" )
diff --git a/cmake/compiler_flags/Clang_C.cmake b/cmake/compiler_flags/Clang_C.cmake
new file mode 100644
index 0000000..bc73c69
--- /dev/null
+++ b/cmake/compiler_flags/Clang_C.cmake
@@ -0,0 +1,13 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C compiler flags for Release builds" FORCE )
+set( CMAKE_C_FLAGS_BIT "-O2 -DNDEBUG" CACHE STRING "C compiler flags for Bit-reproducible builds" FORCE )
+set( CMAKE_C_FLAGS_DEBUG "-O0 -g -ftrapv" CACHE STRING "C compiler flags for Debug builds" FORCE )
+set( CMAKE_C_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "C compiler flags for Production builds." FORCE )
+set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "C compiler flags for RelWithDebInfo builds." FORCE )
diff --git a/cmake/compiler_flags/Clang_CXX.cmake b/cmake/compiler_flags/Clang_CXX.cmake
new file mode 100644
index 0000000..53f0f21
--- /dev/null
+++ b/cmake/compiler_flags/Clang_CXX.cmake
@@ -0,0 +1,13 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C++ compiler flags for Release builds" FORCE )
+set( CMAKE_CXX_FLAGS_BIT "-O2 -DNDEBUG" CACHE STRING "C++ compiler flags for Bit-reproducible builds" FORCE )
+set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ftrapv" CACHE STRING "C++ compiler flags for Debug builds" FORCE )
+set( CMAKE_CXX_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "C++ compiler flags for Production builds." FORCE )
+set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "C++ compiler flags for RelWithDebInfo builds." FORCE )
diff --git a/cmake/compiler_flags/Cray_C.cmake b/cmake/compiler_flags/Cray_C.cmake
new file mode 100644
index 0000000..76779f9
--- /dev/null
+++ b/cmake/compiler_flags/Cray_C.cmake
@@ -0,0 +1,14 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_C_FLAGS_ALL "-hlist=amid" CACHE STRING "Common flags for all build-types" FORCE )
+set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_ALL} -O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" CACHE STRING "Release C flags" FORCE )
+set( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_ALL} -O2 -hfp1 -Gfast -DNDEBUG" CACHE STRING "Release-with-debug-info C flags" FORCE )
+set( CMAKE_C_FLAGS_PRODUCTION "${CMAKE_C_FLAGS_ALL} -O2 -hfp1 -G2" CACHE STRING "Production C flags" FORCE )
+set( CMAKE_C_FLAGS_BIT "${CMAKE_C_FLAGS_ALL} -O2 -hfp1 -G2 -hflex_mp=conservative -hadd_paren -DNDEBUG" CACHE STRING "Bit-reproducible C flags" FORCE )
+set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_ALL} -O0 -G0" CACHE STRING "Debug Cflags" FORCE )
diff --git a/cmake/compiler_flags/Cray_CXX.cmake b/cmake/compiler_flags/Cray_CXX.cmake
new file mode 100644
index 0000000..d599bff
--- /dev/null
+++ b/cmake/compiler_flags/Cray_CXX.cmake
@@ -0,0 +1,14 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_CXX_FLAGS_ALL "-hlist=amid" CACHE STRING "Common flags for all build-types" FORCE )
+set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_ALL} -O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" CACHE STRING "Release C++ flags" FORCE )
+set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_ALL} -O2 -hfp1 -Gfast -DNDEBUG" CACHE STRING "Release-with-debug-info C++ flags" FORCE )
+set( CMAKE_CXX_FLAGS_PRODUCTION "${CMAKE_CXX_FLAGS_ALL} -O2 -hfp1 -G2" CACHE STRING "Production C++ flags" FORCE )
+set( CMAKE_CXX_FLAGS_BIT "${CMAKE_CXX_FLAGS_ALL} -O2 -hfp1 -G2 -hflex_mp=conservative -hadd_paren -DNDEBUG" CACHE STRING "Bit-reproducible C++ flags" FORCE )
+set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_ALL} -O0 -G0" CACHE STRING "Debug CXX flags" FORCE )
diff --git a/cmake/compiler_flags/Cray_Fortran.cmake b/cmake/compiler_flags/Cray_Fortran.cmake
new file mode 100644
index 0000000..b2c23de
--- /dev/null
+++ b/cmake/compiler_flags/Cray_Fortran.cmake
@@ -0,0 +1,15 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+# -emf activates .mods and uses lower case
+set( CMAKE_Fortran_FLAGS_ALL "-emf" CACHE STRING "Common flags for all build-types" FORCE )
+set( CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_ALL} -O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" CACHE STRING "Release Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_ALL} -O2 -hfp1 -Gfast -DNDEBUG" CACHE STRING "Release-with-debug-info Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_PRODUCTION "${CMAKE_Fortran_FLAGS_ALL} -O2 -hfp1 -G2" CACHE STRING "Production Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_BIT "${CMAKE_Fortran_FLAGS_ALL} -O2 -hfp1 -G2 -hflex_mp=conservative -hadd_paren -DNDEBUG" CACHE STRING "Bit-reproducible Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_ALL} -O0 -G0" CACHE STRING "Debug Fortran flags" FORCE )
diff --git a/cmake/compiler_flags/GNU_C.cmake b/cmake/compiler_flags/GNU_C.cmake
new file mode 100644
index 0000000..955f527
--- /dev/null
+++ b/cmake/compiler_flags/GNU_C.cmake
@@ -0,0 +1,18 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C compiler flags for Release builds" FORCE )
+set( CMAKE_C_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG" CACHE STRING "C compiler flags for Bit-reproducible builds" FORCE )
+set( CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE STRING "C compiler flags for Debug builds" FORCE )
+set( CMAKE_C_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "C compiler flags for Production builds." FORCE )
+set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "C compiler flags for RelWithDebInfo builds." FORCE )
+
+# NOTE: gcc does not guarrante that -O3 performs better than -O2
+# -- it can perform worse due to assembly code bloating.
+# Moreover for gcc 4.1.2 we found that -O3 remove the parser code generated from Lex/Yacc
+# and therefore in production mode we downgrade to -O2 if the compiler is GCC (for all versions).
diff --git a/cmake/compiler_flags/GNU_CXX.cmake b/cmake/compiler_flags/GNU_CXX.cmake
new file mode 100644
index 0000000..0ab8c3a
--- /dev/null
+++ b/cmake/compiler_flags/GNU_CXX.cmake
@@ -0,0 +1,18 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C++ compiler flags for Release builds" FORCE )
+set( CMAKE_CXX_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG" CACHE STRING "C++ compiler flags for Bit-reproducible builds" FORCE )
+set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "C++ compiler flags for Debug builds" FORCE )
+set( CMAKE_CXX_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "C++ compiler flags for Production builds." FORCE )
+set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "C++ compiler flags for RelWithDebInfo builds." FORCE )
+
+# NOTE: gcc does not guarrante that -O3 performs better than -O2
+# -- it can perform worse due to assembly code bloating.
+# Moreover for gcc 4.1.2 we found that -O3 remove the parser code generated from Lex/Yacc
+# and therefore in production mode we downgrade to -O2 if the compiler is GCC (for all versions).
diff --git a/cmake/compiler_flags/GNU_Fortran.cmake b/cmake/compiler_flags/GNU_Fortran.cmake
new file mode 100644
index 0000000..a12abec
--- /dev/null
+++ b/cmake/compiler_flags/GNU_Fortran.cmake
@@ -0,0 +1,21 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -funroll-all-loops -finline-functions" CACHE STRING "Fortran compiler flags for Release builds" FORCE )
+set( CMAKE_Fortran_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG -fno-range-check -fconvert=big-endian" CACHE STRING "Fortran compiler flags for Bit-reproducible builds" FORCE )
+set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fcheck=bounds -fbacktrace -finit-real=snan" CACHE STRING "Fortran compiler flags for Debug builds" FORCE )
+set( CMAKE_Fortran_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "Fortran compiler flags for Production builds." FORCE )
+set( CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Fortran compiler flags for RelWithDebInfo builds." FORCE )
+
+####################################################################
+
+# Meaning of flags
+# ----------------
+# -fstack-arrays : Allocate automatic arrays on the stack (needs large stacksize!!!)
+# -funroll-all-loops : Unroll all loops
+# -fcheck=bounds : Bounds checking
diff --git a/cmake/compiler_flags/Intel_C.cmake b/cmake/compiler_flags/Intel_C.cmake
new file mode 100644
index 0000000..dbea59f
--- /dev/null
+++ b/cmake/compiler_flags/Intel_C.cmake
@@ -0,0 +1,13 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Release C compiler flags" FORCE )
+set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Release-with-debug-info C compiler flags" FORCE )
+set( CMAKE_C_FLAGS_BIT "-O2 -DNDEBUG" CACHE STRING "Bit-reproducible C compiler flags" FORCE )
+set( CMAKE_C_FLAGS_DEBUG "-O0 -g -traceback" CACHE STRING "Debug C compiler flags" FORCE )
+set( CMAKE_C_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "Production C compiler flags" FORCE )
diff --git a/cmake/compiler_flags/Intel_CXX.cmake b/cmake/compiler_flags/Intel_CXX.cmake
new file mode 100644
index 0000000..5b8dc78
--- /dev/null
+++ b/cmake/compiler_flags/Intel_CXX.cmake
@@ -0,0 +1,13 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Release C++ compiler flags" FORCE )
+set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Release-with-debug-info C++ compiler flags" FORCE )
+set( CMAKE_CXX_FLAGS_BIT "-O2 -DNDEBUG" CACHE STRING "Bit-reproducible C++ compiler flags" FORCE )
+set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -traceback" CACHE STRING "Debug C++ compiler flags" FORCE )
+set( CMAKE_CXX_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "Production C++ compiler flags" FORCE )
diff --git a/cmake/compiler_flags/Intel_Fortran.cmake b/cmake/compiler_flags/Intel_Fortran.cmake
new file mode 100644
index 0000000..86b69dc
--- /dev/null
+++ b/cmake/compiler_flags/Intel_Fortran.cmake
@@ -0,0 +1,14 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -unroll -inline -heap-arrays" CACHE STRING "Release Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Release-with-debug-info Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_BIT "-O2 -unroll -inline -heap-arrays" CACHE STRING "Bit-reproducible Fortran flags" FORCE )
+# -check all implies -check bounds
+set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -traceback -heap-arrays -check all" CACHE STRING "Debug Fortran flags" FORCE )
+set( CMAKE_Fortran_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "Production Fortran compiler flags" FORCE )
diff --git a/cmake/compiler_flags/PGI_C.cmake b/cmake/compiler_flags/PGI_C.cmake
new file mode 100644
index 0000000..8cbf6e1
--- /dev/null
+++ b/cmake/compiler_flags/PGI_C.cmake
@@ -0,0 +1,11 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+set( CMAKE_C_FLAGS_RELEASE "-fast -O3 -DNDEBUG" CACHE STRING "Release C compiler flags" FORCE )
+
+set( CMAKE_C_LINK_FLAGS "" CACHE STRING "" )
diff --git a/cmake/compiler_flags/PGI_CXX.cmake b/cmake/compiler_flags/PGI_CXX.cmake
new file mode 100644
index 0000000..f97098e
--- /dev/null
+++ b/cmake/compiler_flags/PGI_CXX.cmake
@@ -0,0 +1,11 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+set( CMAKE_CXX_FLAGS_RELEASE "-fast -O3 -DNDEBUG" CACHE STRING "Release C++ compiler flags" FORCE )
+
+set( CMAKE_CXX_LINK_FLAGS "" CACHE STRING "" )
diff --git a/cmake/compiler_flags/PGI_Fortran.cmake b/cmake/compiler_flags/PGI_Fortran.cmake
new file mode 100644
index 0000000..a777947
--- /dev/null
+++ b/cmake/compiler_flags/PGI_Fortran.cmake
@@ -0,0 +1,11 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+set( CMAKE_Fortran_FLAGS_RELEASE "-fast -O3" CACHE STRING "Release Fortran compiler flags" FORCE )
+
+set( CMAKE_Fortran_LINK_FLAGS "" CACHE STRING "" )
diff --git a/cmake/contrib/FindNetCDF4.cmake b/cmake/contrib/FindNetCDF4.cmake
index 89b0337..2afff21 100644
--- a/cmake/contrib/FindNetCDF4.cmake
+++ b/cmake/contrib/FindNetCDF4.cmake
@@ -158,7 +158,7 @@ else()
foreach( LANGUAGE ${NETCDF_LANGUAGE_BINDINGS} )
ecbuild_debug("FindNetCDF4: looking for ${LANGUAGE} language bindings")
set( NETCDF_${LANGUAGE}_FOUND 1 ) # disable this in following if necessary
-
+
# find the NETCDF includes
foreach( INC ${NETCDF_${LANGUAGE}_INCLUDE_NAMES} )
find_path( NETCDF_${INC}_INCLUDE_DIR ${INC}
@@ -170,7 +170,7 @@ else()
Include
)
mark_as_advanced( NETCDF_${INC}_INCLUDE_DIR )
- # debug_var( NETCDF_${INC}_INCLUDE_DIR)
+ # ecbuild_debug_var( NETCDF_${INC}_INCLUDE_DIR)
if (NETCDF_${INC}_INCLUDE_DIR)
list( APPEND NETCDF_INCLUDE_DIRS ${NETCDF_${INC}_INCLUDE_DIR} )
else()
@@ -249,19 +249,19 @@ else()
# Append the libraries for this language binding to the list of all
# required libraries.
-
+
if( NETCDF_${LANGUAGE}_FOUND )
ecbuild_debug( "FindNetCDF4: ${LANGUAGE} language bindings found" )
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- list( APPEND NETCDF_${LANGUAGE}_LIBRARIES
+ list( APPEND NETCDF_${LANGUAGE}_LIBRARIES
debug ${NETCDF_${LANGUAGE}_LIBRARIES_DEBUG}
optimized ${NETCDF_${LANGUAGE}_LIBRARIES_RELEASE} )
else()
- list( APPEND NETCDF_${LANGUAGE}_LIBRARIES
- ${NETCDF_${LANGUAGE}_LIBRARIES_RELEASE} )
+ list( APPEND NETCDF_${LANGUAGE}_LIBRARIES
+ ${NETCDF_${LANGUAGE}_LIBRARIES_RELEASE} )
endif()
endif()
- # debug_var( NETCDF_${LANGUAGE}_LIBRARIES )
+ # ecbuild_debug_var( NETCDF_${LANGUAGE}_LIBRARIES )
list( APPEND NETCDF_FOUND_REQUIRED_VARS NETCDF_${LANGUAGE}_FOUND )
endforeach()
diff --git a/cmake/contrib/GetGitRevisionDescription.cmake.in b/cmake/contrib/GetGitRevisionDescription.cmake.in
index 7a3e42f..9fd3e64 100644
--- a/cmake/contrib/GetGitRevisionDescription.cmake.in
+++ b/cmake/contrib/GetGitRevisionDescription.cmake.in
@@ -33,6 +33,10 @@ else()
endif()
if(NOT HEAD_HASH)
+ if(EXISTS "@GIT_DATA@/head-ref")
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
-endif()
\ No newline at end of file
+ else()
+ set(HEAD_HASH "unknown")
+ endif()
+endif()
diff --git a/cmake/ecbuild_add_c_flags.cmake b/cmake/ecbuild_add_c_flags.cmake
index bef1d34..132d29c 100644
--- a/cmake/ecbuild_add_c_flags.cmake
+++ b/cmake/ecbuild_add_c_flags.cmake
@@ -40,41 +40,53 @@ macro( ecbuild_add_c_flags m_c_flags )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
- if( NOT DEFINED N_CFLAG )
- set( N_CFLAG 0 )
+ set( _try_add_flag TRUE )
+ if( _PAR_BUILD )
+ string( TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_CAPS )
+ string( TOUPPER ${_PAR_BUILD} _PAR_BUILD_CAPS )
+ if( NOT CMAKE_BUILD_TYPE_CAPS MATCHES "${_PAR_BUILD_CAPS}" )
+ set( _try_add_flag FALSE )
+ endif()
endif()
+ if( _try_add_flag )
+ if( NOT DEFINED N_CFLAG )
+ set( N_CFLAG 0 )
+ endif()
- math( EXPR N_CFLAG '${N_CFLAG}+1' )
+ math( EXPR N_CFLAG '${N_CFLAG}+1' )
- if( NOT ECBUILD_TRUST_FLAGS )
- if( DEFINED _PAR_NAME )
- check_c_compiler_flag( ${_flags} ${_PAR_NAME} )
- set( _flag_ok ${${_PAR_NAME}} )
+ if( NOT ECBUILD_TRUST_FLAGS )
+ if( DEFINED _PAR_NAME )
+ check_c_compiler_flag( ${_flags} ${_PAR_NAME} )
+ set( _flag_ok ${${_PAR_NAME}} )
+ else()
+ check_c_compiler_flag( ${_flags} C_FLAG_TEST_${N_CFLAG} )
+ set( _flag_ok ${C_FLAG_TEST_${N_CFLAG}} )
+ endif()
else()
- check_c_compiler_flag( ${_flags} C_FLAG_TEST_${N_CFLAG} )
- set( _flag_ok ${C_FLAG_TEST_${N_CFLAG}} )
+ set( _flag_ok 1 )
endif()
- else()
- set( _flag_ok 1 )
- endif()
- if( _flag_ok )
- if( _PAR_BUILD )
- set( CMAKE_C_FLAGS_${_PAR_BUILD} "${CMAKE_C_FLAGS_${_PAR_BUILD}} ${_flags}" )
- ecbuild_debug( "C FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ if( _flag_ok )
+ if( _PAR_BUILD )
+ set( CMAKE_C_FLAGS_${_PAR_BUILD} "${CMAKE_C_FLAGS_${_PAR_BUILD}} ${_flags}" )
+ ecbuild_debug( "C FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ else()
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" )
+ ecbuild_debug( "C FLAG [${_flags}] added" )
+ endif()
else()
- set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" )
- ecbuild_debug( "C FLAG [${_flags}] added" )
+ message( WARNING "Unrecognised C flag [${_flags}] -- skipping" )
endif()
- else()
- message( WARNING "Unrecognised C flag [${_flags}] -- skipping" )
endif()
+ unset( _flags )
+ unset( _flag_ok )
+ unset( _try_add_flag )
endif()
- unset( _flags )
- unset( _flag_ok )
+
endmacro()
macro( cmake_add_c_flags m_c_flags )
- message( DEPRECATION " cmake_add_c_flags is deprecated, use ecbuild_add_c_flags instead." )
+ ecbuild_deprecate( " cmake_add_c_flags is deprecated, use ecbuild_add_c_flags instead." )
ecbuild_add_c_flags( ${m_c_flags} )
endmacro()
diff --git a/cmake/ecbuild_add_cxx_flags.cmake b/cmake/ecbuild_add_cxx_flags.cmake
index 8393572..c4aef6e 100644
--- a/cmake/ecbuild_add_cxx_flags.cmake
+++ b/cmake/ecbuild_add_cxx_flags.cmake
@@ -39,42 +39,54 @@ macro( ecbuild_add_cxx_flags m_cxx_flags )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
- if( NOT DEFINED N_CXXFLAG )
- set( N_CXXFLAG 0 )
+ set( _try_add_flag TRUE )
+ if( _PAR_BUILD )
+ string( TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_CAPS )
+ string( TOUPPER ${_PAR_BUILD} _PAR_BUILD_CAPS )
+ if( NOT CMAKE_BUILD_TYPE_CAPS MATCHES "${_PAR_BUILD_CAPS}" )
+ set( _try_add_flag FALSE )
+ endif()
endif()
+ if( _try_add_flag )
+
+ if( NOT DEFINED N_CXXFLAG )
+ set( N_CXXFLAG 0 )
+ endif()
- math( EXPR N_CXXFLAG '${N_CXXFLAG}+1' )
+ math( EXPR N_CXXFLAG '${N_CXXFLAG}+1' )
- if( NOT ECBUILD_TRUST_FLAGS )
- if( DEFINED _PAR_NAME )
- check_cxx_compiler_flag( ${_flags} ${_PAR_NAME} )
- set( _flag_ok ${${_PAR_NAME}} )
+ if( NOT ECBUILD_TRUST_FLAGS )
+ if( DEFINED _PAR_NAME )
+ check_cxx_compiler_flag( ${_flags} ${_PAR_NAME} )
+ set( _flag_ok ${${_PAR_NAME}} )
+ else()
+ check_cxx_compiler_flag( ${_flags} CXX_FLAG_TEST_${N_CXXFLAG} )
+ set( _flag_ok CXX_FLAG_TEST_${N_CXXFLAG} )
+ endif()
else()
- check_cxx_compiler_flag( ${_flags} CXX_FLAG_TEST_${N_CXXFLAG} )
- set( _flag_ok CXX_FLAG_TEST_${N_CXXFLAG} )
+ set( _flag_ok 1 )
endif()
- else()
- set( _flag_ok 1 )
- endif()
- if( _flag_ok )
- if( _PAR_BUILD )
- set( CMAKE_CXX_FLAGS_${_PAR_BUILD} "${CMAKE_CXX_FLAGS_${_PAR_BUILD}} ${_flags}" )
- ecbuild_debug( "C++ FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ if( _flag_ok )
+ if( _PAR_BUILD )
+ set( CMAKE_CXX_FLAGS_${_PAR_BUILD} "${CMAKE_CXX_FLAGS_${_PAR_BUILD}} ${_flags}" )
+ ecbuild_debug( "C++ FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ else()
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" )
+ ecbuild_debug( "C++ FLAG [${_flags}] added" )
+ endif()
else()
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" )
- ecbuild_debug( "C++ FLAG [${_flags}] added" )
+ message( STATUS "Unrecognised CXX flag [${_flags}] -- skipping" )
endif()
- else()
- message( STATUS "Unrecognised CXX flag [${_flags}] -- skipping" )
endif()
+ unset( _flags )
+ unset( _flag_ok )
+ unset( _try_add_flag )
endif()
- unset( _flags )
- unset( _flag_ok )
endmacro()
macro( cmake_add_cxx_flags m_cxx_flags )
- message( DEPRECATION " cmake_add_cxx_flags is deprecated, use ecbuild_add_cxx_flags instead." )
+ ecbuild_deprecate( " cmake_add_cxx_flags is deprecated, use ecbuild_add_cxx_flags instead." )
ecbuild_add_cxx_flags( ${m_cxx_flags} )
endmacro()
diff --git a/cmake/ecbuild_add_executable.cmake b/cmake/ecbuild_add_executable.cmake
index e4e39a1..228cf9e 100644
--- a/cmake/ecbuild_add_executable.cmake
+++ b/cmake/ecbuild_add_executable.cmake
@@ -16,6 +16,9 @@
#
# ecbuild_add_executable( TARGET <name>
# SOURCES <source1> [<source2> ...]
+# [ SOURCES_GLOB <glob1> [<glob2> ...] ]
+# [ SOURCES_EXCLUDE_REGEX <regex1> [<regex2> ...] ]
+# [ OBJECTS <obj1> [<obj2> ...] ]
# [ TEMPLATES <template1> [<template2> ...] ]
# [ LIBS <library1> [<library2> ...] ]
# [ INCLUDES <path1> [<path2> ...] ]
@@ -41,6 +44,16 @@
# SOURCES : required
# list of source files
#
+# SOURCES_GLOB : optional
+# search pattern to find source files to compile (note: not recommend according to CMake guidelines)
+# it is usually better to explicitly list the source files in the CMakeList.txt
+#
+# SOURCES_EXCLUDE_REGEX : optional
+# search pattern to exclude source files from compilation, applies o the results of SOURCES_GLOB
+#
+# OBJECTS : optional
+# list of object libraries to add to this target
+#
# TEMPLATES : optional
# list of files specified as SOURCES which are not to be compiled separately
# (these are commonly template implementation files included in a header)
@@ -69,7 +82,7 @@
#
# NOINSTALL : optional
# do not install the executable
-#
+#
# VERSION : optional, AUTO_VERSION or LIBS_VERSION is used if not specified
# version to use as executable version
#
@@ -85,7 +98,6 @@
# FFLAGS : optional
# list of Fortran compiler flags to use for all Fortran source files
#
-#
# LINKER_LANGUAGE : optional
# sets the LINKER_LANGUAGE property on the target
#
@@ -98,7 +110,7 @@ macro( ecbuild_add_executable )
set( options NOINSTALL AUTO_VERSION )
set( single_value_args TARGET COMPONENT LINKER_LANGUAGE VERSION OUTPUT_NAME )
- set( multi_value_args SOURCES TEMPLATES LIBS INCLUDES DEPENDS PERSISTENT DEFINITIONS CFLAGS CXXFLAGS FFLAGS GENERATED CONDITION )
+ set( multi_value_args SOURCES SOURCES_GLOB SOURCES_EXCLUDE_REGEX OBJECTS TEMPLATES LIBS INCLUDES DEPENDS PERSISTENT DEFINITIONS CFLAGS CXXFLAGS FFLAGS GENERATED CONDITION )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -110,8 +122,8 @@ macro( ecbuild_add_executable )
message(FATAL_ERROR "The call to ecbuild_add_executable() doesn't specify the TARGET.")
endif()
- if( NOT _PAR_SOURCES )
- message(FATAL_ERROR "The call to ecbuild_add_executable() doesn't specify the SOURCES.")
+ if( NOT _PAR_SOURCES AND NOT _PAR_OBJECTS AND NOT _PAR_SOURCES_GLOB )
+ message(FATAL_ERROR "The call to ecbuild_add_executable() specifies neither SOURCES nor OBJECTS nor SOURCES_GLOB.")
endif()
### conditional build
@@ -130,19 +142,6 @@ macro( ecbuild_add_executable )
if( _${_PAR_TARGET}_condition )
- # add include dirs if defined
- if( DEFINED _PAR_INCLUDES )
- list(REMOVE_DUPLICATES _PAR_INCLUDES )
- foreach( path ${_PAR_INCLUDES} ) # skip NOTFOUND
- if( path )
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): add ${path} to include_directories")
- include_directories( ${path} )
- else()
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): ${path} not found - not adding to include_directories")
- endif()
- endforeach()
- endif()
-
# add persistent layer files
if( DEFINED _PAR_PERSISTENT )
if( DEFINED PERSISTENT_NAMESPACE )
@@ -159,8 +158,44 @@ macro( ecbuild_add_executable )
add_custom_target( ${_PAR_TARGET}_templates SOURCES ${_PAR_TEMPLATES} )
endif()
- # add the executable target
- add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} )
+ # glob sources
+ unset( _glob_srcs )
+ foreach( pattern ${_PAR_SOURCES_GLOB} )
+ ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
+ endforeach()
+
+ foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
+ ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
+ endforeach()
+
+ # insert already compiled objects (from OBJECT libraries)
+ unset( _all_objects )
+ foreach( _obj ${_PAR_OBJECTS} )
+ list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
+ endforeach()
+
+ list( APPEND _PAR_SOURCES ${_glob_srcs} )
+
+ if( ECBUILD_LIST_SOURCES )
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ endif()
+
+ add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} ${_all_objects} )
+
+ # ecbuild_echo_target( ${_PAR_TARGET} )
+
+ # add include dirs if defined
+ if( DEFINED _PAR_INCLUDES )
+ list(REMOVE_DUPLICATES _PAR_INCLUDES )
+ foreach( path ${_PAR_INCLUDES} ) # skip NOTFOUND
+ if( path )
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): add ${path} to include_directories")
+ target_include_directories( ${_PAR_TARGET} PRIVATE ${path} )
+ else()
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): ${path} not found - not adding to include_directories")
+ endif()
+ endforeach()
+ endif()
# set OUTPUT_NAME
@@ -191,24 +226,71 @@ macro( ecbuild_add_executable )
endif()
# filter sources
+
ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
+ # ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_f_srcs )
+
# add local flags
- if( DEFINED _PAR_CFLAGS )
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use C flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_c_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CFLAGS}" )
- endif()
- if( DEFINED _PAR_CXXFLAGS )
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use C++ flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_cxx_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CXXFLAGS}" )
+
+ if( ${_PAR_TARGET}_c_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_C_SOURCE_FLAGS
+ ${_PAR_TARGET}_c
+ "${_PAR_CFLAGS}"
+ "${${_PAR_TARGET}_c_srcs}" )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): setting source file C flags from ${${_PAR_TARGET}_C_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_C_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_CFLAGS )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use C flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_c_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CFLAGS}" )
+
+ endif()
endif()
- if( DEFINED _PAR_FFLAGS )
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use Fortran flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_f_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_FFLAGS}" )
+
+ if( ${_PAR_TARGET}_cxx_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_CXX_SOURCE_FLAGS
+ ${_PAR_TARGET}_cxx
+ "${_PAR_CXXFLAGS}"
+ "${${_PAR_TARGET}_cxx_srcs}" )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): setting source file CXX flags from ${${_PAR_TARGET}_CXX_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_CXX_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_CXXFLAGS )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use C++ flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_cxx_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CXXFLAGS}" )
+
+ endif()
endif()
- if( DEFINED _PAR_GENERATED )
- ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): mark as generated ${_PAR_GENERATED}")
- set_source_files_properties( ${_PAR_GENERATED} PROPERTIES GENERATED 1 )
+
+ if( ${_PAR_TARGET}_f_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_Fortran_SOURCE_FLAGS
+ ${_PAR_TARGET}_f
+ "${_PAR_FFLAGS}"
+ "${${_PAR_TARGET}_f_srcs}" )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): setting source file Fortran flags from ${${_PAR_TARGET}_Fortran_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_Fortran_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_FFLAGS )
+
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): use Fortran flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_f_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_FFLAGS}" )
+
+ endif()
endif()
# define VERSION if requested
@@ -222,11 +304,6 @@ macro( ecbuild_add_executable )
endif()
endif()
- # debug_var( ${_PAR_TARGET}_h_srcs )
- # debug_var( ${_PAR_TARGET}_c_srcs )
- # debug_var( ${_PAR_TARGET}_cxx_srcs )
- # debug_var( ${_PAR_TARGET}_f_srcs )
-
# installation
if( NOT _PAR_NOINSTALL )
@@ -240,7 +317,7 @@ macro( ecbuild_add_executable )
# endif()
install( TARGETS ${_PAR_TARGET}
- EXPORT ${CMAKE_PROJECT_NAME}-targets
+ EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${INSTALL_BIN_DIR}
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${INSTALL_LIB_DIR} )
@@ -273,6 +350,13 @@ macro( ecbuild_add_executable )
if( DEFINED _PAR_LINKER_LANGUAGE )
ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): using linker language ${_PAR_LINKER_LANGUAGE}")
set_property( TARGET ${_PAR_TARGET} PROPERTY LINKER_LANGUAGE ${_PAR_LINKER_LANGUAGE} )
+ if( ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES )
+ target_link_libraries( ${_PAR_TARGET} ${ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES} )
+ endif()
+ endif()
+
+ if( ECBUILD_IMPLICIT_LINK_LIBRARIES )
+ target_link_libraries( ${_PAR_TARGET} ${ECBUILD_IMPLICIT_LINK_LIBRARIES} )
endif()
# make sure target is removed before - some problems with AIX
diff --git a/cmake/ecbuild_add_extra_search_paths.cmake b/cmake/ecbuild_add_extra_search_paths.cmake
index fac96ba..3cb38d2 100644
--- a/cmake/ecbuild_add_extra_search_paths.cmake
+++ b/cmake/ecbuild_add_extra_search_paths.cmake
@@ -15,10 +15,10 @@
function( ecbuild_add_extra_search_paths pkg )
- message( DEPRECATION " ecbuild_add_extra_search_paths modifies CMAKE_PREFIX_PATH,"
- " which can affect future package discovery if not undone by the caller."
- " The current CMAKE_PREFIX_PATH is being backed up as _CMAKE_PREFIX_PATH"
- " so it can later be restored." )
+ ecbuild_deprecate( " ecbuild_add_extra_search_paths modifies CMAKE_PREFIX_PATH,"
+ " which can affect future package discovery if not undone by the caller."
+ " The current CMAKE_PREFIX_PATH is being backed up as _CMAKE_PREFIX_PATH"
+ " so it can later be restored." )
# Back up current CMAKE_PREFIX_PATH so the caller can reset it
set( _CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE )
@@ -28,6 +28,6 @@ function( ecbuild_add_extra_search_paths pkg )
ecbuild_list_extra_search_paths( ${pkg} CMAKE_PREFIX_PATH )
set( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE )
- # debug_var( CMAKE_PREFIX_PATH )
+ # ecbuild_debug_var( CMAKE_PREFIX_PATH )
endfunction()
diff --git a/cmake/ecbuild_add_fortran_flags.cmake b/cmake/ecbuild_add_fortran_flags.cmake
index f0da53f..fc1edcc 100644
--- a/cmake/ecbuild_add_fortran_flags.cmake
+++ b/cmake/ecbuild_add_fortran_flags.cmake
@@ -44,43 +44,55 @@ macro( ecbuild_add_fortran_flags m_fortran_flags )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
- if( NOT DEFINED N_FortranFLAG )
- set( N_FortranFLAG 0 )
+ set( _try_add_flag TRUE )
+ if( _PAR_BUILD )
+ string( TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_CAPS )
+ string( TOUPPER ${_PAR_BUILD} _PAR_BUILD_CAPS )
+ if( NOT CMAKE_BUILD_TYPE_CAPS MATCHES "${_PAR_BUILD_CAPS}" )
+ set( _try_add_flag FALSE )
+ endif()
endif()
- math( EXPR N_FortranFLAG '${N_FortranFLAG}+1' )
+ if( _try_add_flag )
+ if( NOT DEFINED N_FortranFLAG )
+ set( N_FortranFLAG 0 )
+ endif()
+
+ math( EXPR N_FortranFLAG '${N_FortranFLAG}+1' )
- if( NOT ECBUILD_TRUST_FLAGS )
- if( DEFINED _PAR_NAME )
- check_fortran_compiler_flag( ${_flags} ${_PAR_NAME} )
- set( _flag_ok ${${_PAR_NAME}} )
+ if( NOT ECBUILD_TRUST_FLAGS )
+ if( DEFINED _PAR_NAME )
+ check_fortran_compiler_flag( ${_flags} ${_PAR_NAME} )
+ set( _flag_ok ${${_PAR_NAME}} )
+ else()
+ check_fortran_compiler_flag( ${_flags} Fortran_FLAG_TEST_${N_FortranFLAG} )
+ set( _flag_ok ${Fortran_FLAG_TEST_${N_FortranFLAG}} )
+ endif()
else()
- check_fortran_compiler_flag( ${_flags} Fortran_FLAG_TEST_${N_FortranFLAG} )
- set( _flag_ok ${Fortran_FLAG_TEST_${N_FortranFLAG}} )
+ set( _flag_ok 1 )
endif()
- else()
- set( _flag_ok 1 )
- endif()
- if( _flag_ok )
- if( _PAR_BUILD )
- set( CMAKE_Fortran_FLAGS_${_PAR_BUILD} "${CMAKE_Fortran_FLAGS_${_PAR_BUILD}} ${_flags}" )
- ecbuild_debug( "Fortran FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ if( _flag_ok )
+ if( _PAR_BUILD )
+ set( CMAKE_Fortran_FLAGS_${_PAR_BUILD} "${CMAKE_Fortran_FLAGS_${_PAR_BUILD}} ${_flags}" )
+ ecbuild_debug( "Fortran FLAG [${_flags}] added for build type ${_PAR_BUILD}" )
+ else()
+ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${_flags}" )
+ ecbuild_debug( "Fortran FLAG [${_flags}] added" )
+ endif()
else()
- set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${_flags}" )
- ecbuild_debug( "Fortran FLAG [${_flags}] added" )
+ message( STATUS "Unrecognised Fortran flag [${_flags}] -- skipping" )
endif()
- else()
- message( STATUS "Unrecognised Fortran flag [${_flags}] -- skipping" )
endif()
- endif()
- unset( _flags )
- unset( _flag_ok )
+ unset( _flags )
+ unset( _flag_ok )
+ unset( _try_add_flag )
+ endif()
endmacro()
macro( cmake_add_fortran_flags m_fortran_flags )
- message( DEPRECATION " cmake_add_fortran_flags is deprecated, use ecbuild_add_fortran_flags instead." )
+ ecbuild_deprecate( " cmake_add_fortran_flags is deprecated, use ecbuild_add_fortran_flags instead." )
ecbuild_add_fortran_flags( ${m_fortran_flags} )
endmacro()
diff --git a/cmake/ecbuild_add_library.cmake b/cmake/ecbuild_add_library.cmake
index dc47956..561f274 100644
--- a/cmake/ecbuild_add_library.cmake
+++ b/cmake/ecbuild_add_library.cmake
@@ -16,7 +16,10 @@
#
# ecbuild_add_library( TARGET <name>
# SOURCES <source1> [<source2> ...]
-# [ TYPE SHARED|STATIC|MODULE ]
+# [ SOURCES_GLOB <glob1> [<glob2> ...] ]
+# [ SOURCES_EXCLUDE_REGEX <regex1> [<regex2> ...] ]
+# [ TYPE SHARED|STATIC|MODULE|OBJECT ]
+# [ OBJECTS <obj1> [<obj2> ...] ]
# [ TEMPLATES <template1> [<template2> ...] ]
# [ LIBS <library1> [<library2> ...] ]
# [ INCLUDES <path1> [<path2> ...] ]
@@ -55,6 +58,17 @@
# :STATIC: archives of object files for use when linking other targets.
# :MODULE: plugins that are not linked into other targets but may be loaded
# dynamically at runtime using dlopen-like functionality
+# :OBJECT: files are just compiled into objects
+#
+# SOURCES_GLOB : optional
+# search pattern to find source files to compile (note: not recommend according to CMake guidelines)
+# it is usually better to explicitly list the source files in the CMakeList.txt
+#
+# SOURCES_EXCLUDE_REGEX : optional
+# search pattern to exclude source files from compilation, applies o the results of SOURCES_GLOB
+#
+# OBJECTS : optional
+# list of object libraries to add to this target
#
# TEMPLATES : optional
# list of files specified as SOURCES which are not to be compiled separately
@@ -135,7 +149,7 @@ function( ecbuild_add_library_impl )
set( options NOINSTALL AUTO_VERSION )
set( single_value_args TARGET TYPE COMPONENT INSTALL_HEADERS INSTALL_HEADERS_REGEX LINKER_LANGUAGE HEADER_DESTINATION VERSION OUTPUT_NAME )
- set( multi_value_args SOURCES TEMPLATES LIBS INCLUDES PRIVATE_INCLUDES PUBLIC_INCLUDES DEPENDS PERSISTENT DEFINITIONS INSTALL_HEADERS_LIST CFLAGS CXXFLAGS FFLAGS GENERATED CONDITION )
+ set( multi_value_args SOURCES SOURCES_GLOB SOURCES_EXCLUDE_REGEX OBJECTS TEMPLATES LIBS INCLUDES PRIVATE_INCLUDES PUBLIC_INCLUDES DEPENDS PERSISTENT DEFINITIONS INSTALL_HEADERS_LIST CFLAGS CXXFLAGS FFLAGS GENERATED CONDITION )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -147,8 +161,8 @@ function( ecbuild_add_library_impl )
message(FATAL_ERROR "The call to ecbuild_add_library() doesn't specify the TARGET.")
endif()
- if( NOT _PAR_SOURCES )
- message(FATAL_ERROR "The call to ecbuild_add_library() doesn't specify the SOURCES.")
+ if( NOT _PAR_SOURCES AND NOT _PAR_OBJECTS AND NOT _PAR_SOURCES_GLOB )
+ message(FATAL_ERROR "The call to ecbuild_add_library() specifies neither SOURCES nor OBJECTS nor SOURCES_GLOB")
endif()
### conditional build
@@ -172,8 +186,9 @@ function( ecbuild_add_library_impl )
# checks that is either SHARED or STATIC or MODULE
if( NOT _PAR_TYPE MATCHES "STATIC" AND
NOT _PAR_TYPE MATCHES "SHARED" AND
+ NOT _PAR_TYPE MATCHES "OBJECT" AND
NOT _PAR_TYPE MATCHES "MODULE" )
- message( FATAL_ERROR "library type must be one of [ STATIC | SHARED | MODULE ]" )
+ message( FATAL_ERROR "library type must be one of [ STATIC | SHARED | MODULE | OBJECT ]" )
endif()
ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): library type is ${_PAR_TYPE}")
endif()
@@ -195,7 +210,31 @@ function( ecbuild_add_library_impl )
add_custom_target( ${_PAR_TARGET}_templates SOURCES ${_PAR_TEMPLATES} )
endif()
- add_library( ${_PAR_TARGET} ${_PAR_TYPE} ${_PAR_SOURCES} )
+ # glob sources
+ unset( _glob_srcs )
+ foreach( pattern ${_PAR_SOURCES_GLOB} )
+ ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
+ endforeach()
+
+ foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
+ ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
+ endforeach()
+
+ # insert already compiled objects (from OBJECT libraries)
+ unset( _all_objects )
+ foreach( _obj ${_PAR_OBJECTS} )
+ list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
+ endforeach()
+
+ list( APPEND _PAR_SOURCES ${_glob_srcs} )
+
+ if( ECBUILD_LIST_SOURCES )
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ endif()
+
+ add_library( ${_PAR_TARGET} ${_PAR_TYPE} ${_PAR_SOURCES} ${_all_objects} )
+
+ # ecbuild_echo_target( ${_PAR_TARGET} )
# set OUTPUT_NAME
@@ -306,27 +345,74 @@ function( ecbuild_add_library_impl )
# filter sources
- ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
+ if( _PAR_SOURCES )
+ ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
+ endif()
- # debug_var( ${_PAR_TARGET}_h_srcs )
- # debug_var( ${_PAR_TARGET}_c_srcs )
- # debug_var( ${_PAR_TARGET}_cxx_srcs )
- # debug_var( ${_PAR_TARGET}_f_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
+ # ecbuild_debug_var( ${_PAR_TARGET}_f_srcs )
# add local flags
- if( DEFINED _PAR_CFLAGS )
- ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use C flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_c_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CFLAGS}" )
+ if( ${_PAR_TARGET}_c_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_C_SOURCE_FLAGS
+ ${_PAR_TARGET}_c
+ "${_PAR_CFLAGS}"
+ "${${_PAR_TARGET}_c_srcs}" )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): setting source file C flags from ${${_PAR_TARGET}_C_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_C_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_CFLAGS )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use C flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_c_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CFLAGS}" )
+
+ endif()
endif()
- if( DEFINED _PAR_CXXFLAGS )
- ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use C++ flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_cxx_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CXXFLAGS}" )
+
+ if( ${_PAR_TARGET}_cxx_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_CXX_SOURCE_FLAGS
+ ${_PAR_TARGET}_cxx
+ "${_PAR_CXXFLAGS}"
+ "${${_PAR_TARGET}_cxx_srcs}" )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): setting source file CXX flags from ${${_PAR_TARGET}_CXX_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_CXX_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_CXXFLAGS )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use C++ flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_cxx_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_CXXFLAGS}" )
+
+ endif()
endif()
- if( DEFINED _PAR_FFLAGS )
- ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use Fortran flags ${_PAR_CFLAGS}")
- set_source_files_properties( ${${_PAR_TARGET}_f_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_FFLAGS}" )
+
+ if( ${_PAR_TARGET}_f_srcs )
+
+ if( ECBUILD_SOURCE_FLAGS )
+ ecbuild_source_flags( ${_PAR_TARGET}_Fortran_SOURCE_FLAGS
+ ${_PAR_TARGET}_f
+ "${_PAR_FFLAGS}"
+ "${${_PAR_TARGET}_f_srcs}" )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): setting source file Fortran flags from ${${_PAR_TARGET}_Fortran_SOURCE_FLAGS}")
+ include( ${${_PAR_TARGET}_Fortran_SOURCE_FLAGS} )
+
+ elseif( DEFINED _PAR_FFLAGS )
+
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): use Fortran flags ${_PAR_CFLAGS}")
+ set_source_files_properties( ${${_PAR_TARGET}_f_srcs} PROPERTIES COMPILE_FLAGS "${_PAR_FFLAGS}" )
+
+ endif()
endif()
+
if( DEFINED _PAR_GENERATED )
ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): mark as generated ${_PAR_GENERATED}")
set_source_files_properties( ${_PAR_GENERATED} PROPERTIES GENERATED 1 )
@@ -336,11 +422,18 @@ function( ecbuild_add_library_impl )
if( DEFINED _PAR_LINKER_LANGUAGE )
ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): using linker language ${_PAR_LINKER_LANGUAGE}")
set_property( TARGET ${_PAR_TARGET} PROPERTY LINKER_LANGUAGE ${_PAR_LINKER_LANGUAGE} )
+ if( ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES )
+ target_link_libraries( ${_PAR_TARGET} ${ECBUILD_${_PAR_LINKER_LANGUAGE}_IMPLICIT_LINK_LIBRARIES} )
+ endif()
endif()
- # installation
+ if( ECBUILD_IMPLICIT_LINK_LIBRARIES )
+ target_link_libraries( ${_PAR_TARGET} ${ECBUILD_IMPLICIT_LINK_LIBRARIES} )
+ endif()
- if( NOT _PAR_NOINSTALL )
+ # installation (except for OBJECT libraries)
+
+ if( NOT _PAR_NOINSTALL AND NOT _PAR_TYPE MATCHES "OBJECT" )
ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): installing to ${INSTALL_LIB_DIR}")
# and associate with defined component
@@ -351,7 +444,7 @@ function( ecbuild_add_library_impl )
# endif()
install( TARGETS ${_PAR_TARGET}
- EXPORT ${CMAKE_PROJECT_NAME}-targets
+ EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${INSTALL_BIN_DIR}
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${INSTALL_LIB_DIR} )
@@ -421,7 +514,9 @@ function( ecbuild_add_library_impl )
endif()
# make sure target is removed before - some problems with AIX
- add_custom_command( TARGET ${_PAR_TARGET} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E remove $<TARGET_FILE:${_PAR_TARGET}> )
+ if( NOT _PAR_TYPE MATCHES "OBJECT" )
+ add_custom_command( TARGET ${_PAR_TARGET} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E remove $<TARGET_FILE:${_PAR_TARGET}> )
+ endif()
# for the links target
if( NOT _PAR_NOINSTALL )
diff --git a/cmake/ecbuild_add_option.cmake b/cmake/ecbuild_add_option.cmake
index 7728716..c7006f2 100644
--- a/cmake/ecbuild_add_option.cmake
+++ b/cmake/ecbuild_add_option.cmake
@@ -17,6 +17,7 @@
# ecbuild_add_option( FEATURE <name>
# [ DEFAULT ON|OFF ]
# [ DESCRIPTION <description> ]
+# [ PURPOSE <purpose> ]
# [ REQUIRED_PACKAGES <package1> [<package2> ...] ]
# [ CONDITION <condition1> [<condition2> ...] ]
# [ ADVANCED ] )
@@ -33,6 +34,12 @@
# DESCRIPTION : optional
# string describing the feature (shown in summary and stored in the cache)
#
+# TYPE : optional, one of RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED
+# type of dependency of the project on this package (defaults to OPTIONAL)
+#
+# PURPOSE : optional
+# string describing which functionality this package enables in the project
+#
# REQUIRED_PACKAGES : optional
# list of packages required to be found for this feature to be enabled
#
@@ -72,7 +79,7 @@
macro( ecbuild_add_option )
set( options ADVANCED )
- set( single_value_args FEATURE DEFAULT DESCRIPTION )
+ set( single_value_args FEATURE DEFAULT DESCRIPTION TYPE PURPOSE )
set( multi_value_args REQUIRED_PACKAGES CONDITION )
cmake_parse_arguments( _p "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -98,6 +105,10 @@ macro( ecbuild_add_option )
endif()
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): defaults to ${_p_DEFAULT}")
+ if( NOT _p_TYPE )
+ set( _p_TYPE OPTIONAL )
+ endif()
+
# check CONDITION parameter
if( DEFINED _p_CONDITION )
set(_feature_condition_file "${CMAKE_CURRENT_BINARY_DIR}/set_${_p_FEATURE}_condition.cmake")
@@ -135,7 +146,12 @@ macro( ecbuild_add_option )
# define the option -- for cmake GUI
option( ENABLE_${_p_FEATURE} "${_p_DESCRIPTION}" ${_p_DEFAULT} )
- ecbuild_set_feature( ${_p_FEATURE} ENABLED ${_p_DEFAULT} PURPOSE "${_p_DESCRIPTION}" )
+ ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): defining option ENABLE_${_p_FEATURE} '${_p_DESCRIPTION}' ${_p_DEFAULT}")
+ ecbuild_set_feature( ${_p_FEATURE} ENABLED ${_p_DEFAULT} )
+ set_package_properties( ${_p_FEATURE} PROPERTIES
+ DESCRIPTION "${_p_DESCRIPTION}"
+ TYPE ${_p_TYPE}
+ PURPOSE "${_p_PURPOSE}" )
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): ENABLE_${_p_FEATURE} = ${ENABLE_${_p_FEATURE}}")
set( _do_search ${ENABLE_${_p_FEATURE}} )
@@ -167,9 +183,9 @@ macro( ecbuild_add_option )
set( pkgproject 0 )
endif()
- # debug_var( pkg )
- # debug_var( pkglist )
- # debug_var( pkgname )
+ # ecbuild_debug_var( pkg )
+ # ecbuild_debug_var( pkglist )
+ # ecbuild_debug_var( pkgname )
string( TOUPPER ${pkgname} pkgUPPER )
string( TOLOWER ${pkgname} pkgLOWER )
@@ -206,6 +222,11 @@ macro( ecbuild_add_option )
list( REMOVE_ITEM _find_args ${pkgname} )
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): searching for Python")
ecbuild_find_python( ${_find_args} )
+ elseif( pkgname STREQUAL "LEXYACC" )
+ set( _find_args ${pkglist} )
+ list( REMOVE_ITEM _find_args ${pkgname} )
+ ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): searching for lex-yacc")
+ ecbuild_find_lexyacc( ${_find_args} )
else()
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): searching for package ${pkgname}")
find_package( ${pkglist} )
@@ -223,9 +244,9 @@ macro( ecbuild_add_option )
endif()
- # debug_var( ${pkgname}_FOUND )
- # debug_var( ${pkgLOWER}_FOUND )
- # debug_var( ${pkgUPPER}_FOUND )
+ # ecbuild_debug_var( ${pkgname}_FOUND )
+ # ecbuild_debug_var( ${pkgLOWER}_FOUND )
+ # ecbuild_debug_var( ${pkgUPPER}_FOUND )
# we have feature if all required packages were FOUND
diff --git a/cmake/ecbuild_add_persistent.cmake b/cmake/ecbuild_add_persistent.cmake
index 96c160d..0e1fdbf 100644
--- a/cmake/ecbuild_add_persistent.cmake
+++ b/cmake/ecbuild_add_persistent.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -34,7 +34,7 @@
# C++ namespace to place the persistent class information in
#
##############################################################################
-
+
# define the script to build the persistent class information
set( sg_perl "${CMAKE_CURRENT_LIST_DIR}/sg.pl" CACHE INTERNAL "perl script to generate persistent objects" )
@@ -44,7 +44,7 @@ macro( ecbuild_add_persistent )
set( options )
set( single_value_args SRC_LIST NAMESPACE )
- set( multi_value_args FILES )
+ set( multi_value_args FILES )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -71,7 +71,7 @@ macro( ecbuild_add_persistent )
set( file ${_file_dir}/${_file_we} )
endif()
- # debug_var(file)
+ # ecbuild_debug_var(file)
add_custom_command( OUTPUT ${file}.b
COMMAND ${PERL_EXECUTABLE} ${sg_perl} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.h
diff --git a/cmake/ecbuild_add_test.cmake b/cmake/ecbuild_add_test.cmake
index 6ae839a..47baa67 100644
--- a/cmake/ecbuild_add_test.cmake
+++ b/cmake/ecbuild_add_test.cmake
@@ -16,6 +16,7 @@
#
# ecbuild_add_test( [ TARGET <name> ]
# [ SOURCES <source1> [<source2> ...] ]
+# [ OBJECTS <obj1> [<obj2> ...] ]
# [ COMMAND <executable> ]
# [ TYPE EXE|SCRIPT|PYTHON ]
# [ ARGS <argument1> [<argument2> ...] ]
@@ -48,6 +49,9 @@
# SOURCES : required if TARGET is provided
# list of source files to be compiled
#
+# OBJECTS : optional
+# list of object libraries to add to this target
+#
# COMMAND : either TARGET or COMMAND must be provided, unless TYPE is PYTHON
# command or script to execute (no executable is built)
#
@@ -127,7 +131,7 @@ macro( ecbuild_add_test )
set( options BOOST )
set( single_value_args TARGET ENABLED COMMAND TYPE LINKER_LANGUAGE MPI WORKING_DIRECTORY )
- set( multi_value_args SOURCES LIBS INCLUDES TEST_DEPENDS DEPENDS ARGS
+ set( multi_value_args SOURCES OBJECTS LIBS INCLUDES TEST_DEPENDS DEPENDS ARGS
PERSISTENT DEFINITIONS RESOURCES TEST_DATA CFLAGS
CXXFLAGS FFLAGS GENERATED CONDITION ENVIRONMENT )
@@ -141,13 +145,14 @@ macro( ecbuild_add_test )
# Check for MPI
if(_PAR_MPI)
- if( (_PAR_MPI GREATER 1) AND ( (NOT HAVE_MPI) OR (NOT MPIEXEC) ) )
+ if( (_PAR_MPI GREATER 1) AND ( (NOT MPI_FOUND) OR (NOT MPIEXEC) ) )
ecbuild_debug("ecbuild_add_test(${_PAR_TARGET}): ${_PAR_MPI} MPI ranks requested but MPI not available - disabling test")
set( _PAR_ENABLED 0 )
- endif()
- if( (_PAR_MPI EQUAL 1) AND (NOT HAVE_MPI) )
+ elseif( (_PAR_MPI EQUAL 1) AND (NOT MPI_FOUND) )
ecbuild_debug("ecbuild_add_test(${_PAR_TARGET}): 1 MPI rank requested but MPI not available - disabling MPI")
set( _PAR_MPI 0 )
+ else()
+ ecbuild_debug("ecbuild_add_test(${_PAR_TARGET}): Running using ${_PAR_MPI} MPI rank(s)")
endif()
endif()
@@ -266,9 +271,13 @@ macro( ecbuild_add_test )
endif()
endif()
- # add the test target
+ # insert already compiled objects (from OBJECT libraries)
+ unset( _all_objects )
+ foreach( _obj ${_PAR_OBJECTS} )
+ list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
+ endforeach()
- add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} )
+ add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} ${_all_objects} )
# add extra dependencies
if( DEFINED _PAR_DEPENDS)
@@ -354,9 +363,6 @@ macro( ecbuild_add_test )
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E remove ${EXE_FILENAME} )
- set_property( TARGET ${_PAR_TARGET} PROPERTY SKIP_BUILD_RPATH FALSE )
- set_property( TARGET ${_PAR_TARGET} PROPERTY BUILD_WITH_INSTALL_RPATH FALSE )
-
endif() # _PAR_SOURCES
if( DEFINED _PAR_COMMAND AND NOT _PAR_TARGET ) # in the absence of target, we use the command as a name
@@ -376,7 +382,10 @@ macro( ecbuild_add_test )
# define the arguments
set( TEST_ARGS "" )
- if( DEFINED _PAR_ARGS )
+ # Boost Unit Test >= 1.60 requires arguments to be passed to the application to be separated by --
+ if( DEFINED _PAR_ARGS AND _PAR_BOOST )
+ list( APPEND TEST_ARGS "--" ${_PAR_ARGS} )
+ elseif( DEFINED _PAR_ARGS )
list( APPEND TEST_ARGS ${_PAR_ARGS} )
endif()
diff --git a/cmake/ecbuild_bundle.cmake b/cmake/ecbuild_bundle.cmake
index 2d9b779..bad22d6 100644
--- a/cmake/ecbuild_bundle.cmake
+++ b/cmake/ecbuild_bundle.cmake
@@ -61,7 +61,7 @@ endmacro()
# Declare a subproject to be built as part of this bundle. ::
#
# ecbuild_bundle( PROJECT <name>
-# STASH <repository> | GIT <giturl>
+# STASH <repository> | GIT <giturl> | SOURCE <path>
# [ BRANCH <gitbranch> | TAG <gittag> ]
# [ UPDATE | NOREMOTE ] )
# [ MANUAL ] )
@@ -72,12 +72,15 @@ endmacro()
# PROJECT : required
# project name for the Git repository to be managed
#
-# STASH : cannot be combined with GIT, either is required
+# STASH : cannot be combined with GIT or SOURCE
# Stash repository in the form <project>/<repository>
#
-# URL : cannot be combined with STASH, either is required
+# GIT : cannot be combined with STASH or SOURCE
# Git URL of the remote repository to clone (see ``git help clone``)
#
+# SOURCE : cannot be combined with STASH or GIT
+# Path to an existing local repository, which will be symlinked
+#
# BRANCH : optional, cannot be combined with TAG
# Git branch to check out
#
@@ -104,6 +107,10 @@ endmacro()
# The first time a bundle is built, the sources of all subprojects are cloned
# into directories named according to project in the *source* tree of the
# bundle (which means these directories should be added to ``.gitignore``).
+# If the ``SOURCE`` option is used it must point to an existing local
+# repository on disk and no new repository is cloned. Be aware that using the
+# ``BRANCH`` or ``TAG`` option leads to the corresponding version being checked
+# out in that repository!
#
# Subprojects are configured and built in order. Due to being added as a
# subproject, the usual project discovery mechanism (i.e. locating and
@@ -119,23 +126,32 @@ endmacro()
macro( ecbuild_bundle )
set( options )
- set( single_value_args PROJECT STASH GIT )
+ set( single_value_args PROJECT STASH GIT SOURCE )
set( multi_value_args )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
string(TOUPPER "${_PAR_PROJECT}" PNAME)
if( BUNDLE_SKIP_${PNAME} )
- message( STATUS "Skipping bundle project ${PNAME}" )
+ message( STATUS "Skipping bundle project ${PNAME}" )
else()
- if( _PAR_STASH )
- ecmwf_stash( PROJECT ${_PAR_PROJECT} DIR ${PROJECT_SOURCE_DIR}/${_PAR_PROJECT} STASH ${_PAR_STASH} ${_PAR_UNPARSED_ARGUMENTS} )
- elseif( _PAR_GIT )
- ecbuild_git( PROJECT ${_PAR_PROJECT} DIR ${PROJECT_SOURCE_DIR}/${_PAR_PROJECT} URL ${_PAR_GIT} ${_PAR_UNPARSED_ARGUMENTS} )
+ if( _PAR_STASH )
+ ecmwf_stash( PROJECT ${_PAR_PROJECT} DIR ${PROJECT_SOURCE_DIR}/${_PAR_PROJECT} STASH ${_PAR_STASH} ${_PAR_UNPARSED_ARGUMENTS} )
+ elseif( _PAR_GIT )
+ ecbuild_git( PROJECT ${_PAR_PROJECT} DIR ${PROJECT_SOURCE_DIR}/${_PAR_PROJECT} URL ${_PAR_GIT} ${_PAR_UNPARSED_ARGUMENTS} )
+ elseif( _PAR_SOURCE )
+ if( DEFINED ${PNAME}_SOURCE )
+ ecbuild_critical( "ecbuild_bundle called with SOURCE for project ${_PAR_PROJECT} but ${PNAME}_SOURCE is defined" )
endif()
+ execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${_PAR_SOURCE} ${PROJECT_SOURCE_DIR}/${_PAR_PROJECT} )
+ endif()
+
+ if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_PAR_PROJECT} OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_PAR_PROJECT}/CMakeLists.txt )
+ ecbuild_critical("Source directory '${CMAKE_CURRENT_SOURCE_DIR}/${_PAR_PROJECT}' for subproject '${_PAR_PROJECT}' does not exist or does not contain a CMakeLists.txt file.")
+ endif()
- ecbuild_use_package( PROJECT ${_PAR_PROJECT} )
+ ecbuild_use_package( PROJECT ${_PAR_PROJECT} )
endif()
endmacro()
diff --git a/cmake/ecbuild_check_compiler.cmake b/cmake/ecbuild_check_compiler.cmake
index 32ff6cc..c0f0f29 100644
--- a/cmake/ecbuild_check_compiler.cmake
+++ b/cmake/ecbuild_check_compiler.cmake
@@ -10,7 +10,8 @@
# enable C to use in system introspection
if( NOT CMAKE_C_COMPILER_LOADED AND ENABLE_OS_TESTS )
- enable_language( C )
+ enable_language( C )
+ ecbuild_compiler_flags( C )
endif()
############################################################################################
@@ -122,6 +123,10 @@ if( CMAKE_COMPILER_IS_GNUCXX )
endif()
+if( ENABLE_WARNINGS AND CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
+ ecbuild_add_fortran_flags("-warn all")
+endif()
+
############################################################################################
# compiler dependent fixes
diff --git a/cmake/ecbuild_check_cxx_source_return.cmake b/cmake/ecbuild_check_cxx_source_return.cmake
index e364918..8f96f61 100644
--- a/cmake/ecbuild_check_cxx_source_return.cmake
+++ b/cmake/ecbuild_check_cxx_source_return.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -93,9 +93,9 @@ macro( ecbuild_check_cxx_source_return SOURCE )
if( __add_incs )
set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${__add_incs}")
endif()
-
+
# write the source file
-
+
file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_${_p_VAR}.cxx" "${SOURCE}\n" )
message( STATUS "${_msg}" )
@@ -107,11 +107,11 @@ macro( ecbuild_check_cxx_source_return SOURCE )
-DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
- COMPILE_OUTPUT_VARIABLE compile_OUTPUT
+ COMPILE_OUTPUT_VARIABLE compile_OUTPUT
RUN_OUTPUT_VARIABLE run_OUTPUT )
-
- # debug_var( ${_p_VAR}_COMPILED )
- # debug_var( ${_p_VAR}_EXITCODE )
+
+ # ecbuild_debug_var( ${_p_VAR}_COMPILED )
+ # ecbuild_debug_var( ${_p_VAR}_EXITCODE )
# if it did not compile make the return value fail code of 1
@@ -125,21 +125,21 @@ macro( ecbuild_check_cxx_source_return SOURCE )
# if the return value was 0 then it worked
if( ${_p_VAR}_COMPILED AND "${${_p_VAR}_EXITCODE}" EQUAL 0 )
-
+
message(STATUS "${_msg} Success")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${_p_VAR} succeded with the following compile output:\n"
- "${compile_OUTPUT}\n"
+ "${compile_OUTPUT}\n"
"Performing C++ SOURCE FILE Run ${_p_VAR} succeded with the following run output:\n"
- "${run_OUTPUT}\n"
+ "${run_OUTPUT}\n"
"Return value: ${${_p_VAR}}\n"
"Source file was:\n${SOURCE}\n")
set( ${_p_VAR} 1 CACHE INTERNAL "Test ${_p_VAR}")
set( ${_p_OUTPUT} "${run_OUTPUT}" CACHE INTERNAL "Test ${_p_VAR} output")
-
+
else()
-
+
if(CMAKE_CROSSCOMPILING AND "${${_p_VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
set(${_p_VAR} "${${_p_VAR}_EXITCODE}")
set(${OUTPUT} "")
@@ -147,17 +147,17 @@ macro( ecbuild_check_cxx_source_return SOURCE )
set(${_p_VAR} "" CACHE INTERNAL "Test ${_p_VAR}")
set(${_p_OUTPUT} "" CACHE INTERNAL "Test ${_p_VAR} output")
endif()
-
+
message(STATUS "Test ${_p_VAR} - Failed")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C++ SOURCE FILE Test ${_p_VAR} failed with the following compile output:\n"
- "${compile_OUTPUT}\n"
+ "${compile_OUTPUT}\n"
"Performing C++ SOURCE FILE Run ${_p_VAR} failed with the following run output:\n"
- "${run_OUTPUT}\n"
+ "${run_OUTPUT}\n"
"Return value: ${${_p_VAR}_EXITCODE}\n"
"Source file was:\n${SOURCE}\n")
endif()
-
+
endif()
endmacro()
diff --git a/cmake/ecbuild_check_functions.cmake b/cmake/ecbuild_check_functions.cmake
index a3ed7a1..25f9d62 100644
--- a/cmake/ecbuild_check_functions.cmake
+++ b/cmake/ecbuild_check_functions.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -73,10 +73,10 @@ if( ENABLE_OS_FUNCTIONS_TEST )
ecbuild_cache_check_c_source_compiles( "#define _LARGEFILE64_SOURCE\n#include <sys/stat.h>\nint main(){ struct stat64 s; fstat64(1,&s); return 0; }" EC_HAVE_FSTAT64 )
# test fseeko64
ecbuild_cache_check_c_source_compiles( "#define _LARGEFILE64_SOURCE\n#include <stdio.h>\n#include <sys/types.h>\nint main(){FILE* file;off64_t l=0;fseeko64(file,l,SEEK_CUR);return 0;}\n" EC_HAVE_FSEEKO64 )
-
+
# test for ftello64
ecbuild_cache_check_c_source_compiles( "#define _LARGEFILE64_SOURCE\n#include <stdio.h>\n#include <sys/types.h>\nint main(){FILE* file;off64_t l = ftello64(file);return 0;}\n" EC_HAVE_FTELLO64 )
-
+
# test for lseek64
ecbuild_cache_check_c_source_compiles( "#define _LARGEFILE64_SOURCE\n#include <sys/types.h>\n#include <unistd.h>\nint main(){off64_t h = lseek64(0,0,SEEK_SET);return 0;}\n" EC_HAVE_LSEEK64 )
# test for open64
@@ -114,7 +114,7 @@ if( ENABLE_OS_FUNCTIONS_TEST )
# test for getpwuid_r
ecbuild_cache_check_c_source_compiles( "#include <unistd.h>\n#include <sys/types.h>\n#include <pwd.h>\nint main(){ char buf[4096]; struct passwd pwbuf; struct passwd *pwbufp = 0; getpwuid_r(getuid(), &pwbuf, buf, sizeof(buf), &pwbufp); }\n" EC_HAVE_GETPWUID_R )
# test for getpwnam_r
- ecbuild_cache_check_c_source_compiles( "#include <sys/types.h>\n#include <pwd.h>\nint main(){ struct passwd p; char line[1024]; int n = getpwnam_r(\"user\",&p,line,sizeof(line),0); }\n" EC_HAVE_GETPWNAM_R )
+ ecbuild_cache_check_c_source_compiles( "#include <sys/types.h>\n#include <pwd.h>\nint main(){ struct passwd p; char line[1024]; int n = getpwnam_r(\"user\",&p,line,sizeof(line),0); }\n" EC_HAVE_GETPWNAM_R )
# test for readdir_r
ecbuild_cache_check_c_source_compiles( "#include <dirent.h>\nint main(){ DIR *dirp; struct dirent *entry; struct dirent **result; int i = readdir_r(dirp, entry, result); }\n" EC_HAVE_READDIR_R )
# test for gethostbyname_r
@@ -164,8 +164,8 @@ if( ENABLE_OS_FUNCTIONS_TEST )
endif()
ecbuild_cache_var( EC_HAVE_PROCFS )
-# debug_var(EC_HAVE_PROCFS)
-# debug_var(EC_HAVE_PROCFS_OUTPUT)
+# ecbuild_debug_var(EC_HAVE_PROCFS)
+# ecbuild_debug_var(EC_HAVE_PROCFS_OUTPUT)
endif()
diff --git a/cmake/ecbuild_check_os.cmake b/cmake/ecbuild_check_os.cmake
index 942fb6b..06be4c7 100644
--- a/cmake/ecbuild_check_os.cmake
+++ b/cmake/ecbuild_check_os.cmake
@@ -9,23 +9,34 @@
############################################################################################
# check size of pointer
+# Re-check size of void pointer since for some compiler combinations this is not properly set
ecbuild_cache_check_type_size( "void*" CMAKE_SIZEOF_VOID_P )
+if( NOT CMAKE_C_COMPILER_LOADED AND ENABLE_OS_TESTS )
+
+ enable_language( C )
+ ecbuild_compiler_flags( C )
+
+endif()
+
math( EXPR EC_OS_BITS "${CMAKE_SIZEOF_VOID_P} * 8" )
# we only support 32 and 64 bit operating systems
if( NOT EC_OS_BITS EQUAL "32" AND NOT EC_OS_BITS EQUAL "64" )
- message( FATAL_ERROR "operating system ${CMAKE_SYSTEM} ${EC_OS_BITS} bits -- ecbuild only supports 32 or 64 bit OS's" )
+ message( FATAL_ERROR "operating system ${CMAKE_SYSTEM} ${EC_OS_BITS} bits -- ecbuild only supports 32 or 64 bit OS's" )
endif()
-ecbuild_cache_var( EC_OS_BITS )
############################################################################################
# For 64 bit architectures enable PIC (position-independent code)
-if( ${EC_OS_BITS} EQUAL 64 )
- set( CMAKE_POSITION_INDEPENDENT_CODE ON )
+# Allow overriding the position independent code setting (ECBUILD-220)
+if( DEFINED ECBUILD_POSITION_INDEPENDENT_CODE )
+ set( CMAKE_POSITION_INDEPENDENT_CODE ${ECBUILD_POSITION_INDEPENDENT_CODE} )
+elseif( ${EC_OS_BITS} EQUAL 64 )
+ set( CMAKE_POSITION_INDEPENDENT_CODE ON )
endif()
+
############################################################################################
# check architecture
@@ -101,14 +112,19 @@ endif()
if( ENABLE_OS_ENDINESS_TEST )
if( NOT DEFINED EC_BIG_ENDIAN AND NOT DEFINED EC_LITTLE_ENDIAN )
+
test_big_endian( _BIG_ENDIAN )
if( _BIG_ENDIAN )
- set( EC_BIG_ENDIAN 1 )
+ set( EC_BIG_ENDIAN 1 )
+ set( EC_LITTLE_ENDIAN 0 )
else()
- set( EC_LITTLE_ENDIAN 1 )
+ set( EC_BIG_ENDIAN 0 )
+ set( EC_LITTLE_ENDIAN 1 )
endif()
+
endif()
+
ecbuild_cache_var( EC_BIG_ENDIAN )
ecbuild_cache_var( EC_LITTLE_ENDIAN )
@@ -142,9 +158,15 @@ if( ENABLE_OS_ENDINESS_TEST )
if( "${IEEE_BE}" STREQUAL "" )
set( IEEE_BE 0 CACHE INTERNAL "Test IEEE_BE")
endif()
+
endif()
+
ecbuild_cache_var( IEEE_BE )
+ if( EC_BIG_ENDIAN AND NOT IEEE_BE )
+ ecbuild_critical("Failed to sanity check on endiness: OS should be Big-Endian but compiled code runs differently -- to ignore this pass -DIEEE_BE=0 to CMake/ecBuild")
+ endif()
+
if( NOT DEFINED IEEE_LE )
check_c_source_runs(
"int compare(unsigned char* a,unsigned char* b) {
@@ -172,12 +194,17 @@ if( ENABLE_OS_ENDINESS_TEST )
return 0;
}" IEEE_LE )
- if( "${IEEE_BE}" STREQUAL "" )
+ if( "${IEEE_LE}" STREQUAL "" )
set( IEEE_LE 0 CACHE INTERNAL "Test IEEE_LE")
endif()
endif()
+
ecbuild_cache_var( IEEE_LE )
+ if( EC_LITTLE_ENDIAN AND NOT IEEE_LE )
+ ecbuild_critical("Failed to sanity check on endiness: OS should be Little-Endian but compiled code runs differently -- to ignore this pass -DIEEE_LE=0 to CMake/ecBuild")
+ endif()
+
endif()
############################################################################################
@@ -202,7 +229,7 @@ if( ENABLE_PROFILING )
unset( _trust_flags )
unset( _flags )
-
+
else()
message( WARNING "Profiling enabled but ecbuild doesn't know how to enable for this particular compiler ${CMAKE_C_COMPILER_ID}")
endif()
diff --git a/cmake/ecbuild_compiler_flags.cmake b/cmake/ecbuild_compiler_flags.cmake
new file mode 100644
index 0000000..b97eb2c
--- /dev/null
+++ b/cmake/ecbuild_compiler_flags.cmake
@@ -0,0 +1,97 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+##############################################################################
+#.rst:
+#
+# ecbuild_compiler_flags
+# ======================
+#
+# Set default compiler flags for a given language. ::
+#
+# ecbuild_compiler_flags( <lang> )
+#
+# The procedure is as follows:
+#
+# 1. ecBuild does *not* set ``CMAKE_<lang>_FLAGS`` i.e. the user can set these
+# via -D or the CMake cache and these will be the "base" flags.
+#
+# 2. ecBuild *overwrites* ``CMAKE_<lang>_FLAGS_<btype>`` in the CMake cache
+# for all build types with compiler specific defaults for the currently
+# loaded compiler i.e. any value set by the user via -D or the CMake cache
+# *has no effect*.
+#
+# 3. Any value the user provides via ``ECBUILD_<lang>_FLAGS`` or
+# ``ECBUILD_<lang>_FLAGS_<btype>`` *overrides* the corresponding
+# ``CMAKE_<lang>_FLAGS`` or ``CMAKE_<lang>_FLAGS_<btype>`` *without being
+# written to the CMake cache*.
+#
+##############################################################################
+
+macro( ecbuild_compiler_flags _lang )
+
+ if( CMAKE_${_lang}_COMPILER_LOADED )
+
+ ecbuild_debug( "try include ${ECBUILD_MACROS_DIR}/compiler_flags/${CMAKE_${_lang}_COMPILER_ID}_${_lang}.cmake ")
+
+ include( ${ECBUILD_MACROS_DIR}/compiler_flags/${CMAKE_${_lang}_COMPILER_ID}_${_lang}.cmake OPTIONAL )
+
+ ecbuild_debug_var( CMAKE_${_lang}_FLAGS )
+
+ foreach( _btype NONE DEBUG BIT PRODUCTION RELEASE RELWITHDEBINFO )
+ ecbuild_debug_var( CMAKE_${_lang}_FLAGS_${_btype} )
+ endforeach()
+
+ endif()
+
+ foreach( _btype NONE DEBUG BIT PRODUCTION RELEASE RELWITHDEBINFO )
+ if( DEFINED ECBUILD_${_lang}_FLAGS_${_btype} )
+ set( CMAKE_${_lang}_FLAGS_${_btype} ${ECBUILD_${_lang}_FLAGS_${_btype}} )
+ endif()
+ mark_as_advanced( CMAKE_${_lang}_FLAGS_${_btype} )
+ endforeach()
+
+ if( DEFINED ECBUILD_${_lang}_FLAGS )
+ set( CMAKE_${_lang}_FLAGS "${ECBUILD_${_lang}_FLAGS}" )
+ endif()
+
+ mark_as_advanced( CMAKE_${_lang}_FLAGS )
+
+ if( DEFINED ECBUILD_${_lang}_LINK_FLAGS )
+ set( CMAKE_${_lang}_LINK_FLAGS "${ECBUILD_${_lang}_LINK_FLAGS}" )
+ endif()
+
+ mark_as_advanced( CMAKE_${_lang}_LINK_FLAGS )
+
+endmacro()
+
+#-----------------------------------------------------------------------------------------------------------------------
+
+### OVERRIDE Compiler FLAGS (we override because CMake forcely defines them) -- see ecbuild_compiler_flags() macro
+
+foreach( _lang C CXX Fortran )
+ if( CMAKE_${_lang}_COMPILER_LOADED )
+ ecbuild_compiler_flags( ${_lang} )
+ endif()
+endforeach()
+
+### OVERRIDE Linker FLAGS per object type (we override because CMake forcely defines them)
+
+foreach( _btype NONE DEBUG BIT PRODUCTION RELEASE RELWITHDEBINFO )
+
+ foreach( _obj EXE SHARED MODULE )
+ if( ECBUILD_${_obj}_LINKER_FLAGS_${_btype} )
+ set( CMAKE_${_obj}_LINKER_FLAGS_${_btype} ${ECBUILD_${_obj}_LINKER_FLAGS_${_btype}} )
+ endif()
+ endforeach()
+
+endforeach()
+
+#-----------------------------------------------------------------------------------------------------------------------
+
+mark_as_advanced( CMAKE_C_FLAGS_BIT )
diff --git a/cmake/ecbuild_debug_var.cmake b/cmake/ecbuild_debug_var.cmake
deleted file mode 100644
index 9bb3499..0000000
--- a/cmake/ecbuild_debug_var.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# (C) Copyright 1996-2015 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
-# granted to it by virtue of its status as an intergovernmental organisation nor
-# does it submit to any jurisdiction.
-
-##############################################################################
-# macro for exporting a variable to parent scope
-
-macro( set_parent_scope VAR )
-
- set( ${VAR} ${${VAR}} PARENT_SCOPE )
-
-endmacro( set_parent_scope )
-
-##############################################################################
-# macro for debugging a cmake variable
-
-macro( debug_var VAR )
-
- message( STATUS "${VAR} [${${VAR}}]" )
-
-endmacro( debug_var )
-
-##############################################################################
-# macro for debugging a cmake list
-
-macro( debug_list VAR )
-
- message( STATUS "${VAR}:" )
- foreach( _elem ${${VAR}} )
- message( STATUS " ${_elem}" )
- endforeach()
-
-endmacro( debug_list )
-
-##############################################################################
-# macro for debugging a environment variable within cmake
-
-macro( debug_env_var VAR )
-
- message( STATUS "ENV ${VAR} [$ENV{${VAR}}]" )
-
-endmacro( debug_env_var )
-
diff --git a/cmake/ecbuild_declare_project.cmake b/cmake/ecbuild_declare_project.cmake
index 11052c6..23e835d 100644
--- a/cmake/ecbuild_declare_project.cmake
+++ b/cmake/ecbuild_declare_project.cmake
@@ -69,8 +69,8 @@ macro( ecbuild_declare_project )
get_git_head_revision( GIT_REFSPEC ${PNAME}_GIT_SHA1 )
if( ${PNAME}_GIT_SHA1 )
string( SUBSTRING "${${PNAME}_GIT_SHA1}" 0 7 ${PNAME}_GIT_SHA1_SHORT )
- # debug_var( ${PNAME}_GIT_SHA1 )
- # debug_var( ${PNAME}_GIT_SHA1_SHORT )
+ # ecbuild_debug_var( ${PNAME}_GIT_SHA1 )
+ # ecbuild_debug_var( ${PNAME}_GIT_SHA1_SHORT )
else()
message( STATUS "Could not get git-sha1 for project ${PNAME}")
endif()
@@ -101,11 +101,11 @@ macro( ecbuild_declare_project )
set( ${PNAME}_VERSION_STR "${${PROJECT_NAME}_VERSION_STR}"
CACHE INTERNAL "package ${PNAME} version string" ) # ignore caps
- # debug_var( ${PNAME}_VERSION )
- # debug_var( ${PNAME}_VERSION_STR )
- # debug_var( ${PNAME}_MAJOR_VERSION )
- # debug_var( ${PNAME}_MINOR_VERSION )
- # debug_var( ${PNAME}_PATCH_VERSION )
+ # ecbuild_debug_var( ${PNAME}_VERSION )
+ # ecbuild_debug_var( ${PNAME}_VERSION_STR )
+ # ecbuild_debug_var( ${PNAME}_MAJOR_VERSION )
+ # ecbuild_debug_var( ${PNAME}_MINOR_VERSION )
+ # ecbuild_debug_var( ${PNAME}_PATCH_VERSION )
# install dirs for this project
@@ -151,7 +151,7 @@ macro( ecbuild_declare_project )
CACHE INTERNAL "${PNAME} ${p} full install path" )
endif()
- # debug_var( ${PNAME}_FULL_INSTALL_${p}_DIR )
+ # ecbuild_debug_var( ${PNAME}_FULL_INSTALL_${p}_DIR )
endforeach()
@@ -162,7 +162,7 @@ macro( ecbuild_declare_project )
if( ENABLE_RELATIVE_RPATHS )
file( RELATIVE_PATH relative_rpath ${${PNAME}_FULL_INSTALL_BIN_DIR} ${${PNAME}_FULL_INSTALL_LIB_DIR} )
- # debug_var( relative_rpath )
+ # ecbuild_debug_var( relative_rpath )
ecbuild_append_to_rpath( ${relative_rpath} )
@@ -171,14 +171,14 @@ macro( ecbuild_declare_project )
if( IS_ABSOLUTE ${INSTALL_LIB_DIR} )
ecbuild_append_to_rpath( "${INSTALL_LIB_DIR}" )
else()
- ecbuild_append_to_rpath( "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}" )
+ ecbuild_append_to_rpath( "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}" )
endif()
endif()
endif()
- # debug_var( CMAKE_INSTALL_RPATH )
+ # ecbuild_debug_var( CMAKE_INSTALL_RPATH )
# print project header
diff --git a/cmake/ecbuild_define_build_types.cmake b/cmake/ecbuild_define_build_types.cmake
index 53e4de0..69c5d1b 100644
--- a/cmake/ecbuild_define_build_types.cmake
+++ b/cmake/ecbuild_define_build_types.cmake
@@ -7,55 +7,6 @@
# does it submit to any jurisdiction.
############################################################################################
-# define a Production build type
-
-# NOTE: gcc does not guarrante that -O3 performs better than -O2
-# -- it can perform worse due to assembly code bloating.
-# Moreover for gcc 4.1.2 we found that -O3 remove the parser code generated from Lex/Yacc
-# and therefore in production mode we downgrade to -O2 if the compiler is GCC (for all versions).
-
-
-if(CMAKE_COMPILER_IS_GNUCXX)
- set( CMAKE_CXX_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "Flags used by the C++ compiler during Production builds." FORCE )
-else()
- set( CMAKE_CXX_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "Flags used by the C++ compiler during Production builds." FORCE )
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- set( CMAKE_C_FLAGS_PRODUCTION "-O2 -g" CACHE STRING "Flags used by the C compiler during Production builds." FORCE )
-else()
- set( CMAKE_C_FLAGS_PRODUCTION "-O3 -g" CACHE STRING "Flags used by the C compiler during Production builds." FORCE )
-endif()
-
-set( CMAKE_EXE_LINKER_FLAGS_PRODUCTION "" CACHE STRING "Flags used for linking binaries during Production builds." FORCE )
-set( CMAKE_SHARED_LINKER_FLAGS_PRODUCTION "" CACHE STRING "Flags used by the shared libraries linker during Production builds." FORCE )
-set( CMAKE_MODULE_LINKER_FLAGS_PRODUCTION "" CACHE STRING "Flags used by the static libraries linker during Production builds." FORCE )
-
-mark_as_advanced(
- CMAKE_CXX_FLAGS_PRODUCTION
- CMAKE_C_FLAGS_PRODUCTION
- CMAKE_EXE_LINKER_FLAGS_PRODUCTION
- CMAKE_SHARED_LINKER_FLAGS_PRODUCTION
- CMAKE_MODULE_LINKER_FLAGS_PRODUCTION )
-
-############################################################################################
-# fixes for specific compilers
-
-### remove -Mipa=fast from PGI compilers in RELEASE mode
-
-if( CMAKE_C_COMPILER_ID STREQUAL "PGI" )
- set(CMAKE_C_FLAGS_RELEASE "-fast -O3")
-endif()
-
-if( CMAKE_CXX_COMPILER_ID STREQUAL "PGI" )
- set(CMAKE_CXX_FLAGS_RELEASE "-fast -O3")
-endif()
-
-if( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" )
- set(CMAKE_Fortran_FLAGS_RELEASE "-fast -O3")
-endif()
-
-############################################################################################
# define default build type
set( _BUILD_TYPE_MSG "Build type options are: [ None | Debug | Bit | Production | Release | RelWithDebInfo ]" )
@@ -106,32 +57,3 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "None" AND
NOT CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo" )
message( FATAL_ERROR "CMAKE_BUILD_TYPE is not recognized. ${_BUILD_TYPE_MSG}" )
endif()
-
-############################################################################################
-# overrides of the flags per build type
-
-foreach( _btype NONE DEBUG BIT PRODUCTION RELEASE RELWITHDEBINFO )
-
- # OVERRIDE Compiler FLAGS per language (we override because CMake forcely defines them)
- foreach( _lang C CXX Fortran )
- if( ECBUILD_${_lang}_FLAGS_${_btype} )
- set( CMAKE_${_lang}_FLAGS_${_btype} ${ECBUILD_${_lang}_FLAGS_${_btype}} )
- endif()
- endforeach()
-
- # OVERRIDE Linker FLAGS per object type (we override because CMake forcely defines them)
- foreach( _obj EXE SHARED MODULE )
- if( ECBUILD_${_obj}_LINKER_FLAGS_${_btype} )
- set( CMAKE_${_obj}_LINKER_FLAGS_${_btype} ${ECBUILD_${_obj}_LINKER_FLAGS_${_btype}} )
- endif()
- endforeach()
-
-endforeach()
-
-# APPEND Linker FLAGS per language (we append because CMake typically leaves them empty)
-
-foreach( _lang C CXX Fortran )
- if( ECBUILD_${_lang}_LINK_FLAGS )
- set( CMAKE_${_lang}_LINK_FLAGS "${CMAKE_${_lang}_LINK_FLAGS} ${ECBUILD_${_lang}_LINK_FLAGS}" )
- endif()
-endforeach()
\ No newline at end of file
diff --git a/cmake/ecbuild_define_libs_and_execs_target.cmake b/cmake/ecbuild_define_libs_and_execs_target.cmake
new file mode 100644
index 0000000..ff009f4
--- /dev/null
+++ b/cmake/ecbuild_define_libs_and_execs_target.cmake
@@ -0,0 +1,29 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+set( EC_ALL_EXES "" CACHE INTERNAL "" )
+set( EC_ALL_LIBS "" CACHE INTERNAL "" )
+
+############################################################################################
+# define libs and execs targets
+
+macro( ecbuild_define_libs_and_execs_targets )
+
+ add_custom_target( libs )
+
+ if( EC_ALL_LIBS )
+ add_dependencies( libs ${EC_ALL_LIBS} )
+ endif()
+
+ add_custom_target( execs )
+
+ if( EC_ALL_EXECS )
+ add_dependencies( execs ${EC_ALL_EXES} )
+ endif()
+
+endmacro(ecbuild_define_libs_and_execs_targets)
diff --git a/cmake/ecbuild_links_target.cmake b/cmake/ecbuild_define_links_target.cmake
similarity index 93%
rename from cmake/ecbuild_links_target.cmake
rename to cmake/ecbuild_define_links_target.cmake
index c881c0d..bd9fe6c 100644
--- a/cmake/ecbuild_links_target.cmake
+++ b/cmake/ecbuild_define_links_target.cmake
@@ -63,11 +63,11 @@ macro( ecbuild_define_links_target )
add_custom_target( links DEPENDS ${ec_link_libs} ${ec_link_exes} )
- # debug_var( EC_ALL_EXES )
- # debug_var( ec_link_exes )
+ # ecbuild_debug_var( EC_ALL_EXES )
+ # ecbuild_debug_var( ec_link_exes )
- # debug_var( EC_ALL_LIBS )
- # debug_var( ec_link_libs )
+ # ecbuild_debug_var( EC_ALL_LIBS )
+ # ecbuild_debug_var( ec_link_libs )
endif()
diff --git a/cmake/ecbuild_define_options.cmake b/cmake/ecbuild_define_options.cmake
index f7a2321..e13bc8d 100644
--- a/cmake/ecbuild_define_options.cmake
+++ b/cmake/ecbuild_define_options.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -46,3 +46,7 @@ option( ECBUILD_USE_INCLUDE_DIRECTORIES "Forces to use global include_directorie
mark_as_advanced( ECBUILD_USE_INCLUDE_DIRECTORIES )
set( CMAKE_NO_SYSTEM_FROM_IMPORTED ON )
+
+# hide some CMake options from CMake UI
+
+mark_as_advanced( CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT )
\ No newline at end of file
diff --git a/cmake/ecbuild_echo_targets.cmake b/cmake/ecbuild_echo_targets.cmake
index ddaa2e4..217a196 100644
--- a/cmake/ecbuild_echo_targets.cmake
+++ b/cmake/ecbuild_echo_targets.cmake
@@ -32,13 +32,13 @@ function(ecbuild_echo_target_property tgt prop)
get_property(s TARGET ${tgt} PROPERTY ${prop} SET)
# only produce output for values that are set
- #if(s)
+ if(s)
message("tgt='${tgt}' prop='${prop}'")
message(" value='${v}'")
message(" defined='${d}'")
message(" set='${s}'")
message("")
- #endif()
+ endif()
cmake_policy(POP)
@@ -207,7 +207,7 @@ XCODE_ATTRIBUTE_WHATEVER
message("======================== ${tgt} ========================")
foreach(p ${props})
- ecbuild_echo_target_property("${t}" "${p}")
+ ecbuild_echo_target_property("${tgt}" "${p}")
endforeach()
message("")
endfunction()
diff --git a/cmake/ecbuild_enable_fortran.cmake b/cmake/ecbuild_enable_fortran.cmake
index 16512e8..434d5ee 100644
--- a/cmake/ecbuild_enable_fortran.cmake
+++ b/cmake/ecbuild_enable_fortran.cmake
@@ -39,7 +39,14 @@ macro( ecbuild_enable_fortran )
message(FATAL_ERROR "Unknown keywords given to ecbuild_enable_fortran(): \"${_PAR_UNPARSED_ARGUMENTS}\"")
endif()
- enable_language( Fortran )
+ if( NOT CMAKE_Fortran_COMPILER_LOADED )
+ enable_language( Fortran )
+ ecbuild_compiler_flags( Fortran )
+ if( ENABLE_WARNINGS AND CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
+ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all" )
+ ecbuild_debug( "Fortran FLAG [-warn all] added" )
+ endif()
+ endif()
if( DEFINED _PAR_REQUIRED )
if( CMAKE_Fortran_COMPILER_FORCED )
diff --git a/cmake/ecbuild_features.cmake b/cmake/ecbuild_features.cmake
index 5d619a5..aebd874 100644
--- a/cmake/ecbuild_features.cmake
+++ b/cmake/ecbuild_features.cmake
@@ -10,10 +10,6 @@
include( FeatureSummary )
-function( debug_var _var )
- message( "${_var} = ${${_var}}" )
-endfunction()
-
# Write list of enabled features to CMake variable ${OUT}
macro( ecbuild_enabled_features OUT )
get_property( ${OUT} GLOBAL PROPERTY ENABLED_FEATURES )
@@ -26,17 +22,17 @@ endmacro()
# Enable the feature ${_name} (add to enabled features, remove from disabled)
function( ecbuild_enable_feature _name )
-
+
get_property( _enabled_features GLOBAL PROPERTY ENABLED_FEATURES )
get_property( _disabled_features GLOBAL PROPERTY DISABLED_FEATURES )
-
+
if( _disabled_features )
list( REMOVE_ITEM _disabled_features ${_name} )
endif()
list( APPEND _enabled_features ${_name} )
list( REMOVE_DUPLICATES _enabled_features )
-
+
set_property(GLOBAL PROPERTY ENABLED_FEATURES "${_enabled_features}" )
set_property(GLOBAL PROPERTY DISABLED_FEATURES "${_disabled_features}" )
@@ -47,53 +43,42 @@ function( ecbuild_disable_feature _name )
get_property( _enabled_features GLOBAL PROPERTY ENABLED_FEATURES )
get_property( _disabled_features GLOBAL PROPERTY DISABLED_FEATURES )
-
+
if( _enabled_features )
list( REMOVE_ITEM _enabled_features ${_name} )
endif()
list( APPEND _disabled_features ${_name} )
list( REMOVE_DUPLICATES _disabled_features )
-
+
set_property(GLOBAL PROPERTY ENABLED_FEATURES "${_enabled_features}" )
set_property(GLOBAL PROPERTY DISABLED_FEATURES "${_disabled_features}" )
-
-endfunction()
-# Set description of feature ${_name} to ${_desc}
-function( ecbuild_set_feature_description _name _desc)
- set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
-endfunction()
-
-# Set purpose of feature ${_name} to ${_desc}
-function( ecbuild_set_feature_purpose _name _purpose )
- get_property( _purpose_list GLOBAL PROPERTY _CMAKE_${_name}_PURPOSE )
- list( APPEND _purpose_list ${_purpose} )
- list( REMOVE_DUPLICATES _purpose_list )
- set_property(GLOBAL PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose_list}" )
endfunction()
# en/disable feature ${_name} and set its description and purpose
function( ecbuild_set_feature _name )
set(options ) # none
- set(oneValueArgs ENABLED DESCRIPTION PURPOSE )
+ set(oneValueArgs ENABLED )
set(multiValueArgs ) # none
- CMAKE_PARSE_ARGUMENTS( _PAR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
-
- get_property( _feature_desc GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION )
+ cmake_parse_arguments( _PAR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+
+ get_property( _feature_desc GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION )
get_property( _enabled_features GLOBAL PROPERTY ENABLED_FEATURES )
get_property( _disabled_features GLOBAL PROPERTY DISABLED_FEATURES )
-
+
if( DEFINED _PAR_ENABLED )
if( _PAR_ENABLED )
+ ecbuild_debug( "ecbuild_set_feature(${_name}): enabling feature" )
ecbuild_enable_feature( ${_name} )
else()
+ ecbuild_debug( "ecbuild_set_feature(${_name}): disabling feature" )
ecbuild_disable_feature( ${_name} )
endif()
endif()
-
+
ecbuild_enabled_features( _enabled_features )
list (FIND _enabled_features "${_name}" _index)
if (${_index} GREATER -1)
@@ -105,17 +90,9 @@ function( ecbuild_set_feature _name )
if (${_index} GREATER -1)
set( _feature_found 1 )
endif()
-
+
if( NOT _feature_found )
message( WARNING "Feature ${_name} has not yet been enabled or disabled" )
endif()
-
- if( _PAR_DESCRIPTION )
- ecbuild_set_feature_description( ${_name} ${_PAR_DESCRIPTION} )
- endif()
-
- if( _PAR_PURPOSE )
- ecbuild_set_feature_purpose( ${_name} ${_PAR_PURPOSE} )
- endif()
endfunction()
diff --git a/cmake/ecbuild_find_lexyacc.cmake b/cmake/ecbuild_find_lexyacc.cmake
index 9876097..4853851 100644
--- a/cmake/ecbuild_find_lexyacc.cmake
+++ b/cmake/ecbuild_find_lexyacc.cmake
@@ -34,6 +34,7 @@
#
# The following CMake variables are set if lex and yacc were found:
#
+# :LEXYACC_FOUND: Found suitable combination of bison, lex, yacc, flex
# :LEX_FOUND: lex was found
# :YACC_FOUND: yacc was found
# :LEX_EXECUTABLE: path to the lex executable
@@ -59,25 +60,32 @@ macro( ecbuild_find_lexyacc )
endif()
+ set( LEXYACC_FOUND 1 )
+
if( NOT YACC_FOUND AND NOT BISON_FOUND ) # neither bison nor yacc were found
- message( FATAL_ERROR "neither bison or yacc were found - at least one is required (together with its lexical analyser" )
+ ecbuild_debug( "Neither bison or yacc were found - at least one is required (together with its lexical analyser" )
+ set( LEXYACC_FOUND 0 )
endif()
if( NOT YACC_FOUND ) # check for both bison & flex together
if( BISON_FOUND AND NOT FLEX_FOUND )
- message( FATAL_ERROR "both bison and flex are required - flex not found" )
+ set( LEXYACC_FOUND 0 )
+ ecbuild_debug( "Both bison and flex are required - flex not found" )
endif()
if( FLEX_FOUND AND NOT BISON_FOUND )
- message( FATAL_ERROR "both bison and flex are required - bison not found" )
+ set( LEXYACC_FOUND 0 )
+ ecbuild_debug( "Both bison and flex are required - bison not found" )
endif()
endif()
if( NOT BISON_FOUND ) # check for both yacc & lex together
if( YACC_FOUND AND NOT LEX_FOUND )
- message( FATAL_ERROR "both yacc and lex are required - lex not found" )
+ set( LEXYACC_FOUND 0 )
+ ecbuild_debug( "Both yacc and lex are required - lex not found" )
endif()
if( LEX_FOUND AND NOT YACC_FOUND )
- message( FATAL_ERROR "both yacc and lex are required - yacc not found" )
+ set( LEXYACC_FOUND 0 )
+ ecbuild_debug( "Both yacc and lex are required - yacc not found" )
endif()
endif()
diff --git a/cmake/ecbuild_find_omp.cmake b/cmake/ecbuild_find_omp.cmake
index 882adfe..ff38ccf 100644
--- a/cmake/ecbuild_find_omp.cmake
+++ b/cmake/ecbuild_find_omp.cmake
@@ -206,17 +206,24 @@ endmacro( ecbuild_find_omp )
macro( ecbuild_enable_omp )
+ ecbuild_debug("ecbuild_enable_omp: Trying to enable OpenMP")
ecbuild_find_omp( COMPONENTS C CXX Fortran )
+ ecbuild_debug_var("OMP_C_FOUND")
if( OMP_C_FOUND )
+ ecbuild_debug("Adding ${OMP_C_FLAGS} to CMAKE_C_FLAGS")
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OMP_C_FLAGS}" )
endif()
+ ecbuild_debug_var("OMP_CXX_FOUND")
if( OMP_CXX_FOUND )
+ ecbuild_debug("Adding ${OMP_CXX_FLAGS} to CMAKE_CXX_FLAGS")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OMP_CXX_FLAGS}" )
endif()
+ ecbuild_debug_var("OMP_Fortran_FOUND")
if( OMP_Fortran_FOUND )
+ ecbuild_debug("Adding ${OMP_Fortran_FLAGS} to CMAKE_Fortran_FLAGS")
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OMP_Fortran_FLAGS}" )
endif()
diff --git a/cmake/ecbuild_find_package.cmake b/cmake/ecbuild_find_package.cmake
index b67b51d..3ec1204 100644
--- a/cmake/ecbuild_find_package.cmake
+++ b/cmake/ecbuild_find_package.cmake
@@ -103,7 +103,7 @@ macro( ecbuild_find_package )
message(FATAL_ERROR "Call to ecbuild_find_package() requests EXACT but doesn't specify VERSION.")
endif()
- # debug_var( _PAR_NAME )
+ # ecbuild_debug_var( _PAR_NAME )
string( TOUPPER ${_PAR_NAME} pkgUPPER )
string( TOLOWER ${_PAR_NAME} pkgLOWER )
@@ -157,9 +157,9 @@ macro( ecbuild_find_package )
set( ${_PAR_NAME}_DIR "$ENV{${_PAR_NAME}_DIR}" )
endif()
- # Find packages quietly unless in DEVELOPER_MODE, LOG_LEVEL is DEBUG or the package is REQUIRED
+ # Find packages quietly unless in DEVELOPER_MODE or LOG_LEVEL is DEBUG
- if( NOT ( DEVELOPER_MODE OR _PAR_REQUIRED ) AND ( ECBUILD_LOG_LEVEL GREATER ${ECBUILD_DEBUG} ) )
+ if( NOT DEVELOPER_MODE AND ( ECBUILD_LOG_LEVEL GREATER ${ECBUILD_DEBUG} ) )
set( _find_quiet QUIET )
endif()
diff --git a/cmake/ecbuild_find_python.cmake b/cmake/ecbuild_find_python.cmake
index c001a7b..e06e94f 100644
--- a/cmake/ecbuild_find_python.cmake
+++ b/cmake/ecbuild_find_python.cmake
@@ -14,7 +14,7 @@
#
# Find Python interpreter, its version and the Python libraries. ::
#
-# ecbuild_find_python( [ VERSION <version> ] [ REQUIRED ] )
+# ecbuild_find_python( [ VERSION <version> ] [ REQUIRED ] [ NO_LIBS ] )
#
# Options
# -------
@@ -25,14 +25,18 @@
# REQUIRED : optional
# fail if Python was not found
#
+# NO_LIBS : optional
+# only search for the Python interpreter, not the libraries
+#
# Output variables
# ----------------
#
-# The following CMake variables are set if perl was found:
+# The following CMake variables are set if python was found:
#
# :PYTHONINTERP_FOUND: Python interpreter was found
# :PYTHONLIBS_FOUND: Python libraries were found
# :PYTHON_FOUND: Python was found (both interpreter and libraries)
+# :PYTHON_EXECUTABLE: Python executable
# :PYTHON_VERSION_MAJOR: major version number
# :PYTHON_VERSION_MINOR: minor version number
# :PYTHON_VERSION_PATCH: patch version number
@@ -45,11 +49,11 @@
set( __test_python ${CMAKE_CURRENT_LIST_DIR}/pymain.c )
-macro( ecbuild_find_python )
+function( ecbuild_find_python )
# parse parameters
- set( options REQUIRED )
+ set( options REQUIRED NO_LIBS )
set( single_value_args VERSION )
set( multi_value_args )
@@ -64,7 +68,7 @@ macro( ecbuild_find_python )
find_package( PythonInterp )
if( NOT PYTHONINTERP_FOUND AND _p_REQUIRED )
- message( FATAL_ERROR "Failed to find any Python interpreter (REQUIRED)" )
+ ecbuild_error( "Failed to find any Python interpreter (REQUIRED)" )
endif()
# find python version
@@ -74,10 +78,10 @@ macro( ecbuild_find_python )
# endif()
# endif()
- # message( STATUS "Python version ${PYTHON_VERSION_STRING}" )
- # debug_var(PYTHON_VERSION_MAJOR)
- # debug_var(PYTHON_VERSION_MINOR)
- # debug_var(PYTHON_VERSION_PATCH)
+ # ecbuild_debug( "Python version ${PYTHON_VERSION_STRING}" )
+ # ecbuild_debug_var(PYTHON_VERSION_MAJOR)
+ # ecbuild_debug_var(PYTHON_VERSION_MINOR)
+ # ecbuild_debug_var(PYTHON_VERSION_PATCH)
if( PYTHONINTERP_FOUND AND DEFINED _p_VERSION )
if( _p_VERSION VERSION_GREATER "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}" )
@@ -94,65 +98,77 @@ macro( ecbuild_find_python )
if( PYTHONINTERP_FOUND )
ecbuild_debug( "ecbuild_find_python: Found Python interpreter version ${PYTHON_VERSION_STRING} at ${PYTHON_EXECUTABLE}" )
+ # 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)
+ endif()
+ ecbuild_debug( "ecbuild_find_python: PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}" )
+
+ endif()
+ if( PYTHONINTERP_FOUND AND NOT _p_NO_LIBS )
# find python config
if( PYTHON_EXECUTABLE AND EXISTS ${PYTHON_EXECUTABLE}-config )
- set(PYTHON_CONFIG ${PYTHON_EXECUTABLE}-config CACHE PATH "" FORCE)
+ set(PYTHON_CONFIG_EXECUTABLE ${PYTHON_EXECUTABLE}-config CACHE PATH "" FORCE)
else()
- find_program( PYTHON_CONFIG NAMES python-config python-config${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} )
+ find_program( PYTHON_CONFIG_EXECUTABLE NAMES python-config python-config${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} )
endif()
+ ecbuild_debug_var( PYTHON_CONFIG_EXECUTABLE )
+
# find python libs
- # The OpenBSD python packages have python-config's
+ # The OpenBSD python packages have python-config's
# that don't reliably report linking flags that will work.
-
- if( PYTHON_CONFIG AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
- ecbuild_debug( "ecbuild_find_python: Searching for Python include directories and libraries using ${PYTHON_CONFIG}" )
-
- execute_process(COMMAND "${PYTHON_CONFIG}" --ldflags
+
+ if( PYTHON_CONFIG_EXECUTABLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
+ ecbuild_debug( "ecbuild_find_python: Searching for Python include directories and libraries using ${PYTHON_CONFIG_EXECUTABLE}" )
+
+ execute_process(COMMAND "${PYTHON_CONFIG_EXECUTABLE}" --ldflags
OUTPUT_VARIABLE PYTHON_LIBRARIES
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
- execute_process(COMMAND "${PYTHON_CONFIG}" --includes
- OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
+ execute_process(COMMAND "${PYTHON_CONFIG_EXECUTABLE}" --includes
+ OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
- string(REGEX REPLACE "^[-I]" "" PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
- string(REGEX REPLACE "[ ]-I" " " PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
-
- separate_arguments(PYTHON_INCLUDE_DIR)
+ string(REGEX REPLACE "^[-I]" "" PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}")
+ string(REGEX REPLACE "[ ]-I" " " PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}")
+
+ separate_arguments(PYTHON_INCLUDE_DIRS)
else() # revert to finding pythonlibs the standard way (cmake macro)
ecbuild_debug( "ecbuild_find_python: Searching for Python include directories and libraries using find_package(PythonLibs)" )
-
+
find_package(PythonLibs)
- if( PYTHON_INCLUDE_PATH AND NOT PYTHON_INCLUDE_DIR )
- set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}")
+ if( PYTHON_INCLUDE_PATH AND NOT PYTHON_INCLUDE_DIRS )
+ set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_PATH}")
endif()
endif()
# Remove duplicate include directories
- list(REMOVE_DUPLICATES PYTHON_INCLUDE_DIR)
+ list(REMOVE_DUPLICATES PYTHON_INCLUDE_DIRS)
- # Test if we can link against the Python libraries and include Python.h
- try_compile( PYTHON_LIBS_WORKING ${CMAKE_CURRENT_BINARY_DIR}
- ${__test_python}
- CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${PYTHON_INCLUDE_DIR}"
- LINK_LIBRARIES ${PYTHON_LIBRARIES} )
- # set output variables
+ if( PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS )
+ # Test if we can link against the Python libraries and include Python.h
+ try_compile( PYTHON_LIBS_WORKING ${CMAKE_CURRENT_BINARY_DIR}
+ ${__test_python}
+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${PYTHON_INCLUDE_DIRS}"
+ LINK_LIBRARIES ${PYTHON_LIBRARIES} )
- find_package_handle_standard_args( PythonLibs DEFAULT_MSG
- PYTHON_INCLUDE_DIR PYTHON_LIBRARIES PYTHON_LIBS_WORKING )
- ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}" )
- ecbuild_debug( "ecbuild_find_python: PYTHON_LIBRARIES=${PYTHON_LIBRARIES}" )
+ # set output variables
- set( PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} )
- set( PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE_DIR} )
+ find_package_handle_standard_args( PythonLibs DEFAULT_MSG
+ PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES PYTHON_LIBS_WORKING )
+ ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_DIRS=${PYTHON_INCLUDE_DIRS}" )
+ ecbuild_debug( "ecbuild_find_python: PYTHON_LIBRARIES=${PYTHON_LIBRARIES}" )
+
+ endif()
# Also set PYTHON_FOUND and Python_FOUND for compatibility with ecbuild_add_option
if( PYTHONLIBS_FOUND )
@@ -160,18 +176,30 @@ macro( ecbuild_find_python )
set( Python_FOUND 1 )
endif()
- # find where python site-packages are ...
-
- 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)
- ecbuild_debug( "ecbuild_find_python: PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}" )
-
endif()
-# debug_var( PYTHONINTERP_FOUND )
-# debug_var( PYTHON_EXECUTABLE )
-# debug_var( PYTHONLIBS_FOUND )
-# debug_var( PYTHON_INCLUDE_DIRS )
-# debug_var( PYTHON_LIBRARIES )
-# debug_var( PYTHON_SITE_PACKAGES )
-
-endmacro( ecbuild_find_python )
+ ecbuild_debug_var( PYTHONINTERP_FOUND )
+ ecbuild_debug_var( PYTHON_FOUND )
+ ecbuild_debug_var( PYTHON_EXECUTABLE )
+ ecbuild_debug_var( PYTHON_CONFIG_EXECUTABLE )
+ ecbuild_debug_var( PYTHON_VERSION_MAJOR )
+ ecbuild_debug_var( PYTHON_VERSION_MINOR )
+ ecbuild_debug_var( PYTHON_VERSION_PATCH )
+ ecbuild_debug_var( PYTHON_VERSION_STRING )
+ ecbuild_debug_var( PYTHON_INCLUDE_DIRS )
+ ecbuild_debug_var( PYTHON_LIBRARIES )
+ ecbuild_debug_var( PYTHON_SITE_PACKAGES )
+
+ set( PYTHONINTERP_FOUND ${PYTHONINTERP_FOUND} PARENT_SCOPE )
+ set( PYTHONLIBS_FOUND ${PYTHONLIBS_FOUND} PARENT_SCOPE )
+ set( PYTHON_FOUND ${PYTHON_FOUND} PARENT_SCOPE )
+ set( PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} PARENT_SCOPE )
+ set( PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR} PARENT_SCOPE )
+ set( PYTHON_VERSION_MINOR ${PYTHON_VERSION_MINOR} PARENT_SCOPE )
+ set( PYTHON_VERSION_PATCH ${PYTHON_VERSION_PATCH} PARENT_SCOPE )
+ set( PYTHON_VERSION_STRING ${PYTHON_VERSION_STRING} PARENT_SCOPE )
+ set( PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} PARENT_SCOPE )
+ set( PYTHON_LIBRARIES ${PYTHON_LIBRARIES} PARENT_SCOPE )
+ set( PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES} PARENT_SCOPE )
+
+endfunction( ecbuild_find_python )
diff --git a/cmake/ecbuild_generate_fortran_interfaces.cmake b/cmake/ecbuild_generate_fortran_interfaces.cmake
new file mode 100644
index 0000000..d57d89a
--- /dev/null
+++ b/cmake/ecbuild_generate_fortran_interfaces.cmake
@@ -0,0 +1,115 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+##############################################################################
+#.rst:
+#
+# ecbuild_generate_fortran_interfaces
+# ===================================
+#
+# Generates interfaces form the Fortran source files. ::
+#
+# ecbuild_generate_fortran_interfaces()
+#
+# Options
+# -------
+#
+# TARGET : required
+# target name
+#
+##############################################################################
+
+function( ecbuild_generate_fortran_interfaces )
+
+ find_program( FCM_EXECUTABLE fcm REQUIRED DOC "Fortran interface generator" )
+
+ if( NOT FCM_EXECUTABLE )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: fcm executable not found." )
+ endif()
+
+ set( FCM_CONFIG_FILE "${PROJECT_SOURCE_DIR}/cmake/fcm-make-interfaces.cfg")
+
+ if( NOT EXISTS ${FCM_CONFIG_FILE} )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: needs fcm configuration in ${FCM_CONFIG_FILE}" )
+ endif()
+
+ set( options )
+ set( single_value_args TARGET DESTINATION PARALLEL INCLUDE_DIRS GENERATED SOURCE_DIR )
+ set( multi_value_args DIRECTORIES )
+
+ cmake_parse_arguments( P "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
+
+ if( NOT DEFINED P_TARGET )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: TARGET argument missing" )
+ endif()
+
+ if( NOT DEFINED P_DESTINATION )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: DESTINATION argument missing" )
+ endif()
+
+ if( NOT DEFINED P_DIRECTORIES )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: DIRECTORIES argument missing" )
+ endif()
+
+ if( NOT DEFINED P_PARALLEL OR (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") )
+ set( P_PARALLEL 1 )
+ endif()
+
+ if( NOT DEFINED P_SOURCE_DIR )
+ message( FATAL_ERROR "ecbuild_generate_fortran_interfaces: SOURCE_DIR argument missing")
+ endif()
+
+ foreach( _srcdir ${P_DIRECTORIES} )
+ if( _srcdir MATCHES "/$" )
+ ecbuild_critical("ecbuild_generate_fortran_interfaces: directory ${_srcdir} must not end with /")
+ endif()
+ ecbuild_list_add_pattern( LIST fortran_files SOURCE_DIR ${P_SOURCE_DIR} GLOB ${_srcdir}/*.F* )
+ endforeach()
+
+ string( REPLACE ";" " " _srcdirs "${P_DIRECTORIES}" )
+
+ set( _cnt 0 )
+ foreach( file ${_fortran_files} )
+ if( ${${SRC}/file} IS_NEWER_THAN ${${SRC}/file} )
+ set( run_fcm 1 )
+ endif()
+ endforeach()
+
+ foreach( fortran_file ${fortran_files} )
+ #list( APPEND fullpath_fortran_files ${CMAKE_CURRENT_SOURCE_DIR}/${fortran_file} )
+ get_filename_component(base ${fortran_file} NAME_WE)
+ set( interface_file "${CMAKE_CURRENT_BINARY_DIR}/interfaces/include/${base}.intfb.h" )
+ list( APPEND interface_files ${interface_file} )
+ set_source_files_properties( ${interface_file} PROPERTIES GENERATED TRUE )
+ math(EXPR _cnt "${_cnt}+1")
+ endforeach()
+
+ ecbuild_info("Target ${P_TARGET} will generate ${_cnt} interface files using FCM")
+
+ if( DEFINED P_GENERATED )
+ set( ${P_GENERATED} ${interface_files} PARENT_SCOPE )
+ endif()
+
+ set( include_dir ${CMAKE_CURRENT_BINARY_DIR}/${P_DESTINATION}/interfaces/include )
+ set( ${P_INCLUDE_DIRS} ${include_dir} PARENT_SCOPE )
+
+ execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${include_dir}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
+
+ add_custom_command(
+ OUTPUT "${P_DESTINATION}/${P_TARGET}.timestamp"
+ COMMAND ${FCM_EXECUTABLE} make -j ${P_PARALLEL} --config-file=${FCM_CONFIG_FILE} interfaces.ns-incl=${_srcdirs} interfaces.source=${P_SOURCE_DIR}
+ COMMAND touch "${P_TARGET}.timestamp"
+ DEPENDS ${fortran_files}
+ COMMENT "Generating ${_cnt} interface files for target ${P_TARGET}"
+ WORKING_DIRECTORY ${P_DESTINATION} VERBATIM )
+
+ add_custom_target( ${P_TARGET} DEPENDS ${P_DESTINATION}/${P_TARGET}.timestamp )
+
+
+endfunction( ecbuild_generate_fortran_interfaces )
diff --git a/cmake/ecbuild_generate_yy.cmake b/cmake/ecbuild_generate_yy.cmake
index 5ef2dad..85cdd9b 100644
--- a/cmake/ecbuild_generate_yy.cmake
+++ b/cmake/ecbuild_generate_yy.cmake
@@ -19,6 +19,7 @@
# LEX <file>
# DEPENDANT <file1> [ <file2> ... ]
# [ SOURCE_DIR <dir> ]
+# [ OUTPUT_DIRECTORY <dir> ]
# [ YACC_TARGET <file> ]
# [ LEX_TARGET <file> ]
# [ YACC_FLAGS <flags> ]
@@ -45,6 +46,9 @@
# SOURCE_DIR : optional, defaults to CMAKE_CURRENT_SOURCE_DIR
# directory where yacc and lex source files are located
#
+# OUTPUT_DIRECTORY : optional, defaults to CMAKE_CURRENT_BINARY_DIR
+# output directory for yacc and lex target files
+#
# YACC_TARGET : optional, defaults to YACC
# base name of the generated yacc target file (without .c extension)
#
@@ -72,7 +76,7 @@ macro( ecbuild_generate_yy )
ecbuild_find_perl( REQUIRED )
set( options )
- set( single_value_args YYPREFIX YACC LEX SOURCE_DIR YACC_TARGET LEX_TARGET LEX_FLAGS YACC_FLAGS FLEX_FLAGS BISON_FLAGS )
+ set( single_value_args YYPREFIX YACC LEX SOURCE_DIR OUTPUT_DIRECTORY YACC_TARGET LEX_TARGET LEX_FLAGS YACC_FLAGS FLEX_FLAGS BISON_FLAGS )
set( multi_value_args DEPENDANT )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -125,19 +129,23 @@ macro( ecbuild_generate_yy )
set ( _PAR_LEX_TARGET ${_PAR_LEX} )
endif()
- set( ${BASE}yy_tmp_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_YACC_TARGET}.tmp.c )
- set( ${BASE}yh_tmp_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_YACC_TARGET}.tmp.h )
- set( ${BASE}yl_tmp_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_LEX_TARGET}.tmp.c )
-
- set( ${BASE}yy_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_YACC_TARGET}.c )
- set( ${BASE}yh_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_YACC_TARGET}.h )
- set( ${BASE}yl_target ${CMAKE_CURRENT_BINARY_DIR}/${_PAR_LEX_TARGET}.c )
-
if( NOT _PAR_SOURCE_DIR )
set( _PAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
endif()
- add_custom_target( ${_PAR_YYPREFIX}_${DEPENDANT} SOURCES ${_PAR_SOURCE_DIR}/${_PAR_YACC}.y ${_PAR_SOURCE_DIR}/${_PAR_LEX}.l )
+ if( NOT _PAR_OUTPUT_DIRECTORY )
+ set( _PAR_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
+ else()
+ file( MAKE_DIRECTORY ${_PAR_OUTPUT_DIRECTORY} )
+ endif()
+
+ set( ${BASE}yy_tmp_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_YACC_TARGET}.tmp.c )
+ set( ${BASE}yh_tmp_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_YACC_TARGET}.tmp.h )
+ set( ${BASE}yl_tmp_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_LEX_TARGET}.tmp.c )
+
+ set( ${BASE}yy_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_YACC_TARGET}.c )
+ set( ${BASE}yh_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_YACC_TARGET}.h )
+ set( ${BASE}yl_target ${_PAR_OUTPUT_DIRECTORY}/${_PAR_LEX_TARGET}.c )
if( BISON_FOUND )
bison_target( ${BASE}_parser ${_PAR_SOURCE_DIR}/${_PAR_YACC}.y ${${BASE}yy_tmp_target} COMPILE_FLAGS "${_PAR_BISON_FLAGS}" )
diff --git a/cmake/ecbuild_get_resources.cmake b/cmake/ecbuild_get_resources.cmake
index da824d9..d79ee59 100644
--- a/cmake/ecbuild_get_resources.cmake
+++ b/cmake/ecbuild_get_resources.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -29,7 +29,7 @@ macro( ecbuild_get_resources )
if( NOT _PAR_TO_DIR )
set( _PAR_TO_DIR ${CMAKE_CURRENT_BINARY_DIR} )
endif()
-
+
list( LENGTH _PAR_LIST _rsize )
math( EXPR _max "${_rsize}-1" )
foreach( i RANGE 0 ${_max} 2 )
@@ -39,14 +39,14 @@ macro( ecbuild_get_resources )
list( GET _PAR_LIST ${i} r )
list( GET _PAR_LIST ${in} rh )
-# debug_var( r )
-# debug_var( rh )
+# ecbuild_debug_var( r )
+# ecbuild_debug_var( rh )
get_filename_component( rf ${r} NAME )
file( DOWNLOAD ${r} ${_PAR_TO_DIR}/${rf} EXPECTED_HASH SHA1=${rh} )
endforeach()
-
+
endmacro()
diff --git a/cmake/ecbuild_get_test_data.cmake b/cmake/ecbuild_get_test_data.cmake
index 8106c65..0920133 100644
--- a/cmake/ecbuild_get_test_data.cmake
+++ b/cmake/ecbuild_get_test_data.cmake
@@ -151,10 +151,10 @@ function( ecbuild_get_test_data )
set( _p_DIRNAME ${PROJECT_NAME}/${currdir} )
endif()
-# debug_var( _p_TARGET )
-# debug_var( _p_NAME )
-# debug_var( _p_URL )
-# debug_var( _p_DIRNAME )
+# ecbuild_debug_var( _p_TARGET )
+# ecbuild_debug_var( _p_NAME )
+# ecbuild_debug_var( _p_URL )
+# ecbuild_debug_var( _p_DIRNAME )
# download the data
@@ -326,9 +326,9 @@ function( ecbuild_get_test_multidata )
message(FATAL_ERROR "ecbuild_get_test_data() expects a TARGET")
endif()
-# debug_var( _p_TARGET )
-# debug_var( _p_NAME )
-# debug_var( _p_DIRNAME )
+# ecbuild_debug_var( _p_TARGET )
+# ecbuild_debug_var( _p_NAME )
+# ecbuild_debug_var( _p_DIRNAME )
if( _p_EXTRACT )
set( _extract EXTRACT )
@@ -372,11 +372,11 @@ endfunction()\n\n" )
set( _md5 MD5 ${_md5} )
endif()
- #debug_var(_f)
- #debug_var(_file)
- #debug_var(_dirname)
- #debug_var(_name)
- #debug_var(_md5)
+ #ecbuild_debug_var(_f)
+ #ecbuild_debug_var(_file)
+ #ecbuild_debug_var(_dirname)
+ #ecbuild_debug_var(_name)
+ #ecbuild_debug_var(_md5)
ecbuild_get_test_data(
TARGET __get_data_${_p_TARGET}_${_name}
diff --git a/cmake/ecbuild_git.cmake b/cmake/ecbuild_git.cmake
index 42124db..2ae0513 100644
--- a/cmake/ecbuild_git.cmake
+++ b/cmake/ecbuild_git.cmake
@@ -8,6 +8,8 @@
set( ECBUILD_GIT ON CACHE BOOL "Turn on/off ecbuild_git() function" )
+mark_as_advanced(ECBUILD_GIT)
+
if( ECBUILD_GIT )
find_package(Git)
@@ -106,7 +108,7 @@ macro( ecbuild_git )
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${PARENT_DIR}")
if(nok)
- message(FATAL_ERROR "${_PAR_DIR} git clone failed: ${error}\n")
+ message(FATAL_ERROR "${_PAR_DIR} git clone failed:\n ${GIT_EXECUTABLE} clone ${_PAR_URL} ${clone_args} ${_PAR_DIR} -q\n ${error}\n")
endif()
message( STATUS "${_PAR_DIR} retrieved.")
set( _needs_switch 1 )
@@ -133,7 +135,6 @@ macro( ecbuild_git )
message(STATUS "git rev-parse --abbrev-ref HEAD on ${_PAR_DIR} failed:\n ${error}")
endif()
- #message(STATUS "git describe --exact-match --abbrev=0 @ ${ABS_PAR_DIR}")
execute_process( COMMAND ${GIT_EXECUTABLE} describe --exact-match --abbrev=0
OUTPUT_VARIABLE _current_tag RESULT_VARIABLE nok ERROR_VARIABLE error
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
@@ -148,7 +149,6 @@ macro( ecbuild_git )
endif()
if( NOT _current_tag ) # try nother method
- #message(STATUS "git name-rev --tags --name-only @ ${ABS_PAR_DIR}")
execute_process( COMMAND ${GIT_EXECUTABLE} name-rev --tags --name-only ${_sha1}
OUTPUT_VARIABLE _current_tag RESULT_VARIABLE nok ERROR_VARIABLE error
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -231,7 +231,7 @@ macro( ecbuild_git )
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${ABS_PAR_DIR}")
if(nok)
- message(FATAL_ERROR "git checkout ${_gitref} on ${_PAR_DIR} failed:\n ${error}")
+ message(FATAL_ERROR "git checkout ${_gitref} on ${_PAR_DIR} failed:\n ${GIT_EXECUTABLE} checkout -q ${_gitref}\n ${error}")
endif()
if( DEFINED _PAR_BRANCH AND _PAR_UPDATE ) #############################################################################
diff --git a/cmake/ecbuild_install_project.cmake b/cmake/ecbuild_install_project.cmake
index d53f110..960d8d9 100644
--- a/cmake/ecbuild_install_project.cmake
+++ b/cmake/ecbuild_install_project.cmake
@@ -33,7 +33,7 @@
# the project with cpack and exports the configuration and targets for other
# projects to use.
#
-# In a top-level project, the following files are generated:
+# Unless ECBUILD_SKIP_<PNAME>_EXPORT is set, the following files are generated:
#
# :<project>-config.cmake: default project configuration
# :<project>-config-version.cmake: project version number
@@ -49,7 +49,7 @@
# and ``<project>-config-version.cmake``.
#
# In DEVELOPER_MODE, the build tree location is also added to the CMake user
-# package registry.
+# package registry for top level projects.
#
# If the project is added as a subdirectory, the following CMake variables
# are set in the parent scope:
@@ -70,7 +70,6 @@
#
##############################################################################
-
macro( ecbuild_install_project )
set( options )
@@ -87,6 +86,17 @@ macro( ecbuild_install_project )
message(FATAL_ERROR "The call to ecbuild_install_project() doesn't specify the NAME.")
endif()
+ ### EXTRA TARGETS #####################################################
+
+ # added here to avoid adding another macro call at the end of each project,
+
+ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
+
+ ecbuild_define_libs_and_execs_targets()
+ ecbuild_define_links_target()
+
+ endif()
+
### PACKAGING ########################################################
set( PNAME ${PROJECT_NAME_CAPS} )
@@ -160,6 +170,8 @@ macro( ecbuild_install_project )
PATHS ${ECBUILD_MACROS_DIR}/../toolchains
${ECBUILD_MACROS_DIR}/../share/ecbuild/toolchains )
+ mark_as_advanced( ECBUILD_TOOLCHAIN_DIR )
+
if( ECBUILD_TOOLCHAIN_DIR )
list( APPEND CPACK_SOURCE_INSTALLED_DIRECTORIES "${ECBUILD_TOOLCHAIN_DIR}" "share/ecbuild/toolchains/" )
endif()
@@ -169,6 +181,8 @@ macro( ecbuild_install_project )
PATHS ${ECBUILD_MACROS_DIR}/../bin
${ECBUILD_MACROS_DIR}/../../../bin )
+ mark_as_advanced( ECBUILD_SCRIPT )
+
if( ECBUILD_SCRIPT )
get_filename_component( ECBUILD_BIN_DIR ${ECBUILD_SCRIPT} PATH )
list( APPEND CPACK_SOURCE_INSTALLED_DIRECTORIES "${ECBUILD_BIN_DIR}" "bin/" )
@@ -219,16 +233,9 @@ macro( ecbuild_install_project )
endif()
endforeach()
- # TOP-LEVEL PROJECT EXPORT
-
- if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
-
- # exports the package for use from the build-tree but only in DEVELOPER_MODE
- # inserts <package> into the CMake user package registry
-
- if( DEVELOPER_MODE )
- export( PACKAGE ${PROJECT_NAME} )
- endif()
+ # Generate the project .cmake config files
+ # All variables here must be (sub)project specific in order to work within bundles
+ if ( NOT ECBUILD_SKIP_${PNAME}_EXPORT )
set( _template_config "${ECBUILD_MACROS_DIR}/project-config.cmake.in" )
if( EXISTS ${LNAME}-config.cmake.in )
@@ -242,7 +249,9 @@ macro( ecbuild_install_project )
# project-config-version.cmake -- format ([0-9]+).([0-9]+).([0-9]+)
- set( PACKAGE_VERSION "${${PNAME}_VERSION}" )
+ set( PACKAGE_VERSION "${${PNAME}_VERSION}" )
+ set( PACKAGE_GIT_SHA1 "${${PNAME}_GIT_SHA1}" )
+ set( PACKAGE_GIT_SHA1_SHORT "${${PNAME}_GIT_SHA1_SHORT}" )
configure_file( "${_template_config_version}" "${PROJECT_BINARY_DIR}/${LNAME}-config-version.cmake" @ONLY )
@@ -297,6 +306,7 @@ macro( ecbuild_install_project )
# If <project>-import.cmake.in exist in source tree, configure it to
# the build tree and install the configured version
if( EXISTS "${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}.in" )
+ ecbuild_debug( "Found ${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}.in - configuring to ${PROJECT_BINARY_DIR}/${CONF_IMPORT_FILE}" )
configure_file( "${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}.in"
"${PROJECT_BINARY_DIR}/${CONF_IMPORT_FILE}" @ONLY )
install( FILES "${PROJECT_BINARY_DIR}/${CONF_IMPORT_FILE}"
@@ -304,10 +314,13 @@ macro( ecbuild_install_project )
# Otherwise, if <project>-import.cmake exist in source tree, copy it to
# the build tree and install it
elseif( EXISTS "${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}" )
+ ecbuild_debug( "Found ${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE} - copying to ${PROJECT_BINARY_DIR}/${CONF_IMPORT_FILE}" )
configure_file( "${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}"
"${PROJECT_BINARY_DIR}/${CONF_IMPORT_FILE}" COPYONLY )
install( FILES "${PROJECT_SOURCE_DIR}/${CONF_IMPORT_FILE}"
DESTINATION "${INSTALL_CMAKE_DIR}" )
+ else()
+ ecbuild_debug( "No ${CONF_IMPORT_FILE} found in ${PROJECT_SOURCE_DIR}" )
endif()
set( _lname_config "${PROJECT_BINARY_DIR}/${LNAME}-config.cmake")
@@ -318,13 +331,28 @@ macro( ecbuild_install_project )
file( REMOVE ${_lname_config}.tpls.in )
foreach( _tpl ${${PNAME}_TPLS} )
+
string( TOUPPER ${_tpl} TPL )
- if( ${TPL}_IMPORT_FILE )
+
+ if( ${TPL}_IMPORT_FILE ) # ecBuild packages should trigger this if they export themselves
+
+ ecbuild_debug( "Adding TPL ${TPL} import file to ${_lname_config}.tpls.in" )
set( __import_file "${${TPL}_IMPORT_FILE}" )
file( APPEND "${_lname_config}.tpls.in" "if( NOT ${TPL}_IMPORT_FILE )\n" )
file( APPEND "${_lname_config}.tpls.in" " include( \"${__import_file}\" OPTIONAL )\n" )
file( APPEND "${_lname_config}.tpls.in" "endif()\n" )
+
+ elseif( ${TPL}_CONFIG ) # cmake built packages (e.g. CGAL) may have exported their targets
+
+ ecbuild_debug( "Adding TPL ${TPL} import file to ${_lname_config}.tpls.in" )
+ set( __import_file "${${TPL}_CONFIG}" )
+ file( APPEND "${_lname_config}.tpls.in" "if( NOT ${TPL}_CONFIG )\n" )
+ file( APPEND "${_lname_config}.tpls.in" " include( \"${__import_file}\" OPTIONAL )\n" )
+ file( APPEND "${_lname_config}.tpls.in" " set( ${TPL}_CONFIG \"${__import_file}\" )\n" )
+ file( APPEND "${_lname_config}.tpls.in" "endif()\n" )
+
endif()
+
endforeach()
if( EXISTS "${_lname_config}.tpls.in" )
@@ -361,14 +389,30 @@ macro( ecbuild_install_project )
# install the export
if( ${PROJECT_NAME}_ALL_EXES OR ${PROJECT_NAME}_ALL_LIBS )
- install( EXPORT ${CMAKE_PROJECT_NAME}-targets DESTINATION "${INSTALL_CMAKE_DIR}" )
+ install( EXPORT ${PROJECT_NAME}-targets
+ DESTINATION "${INSTALL_CMAKE_DIR}" )
+ endif()
+
+ endif() # if ( NOT ECBUILD_SKIP_${PNAME}_EXPORT )
+
+ # exports the package for use from the build-tree but only in DEVELOPER_MODE
+ # inserts <package> into the CMake user package registry
+
+ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
+
+ if( DEVELOPER_MODE )
+ export( PACKAGE ${PROJECT_NAME} )
endif()
else()
+ # export variables for upper projects
+
set( ${PNAME}_FOUND TRUE PARENT_SCOPE )
set( ${PROJECT_NAME}_FOUND TRUE PARENT_SCOPE )
set( ${PNAME}_VERSION ${${PNAME}_VERSION} PARENT_SCOPE )
+ set( ${PNAME}_GIT_SHA1 ${${PNAME}_GIT_SHA1} PARENT_SCOPE )
+ set( ${PNAME}_GIT_SHA1_SHORT ${${PNAME}_GIT_SHA1_SHORT} PARENT_SCOPE )
set( ${PROJECT_NAME}_VERSION ${${PNAME}_VERSION} PARENT_SCOPE )
set( ${PNAME}_INCLUDE_DIRS ${${PNAME}_INCLUDE_DIRS} PARENT_SCOPE )
set( ${PNAME}_LIBRARIES ${${PNAME}_LIBRARIES} PARENT_SCOPE )
@@ -382,6 +426,7 @@ macro( ecbuild_install_project )
foreach( _f ${${PNAME}_FEATURES} )
set( ${PNAME}_HAVE_${_f} ${${PNAME}_HAVE_${_f}} PARENT_SCOPE )
endforeach()
- endif()
+
+ endif()
endmacro( ecbuild_install_project )
diff --git a/cmake/ecbuild_list_add_pattern.cmake b/cmake/ecbuild_list_add_pattern.cmake
new file mode 100644
index 0000000..32cf74a
--- /dev/null
+++ b/cmake/ecbuild_list_add_pattern.cmake
@@ -0,0 +1,102 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+##############################################################################
+#.rst:
+#
+# ecbuild_list_add_pattern
+# ========================
+#
+# Exclude items from a list that match a list of patterns. ::
+#
+# ecbuild_list_add_pattern( LIST <input_list>
+# GLOB <pattern1> [ <pattern2> ... ]
+# [ SOURCE_DIR <source_dir> ]
+# [ QUIET ] )
+#
+# Options
+# -------
+#
+# LIST : required
+# list variable to be appended to
+#
+# GLOB : required
+# Regex pattern of exclusion
+#
+# SOURCE_DIR : optional
+# Directory from where to start search
+#
+# QUIET : optional
+# Don't warn if patterns don't match
+#
+##############################################################################
+
+function( ecbuild_list_add_pattern )
+
+ set( options QUIET )
+ set( single_value_args LIST SOURCE_DIR )
+ set( multi_value_args GLOB )
+
+ cmake_parse_arguments( _p "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
+
+ if(_p_UNPARSED_ARGUMENTS)
+ ecbuild_critical("Unknown keywords given to ecbuild_list_add_pattern(): \"${_p_UNPARSED_ARGUMENTS}\"")
+ endif()
+
+ if( NOT _p_LIST )
+ ecbuild_critical("The call to ecbuild_list_add_pattern() doesn't specify the LIST.")
+ endif()
+
+ if( NOT _p_GLOB )
+ ecbuild_critical("The call to ecbuild_list_add_pattern() doesn't specify the GLOB.")
+ endif()
+
+ #####
+
+ set( input_list ${${_p_LIST}} )
+ unset( matched_files )
+
+ foreach( pattern ${_p_GLOB} )
+
+ if( IS_ABSOLUTE ${pattern} )
+ ecbuild_debug( "ecbuild_list_add_pattern: Adding ${pattern}" )
+ file( GLOB_RECURSE matched_files ${pattern} )
+ else()
+
+ if(_p_SOURCE_DIR)
+ if( IS_ABSOLUTE ${_p_SOURCE_DIR} )
+ ecbuild_debug( "ecbuild_list_add_pattern: Adding ${_p_SOURCE_DIR}/${pattern}" )
+ file( GLOB_RECURSE matched_files ${_p_SOURCE_DIR}/${pattern} )
+ else()
+ ecbuild_debug( "ecbuild_list_add_pattern: Adding ${_p_SOURCE_DIR}/${pattern}" )
+ file( GLOB_RECURSE matched_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${_p_SOURCE_DIR}/${pattern} )
+ endif()
+ else()
+ ecbuild_debug( "ecbuild_list_add_pattern: Adding ${pattern} ")
+ file( GLOB_RECURSE matched_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${pattern} )
+ endif()
+
+ endif()
+
+ if(matched_files)
+ ecbuild_debug( "ecbuild_list_add_pattern: Found ${matched_files}" )
+ list( APPEND input_list ${matched_files} )
+ list( REMOVE_DUPLICATES input_list )
+ set( ${_p_LIST} ${input_list} PARENT_SCOPE )
+ else()
+ if(NOT _p_QUIET)
+ ecbuild_warn( "ecbuild_list_add_pattern: no matches found for patterns ${pattern}" )
+ else()
+ ecbuild_debug( "ecbuild_list_add_pattern:no matches found for patterns ${pattern}" )
+ endif()
+ endif()
+
+ endforeach()
+
+
+endfunction(ecbuild_list_add_pattern)
diff --git a/cmake/ecbuild_list_exclude_pattern.cmake b/cmake/ecbuild_list_exclude_pattern.cmake
new file mode 100644
index 0000000..9add278
--- /dev/null
+++ b/cmake/ecbuild_list_exclude_pattern.cmake
@@ -0,0 +1,88 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation nor
+# does it submit to any jurisdiction.
+
+##############################################################################
+#.rst:
+#
+# ecbuild_list_exclude_pattern
+# ============================
+#
+# Exclude items from a list that match a list of patterns. ::
+#
+# ecbuild_list_exclude_pattern( LIST <input_list>
+# REGEX <regex1> [ <regex2> ... ]
+# [ QUIET ] )
+#
+# Options
+# -------
+#
+# LIST : required
+# list variable to be cleaned
+#
+# REGEX : required
+# Regex pattern of exclusions
+#
+# QUIET : optional
+# Don't warn if patterns don't match
+#
+##############################################################################
+
+function( ecbuild_list_exclude_pattern )
+
+ set( options QUIET )
+ set( single_value_args LIST )
+ set( multi_value_args REGEX )
+
+ cmake_parse_arguments( _p "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
+
+ if(_p_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to ecbuild_list_exclude_pattern(): \"${_p_UNPARSED_ARGUMENTS}\"")
+ endif()
+
+ if( NOT _p_LIST )
+ message(FATAL_ERROR "The call to ecbuild_list_exclude_pattern() doesn't specify the LIST.")
+ endif()
+
+ if( NOT _p_REGEX )
+ message(FATAL_ERROR "The call to ecbuild_list_exclude_pattern() doesn't specify the REGEX.")
+ endif()
+
+ #####
+
+ set( result "" )
+ set( matches_found 0 )
+
+ # ecbuild_debug_var(_p_REGEX)
+
+ foreach( item ${${_p_LIST}} )
+
+ set( _keep 1 )
+
+ foreach( pattern ${_p_REGEX} )
+ if( ${item} MATCHES ${pattern} )
+ set( _keep 0 )
+ set( matches_found 1 )
+ endif()
+ endforeach()
+ if( _keep )
+ list( APPEND result ${item} )
+# else()
+# ecbuild_warn( "removing ${item}" )
+ endif()
+
+ endforeach()
+
+ if( matches_found )
+ set( ${_p_LIST} ${result} PARENT_SCOPE )
+ else()
+ if( NOT _p_QUIET )
+ ecbuild_warn( "ecbuild_list_exclude_pattern: no matches found for patterns ${_p_REGEX} in ${_p_LIST}" )
+ endif()
+ endif()
+
+endfunction(ecbuild_list_exclude_pattern)
diff --git a/cmake/ecbuild_list_extra_search_paths.cmake b/cmake/ecbuild_list_extra_search_paths.cmake
index 0768a48..c307012 100644
--- a/cmake/ecbuild_list_extra_search_paths.cmake
+++ b/cmake/ecbuild_list_extra_search_paths.cmake
@@ -14,11 +14,11 @@
function( ecbuild_list_extra_search_paths pkg var )
- message( DEPRECATION " ecbuild_list_extra_search_paths should no longer be"
- " used and is going to be removed in a future version of ecBuild." )
+ ecbuild_deprecate( " ecbuild_list_extra_search_paths should no longer be"
+ " used and is going to be removed in a future version of ecBuild." )
- # debug_var( pkg )
- # debug_var( var )
+ # ecbuild_debug_var( pkg )
+ # ecbuild_debug_var( var )
string( TOUPPER ${pkg} _PKG )
@@ -75,7 +75,7 @@ function( ecbuild_list_extra_search_paths pkg var )
ecbuild_debug("ecbuild_list_extra_search_paths(${pkg}): setting ${var} to ${${var}}")
set( ${var} ${${var}} PARENT_SCOPE )
-# debug_var( ${var} )
+# ecbuild_debug_var( ${var} )
endfunction()
diff --git a/cmake/ecbuild_list_macros.cmake b/cmake/ecbuild_list_macros.cmake
index a4152c7..95d9512 100644
--- a/cmake/ecbuild_list_macros.cmake
+++ b/cmake/ecbuild_list_macros.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -56,35 +56,3 @@ function( MAP_GET _map _key _var )
set( ${_var} "${_${_map}_${_key}}" PARENT_SCOPE )
endfunction(MAP_GET)
-##############################################################################
-# function to remove items from a list that match a list of patterns
-#
-# examples:
-#
-# ecbuild_list_remove_pattern( mylist "foo;bar" VAR )
-#
-
-function(ecbuild_list_remove_pattern _list _patterns _var)
-
-#debug_var( _list )
-#debug_var( _patterns )
-#debug_var( _var )
-
- foreach( _elem ${_list} )
- set( _keep TRUE)
- foreach( _pat ${_patterns} )
- if( ${_elem} MATCHES ${_pat} )
- set( _keep FALSE)
- endif()
- endforeach()
- if( _keep )
- list( APPEND _result ${_elem} )
- endif()
-
- endforeach()
-
-#debug_var( _result )
-
- set( ${_var} "${_result}" PARENT_SCOPE )
-
-endfunction(ecbuild_list_remove_pattern)
diff --git a/cmake/ecbuild_log.cmake b/cmake/ecbuild_log.cmake
index fbb2349..d0acbc6 100644
--- a/cmake/ecbuild_log.cmake
+++ b/cmake/ecbuild_log.cmake
@@ -15,11 +15,12 @@
# ecBuild provides macros for logging based on a log level set by the user,
# similar to the Python logging module:
#
-# :ecbuild_debug: logs a ``STATUS`` message if log level <= ``DEBUG``
-# :ecbuild_info: logs a ``STATUS`` message if log level <= ``INFO``
-# :ecbuild_warn: logs a ``WARNING`` message if log level <= ``WARN``
-# :ecbuild_error: logs a ``SEND_ERROR`` message if log level <= ``ERROR``
-# :ecbuild_critical: logs a ``FATAL_ERROR`` message if log level <= ``CRITICAL``
+# :ecbuild_debug: logs a ``STATUS`` message if log level <= ``DEBUG``
+# :ecbuild_info: logs a ``STATUS`` message if log level <= ``INFO``
+# :ecbuild_warn: logs a ``WARNING`` message if log level <= ``WARN``
+# :ecbuild_error: logs a ``SEND_ERROR`` message if log level <= ``ERROR``
+# :ecbuild_critical: logs a ``FATAL_ERROR`` message if log level <= ``CRITICAL``
+# :ecbuild_deprecate: logs a ``DEPRECATION`` message
#
# Input variables
# ---------------
@@ -32,6 +33,10 @@
# ECBUILD_NO_COLOUR : bool
# if set, does not colour log output (by default log output is coloured)
#
+# ECBUILD_NO_DEPRECATIONS : bool
+# if set, does not output deprecation messages (only set this if you *really*
+# know what you are doing!)
+#
# Usage
# -----
#
@@ -70,7 +75,7 @@ set(ECBUILD_ERROR 40)
set(ECBUILD_CRITICAL 50)
if( NOT DEFINED ECBUILD_LOG_LEVEL )
- set(ECBUILD_LOG_LEVEL ${ECBUILD_WARN})
+ set(ECBUILD_LOG_LEVEL ${ECBUILD_INFO})
elseif( NOT ECBUILD_LOG_LEVEL )
set(ECBUILD_LOG_LEVEL 60)
elseif( ECBUILD_LOG_LEVEL STREQUAL "DEBUG" )
@@ -122,8 +127,81 @@ endmacro( ecbuild_error )
##############################################################################
+macro( ecbuild_deprecate )
+ if( NOT ECBUILD_NO_DEPRECATIONS )
+ string(REPLACE ";" "" MSG ${ARGV})
+ message(DEPRECATION "${BoldRed}${MSG}${ColourReset}")
+ endif()
+endmacro( ecbuild_deprecate )
+
+##############################################################################
+
macro( ecbuild_critical MSG )
if( ECBUILD_LOG_LEVEL LESS 51)
message(FATAL_ERROR "${BoldMagenta}CRITICAL - ${MSG}${ColourReset}")
endif()
endmacro( ecbuild_critical )
+
+##############################################################################
+# macro for debugging a cmake variable
+
+macro( ecbuild_debug_var VAR )
+ if( ECBUILD_LOG_LEVEL LESS 11)
+ message(STATUS "${Blue}DEBUG - ${VAR} : ${${VAR}}${ColourReset}")
+ endif()
+endmacro()
+
+##############################################################################
+# macro for debugging a cmake variable
+
+macro( ecbuild_debug_list VAR )
+ if( ECBUILD_LOG_LEVEL LESS 11)
+ message( STATUS "${Blue}DEBUG - ${VAR}" )
+ foreach( _elem ${${VAR}} )
+ message( STATUS " ${_elem}" )
+ endforeach()
+ message(STATUS "${ColourReset}")
+ endif()
+endmacro()
+
+##############################################################################
+# macro for debugging a environment variable within cmake
+
+macro( ecbuild_debug_env_var VAR )
+ if( ECBUILD_LOG_LEVEL LESS 11)
+ message(STATUS "${Blue}DEBUG - ENV ${VAR} [$ENV{${VAR}}]${ColourReset}")
+ endif()
+endmacro()
+
+##############################################################################
+# macro for debugging a cmake variable
+
+macro( debug_var VAR )
+
+ message( WARNING "DEPRECATED debug_var() -- ${VAR} [${${VAR}}]" )
+
+endmacro()
+
+##############################################################################
+# macro for debugging a cmake list
+
+macro( debug_list VAR )
+
+ message( WARNING "DEPRECATED debug_list() -- ${VAR}:" )
+ foreach( _elem ${${VAR}} )
+ message( WARNING " ${_elem}" )
+ endforeach()
+
+endmacro()
+
+##############################################################################
+# macro for debugging a environment variable within cmake
+
+macro( debug_env_var VAR )
+
+ message( WARNING "DEPRECATED debug_env_var() -- ENV ${VAR} [$ENV{${VAR}}]" )
+
+endmacro()
+
+
+
diff --git a/cmake/ecbuild_policies.cmake b/cmake/ecbuild_policies.cmake
index 06f856b..e420e81 100644
--- a/cmake/ecbuild_policies.cmake
+++ b/cmake/ecbuild_policies.cmake
@@ -6,13 +6,17 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
-###############################################################################
-# define cmake policies
+##############################################################################
+#
+# ecBuild Policies
+# ================
#
# NOTE: This file needs to be included with NO_POLICY_SCOPE or it will have no
# effect!
# NOTE: Policies 1 through 17 will be set to NEW by requiring CMake 2.8.4 i.e.
# calling cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR )
+#
+##############################################################################
# allow for empty spaces around library names
if( POLICY CMP0004 )
diff --git a/cmake/ecbuild_print_summary.cmake b/cmake/ecbuild_print_summary.cmake
index d4bffba..14ccdd1 100644
--- a/cmake/ecbuild_print_summary.cmake
+++ b/cmake/ecbuild_print_summary.cmake
@@ -38,8 +38,6 @@ macro( ecbuild_print_summary )
if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
- ecbuild_define_links_target()
-
get_property( langs GLOBAL PROPERTY ENABLED_LANGUAGES )
message( STATUS "---------------------------------------------------------" )
@@ -89,7 +87,7 @@ macro( ecbuild_print_summary )
### FEATURE SUMMARY
- # debug_var( CMAKE_VERSION )
+ # ecbuild_debug_var( CMAKE_VERSION )
if( ${CMAKE_VERSION} VERSION_LESS "2.8.6" )
feature_summary( WHAT ALL )
else()
@@ -101,6 +99,6 @@ macro( ecbuild_print_summary )
# issue warnings / errors in case there are unused project files
ecbuild_warn_unused_files()
- endif( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
+ endif()
endmacro( ecbuild_print_summary )
diff --git a/cmake/ecbuild_project_files.cmake b/cmake/ecbuild_project_files.cmake
index fbf3015..537556a 100644
--- a/cmake/ecbuild_project_files.cmake
+++ b/cmake/ecbuild_project_files.cmake
@@ -1,8 +1,8 @@
# (C) Copyright 1996-2015 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.
@@ -50,7 +50,7 @@ macro( ecbuild_declare_project_files )
if( CHECK_UNUSED_FILES )
foreach( _afile ${ARGV} )
- # debug_var( _afile )
+ # ecbuild_debug_var( _afile )
get_property( _src_gen SOURCE ${_afile} PROPERTY GENERATED )
diff --git a/cmake/ecbuild_remove_fortran_flags.cmake b/cmake/ecbuild_remove_fortran_flags.cmake
new file mode 100644
index 0000000..74c8832
--- /dev/null
+++ b/cmake/ecbuild_remove_fortran_flags.cmake
@@ -0,0 +1,61 @@
+# (C) Copyright 1996-2016 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+##############################################################################
+#.rst:
+#
+# ecbuild_remove_fortran_flags
+# =========================
+#
+# Remove Fortran compiler flags from CMAKE_Fortran_FLAGS. ::
+#
+# ecbuild_remove_fortran_flags( <flag1> [ <flag2> ... ] [ BUILD <build> ] )
+#
+# Options
+# -------
+#
+# BUILD : optional
+# remove flags from ``CMAKE_Fortran_FLAGS_<build>`` instead of
+# ``CMAKE_Fortran_FLAGS``
+#
+##############################################################################
+
+include( CheckFortranCompilerFlag )
+macro( ecbuild_remove_fortran_flags m_flags )
+
+ set( _flags ${m_flags} )
+ if( _flags AND CMAKE_Fortran_COMPILER_LOADED )
+
+ set( single_value_args BUILD )
+ set( multi_value_args )
+ cmake_parse_arguments( _PAR "" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
+
+ string( TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_CAPS )
+ string( TOUPPER ${_PAR_BUILD} _PAR_BUILD_CAPS )
+
+ if( _PAR_BUILD AND (CMAKE_BUILD_TYPE_CAPS MATCHES "${_PAR_BUILD_CAPS}") )
+
+ foreach( _flag ${_flags} )
+ string(REGEX REPLACE " *${_flag} *" " " CMAKE_Fortran_FLAGS_${_PAR_BUILD} ${CMAKE_Fortran_FLAGS_${_PAR_BUILD}})
+ ecbuild_debug( "Fortran FLAG [${_flag}] removed from build type ${_PAR_BUILD}" )
+ endforeach()
+
+ elseif( NOT _PAR_BUILD )
+
+ foreach( _flag ${_flags} )
+ string(REGEX REPLACE " *${_flag} *" " " CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS} )
+ ecbuild_debug( "Fortran FLAG [${_flag}] removed" )
+ endforeach()
+
+ endif()
+
+ endif()
+ unset( _flags )
+
+endmacro()
+
diff --git a/cmake/ecbuild_separate_sources.cmake b/cmake/ecbuild_separate_sources.cmake
index 55c6d8f..3f930b3 100644
--- a/cmake/ecbuild_separate_sources.cmake
+++ b/cmake/ecbuild_separate_sources.cmake
@@ -83,9 +83,9 @@ macro( ecbuild_separate_sources )
endif()
endforeach()
-# debug_var( ${_PAR_TARGET}_h_srcs )
-# debug_var( ${_PAR_TARGET}_c_srcs )
-# debug_var( ${_PAR_TARGET}_cxx_srcs )
-# debug_var( ${_PAR_TARGET}_f_srcs )
+# ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
+# ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
+# ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
+# ecbuild_debug_var( ${_PAR_TARGET}_f_srcs )
endmacro( ecbuild_separate_sources )
diff --git a/cmake/ecbuild_setup_test_framework.cmake b/cmake/ecbuild_setup_test_framework.cmake
index 538a433..f38bafb 100644
--- a/cmake/ecbuild_setup_test_framework.cmake
+++ b/cmake/ecbuild_setup_test_framework.cmake
@@ -2,7 +2,7 @@ ecbuild_add_option( FEATURE TESTS
DEFAULT ON
DESCRIPTION "Enable the unit tests" )
-if( ENABLE_TESTS )
+if( ENABLE_TESTS AND CMAKE_CXX_COMPILER_LOADED )
# Try to find compiled boost
@@ -39,3 +39,7 @@ if( ENABLE_TESTS )
endif()
endif()
+
+if( NOT ENABLE_TESTS )
+ ecbuild_info("Tests have been disabled")
+endif()
\ No newline at end of file
diff --git a/cmake/ecbuild_source_flags.cmake b/cmake/ecbuild_source_flags.cmake
new file mode 100644
index 0000000..325a941
--- /dev/null
+++ b/cmake/ecbuild_source_flags.cmake
@@ -0,0 +1,30 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+set( __gen_source_flags ${CMAKE_CURRENT_LIST_DIR}/gen_source_flags.py )
+
+# Calls gen_source_flags.py to generate a CMake file with the per
+# source file flags for a given target.
+function( ecbuild_source_flags OUT TARGET DEFAULT_FLAGS SOURCES )
+
+ if( NOT PYTHONINTERP_FOUND OR PYTHON_VERSION VERSION_LESS 2.7 )
+ find_package( PythonInterp 2.7 REQUIRED )
+ endif()
+
+ set( OUTFILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_source_flags.cmake )
+
+ if( ECBUILD_LOG_LEVEL LESS 11)
+ set( __debug "--debug" )
+ endif()
+ execute_process( COMMAND ${PYTHON_EXECUTABLE} ${__gen_source_flags}
+ ${ECBUILD_SOURCE_FLAGS} ${OUTFILE} "${DEFAULT_FLAGS}"
+ ${SOURCES} "${__debug}" )
+
+ set( ${OUT} ${OUTFILE} PARENT_SCOPE )
+
+endfunction()
diff --git a/cmake/ecbuild_system.cmake b/cmake/ecbuild_system.cmake
index ca4f4fa..f885fc6 100644
--- a/cmake/ecbuild_system.cmake
+++ b/cmake/ecbuild_system.cmake
@@ -28,7 +28,7 @@ endif()
########################################################################################################
# ecbuild versioning support
-set( ECBUILD_CMAKE_MINIMUM "2.8.4" )
+set( ECBUILD_CMAKE_MINIMUM "2.8.10" )
if( ${CMAKE_VERSION} VERSION_LESS ${ECBUILD_CMAKE_MINIMUM} )
message(FATAL_ERROR "${PROJECT_NAME} requires at least CMake ${ECBUILD_CMAKE_MINIMUM} -- you are using ${CMAKE_COMMAND} [${CMAKE_VERSION}]\n Please, get a newer version of CMake @ www.cmake.org" )
endif()
@@ -66,6 +66,10 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
message( STATUS "toolchain ${CMAKE_TOOLCHAIN_FILE}" )
endif()
+ if( ECBUILD_CONFIG )
+ message( STATUS "config ${ECBUILD_CONFIG}" )
+ endif()
+
if( ECBUILD_CACHE )
include( ${ECBUILD_CACHE} )
message( STATUS "cache ${ECBUILD_CACHE}" )
@@ -121,19 +125,19 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
# include(CMakePrintSystemInformation) # available in cmake 2.8.4
if( CMAKE_CXX_COMPILER_LOADED )
- include(CheckIncludeFileCXX)
- include(CheckCXXCompilerFlag)
- include(CheckCXXSourceCompiles)
- include(CheckCXXSourceRuns)
+ include(CheckIncludeFileCXX)
+ include(CheckCXXCompilerFlag)
+ include(CheckCXXSourceCompiles)
+ include(CheckCXXSourceRuns)
endif()
if( CMAKE_Fortran_COMPILER_LOADED )
set( CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module CACHE PATH "directory for all fortran modules." )
- include(CheckFortranFunctionExists)
- if( CMAKE_C_COMPILER_LOADED AND ENABLE_FORTRAN_C_INTERFACE )
- include(FortranCInterface)
- endif()
- set( EC_HAVE_FORTRAN 1 )
+ include(CheckFortranFunctionExists)
+ if( CMAKE_C_COMPILER_LOADED AND ENABLE_FORTRAN_C_INTERFACE )
+ include(FortranCInterface)
+ endif()
+ set( EC_HAVE_FORTRAN 1 )
endif()
include(FeatureSummary) # support features in cmake
@@ -144,17 +148,18 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
# backport of cmake > 2.8.4 functions
if( "${CMAKE_VERSION}" VERSION_LESS "2.8.6" )
- include( ${CMAKE_CURRENT_LIST_DIR}/2.8/CMakePushCheckState.cmake )
+ include( ${CMAKE_CURRENT_LIST_DIR}/2.8/CMakePushCheckState.cmake )
else()
- include(CMakePushCheckState)
+ include(CMakePushCheckState)
endif()
############################################################################################
# add our macros
- include( ecbuild_debug_var )
include( ecbuild_log )
include( ecbuild_list_macros )
+ include( ecbuild_list_add_pattern )
+ include( ecbuild_list_exclude_pattern )
include( ecbuild_check_c_source_return )
include( ecbuild_check_cxx_source_return )
@@ -167,6 +172,7 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
include( ecbuild_generate_config_headers )
include( ecbuild_generate_rpc )
include( ecbuild_generate_yy )
+ include( ecbuild_generate_fortran_interfaces )
include( ecbuild_echo_targets )
include( ecbuild_features )
include( ecbuild_add_option )
@@ -202,30 +208,38 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
include( ecbuild_find_fortranlibs )
include( ecbuild_git )
include( ecbuild_enable_fortran )
+ include( ecbuild_source_flags )
include( ecbuild_bundle )
include( ecbuild_pkgconfig )
include( ecbuild_cache )
+ include( ecbuild_remove_fortran_flags )
include( ${CMAKE_CURRENT_LIST_DIR}/contrib/GetGitRevisionDescription.cmake )
############################################################################################
# kickstart the build system
- ecbuild_prepare_cache()
+ if( ECBUILD_CONFIG )
+ include( ${ECBUILD_CONFIG} )
+ endif()
+
+ ecbuild_prepare_cache()
include( ecbuild_define_options ) # define build options
+ include( ecbuild_compiler_flags ) # compiler flags
include( ecbuild_check_compiler ) # check for compiler characteristics
include( ecbuild_check_os ) # check for os characteristics
include( ecbuild_check_functions ) # check for available functions
- include( ecbuild_define_paths ) # define installation paths
- include( ecbuild_links_target ) # define the links target
+ include( ecbuild_define_paths ) # defines installation paths
+ include( ecbuild_define_libs_and_execs_target ) # defines the top level execs and libs
+ include( ecbuild_define_links_target ) # defines the links target
include( ecbuild_setup_test_framework ) # setup test framework
include( ecbuild_define_uninstall ) # define uninstall target
ecbuild_flush_cache()
############################################################################################
- # define the build timestamp
+ # define the build timestamp, unless the user provided one via EC_BUILD_TIMESTAMP
if( NOT DEFINED EC_BUILD_TIMESTAMP )
ecbuild_get_timestamp( EC_BUILD_TIMESTAMP )
@@ -234,5 +248,17 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
message( STATUS "---------------------------------------------------------" )
-endif()
+else()
+
+ # Allow subprojects with different compilation flags. This could be done by defining
+ # set( ECBUILD_C_FLAGS_DEBUG "-O0" )
+ # or
+ # set( ECBUILD_CONFIG "<subproject-config>.cmake" )
+ if( ECBUILD_CONFIG )
+ message( STATUS "---------------------------------------------------------" )
+ message( STATUS "config ${ECBUILD_CONFIG}" )
+ include( ${ECBUILD_CONFIG} )
+ endif()
+ include( ecbuild_compiler_flags )
+endif()
diff --git a/cmake/ecbuild_use_package.cmake b/cmake/ecbuild_use_package.cmake
index acbe495..2c6febb 100644
--- a/cmake/ecbuild_use_package.cmake
+++ b/cmake/ecbuild_use_package.cmake
@@ -105,6 +105,7 @@ macro( ecbuild_use_package )
# user defined dir with subprojects
if( NOT DEFINED ${pkgUPPER}_SOURCE AND DEFINED SUBPROJECT_DIRS )
+ ecbuild_warn("ecbuild_use_package(): setting SUBPROJECT_DIRS is deprecated")
ecbuild_debug("ecbuild_use_package(${_p_PROJECT}): scanning subproject directories ${SUBPROJECT_DIRS}")
foreach( dir ${SUBPROJECT_DIRS} )
if( EXISTS ${dir}/${_p_PROJECT} AND EXISTS ${dir}/${_p_PROJECT}/CMakeLists.txt )
@@ -119,7 +120,7 @@ macro( ecbuild_use_package )
if( DEFINED ${pkgUPPER}_SOURCE )
if( NOT EXISTS ${${pkgUPPER}_SOURCE} OR NOT EXISTS ${${pkgUPPER}_SOURCE}/CMakeLists.txt )
- message( FATAL_ERROR "User defined source directory '${${pkgUPPER}_SOURCE}' for project '${_p_PROJECT}' does not exist or does not contain a CMakeLists.txt file." )
+ ecbuild_critical("User defined source directory '${${pkgUPPER}_SOURCE}' for project '${_p_PROJECT}' does not exist or does not contain a CMakeLists.txt file.")
endif()
set( ${pkgUPPER}_subproj_dir_ "${${pkgUPPER}_SOURCE}" )
@@ -187,6 +188,8 @@ macro( ecbuild_use_package )
set( ${pkgUPPER}_FOUND 1 )
set( ${_p_PROJECT}_VERSION ${${pkgUPPER}_VERSION} )
+ list( APPEND ${pkgUPPER}_INCLUDE_DIRS ${${pkgUPPER}_TPL_INCLUDE_DIRS} )
+
endif()
endif()
@@ -221,15 +224,15 @@ macro( ecbuild_use_package )
# test version for Cases 1,2,3
- # debug_var( _p_PROJECT )
- # debug_var( _p_VERSION )
- # debug_var( ${pkgUPPER}_VERSION )
- # debug_var( ${_p_PROJECT}_VERSION )
- # debug_var( _just_added )
- # debug_var( _do_version_check )
- # debug_var( _source_description )
- # debug_var( ${pkgUPPER}_FOUND )
- # debug_var( ${pkgUPPER}_previous_subproj_ )
+ # ecbuild_debug_var( _p_PROJECT )
+ # ecbuild_debug_var( _p_VERSION )
+ # ecbuild_debug_var( ${pkgUPPER}_VERSION )
+ # ecbuild_debug_var( ${_p_PROJECT}_VERSION )
+ # ecbuild_debug_var( _just_added )
+ # ecbuild_debug_var( _do_version_check )
+ # ecbuild_debug_var( _source_description )
+ # ecbuild_debug_var( ${pkgUPPER}_FOUND )
+ # ecbuild_debug_var( ${pkgUPPER}_previous_subproj_ )
if( _p_VERSION AND _do_version_check )
if( _p_EXACT )
diff --git a/cmake/gen_source_flags.py b/cmake/gen_source_flags.py
new file mode 100644
index 0000000..9393c11
--- /dev/null
+++ b/cmake/gen_source_flags.py
@@ -0,0 +1,84 @@
+# (C) Copyright 1996-2015 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
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+"""
+Generate .cmake file to set source-file specific compiler flags based on
+rules defined in a JSON file.
+"""
+
+from argparse import ArgumentParser
+from fnmatch import fnmatch
+import logging
+from json import JSONDecoder
+from os import path
+
+log = logging.getLogger('gen_source_flags')
+
+
+def match(source, pattern, op, flags, indent=0):
+ if fnmatch(source, pattern):
+
+ suff = '' if op[0] in ('+', '=', '/') else ' (nested pattern)'
+ log.debug('%s-> pattern "%s" matches "%s"%s',
+ ' ' * (indent + 1), pattern, source, suff)
+
+ if op[0] == "+":
+ flags += [flag for flag in op[1:] if flag not in flags]
+ log.debug('%sappending %s --> flags: %s', ' ' * (indent + 2), op[1:], flags)
+
+ elif op[0] == "=":
+ flags = op[1:]
+ log.debug('%ssetting %s --> flags: %s', ' ' * (indent + 2), op[1:], flags)
+
+ elif op[0] == "/":
+ flags = [flag for flag in flags if flag not in op[1:]]
+ log.debug('%sremoving %s --> flags: %s', ' ' * (indent + 2), op[1:], flags)
+
+ else: # Nested rule
+ log.debug('%sapplying nested rules for "%s" (flags: %s)',
+ ' ' * (indent + 2), pattern, flags)
+ for nested_pattern, nested_op in op:
+ flags = match(source, nested_pattern, nested_op, flags, indent + 2)
+
+ return flags
+
+
+def generate(rules, out, default_flags, sources, debug=False):
+ logging.basicConfig(level=logging.DEBUG if debug else logging.INFO,
+ format='-- %(levelname)s - %(name)s: %(message)s')
+
+ with open(path.expanduser(rules)) as f:
+ rules = JSONDecoder(object_pairs_hook=list).decode(f.read())
+
+ with open(path.expanduser(out), 'w') as f:
+ for source in sources:
+ log.debug('%s (default flags: "%s")', source, default_flags)
+ flags = default_flags.split()
+ for pattern, op in rules:
+ flags = match(source, pattern, op, flags)
+
+ if flags:
+ log.debug(' ==> setting flags for %s to %s', source, ' '.join(flags))
+ f.write('set_source_files_properties(%s PROPERTIES COMPILE_FLAGS "%s")\n'
+ % (source, ' '.join(flags)))
+ else:
+ log.debug(' ==> flags for %s empty', source)
+
+
+def main():
+ """Parse arguments"""
+ parser = ArgumentParser(description=__doc__)
+ parser.add_argument('rules', metavar='RULES.json', help='JSON rules file')
+ parser.add_argument('out', metavar='OUT.cmake', help='CMake script to generate')
+ parser.add_argument('default_flags', help='Default compiler flags to use')
+ parser.add_argument('sources', metavar='file', nargs='+', help='Path to file to apply rules to')
+ parser.add_argument('--debug', '-d', action='store_true', help='Log debug messages')
+ generate(**vars(parser.parse_args()))
+
+if __name__ == '__main__':
+ main()
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
index 03f875b..6d48728 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
@@ -1,11 +1,13 @@
# Config file for the @PROJECT_NAME@ package
# Defines the following variables:
#
-# @PNAME at _INCLUDE_DIRS - include directories
-# @PNAME at _DEFINITIONS - preprocessor definitions
-# @PNAME at _LIBRARIES - libraries to link against
-# @PNAME at _FEATURES - list of enabled features
-# @PNAME at _VERSION - version of the package
+# @PNAME at _INCLUDE_DIRS - include directories
+# @PNAME at _DEFINITIONS - preprocessor definitions
+# @PNAME at _LIBRARIES - libraries to link against
+# @PNAME at _FEATURES - list of enabled features
+# @PNAME at _VERSION - version of the package
+# @PNAME at _GIT_SHA1 - Git revision of the package
+# @PNAME at _GIT_SHA1_SHORT - short Git revision of the package
#
# Also defines @PROJECT_NAME@ third-party library dependencies:
# @PNAME at _TPLS - package names of third-party library dependencies
@@ -26,12 +28,16 @@ set( @PNAME at _TPL_INCLUDE_DIRS "@CONF_TPL_INCLUDE_DIRS@" )
set( @PNAME at _TPL_DEFINITIONS "@CONF_TPL_DEFINITIONS@" )
set( @PNAME at _TPL_LIBRARIES "@CONF_TPL_LIBRARIES@" )
+set( @PNAME at _VERSION "@PACKAGE_VERSION@" )
+set( @PNAME at _GIT_SHA1 "@PACKAGE_GIT_SHA1@" )
+set( @PNAME at _GIT_SHA1_SHORT "@PACKAGE_GIT_SHA1_SHORT@" )
+
### export include paths as absolute paths
set( @PNAME at _INCLUDE_DIRS "" )
foreach( path ${@PNAME at _SELF_INCLUDE_DIRS} )
- get_filename_component( abspath ${path} ABSOLUTE )
- list( APPEND @PNAME at _INCLUDE_DIRS ${abspath} )
+ get_filename_component( abspath ${path} ABSOLUTE )
+ list( APPEND @PNAME at _INCLUDE_DIRS ${abspath} )
endforeach()
list( APPEND @PNAME at _INCLUDE_DIRS ${@PNAME at _TPL_INCLUDE_DIRS} )
@@ -47,7 +53,7 @@ set( @PNAME at _LIBRARIES ${@PNAME at _SELF_LIBRARIES} ${@PNAME at _TPL_LIBRARIE
set( @PNAME at _FEATURES "@CONF_FEATURES@" )
foreach( _f ${@PNAME at _FEATURES} )
- set( @PNAME at _HAVE_${_f} 1 )
+ set( @PNAME at _HAVE_${_f} 1 )
endforeach()
# Has this configuration been exported from a build tree?
@@ -58,22 +64,22 @@ if( EXISTS ${@PNAME at _CMAKE_DIR}/@CONF_IMPORT_FILE@ )
include( ${@PNAME at _IMPORT_FILE} )
endif()
+# here goes the imports of the TPL's
+
+include( ${CMAKE_CURRENT_LIST_FILE}.tpls OPTIONAL )
+
# insert definitions for IMPORTED targets
if( NOT @PROJECT_NAME at _BINARY_DIR )
if( @PNAME at _IS_BUILD_DIR_EXPORT )
- include( "@TOP_PROJECT_TARGETS_FILE@" OPTIONAL )
- else()
- include( "${@PNAME at _CMAKE_DIR}/@CMAKE_PROJECT_NAME at -targets.cmake" )
- endif()
+ include( "@TOP_PROJECT_TARGETS_FILE@" OPTIONAL )
+ else()
+ include( "${@PNAME at _CMAKE_DIR}/@PROJECT_NAME at -targets.cmake" )
+ endif()
endif()
-# here goes the imports of the TPL's
-
-include( ${CMAKE_CURRENT_LIST_FILE}.tpls OPTIONAL )
-
# publish this file as imported
set( @PNAME at _IMPORT_FILE ${CMAKE_CURRENT_LIST_FILE} )
@@ -82,9 +88,10 @@ mark_as_advanced( @PNAME at _IMPORT_FILE )
# set @PROJECT_NAME at _BASE_DIR for final installations or build directories
if( NOT @PROJECT_NAME@ )
- if( @PNAME at _IS_BUILD_DIR_EXPORT )
- set( @PROJECT_NAME at _BASE_DIR @CMAKE_BINARY_DIR@ )
- else()
- set( @PROJECT_NAME at _BASE_DIR @CMAKE_INSTALL_PREFIX@ )
- endif()
+ if( @PNAME at _IS_BUILD_DIR_EXPORT )
+ set( @PROJECT_NAME at _BASE_DIR @CMAKE_BINARY_DIR@ )
+ else()
+ get_filename_component( abspath ${CMAKE_CURRENT_LIST_DIR}/../../.. ABSOLUTE )
+ set( @PROJECT_NAME at _BASE_DIR ${abspath} )
+ endif()
endif()
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 5cfccdd..0978023 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -21,7 +21,7 @@ set(scripts
)
if(AT_ECMWF)
- list(APPEND scripts mv_debug_env.sh)
+ list(APPEND scripts mv_debug_env.sh metgram.py)
endif()
@@ -56,8 +56,18 @@ string (REPLACE ";" " " EMOS_LIBRARIES_STR "${EMOS_LIB_
set(GRIB_API_LIBRARIES_STR "${GRIB_API_LIBRARIES_STR} ${PTHREAD_LIB}") # add pthread in case needed
+
+
+# we may need to add the netCDF lib dir to the rpath. We don't seem to have a variable
+# which tells us this directly, so we need to make an educated guess...
+if(DEFINED NETCDF_INCLUDE_DIR)
+ set(NETCDF_LIB_RPATH "-Wl,-rpath,${NETCDF_INCLUDE_DIR}/../lib64:${NETCDF_INCLUDE_DIR}/../lib")
+ set(GRIB_API_LIBRARIES_STR "${GRIB_API_LIBRARIES_STR} ${NETCDF_LIB_RPATH}")
+endif()
+
set(GRIB_API_LIBRARIES_STR_ORIGINAL "${GRIB_API_LIBRARIES_STR}") # keep a backup for later
+
# if we are linking with shared GRIB_API libraries, then in order to be able
# to run compiled inline Fortran/C/Macro programs, we will need to set
# LD_LIBRARY_PATH to where GRIB_API was installed (this should only be
@@ -117,10 +127,11 @@ configure_file(compile.in ${CMAKE_BINARY_DIR}/bin/compile @ONLY)
# script which is the one that will actually be installed. In the case where
# we're not building a bundle, these two compile scripts will be identical.
-if(DEFINED METVIEW_BUNDLE)
+if(DEFINED METVIEW_BUNDLE OR METVIEW_BUNDLE_TYPE STREQUAL "MMG")
set(GRIB_API_LIBRARIES_STR "-L${CMAKE_INSTALL_PREFIX}/lib ${GRIB_API_LIBRARIES_STR_ORIGINAL}")
set(GRIB_API_INCLUDE_DIRS_STR "-I${CMAKE_INSTALL_PREFIX}/include")
string(REPLACE "${CMAKE_BINARY_DIR}/lib" "${CMAKE_INSTALL_PREFIX}/lib" EMOS_LIBRARIES_STR "${EMOS_LIBRARIES_STR}")
+ set(GRIB_API_PATH ${CMAKE_INSTALL_PREFIX})
endif()
configure_file(compile.in ${CMAKE_BINARY_DIR}/bin/compile_install @ONLY)
@@ -180,6 +191,29 @@ ecbuild_get_date(TODAYS_DATE)
# endforeach()
+
+# MAGPLUS_HOME - under normal circumstances, we link with a specific
+# Magics library which knows where it's been installed, so we don't
+# need (or want) to set MAGPLUS_HOME, and in fact we want to avoid
+# the situation where a user sets it to the wrong path (as can happen
+# if a Magics module is set up by default in a user's environment).
+# So the simplest thing is to unset MAGPLUS_HOME and let the library
+# find its own resource files. This works fine if Magics has been
+# installed, but not if we are linking with a Magics in the build tree.
+# In this case MAGPLUS_HOME will need to point to the Magics source(!)
+# directory. In Magics 2.27.0 onwards, this is all taken care of by the
+# CMake variable MAFPLUS_HOME. If this is not set (i.e. earlier version
+# of Magics) then we just unset it. MV_MAGPLUS_HOME_PATH_SET is used
+# in metview_base.in.
+
+if(DEFINED MAGPLUS_HOME)
+ set(MV_MAGPLUS_HOME_PATH_SET "MAGPLUS_HOME=${MAGPLUS_HOME}")
+else()
+ set(MV_MAGPLUS_HOME_PATH_SET "unset MAGPLUS_HOME")
+endif()
+
+
+
# create the Metview startup script
configure_file(metview_base.in ${FULL_STARTUP_SCRIPT_PATH} @ONLY)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt.orig
similarity index 60%
copy from scripts/CMakeLists.txt
copy to scripts/CMakeLists.txt.orig
index 5cfccdd..fe1301a 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt.orig
@@ -21,7 +21,7 @@ set(scripts
)
if(AT_ECMWF)
- list(APPEND scripts mv_debug_env.sh)
+ list(APPEND scripts mv_debug_env.sh metgram.py)
endif()
@@ -41,68 +41,68 @@ metview_script_files(SCRIPT_FILES ${scripts})
get_property(EMOS_LIB_PATH TARGET emos PROPERTY LOCATION)
-# for GRIB_API, we *might* get something like
-# grib_api;grib_api_f77;grib_api_f90;/usr/lib64/libjasper.so;/usr/lib64/libjpeg.so;/usr/lib64/libm.so
-# which is not all that we need to link. So we convert 'grib_api' into '-lgrib_api'
+# for ECCODES, we *might* get something like
+# eccodes;eccodes_f77;eccodes_f90;/usr/lib64/libjasper.so;/usr/lib64/libjpeg.so;/usr/lib64/libm.so
+# which is not all that we need to link. So we convert 'eccodes' into '-leccodes'
# and for the Fortran libraries.
-set(GRIB_API_LIBRARIES_STR " ${GRIB_API_LIBRARIES}") # add a space to the beginning
-list(REMOVE_ITEM GRIB_API_LIBRARIES_STR "debug") # remove non-compiler items from the string
-list(REMOVE_ITEM GRIB_API_LIBRARIES_STR "optimized") # remove non-compiler items from the string
+set(ECCODES_LIBRARIES_STR " ${ECCODES_LIBRARIES}") # add a space to the beginning
+list(REMOVE_ITEM ECCODES_LIBRARIES_STR "debug") # remove non-compiler items from the string
+list(REMOVE_ITEM ECCODES_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}")
+string (REPLACE ";" " " ECCODES_LIBRARIES_STR "${ECCODES_LIBRARIES_STR}")
+string (REPLACE " eccodes" " -leccodes" ECCODES_LIBRARIES_STR "${ECCODES_LIBRARIES_STR}")
string (REPLACE ";" " " EMOS_LIBRARIES_STR "${EMOS_LIB_PATH}")
-set(GRIB_API_LIBRARIES_STR "${GRIB_API_LIBRARIES_STR} ${PTHREAD_LIB}") # add pthread in case needed
-set(GRIB_API_LIBRARIES_STR_ORIGINAL "${GRIB_API_LIBRARIES_STR}") # keep a backup for later
+set(ECCODES_LIBRARIES_STR "${ECCODES_LIBRARIES_STR} ${PTHREAD_LIB}") # add pthread in case needed
+set(ECCODES_LIBRARIES_STR_ORIGINAL "${ECCODES_LIBRARIES_STR}") # keep a backup for later
-# if we are linking with shared GRIB_API libraries, then in order to be able
+# if we are linking with shared ECCODES libraries, then in order to be able
# to run compiled inline Fortran/C/Macro programs, we will need to set
-# LD_LIBRARY_PATH to where GRIB_API was installed (this should only be
-# needed if GRIB_API was installed in a non-default location).
-# GRIB_API_LIB_DIR will be added to METVIEW_LD_PATHS and used in compile.in.
+# LD_LIBRARY_PATH to where ECCODES was installed (this should only be
+# needed if ECCODES was installed in a non-default location).
+# ECCODES_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
-if(NOT GRIB_API_PATH)
- get_property(GRIB_LIB_PATH TARGET grib_api PROPERTY LIBRARY_OUTPUT_DIRECTORY)
+# first, if ECCODES_PATH is not defined, then we need to compute the path
+if(NOT ECCODES_PATH)
+ get_property(GRIB_LIB_PATH TARGET eccodes PROPERTY LIBRARY_OUTPUT_DIRECTORY)
if(GRIB_LIB_PATH)
- set(GRIB_API_PATH ${GRIB_LIB_PATH}/..)
+ set(ECCODES_PATH ${GRIB_LIB_PATH}/..)
else()
- if (grib_api_BASE_DIR)
- set(GRIB_API_PATH ${grib_api_BASE_DIR})
+ if (eccodes_BASE_DIR)
+ set(ECCODES_PATH ${eccodes_BASE_DIR})
else()
if(CMAKE_PREFIX_PATH)
- set(GRIB_API_PATH ${CMAKE_PREFIX_PATH})
+ set(ECCODES_PATH ${CMAKE_PREFIX_PATH})
endif()
endif()
endif()
- message(STATUS "Computed GRIB_PATH: ${GRIB_API_PATH}")
+ message(STATUS "Computed GRIB_PATH: ${ECCODES_PATH}")
endif()
-if(GRIB_API_PATH)
- if(EXISTS "${GRIB_API_PATH}/lib")
- set(GRIB_API_LIB_DIR "${GRIB_API_PATH}/lib")
+if(ECCODES_PATH)
+ if(EXISTS "${ECCODES_PATH}/lib")
+ set(ECCODES_LIB_DIR "${ECCODES_PATH}/lib")
else()
endif()
- if(EXISTS "${GRIB_API_PATH}/lib64")
- set(GRIB_API_LIB_DIR "${GRIB_API_PATH}/lib64")
+ if(EXISTS "${ECCODES_PATH}/lib64")
+ set(ECCODES_LIB_DIR "${ECCODES_PATH}/lib64")
endif()
- set(GRIB_API_LIBRARIES_STR "-L${GRIB_API_PATH}/lib -L${GRIB_API_PATH}/lib64 -Wl,-rpath,${GRIB_API_PATH}/lib:${GRIB_API_PATH}/lib64 ${GRIB_API_LIBRARIES_STR}")
+ set(ECCODES_LIBRARIES_STR "-L${ECCODES_PATH}/lib -L${ECCODES_PATH}/lib64 -Wl,-rpath,${ECCODES_PATH}/lib:${ECCODES_PATH}/lib64 ${ECCODES_LIBRARIES_STR}")
endif()
-foreach (inc ${GRIB_API_INCLUDE_DIRS})
- set(GRIB_API_INCLUDE_DIRS_STR "${GRIB_API_INCLUDE_DIRS_STR} -I${inc}")
+foreach (inc ${ECCODES_INCLUDE_DIRS})
+ set(ECCODES_INCLUDE_DIRS_STR "${ECCODES_INCLUDE_DIRS_STR} -I${inc}")
endforeach()
-list(APPEND METVIEW_INLINE_DEFINITIONS ${GRIB_API_DEFINITIONS})
+list(APPEND METVIEW_INLINE_DEFINITIONS ${ECCODES_DEFINITIONS})
@@ -110,17 +110,24 @@ configure_file(compile.in ${CMAKE_BINARY_DIR}/bin/compile @ONLY)
-# in the case of a bundle, the GRIB_API and emoslib locations will have been
+# in the case of a bundle, the ECCODES and emoslib locations will have been
# set to their build directories, which is correct when running from
# the build directory, but not once installed, so we have to change these
# to the location where they will be installed, and create another 'compile'
# script which is the one that will actually be installed. In the case where
# we're not building a bundle, these two compile scripts will be identical.
+<<<<<<< HEAD
if(DEFINED METVIEW_BUNDLE)
+ set(ECCODES_LIBRARIES_STR "-L${CMAKE_INSTALL_PREFIX}/lib ${ECCODES_LIBRARIES_STR_ORIGINAL}")
+ set(ECCODES_INCLUDE_DIRS_STR "-I${CMAKE_INSTALL_PREFIX}/include")
+=======
+if(DEFINED METVIEW_BUNDLE OR METVIEW_BUNDLE_TYPE STREQUAL "MMG")
set(GRIB_API_LIBRARIES_STR "-L${CMAKE_INSTALL_PREFIX}/lib ${GRIB_API_LIBRARIES_STR_ORIGINAL}")
set(GRIB_API_INCLUDE_DIRS_STR "-I${CMAKE_INSTALL_PREFIX}/include")
+>>>>>>> develop
string(REPLACE "${CMAKE_BINARY_DIR}/lib" "${CMAKE_INSTALL_PREFIX}/lib" EMOS_LIBRARIES_STR "${EMOS_LIBRARIES_STR}")
+ set(GRIB_API_PATH ${CMAKE_INSTALL_PREFIX})
endif()
configure_file(compile.in ${CMAKE_BINARY_DIR}/bin/compile_install @ONLY)
@@ -172,7 +179,7 @@ ecbuild_get_date(TODAYS_DATE)
# set(SYS_LIBDIRS "/usr/lib64" "/usr/lib64/" "/usr/lib" "/usr/lib/" "")
# set(METVIEW_LD_PATHS "")
#
-# foreach(LIBPATH ${MAGICS_LIB_DIR} ${ODB_API_LIB_DIR} ${GRIB_API_LIB_DIR})
+# foreach(LIBPATH ${MAGICS_LIB_DIR} ${ODB_API_LIB_DIR} ${ECCODES_LIB_DIR})
# list(FIND SYS_LIBDIRS ${LIBPATH} IND)
# if(IND EQUAL -1) # path not in the list of system paths
# set(METVIEW_LD_PATHS "${LIBPATH}:${METVIEW_LD_PATHS}")
@@ -180,6 +187,29 @@ ecbuild_get_date(TODAYS_DATE)
# endforeach()
+
+# MAGPLUS_HOME - under normal circumstances, we link with a specific
+# Magics library which knows where it's been installed, so we don't
+# need (or want) to set MAGPLUS_HOME, and in fact we want to avoid
+# the situation where a user sets it to the wrong path (as can happen
+# if a Magics module is set up by default in a user's environment).
+# So the simplest thing is to unset MAGPLUS_HOME and let the library
+# find its own resource files. This works fine if Magics has been
+# installed, but not if we are linking with a Magics in the build tree.
+# In this case MAGPLUS_HOME will need to point to the Magics source(!)
+# directory. In Magics 2.27.0 onwards, this is all taken care of by the
+# CMake variable MAFPLUS_HOME. If this is not set (i.e. earlier version
+# of Magics) then we just unset it. MV_MAGPLUS_HOME_PATH_SET is used
+# in metview_base.in.
+
+if(DEFINED MAGPLUS_HOME)
+ set(MV_MAGPLUS_HOME_PATH_SET "MAGPLUS_HOME=${MAGPLUS_HOME}")
+else()
+ set(MV_MAGPLUS_HOME_PATH_SET "unset MAGPLUS_HOME")
+endif()
+
+
+
# create the Metview startup script
configure_file(metview_base.in ${FULL_STARTUP_SCRIPT_PATH} @ONLY)
diff --git a/scripts/MarsOdbWrapper b/scripts/MarsOdbWrapper
index dc67a7a..72af887 100644
--- a/scripts/MarsOdbWrapper
+++ b/scripts/MarsOdbWrapper
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/MarsTiggeWrapper b/scripts/MarsTiggeWrapper
index 7b064b2..49da222 100755
--- a/scripts/MarsTiggeWrapper
+++ b/scripts/MarsTiggeWrapper
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/ObstatToolWrapper b/scripts/ObstatToolWrapper
index d363681..a4af4b1 100644
--- a/scripts/ObstatToolWrapper
+++ b/scripts/ObstatToolWrapper
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/compile.in b/scripts/compile.in
index ab988fc..201bc7b 100755
--- a/scripts/compile.in
+++ b/scripts/compile.in
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -24,6 +24,11 @@
#-- MACRO_EXTRA_CC_FLAGS can be set externally for extra C/C++ flags!
#-- MACRO_EXTRA_INCS is reserved for C programs, for extra -I flags!
+# NOTE that we use environment variables METVIEW_DDIR and METVIEW_VVERSION instead
+# of METVIEW_DIR and METVIEW_VERSION. We set these in extern.cc when we call the
+# popen() routine; we can't always use the normal env vars because these can be
+# overwritten by the default modules command at ECMWF.
+
set -e
CC=@CMAKE_C_COMPILER@
@@ -43,13 +48,27 @@ LDFLAGS_INLINE="@LDFLAGS_INLINE@"
MV_EMOSLIB=${MV_EMOSLIB:="-L/usr/local/lib -lemosR64"}
-#-- Warning: here Mars and Emos library names are hardcoded!!
+
+# installed version with own-built GRIB_API - make sure we pick up the right GRIB libs
+case $METVIEW_VVERSION in
+ prod)
+
+ if [ "x$MV_BUNDLE_TYPE" == "xMMG" -o "x$MV_BUNDLE_SRC" != "x" ]
+ then
+ GRIBAPI_INC="-I$METVIEW_DDIR/include $GRIBAPI_INC"
+ GRIBAPI_LIB="-L$METVIEW_DDIR/$LIBNAME -Wl,-rpath,/$METVIEW_DDIR/$LIBNAME $GRIBAPI_LIB"
+ fi
+ ;;
+esac
+
+
+
#-- Note that we end up with a duplicated '-lgrib_api' in $FLIBS, but this is because this needs to
#-- come after the fortran library (and it also exists within $GRIBAPI_LIB).
-FLIB="-L$METVIEW_DIR/${LIBNAME} -lmacro_api_f90 -lMvMars $MACRO_EXTRA_LIBS $MV_EMOSLIB $GRIBAPI_INC $GRIBAPI_LIB $LDFLAGS_INLINE -lm -lc"
-CLIB="$MACRO_EXTRA_LIBS $GRIBAPI_INC -L$METVIEW_DIR/${LIBNAME} -lMvMars $MV_EMOSLIB $GRIBAPI_LIB $LDFLAGS_INLINE -lm $FC_LIBS"
-CINC="$MACRO_EXTRA_INCS $GRIBAPI_INC -I$METVIEW_DIR/include"
+FLIB="-L$METVIEW_DDIR/${LIBNAME} -lmacro_api_f90 -lMvMars $MACRO_EXTRA_LIBS $MV_EMOSLIB $GRIBAPI_INC $GRIBAPI_LIB $LDFLAGS_INLINE -lm -lc"
+CLIB="$MACRO_EXTRA_LIBS $GRIBAPI_INC -L$METVIEW_DDIR/${LIBNAME} -lMvMars $MV_EMOSLIB $GRIBAPI_LIB $LDFLAGS_INLINE -lm $FC_LIBS"
+CINC="$MACRO_EXTRA_INCS $GRIBAPI_INC -I$METVIEW_DDIR/include"
MX77="$MACRO_EXTRA_F77_FLAGS"
MX90="$MACRO_EXTRA_F90_FLAGS"
MXCC="$MACRO_EXTRA_CC_FLAGS"
@@ -109,7 +128,7 @@ case "$type" in
*)
# Consider the string as a command
cat <<@ > "$out"
-#!/bin/ksh
+#!/bin/bash
cat <<\end_of_inline_macro$$ > $METVIEW_TMPDIR/\$\$
diff --git a/scripts/compile.src b/scripts/compile.src
index 5c1567e..54ea309 100755
--- a/scripts/compile.src
+++ b/scripts/compile.src
@@ -91,7 +91,7 @@ case "$type" in
*)
# Consider the string as a command
cat <<@ > "$out"
-#!/bin/ksh
+#!/bin/bash
cat <<\end_of_inline_macro$$ > $METVIEW_TMPDIR/\$\$
diff --git a/scripts/dump b/scripts/dump
index 7798661..ff49a09 100755
--- a/scripts/dump
+++ b/scripts/dump
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/find_from_libs b/scripts/find_from_libs
index 3bf5299..90b67ef 100755
--- a/scripts/find_from_libs
+++ b/scripts/find_from_libs
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/generate_video b/scripts/generate_video
index a36db2c..e975cd3 100644
--- a/scripts/generate_video
+++ b/scripts/generate_video
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -49,4 +49,4 @@ fi
#clear
rm -f ${fileBase}_*.png
-exit retVal
\ No newline at end of file
+exit retVal
diff --git a/scripts/logrun b/scripts/logrun
index babb874..59c111d 100644
--- a/scripts/logrun
+++ b/scripts/logrun
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/metgram.py b/scripts/metgram.py
new file mode 100644
index 0000000..ad003db
--- /dev/null
+++ b/scripts/metgram.py
@@ -0,0 +1,134 @@
+
+import xml.sax
+import requests
+import json
+import sys, getopt
+import os
+
+epsgrams = {
+ "15_days" : "classical_15d",
+ "15_days_with_clim" : "classical_15d_with_climate",
+ "10_days" : "classical_10d",
+ "10_days_wave" : "classical_wave",
+ "10_days_plumes" : "classical_plume",
+
+}
+
+class MetgramHandler( xml.sax.ContentHandler ):
+ def __init__(self):
+ self.CurrentData = ""
+ self.type = ""
+ self.date = ""
+ self.expver = ""
+ self.stations = []
+
+
+ # Call when an element starts
+ def startElement(self, tag, attributes):
+ self.CurrentData = tag
+ if tag == "eps":
+ self.type = attributes["template"]
+ self.date = attributes.get("date", "").strip()
+ self.time = attributes.get("time", "").strip()
+ if ( self.time != "") :
+ self.time = self.time[:2]
+ self.expver = attributes.get("expver", "0001")
+ self.stations = []
+ if self.date == "latest":
+ self.date = ""
+ else:
+ self.date = "%s%s" % (self.date, self.time)
+
+
+ if tag == "station":
+
+ request = {
+ "station_name" : attributes["name"],
+ "lat" : attributes["latitude"].strip(),
+ "lon" : attributes["longitude"].strip(),
+ "token" : "metview",
+ "expver" : self.expver,
+ "epsgram" : epsgrams[self.type]
+ }
+ if attributes.has_key("height") :
+ request["altitude"] = attributes["height"],
+
+ if self.date != "" :
+ request["time"] = self.date
+
+ if attributes.has_key("pngfile") :
+ request["format"] = "png"
+ output = attributes["pngfile"]
+ if attributes.has_key("psfile") :
+ request["format"] = "ps"
+ output = attributes["psfile"]
+ if attributes.has_key("pdffile") :
+ request["format"] = "pdf"
+ output = attributes["pdffile"]
+ self.stations.append({"request" : request,
+ "output": output}
+ )
+
+
+
+ # Call when an elements ends
+ def endElement(self, tag):
+ if tag == "eps":
+
+
+ self.execute()
+
+
+
+ # Call when a character is read
+ def characters(self, content):
+ pass
+
+ def execute(self):
+ url = "https://apps.ecmwf.int/plots/product-download/web/classical_meteogram"
+ for station in self.stations :
+ request = station["request"]
+ request["token"] = "metview" # this token will only work from inside ECMWF
+ request["email"] = "Web.Administrator at ecmwf.int"
+ request["generator"] = "Metview"
+ request["metview_version"] = os.environ["METVIEW_RELEASE"]
+ request["metview_user"] = os.environ["USER"]
+ request = requests.get(url, params = request,
+ proxies = { "http": "http://proxy.ecmwf.int:3333/" })
+ print request.url
+ if request.status_code == 200 :
+ out = open(station["output"], "w")
+ out.write(request.content)
+ out.close()
+ print "Result saved in %s" % (station["output"], )
+ else :
+ print "No Result -->Error %d" % (request.status_code)
+ self.stations = []
+
+
+def main(argv):
+ try:
+ opts, args = getopt.getopt(argv,"hi:",["input="])
+ except getopt.GetoptError:
+ print 'metgram.py -i <inputfile> '
+ sys.exit(2)
+ for opt, arg in opts:
+ if opt == '-h':
+ print 'metgram.py -i <inputfile> '
+ sys.exit()
+ elif opt in ("-i", "--input"):
+ input = arg
+
+ # create an XMLReader
+ parser = xml.sax.make_parser()
+ # turn off namepsaces
+ parser.setFeature(xml.sax.handler.feature_namespaces, 0)
+
+ # override the default ContextHandler
+ Handler = MetgramHandler()
+ parser.setContentHandler( Handler )
+
+ parser.parse(input)
+
+if __name__ == "__main__":
+ main(sys.argv[1:])
diff --git a/scripts/metview-mail b/scripts/metview-mail
index ff6d70e..be45d6d 100755
--- a/scripts/metview-mail
+++ b/scripts/metview-mail
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/metview_base.in b/scripts/metview_base.in
index 2fa09e6..33b71ac 100755
--- a/scripts/metview_base.in
+++ b/scripts/metview_base.in
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -32,7 +32,7 @@ MV_LOG_DIR=@LOG_DIR@
##OS=linux
##MAJOR_VERSION=2
SHELL=/bin/sh
-#MAGPLUS_HOME=@MAGICS_PATH@
+ at MV_MAGPLUS_HOME_PATH_SET@
GRIBAPI_DIR=@GRIB_API_PATH@
##MV_PYTHON_COMMAND=/usr/local/bin/python
MV_ODB1_VERSION=@MV_ODB1_VERSION@
@@ -44,9 +44,9 @@ METVIEW_VERSION_TITLE="Metview @METVIEW_VERSION_STR@ @EXTRA_TITLE@ (@TODAYS_DATE
METVIEW_GUI_BUILT=@METVIEW_GUI_BUILT@
@MV_FLEXTRA_PATH_SET@
MV_WEATHER_ROOM_BUILT=@MV_WEATHER_ROOM_BUILT@
+MV_BUNDLE_TYPE=@METVIEW_BUNDLE_TYPE@
MV_BUNDLE_SRC=@METVIEW_BUNDLE_SRC@
METVIEW_QT5=@METVIEW_QT5@
-unset MAGPLUS_HOME
#
# Metview scripts are built automatically by 'make'.
@@ -210,8 +210,8 @@ ensure_system_dir_links_correct(){
# one which points to the newly-created System link.
# The following lines set KSH arrays.
- set -A local_dirs "System Drawers" "System Templates"
- set -A sys_dirs Drawers Templates
+ local_dirs=("System Drawers" "System Templates")
+ sys_dirs=( Drawers Templates)
for i in 0 1
do
@@ -339,6 +339,19 @@ do
break
;;
+ -p)
+ METVIEW_MODE=plotSA #plot stand alone
+ inputfile=$(readlink -m $2) #make sure the filename contains the full path
+ if [ ! -f "$inputfile" ]
+ then
+ info "Cannot find file $inputfile"
+ exit 1
+ fi
+ METVIEW_STARTUP="$METVIEW_BIN/uPlot '$inputfile'"
+ METVIEW_EXIT=uPlot
+ shift 1
+ ;;
+
-e)
METVIEW_MODE=examine
datatype=$2
@@ -453,16 +466,20 @@ case $METVIEW_VERSION in
# in the build directory
if [ "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"
MAGPLUS_HOME=${MV_BUNDLE_SRC}/magics
BUFR_TABLES=${MV_BUNDLE_SRC}/bufrdc_tables
MARS_LSM_PATH=${MV_BUNDLE_SRC}/libemos/tables/interpol
- GRIBAPI_DIR=${METVIEW_DIR_DEV}
#FDB_CONFIG_FILE=/tmp/cgi/git/metview-bundle/fdb/etc/Config # has no effect
#FDB_CONF_FILE=/tmp/cgi/git/metview-bundle/fdb/etc/Config # has no effect
fi
+ 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"
+ GRIBAPI_DIR=${METVIEW_DIR_DEV}
+ fi
+
if [ "x at MV_BUNDLE_MAGICS_SRC@" != "x" ]
then
MAGPLUS_HOME=@MV_BUNDLE_MAGICS_SRC@
@@ -716,9 +733,20 @@ esac
# =============================================================
# Create Metview user directory if missing
+uname_=`uname`
+if [[ "$uname_" == 'Darwin' ]]; then
+ # on the MAC, 'dot' files in .tar.gz are treated specially - we want
+ # to disable this special behaviour so that we don't get spurious
+ # files appearing. See discussion here:
+ # http://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x
+ COPYFILE_DISABLE=1
+fi
+
if [ ! -d "$METVIEW_USER_DIRECTORY/System" ]
then
- metview_create_user_dir "$METVIEW_USER_DIRECTORY"
+ # note that since changing the scripts to bash, we need to be aware that the
+ # modules system can overwrite the variable METVIEWDIR in a new shell
+ . metview_create_user_dir "$METVIEW_USER_DIRECTORY"
fi
@@ -781,7 +809,6 @@ then
# set up the file viewers
- uname_=`uname`
if [[ "$uname_" == 'Darwin' ]]; then
METVIEW_PS_VIEWER=${METVIEW_PS_VIEWER:=open}
METVIEW_PDF_VIEWER=${METVIEW_PDF_VIEWER:=open}
diff --git a/scripts/metview_create_user_dir b/scripts/metview_create_user_dir
index 5c78724..8af9625 100755
--- a/scripts/metview_create_user_dir
+++ b/scripts/metview_create_user_dir
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -53,3 +53,8 @@ else
rmdir $USER_DIR
exit 1
fi
+
+# for neatness, unset these env vars
+unset TAR_FILE
+unset DRAWERS_TAR_FILE
+unset USER_DIR
diff --git a/scripts/metview_help b/scripts/metview_help
index 98d49ac..dc1f4b5 100755
--- a/scripts/metview_help
+++ b/scripts/metview_help
@@ -187,6 +187,10 @@ Metview command flags:
'type' can be grib, bufr or odb
e.g. metview -e grib /path/to/grib
+ Plotting flags:
+ -p path plot the given file
+ e.g. metview -p /path/to/grib
+
Batch mode specific flags:
-b mname run macro mname in batch mode
(-b must be the last Metview flag!)
diff --git a/scripts/mv_compress b/scripts/mv_compress
index 3fb15a7..c66e823 100644
--- a/scripts/mv_compress
+++ b/scripts/mv_compress
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_dots b/scripts/mv_dots
index e1af7a4..aca544c 100755
--- a/scripts/mv_dots
+++ b/scripts/mv_dots
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_flexpart_run b/scripts/mv_flexpart_run
index 37d3de2..fd9b582 100644
--- a/scripts/mv_flexpart_run
+++ b/scripts/mv_flexpart_run
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_flextra_prep b/scripts/mv_flextra_prep
index 7b82acc..4be3c0d 100755
--- a/scripts/mv_flextra_prep
+++ b/scripts/mv_flextra_prep
@@ -1,4 +1,4 @@
-#!/usr/bin/ksh
+#!/usr/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_flextra_run b/scripts/mv_flextra_run
index a11fb56..344afa0 100644
--- a/scripts/mv_flextra_run
+++ b/scripts/mv_flextra_run
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -163,4 +163,4 @@ if [ $resCnt -gt 1 ] ; then
cat $resCnt > "multipleRes"
fi
-exit $outCode
\ No newline at end of file
+exit $outCode
diff --git a/scripts/mv_grib_dump b/scripts/mv_grib_dump
index 611ed86..5d9b2b9 100755
--- a/scripts/mv_grib_dump
+++ b/scripts/mv_grib_dump
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_mail b/scripts/mv_mail
index 2ee7573..aed6e8a 100644
--- a/scripts/mv_mail
+++ b/scripts/mv_mail
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_obstat b/scripts/mv_obstat
index 128f86d..a008773 100644
--- a/scripts/mv_obstat
+++ b/scripts/mv_obstat
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_odbsql b/scripts/mv_odbsql
index 938db3f..2100e0d 100755
--- a/scripts/mv_odbsql
+++ b/scripts/mv_odbsql
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_rttov_run b/scripts/mv_rttov_run
index 5d9f7a8..4509d81 100644
--- a/scripts/mv_rttov_run
+++ b/scripts/mv_rttov_run
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_scm_run b/scripts/mv_scm_run
index c5f0bf8..e884d10 100644
--- a/scripts/mv_scm_run
+++ b/scripts/mv_scm_run
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mv_uniquename b/scripts/mv_uniquename
index 62183b2..d853c78 100644
--- a/scripts/mv_uniquename
+++ b/scripts/mv_uniquename
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
@@ -41,4 +41,4 @@ done
echo "$n"_$maxNum
-exit
\ No newline at end of file
+exit
diff --git a/scripts/mv_vapor_gui b/scripts/mv_vapor_gui
index d792b44..9813d08 100644
--- a/scripts/mv_vapor_gui
+++ b/scripts/mv_vapor_gui
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mvrun b/scripts/mvrun
index e3d51d6..011c007 100644
--- a/scripts/mvrun
+++ b/scripts/mvrun
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mvrun_c b/scripts/mvrun_c
index 9451bee..3f37874 100644
--- a/scripts/mvrun_c
+++ b/scripts/mvrun_c
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mvrun_lnx b/scripts/mvrun_lnx
index 370fbd4..30723ff 100644
--- a/scripts/mvrun_lnx
+++ b/scripts/mvrun_lnx
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/mvusage b/scripts/mvusage
index 86cc1d3..5ced846 100755
--- a/scripts/mvusage
+++ b/scripts/mvusage
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/scripts/select_mars_config b/scripts/select_mars_config
index 44fd9e0..c8d34a7 100755
--- a/scripts/select_mars_config
+++ b/scripts/select_mars_config
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
#set -x
export MARS_HOME=${MARS_HOME:=/usr/local/apps/mars/current}
diff --git a/scripts/set_mars_env b/scripts/set_mars_env
index 4270f2e..25ceb68 100755
--- a/scripts/set_mars_env
+++ b/scripts/set_mars_env
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# **************************** LICENSE START ***********************************
#
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake b/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
index 1e12d66..db045ee 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
@@ -1,4 +1,9 @@
####################################################################
+# ARCHITECTURE
+####################################################################
+set( CMAKE_SIZEOF_VOID_P 8 )
+
+####################################################################
# COMPILER
####################################################################
@@ -8,15 +13,11 @@ CMAKE_FORCE_C_COMPILER ( cc Cray )
CMAKE_FORCE_CXX_COMPILER ( CC Cray )
CMAKE_FORCE_Fortran_COMPILER ( ftn Cray )
-link_libraries("$ENV{CC_X86_64}/lib/x86-64/libcray-c++-rts.so")
-link_libraries("-lmpichf90_cray")
-link_libraries("-lmpichcxx_cray")
-
set( ECBUILD_FIND_MPI OFF )
set( ECBUILD_TRUST_FLAGS ON )
####################################################################
-# FLAGS COMMON TO ALL BUILD TYPES
+# OpenMP FLAGS
####################################################################
set( OMP_C_FLAGS "-homp" )
@@ -27,49 +28,12 @@ set( OMPSTUBS_C_FLAGS "-hnoomp" )
set( OMPSTUBS_CXX_FLAGS "-hnoomp" )
set( OMPSTUBS_Fortran_FLAGS "-hnoomp" )
-set( CMAKE_C_FLAGS "" CACHE STRING "" FORCE )
-set( CMAKE_CXX_FLAGS "" CACHE STRING "" FORCE )
-set( CMAKE_Fortran_FLAGS "-emf -rmoid" CACHE STRING "" FORCE ) # -emf activates .mods and uses lower case -rmoid produces a listing file
-
-####################################################################
-# RELEASE FLAGS
-####################################################################
-
-set( ECBUILD_C_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-set( ECBUILD_CXX_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-set( ECBUILD_Fortran_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-
-####################################################################
-# BIT REPRODUCIBLE FLAGS
-####################################################################
-
-set( ECBUILD_C_FLAGS_BIT "-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1 -DNDEBUG" )
-set( ECBUILD_CXX_FLAGS_BIT "-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1 -DNDEBUG" )
-set( ECBUILD_Fortran_FLAGS_BIT "-O1 -G2 -hflex_mp=conservative -hadd_paren -hfp1 -DNDEBUG" )
-
-####################################################################
-# RELWITHDEBINFO FLAGS
-####################################################################
-
-set( ECBUILD_C_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-set( ECBUILD_CXX_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-set( ECBUILD_Fortran_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-
####################################################################
-# DEBUG FLAGS
+# Fortran FLAGS
####################################################################
-set( ECBUILD_C_FLAGS_DEBUG "-O0 -G0" )
-set( ECBUILD_CXX_FLAGS_DEBUG "-O0 -G0" )
-set( ECBUILD_Fortran_FLAGS_DEBUG "-O0 -G0" )
-
-####################################################################
-# PRODUCTION FLAGS
-####################################################################
-
-set( ECBUILD_C_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
-set( ECBUILD_CXX_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
-set( ECBUILD_Fortran_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
+# -emf activates .mods and uses lower case -rmoid produces a listing file
+set( ECBUILD_Fortran_FLAGS "-emf -rmoid" )
####################################################################
# LINK FLAGS
@@ -78,4 +42,4 @@ set( ECBUILD_Fortran_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Ktrap=fp" )
set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Ktrap=fp" )
set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Ktrap=fp" )
-
+set( ECBUILD_CXX_IMPLICIT_LINK_LIBRARIES "$ENV{CC_X86_64}/lib/x86-64/libcray-c++-rts.so" CACHE STRING "" )
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake b/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
index 3c890d5..e09bc56 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
@@ -1,4 +1,9 @@
####################################################################
+# ARCHITECTURE
+####################################################################
+set( CMAKE_SIZEOF_VOID_P 8 )
+
+####################################################################
# COMPILER
####################################################################
@@ -12,56 +17,20 @@ set( ECBUILD_FIND_MPI OFF )
set( ECBUILD_TRUST_FLAGS ON )
####################################################################
-# FLAGS COMMON TO ALL BUILD TYPES
+# OpenMP FLAGS
####################################################################
set( OMP_C_FLAGS "-fopenmp" )
set( OMP_CXX_FLAGS "-fopenmp" )
set( OMP_Fortran_FLAGS "-fopenmp" )
-set( CMAKE_C_FLAGS "" CACHE STRING "" FORCE )
-set( CMAKE_CXX_FLAGS "" CACHE STRING "" FORCE )
-set( CMAKE_Fortran_FLAGS "" CACHE STRING "" FORCE )
-
-####################################################################
-# RELEASE FLAGS
-####################################################################
-
-#set( ECBUILD_C_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-#set( ECBUILD_CXX_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-#set( ECBUILD_Fortran_FLAGS_RELEASE "-O3 -hfp3 -hscalar3 -hvector3 -DNDEBUG" )
-
-####################################################################
-# BIT REPRODUCIBLE FLAGS
-####################################################################
-
-set( ECBUILD_C_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG" )
-set( ECBUILD_CXX_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG" )
-set( ECBUILD_Fortran_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG -fno-range-check -ffree-line-length-300 -fconvert=big-endian" )
-
-####################################################################
-# RELWITHDEBINFO FLAGS
-####################################################################
-
-#set( ECBUILD_C_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-#set( ECBUILD_CXX_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-#set( ECBUILD_Fortran_FLAGS_RELWITHDEBINFO "-O2 -hfp1 -Gfast -DNDEBUG" )
-
####################################################################
# DEBUG FLAGS
####################################################################
-#set( ECBUILD_C_FLAGS_DEBUG "-O0 -G0" )
-#set( ECBUILD_CXX_FLAGS_DEBUG "-O0 -G0" )
-#set( ECBUILD_Fortran_FLAGS_DEBUG "-O0 -G0" )
-
-####################################################################
-# PRODUCTION FLAGS
-####################################################################
-
-#set( ECBUILD_C_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
-#set( ECBUILD_CXX_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
-#set( ECBUILD_Fortran_FLAGS_PRODUCTION "-O2 -hfp1 -G2" )
+set( ECBUILD_C_FLAGS_DEBUG "-O0 -g -ftrapv" )
+set( ECBUILD_CXX_FLAGS_DEBUG "-O0 -g -ftrapv" )
+set( ECBUILD_Fortran_FLAGS_DEBUG "-ffree-line-length-none -O0 -g -fcheck=bounds -fbacktrace -finit-real=snan -ffpe-trap=invalid,zero,overflow" )
####################################################################
# LINK FLAGS
@@ -70,4 +39,3 @@ set( ECBUILD_Fortran_FLAGS_BIT "-g -O2 -m64 -march=native -DNDEBUG -fno-range-c
set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
-
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake b/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
index 485b122..c569daf 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
@@ -12,27 +12,23 @@ set( ECBUILD_FIND_MPI OFF )
set( ECBUILD_TRUST_FLAGS ON )
####################################################################
-# FLAGS COMMON TO ALL BUILD TYPES
+# OpenMP FLAGS
####################################################################
set( OMP_C_FLAGS "-qopenmp -qopenmp-threadprivate=compat -qopenmp-report=2 -qopt-report-phase=vec,openmp" )
set( OMP_CXX_FLAGS "-qopenmp -qopenmp-threadprivate=compat -qopenmp-report=2 -qopt-report-phase=vec,openmp" )
set( OMP_Fortran_FLAGS " -openmp -openmp-threadprivate=compat -openmp-report=2 -opt-report-phase=vec,openmp" ) # -[q] is missing on purpose, ifort does not take -q as flag
-# for diagnostics:
-# -diag-enable=vec -diag-file -Winline
-
-set( CMAKE_C_FLAGS "-fp-speculation=strict -fp-model precise -traceback" CACHE STRING "" FORCE )
-set( CMAKE_CXX_FLAGS "-fp-speculation=strict -fp-model precise -traceback" CACHE STRING "" FORCE )
-set( CMAKE_Fortran_FLAGS "-fp-speculation=strict -fp-model precise -convert big_endian -assume byterecl -traceback -fpe0" CACHE STRING "" FORCE )
-
####################################################################
-# RELEASE FLAGS
+# COMMON FLAGS
####################################################################
-#set( ECBUILD_C_FLAGS_RELEASE "not implemented" )
-#set( ECBUILD_CXX_FLAGS_RELEASE "not implemented" )
-#set( ECBUILD_Fortran_FLAGS_RELEASE "not implemented" )
+# for diagnostics:
+# -diag-enable=vec -diag-file -Winline
+
+set( ECBUILD_C_FLAGS "-fp-speculation=strict -fp-model precise -traceback")
+set( ECBUILD_CXX_FLAGS "-fp-speculation=strict -fp-model precise -traceback" )
+set( ECBUILD_Fortran_FLAGS "-fp-speculation=strict -fp-model precise -convert big_endian -assume byterecl -traceback -fpe0" )
####################################################################
# BIT REPRODUCIBLE FLAGS
@@ -43,28 +39,13 @@ set( ECBUILD_CXX_FLAGS_BIT "-O2 -xAVX -finline-function -finline-limit=500"
set( ECBUILD_Fortran_FLAGS_BIT "-O2 -xAVX -finline-function -finline-limit=500 -align array64byte" )
####################################################################
-# RELWITHDEBINFO FLAGS
-####################################################################
-
-#set( ECBUILD_C_FLAGS_RELWITHDEBINFO "not implemented" )
-#set( ECBUILD_CXX_FLAGS_RELWITHDEBINFO "not implemented" )
-#set( ECBUILD_Fortran_FLAGS_RELWITHDEBINFO "not implemented" )
-
-####################################################################
# DEBUG FLAGS
####################################################################
-set( ECBUILD_C_FLAGS_DEBUG "-g -O0" )
-set( ECBUILD_CXX_FLAGS_DEBUG "-g -O0" )
-set( ECBUILD_Fortran_FLAGS_DEBUG "-g -O0" ) # ??? -align array64byte
-
-####################################################################
-# PRODUCTION FLAGS
-####################################################################
-
-#set( ECBUILD_C_FLAGS_PRODUCTION "not implemented" )
-#set( ECBUILD_CXX_FLAGS_PRODUCTION "not implemented" )
-#set( ECBUILD_Fortran_FLAGS_PRODUCTION "not implemented" )
+set( ECBUILD_C_FLAGS_DEBUG "-O0 -g -traceback -fp-trap=common" )
+set( ECBUILD_CXX_FLAGS_DEBUG "-O0 -g -traceback -fp-trap=common" )
+# -check all implies -check bounds
+set( ECBUILD_Fortran_FLAGS_DEBUG "-O0 -g -traceback -warn all -heap-arrays -fpe-all=0 -fpe:0 -check all" )
####################################################################
# LINK FLAGS
@@ -73,4 +54,3 @@ set( ECBUILD_Fortran_FLAGS_DEBUG "-g -O0" ) # ??? -align array64byte
set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed" )
-
diff --git a/share/metview/app-defaults/LayerKeyProfile_default.xml b/share/metview/app-defaults/LayerKeyProfile_default.xml
index 7fbe481..bf44624 100644
--- a/share/metview/app-defaults/LayerKeyProfile_default.xml
+++ b/share/metview/app-defaults/LayerKeyProfile_default.xml
@@ -32,9 +32,10 @@
<Key name="gridType" shortName="Grid type">
<Data source="gribapi"/>
</Key>
- <Key name="N" shortName="Grid (N)">
+ <Key name="N" shortName="Gaussian number">
<Data source="gribapi"/>
</Key>
+ <Key name="isOctahedral" shortName="Octahedral"/>
<Key name="iDirectionIncrementInDegrees" shortName="Dx">
<Data source="gribapi"/>
</Key>
diff --git a/share/metview/app-defaults/Sample_Drawers.tar.gz b/share/metview/app-defaults/Sample_Drawers.tar.gz
index ec809ab..45ad719 100644
Binary files a/share/metview/app-defaults/Sample_Drawers.tar.gz and b/share/metview/app-defaults/Sample_Drawers.tar.gz differ
diff --git a/share/metview/app-defaults/User_Dir_Frame.tar.gz b/share/metview/app-defaults/User_Dir_Frame.tar.gz
index a1f89d4..afeeffb 100644
Binary files a/share/metview/app-defaults/User_Dir_Frame.tar.gz and b/share/metview/app-defaults/User_Dir_Frame.tar.gz differ
diff --git a/share/metview/etc/MagicsColors.h b/share/metview/etc/MagicsColors.h
index 56dff68..8abc762 100644
--- a/share/metview/etc/MagicsColors.h
+++ b/share/metview/etc/MagicsColors.h
@@ -22,6 +22,7 @@ BLUE_PURPLE ; BLUE_PURPLE #7fff0000ffff:270:100: 50
LAVENDER ; LAVENDER #9df36830f0a2:263: 81: 67
PURPLISH_BLUE ; PURPLISH_BLUE #257a0000ffff:248:100: 50
BLUE ; BLUE #00000000ffff:240:100: 50
+ECMWF_BLUE ; ECMWF_BLUE #40006e00b300:216:121:121
NAVY ; NAVY #000000006666:240:100: 20
SKY ; SKY #7332a3d6ffff:219:100: 72
GREENISH_BLUE ; GREENISH_BLUE #00007fffffff:210:100: 50
diff --git a/share/metview/etc/MarsRules b/share/metview/etc/MarsRules
index c03f72a..07109dd 100755
--- a/share/metview/etc/MarsRules
+++ b/share/metview/etc/MarsRules
@@ -503,6 +503,7 @@
CLASS=EM %or
CLASS=E2 %or
CLASS=EA %or
+ CLASS=ET %or
CLASS=NR %or
CLASS=EP %or
CLASS=RM %or
@@ -577,6 +578,7 @@
CLASS<>EM %and
CLASS<>E2 %and
CLASS<>EA %and
+ CLASS<>ET %and
CLASS<>UR %and
CLASS<>MC %and
CLASS<>NR %and
@@ -725,10 +727,12 @@
# %unset STEP
#
-%if (CLASS = TI %or CLASS = S2) %then %unset DOMAIN
+%if (CLASS = TI %or CLASS = S2 %or CLASS = UR ) %then %unset DOMAIN
%if (CLASS = TI %or CLASS = S2) %and TYPE = CF %then %set NUMBER=0
%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
-%if (CLASS = TI %or CLASS = S2) %and (%not EXPVER) %then %set EXPVER=PROD
+%if (CLASS = TI %or CLASS = S2 %or CLASS = UR ) %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if (CLASS = UR) %then %unset MODEL
%if CLASS = DM %and TYPE = FC %then %set TIME=0
diff --git a/share/metview/etc/ObsFilterDef b/share/metview/etc/ObsFilterDef
index e4d8a21..a7fbf2d 100644
--- a/share/metview/etc/ObsFilterDef
+++ b/share/metview/etc/ObsFilterDef
@@ -34,7 +34,11 @@ _SUBREQUEST ; Dummy ; dummy
LSD - Synop auto record 2 land ; SA2 ; 4
LSD - Soil and earth temperature ; SET ; 7
LSD - Metar ; METAR ; 140
-
+ LSD - Bufr land synop ; BS ; 170
+ LSD - Bufr land synop 2 ; BS2 ; 172
+ LSD - Bufr land synop Wmo region 6 ; BSR6 ; 176
+ LSD - Bufr land synop 1 hourly ; BS1H ; 178
+
SSD - Synop ship abbreviated ; SAB ; 9
SSD - Synop ship ; SS ; 11
SSD - Synop record 2 ship ; SS2 ; 12
@@ -44,6 +48,7 @@ _SUBREQUEST ; Dummy ; dummy
SSD - DRIBU SURFACE ; DSU ; 21
SSD - BATHY SURFACE ; BSU ; 22
SSD - TESAC SURFACE ; TSU ; 23
+ SSD - Bufr ship synop ; BSS ; 180
SF - STORM ; STOR ; 31
diff --git a/share/metview/etc/PageFrameDef b/share/metview/etc/PageFrameDef
index 96fa346..bf6700f 100644
--- a/share/metview/etc/PageFrameDef
+++ b/share/metview/etc/PageFrameDef
@@ -57,7 +57,7 @@ PAGE_FRAME_THICKNESS
PAGE_ID_LINE_COLOUR [ visible = false, interface = colour]
{
%include MagicsColors.h
- } = BLUE
+ } = ECMWF_BLUE
PAGE_ID_LINE_SYSTEM_PLOT [ visible = false ]
{
diff --git a/share/metview/etc/ecmwf.def b/share/metview/etc/ecmwf.def
index f9f7614..676466c 100755
--- a/share/metview/etc/ecmwf.def
+++ b/share/metview/etc/ecmwf.def
@@ -59,6 +59,7 @@ ACCUMULATED LIQUID WATER TENDENCY ; ALW ; 242
ACCUMULATED CARBON DIOXIDE NET ECOSYSTEM EXCHANGE ; ACO2NEE; 80.228
ACCUMULATED CARBON DIOXIDE GROSS PRIMARY PRODUCTION ; ACO2GPP; 81.228
ACCUMULATED CARBON DIOXIDE ECOSYSTEM RESPIRATION ; ACO2REC; 82.228
+ACCUMULATED FREEZING RAIN ; FZRA ; 228216
ADIABATIC TENDENCY OF HUMIDITY ; ATH ; 229
ADIABATIC TENDENCY OF HUMIDITY - ECMWF ; ATHE ; 252
ADIABATIC TENDENCY OF MERIDIONAL WIND ; ATMW ; 254
@@ -101,8 +102,10 @@ CLOUD LIQUID WATER CONTENT ; CLWC ; 246
CLOUD LIQUID WATER CONTENT - ERA ; CLWCER ; 241
CLOUD RAIN WATER CONTENT ; CRWC ; 75
CLOUD SNOW WATER CONTENT ; CSWC ; 76
+CLOUDY BRIGHTNESS TEMPERATURE ; CLBT ; 260510
COEFFICIENT OF DRAG WITH WAVES ; CDWW ; 233
CONVECTIVE AVAILABLE POTENTIAL ENERGY ; CAPE ; 059
+CONVECTIVE AVAILABLE POTENTIAL ENERGY SHEAR ; CAPES ; 228044
CONVECTIVE CLOUD COVER ; CCC ; 185
CONVECTIVE INHIBITION ; CIN ; 228001
CONVECTIVE PRECIPITATION ; CP ; 143
@@ -299,6 +302,7 @@ SIGNIFICANT WAVE HEIGHT PROBABILITY ; SWHP ; 229
SIGNIFICANT WAVE HEIGHT OF FIRST SWELL PARTITION ; SWH1 ; 121
SIGNIFICANT WAVE HEIGHT OF SECOND SWELL PARTITION; SWH2 ; 124
SIGNIFICANT WAVE HEIGHT OF SWELL THIRD PARTITION ; SWH3 ; 127
+SIGNIFICANT WAVE HEIGHT OF ALL WAVES WITH PERIOD LARGER THAN 10S ; SH10 ; 120
SKIN RESERVOIR CONTENT ; SRC ; 198
SKIN TEMPERATURE ; SKT ; 235
SLOPE OF SUBGRID OROGRAPHY ; SLOR ; 163
@@ -712,12 +716,13 @@ TOTAL AEROSOL OPTICAL DEPTH AT 1240NM ; AOD1240 ; 216.210
E20CM ; EM
E20C ; E2
ESAT ; ERA5 ; EA
- CERA20C ; EP
+ CERA20C ; CERA-20C ; EP
EURO4M ; RM
UERRA ; UR
20CR ; NCEP 20CR ; NR
JRA55 ; J5
+ CERASAT ; CERA-SAT ; ET
! Member stats
@@ -1057,7 +1062,7 @@ TOTAL AEROSOL OPTICAL DEPTH AT 1240NM ; AOD1240 ; 216.210
ALL = (NSD/SD)
CONVENTIONAL; NSD = (LSD/SSD/VSNS/SLNS/SLS/OD/DD/CC/SF/GBGPS/OSTIA)
- SD = (SDS/VSS/SSMI/SSMIS/SSBT/TRMM/QSCAT/REO3/IASI/ATMS/CRIS)
+ SD = (SDS/VSS/SSMI/SSMIS/SSBT/TRMM/QSCAT/REO3/IASI/ATMS/CRIS/VASS)
# Image stuff
@@ -1480,6 +1485,7 @@ CROSS-TRACK INFRARED SOUNDER ; CRIS ; 202
O512
O640
O1280
+ O2000
*
/
OFF ; OFF
@@ -4419,7 +4425,7 @@ READ ; X; METVIEW
/
} = ANY
- GRID
+ GRID [ exact_match = true ]
{
&_DUMMY&GRID
ANY ; ANY
diff --git a/share/metview/etc/mars.chk b/share/metview/etc/mars.chk
index c03f72a..07109dd 100755
--- a/share/metview/etc/mars.chk
+++ b/share/metview/etc/mars.chk
@@ -503,6 +503,7 @@
CLASS=EM %or
CLASS=E2 %or
CLASS=EA %or
+ CLASS=ET %or
CLASS=NR %or
CLASS=EP %or
CLASS=RM %or
@@ -577,6 +578,7 @@
CLASS<>EM %and
CLASS<>E2 %and
CLASS<>EA %and
+ CLASS<>ET %and
CLASS<>UR %and
CLASS<>MC %and
CLASS<>NR %and
@@ -725,10 +727,12 @@
# %unset STEP
#
-%if (CLASS = TI %or CLASS = S2) %then %unset DOMAIN
+%if (CLASS = TI %or CLASS = S2 %or CLASS = UR ) %then %unset DOMAIN
%if (CLASS = TI %or CLASS = S2) %and TYPE = CF %then %set NUMBER=0
%if CLASS = TI %and TYPE = FC %then %set STREAM=OPER
-%if (CLASS = TI %or CLASS = S2) %and (%not EXPVER) %then %set EXPVER=PROD
+%if (CLASS = TI %or CLASS = S2 %or CLASS = UR ) %and (%not EXPVER) %then %set EXPVER=PROD
+
+%if (CLASS = UR) %then %unset MODEL
%if CLASS = DM %and TYPE = FC %then %set TIME=0
diff --git a/share/metview/etc/tigge.def b/share/metview/etc/tigge.def
index ed54429..5679898 100755
--- a/share/metview/etc/tigge.def
+++ b/share/metview/etc/tigge.def
@@ -191,6 +191,8 @@ TIME INTEGRATED SURFACE NET THERMAL RADIATION DOWNWARDS ; STRD ; 175
AROMEEPS-MF-EU
PEARP-MF-EU
+ # UERRA
+ ESWI
/
ALL
diff --git a/share/metview/icons/fix_last_line b/share/metview/icons/fix_last_line
index 3e8780d..a2e9a68 100755
--- a/share/metview/icons/fix_last_line
+++ b/share/metview/icons/fix_last_line
@@ -1,4 +1,4 @@
-#!/bin/ksh
+#!/bin/bash
# 030109/vk
# On some platforms 'convert' is broken
# and is not able to read xpm files that
diff --git a/src/AppMod/checkdisplay.cc b/src/AppMod/checkdisplay.cc
index ad417ef..2a00448 100644
--- a/src/AppMod/checkdisplay.cc
+++ b/src/AppMod/checkdisplay.cc
@@ -15,7 +15,7 @@
using namespace std;
-main()
+int main()
{
Display *toBeOrNotToBe;
if( toBeOrNotToBe = XOpenDisplay( 0 ) ) // NULL == $DISPLAY (if POSIX!)
@@ -28,4 +28,6 @@ main()
cerr << " [checkdisplay] Oops! Unable to open display!" << endl;
exit( EXIT_FAILURE );
}
+
+ return 0;
}
diff --git a/src/Hovmoeller/HovArea.cc b/src/Hovmoeller/HovArea.cc
index e363c56..19db7b8 100644
--- a/src/Hovmoeller/HovArea.cc
+++ b/src/Hovmoeller/HovArea.cc
@@ -108,19 +108,26 @@ bool HovAreaToolkit::GetInputInfo(MvRequest& in)
x2_ = in("AREA",3);
// Check if coordinates follow Mars rules (n/w/s/e)
+ bool swap = false;
if ( x1_ > x2_ )
{
double W = x1_;
x1_ = x2_;
x2_ = W;
+ swap = true;
}
if( y2_ > y1_ )
{
double W = y1_;
y1_ = y2_;
y2_ = W;
+ swap = true;
}
+ // Send a warning message
+ if ( swap )
+ marslog(LOG_WARN,"WARNING: Input geographical coordinates do not follow MARS rules (n/w/s/e). Values have been swapped.");
+
// Get direction
geoDir_ = ((const char*)in("AVERAGE_DIRECTION") && strcmp(in("AVERAGE_DIRECTION"),"NORTH_SOUTH" ) == 0 ) ? HOV_NS : HOV_EW;
@@ -246,10 +253,22 @@ bool HovAreaToolkit::consistencyCheck( MvRequest& req1, MvRequest& req2)
MvRequest HovAreaToolkit::CreateViewRequest()
{
MvRequest viewReq("MHOVMOELLERVIEW");
+
viewReq("TYPE") = this->ApplicationType();
- viewReq("SWAP_AXES") = swapAxes_ ? "YES" : "NO";
+ viewReq.addValue("AREA",y1_);
+ viewReq.addValue("AREA",x1_);
+ viewReq.addValue("AREA",y2_);
+ viewReq.addValue("AREA",x2_);
+
viewReq("AVERAGE_DIRECTION") = ( geoDir_ == HOV_NS ) ? "NORTH_SOUTH" : "EAST_WEST";
+
+ viewReq("SWAP_AXES") = swapAxes_ ? "YES" : "NO";
+ if ( (const char*)origReq_("RESOLUTION") )
+ viewReq("RESOLUTION") = (const char*)origReq_("RESOLUTION");
+
+ viewReq("_CLASS") = "MHOVMOELLERVIEW";
viewReq("_DEFAULT") = 1;
+ viewReq("_DATAATTACHED") = "YES";
return viewReq;
}
diff --git a/src/Hovmoeller/HovHeight.cc b/src/Hovmoeller/HovHeight.cc
index 307b6d4..ea7f777 100644
--- a/src/Hovmoeller/HovHeight.cc
+++ b/src/Hovmoeller/HovHeight.cc
@@ -179,19 +179,26 @@ bool HovHeightToolkit::GetInputInfo(MvRequest& in)
x2_ = in("AREA",3);
// Check if coordinates follow Mars rules (n/w/s/e)
+ bool swap = false;
if ( x1_ > x2_ )
{
double W = x1_;
x1_ = x2_;
x2_ = W;
+ swap = true;
}
if( y2_ > y1_ )
{
double W = y1_;
y1_ = y2_;
y2_ = W;
+ swap = true;
}
+ // Send a warning message
+ if ( swap )
+ marslog(LOG_WARN,"WARNING: Input geographical coordinates do not follow MARS rules (n/w/s/e). Values have been swapped.");
+
// Get vertical axis type
vertAxisType_ = ( (const char*)in("VERTICAL_LEVEL_TYPE") && strcmp(in("VERTICAL_LEVEL_TYPE"),"PRESSURE") == 0 ) ? HOV_PRESSURE : HOV_ASINDATA;
@@ -281,9 +288,18 @@ bool HovHeightToolkit::consistencyCheck( MvRequest& req1, MvRequest& req2)
MvRequest HovHeightToolkit::CreateViewRequest()
{
MvRequest viewReq("MHOVMOELLERVIEW");
+
viewReq("TYPE") = this->ApplicationType();
+ viewReq.addValue("AREA",y1_);
+ viewReq.addValue("AREA",x1_);
+ viewReq.addValue("AREA",y2_);
+ viewReq.addValue("AREA",x2_);
+
viewReq("VERTICAL_LEVEL_TYPE") = ( vertAxisType_ == HOV_PRESSURE ) ? "PRESSURE" : "AS_IN_DATA";
+
+ viewReq("_CLASS") = "MHOVMOELLERVIEW";
viewReq("_DEFAULT") = 1;
+ viewReq("_DATAATTACHED") = "YES";
return viewReq;
}
diff --git a/src/Hovmoeller/HovLine.cc b/src/Hovmoeller/HovLine.cc
index d045bfa..8e329b3 100644
--- a/src/Hovmoeller/HovLine.cc
+++ b/src/Hovmoeller/HovLine.cc
@@ -108,19 +108,26 @@ bool HovLineToolkit::GetInputInfo(MvRequest& in)
x2_ = in("LINE",3);
// Check if coordinates follow Mars rules (n/w/s/e)
+ bool swap = false;
if ( x1_ > x2_ )
{
double W = x1_;
x1_ = x2_;
x2_ = W;
+ swap = true;
}
if( y2_ > y1_ )
{
double W = y1_;
y1_ = y2_;
y2_ = W;
+ swap = true;
}
+ // Send a warning message
+ if ( swap )
+ marslog(LOG_WARN,"WARNING: Input geographical coordinates do not follow MARS rules (n/w/s/e). Values have been swapped.");
+
// Get swap axes flag
swapAxes_ = ( (const char*)in("SWAP_AXES") && strcmp(in("SWAP_AXES"),"YES") == 0 ) ? true : false;
@@ -217,8 +224,18 @@ MvRequest HovLineToolkit::CreateViewRequest()
{
MvRequest viewReq("MHOVMOELLERVIEW");
viewReq("TYPE") = this->ApplicationType();
+ viewReq.addValue("LINE",y1_);
+ viewReq.addValue("LINE",x1_);
+ viewReq.addValue("LINE",y2_);
+ viewReq.addValue("LINE",x2_);
+
viewReq("SWAP_AXES") = swapAxes_ ? "YES" : "NO";
+ if ( (const char*)origReq_("RESOLUTION") )
+ viewReq("RESOLUTION") = (const char*)origReq_("RESOLUTION");
+
+ viewReq("_CLASS") = "MHOVMOELLERVIEW";
viewReq("_DEFAULT") = 1;
+ viewReq("_DATAATTACHED") = "YES";
return viewReq;
}
diff --git a/src/Hovmoeller/HovToolkit.cc b/src/Hovmoeller/HovToolkit.cc
index 5c4bc9b..c99ae34 100644
--- a/src/Hovmoeller/HovToolkit.cc
+++ b/src/Hovmoeller/HovToolkit.cc
@@ -148,10 +148,8 @@ MvRequest HovToolkit::CreateOutputRequest()
// Create netCDF output request
MvRequest out1("NETCDF_XY_MATRIX");
out1("NETCDF_PLOT_TYPE") = "XY_MATRIX";
- string xAxisType, yAxisType;
+ out1("NETCDF_DATA") = req;
const char* secondCoordName = GetSecondCoordName();
- MvRequest horAxisReq, vertAxisReq;
- bool latVertAxis = false; // indicates if vertical axis is latitude
if ( verticalAxis_ == HOV_TIME ) // TIME is vertical axis
{
out1("NETCDF_Y_VARIABLE") = HOV_VARTIME.c_str();;
@@ -160,19 +158,7 @@ MvRequest HovToolkit::CreateOutputRequest()
{
out1("NETCDF_X_AUXILIARY_VARIABLE") = GetSecondAuxiliaryCoordName();
out1("NETCDF_X_GEOLINE_CONVENTION") = (const char*)GeolineConvention().c_str();
- xAxisType = "geoline";
- }
- else
- {
- if ( string(secondCoordName) == HOV_VARLAT || string(secondCoordName) == HOV_VARLON )
- {
- horAxisReq.setVerb("MAXIS");
- horAxisReq("AXIS_ORIENTATION") = "HORIZONTAL";
- horAxisReq("AXIS_TICK_LABEL_TYPE") = (secondCoordName == HOV_VARLAT) ? "Latitude" : "Longitude";
- }
- xAxisType = "regular";
}
- yAxisType = "date";
}
else // TIME is horizontal axis
{
@@ -182,74 +168,39 @@ MvRequest HovToolkit::CreateOutputRequest()
{
out1("NETCDF_Y_AUXILIARY_VARIABLE") = GetSecondAuxiliaryCoordName();
out1("NETCDF_Y_GEOLINE_CONVENTION") = (const char*)GeolineConvention().c_str();
- yAxisType = "geoline";
- }
- else
- {
- if ( secondCoordName == HOV_VARLAT || secondCoordName == HOV_VARLON )
- {
- vertAxisReq.setVerb("MAXIS");
- vertAxisReq("AXIS_ORIENTATION") = "VERTICAL";
- vertAxisReq("AXIS_TICK_LABEL_TYPE") = (secondCoordName == HOV_VARLAT) ? "Latitude" : "Longitude";
- }
- latVertAxis = (secondCoordName == HOV_VARLAT) ? true : false;
- yAxisType = "regular";
}
-
- xAxisType = "date";
}
out1("NETCDF_VALUE_VARIABLE") = getNetcdfVarname(par->ParamName()).c_str();
out1("NETCDF_MISSING_ATTRIBUTE") = "_FillValue";
out1("_VERB") = "NETCDF_XY_MATRIX";
- // Create customised CARTESIANVIEW request.
- // This is only needed if a HovData visualisation action was requested.
- // If a dropped (data or HovData) action was requested, the View is taken
- // from uPlot. In this implementation, the view request will be always
- // sent because: a) it is clean; b) does not cause problem.
- MvRequest viewReq("CARTESIANVIEW");
- viewReq("X_AUTOMATIC") = "on";
- viewReq("X_AXIS_TYPE") = xAxisType.c_str();
- viewReq("Y_AUTOMATIC") = "on";
- viewReq("Y_AXIS_TYPE") = yAxisType.c_str();
-
- // If Y_AUTOMATIC is ON and AXIS_TICK_LABEL_TYPE is LATITUDE then
- // reverte the axis values because Hovmoeller computes values from
- // North to South and Magics plots them from bottom to top by default
- if ( strcmp(viewReq("Y_AUTOMATIC"), "on") == 0 && latVertAxis )
- viewReq("Y_AUTOMATIC_REVERSE") = "on";
-
- if ( horAxisReq )
- viewReq("HORIZONTAL_AXIS") = horAxisReq;
-
- if ( vertAxisReq )
- viewReq("VERTICAL_AXIS") = vertAxisReq;
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ out1("_ORIGINAL_REQUEST") = this->buildMacroConverterRequest();
+
+ // Create the View request taking values from the input application
+ MvRequest viewReq = CreateViewRequest();
// Save min/max date. This info is important if the dates in the
// original View are 'automatic'.
- string xy = (yAxisType == "date") ? "Y_" : "X_";
MvDate dd(dateMinD_);
- string str = xy + "DATE_MIN";
- viewReq(str.c_str()) = dd.magicsDate().c_str();
+ viewReq("DATE_MIN") = dd.magicsDate().c_str();
dd = dateMaxD_;
- str = xy + "DATE_MAX";
- viewReq(str.c_str()) = dd.magicsDate().c_str();
+ viewReq("DATE_MAX") = dd.magicsDate().c_str();
// If action is not visualisation related then return the netcdf data.
// Also, add the visualisation and original requests as hidden parameters.
// These may be used later to help the visualisation of the netcdf data.
- MvRequest hovViewReq = CreateViewRequest();
- req("_VIEW") = "MHOVMOELLERVIEW";
- req("_VIEW_REQUEST") = hovViewReq;
- req("_VISUALISE") = out1;
- req("_CARTESIANVIEW") = viewReq;
- req("_ORIGINAL_REQUEST") = origReq_;
if ( !IsVisualise() )
+ {
+ req("_VIEW") = "MHOVMOELLERVIEW";
+ req("_VIEW_REQUEST") = viewReq;
+ req("_VISUALISE") = out1;
return req;
+ }
// Final output request
- out1("NETCDF_DATA") = req;
MvRequest out = viewReq + out1;
return out;
@@ -260,10 +211,9 @@ MvRequest HovToolkit::CreateOutputRequest( MvRequest& in )
// Create NetCDF output request
MvRequest data = in.getSubrequest("DATA");
MvRequest out1 = data.getSubrequest("_VISUALISE");
- MvRequest viewReq = data.getSubrequest("_CARTESIANVIEW");
+ MvRequest viewReq = data.getSubrequest("_VIEW_REQUEST");
data.unsetParam("_VISUALISE"); // to avoid duplication of info
data.unsetParam("_VIEW_REQUEST"); // to avoid duplication of info
- data.unsetParam("_CARTESIANVIEW"); // to avoid duplication of info
data.unsetParam("_ORIGINAL_REQUEST"); // to avoid duplication of info
out1("NETCDF_DATA") = data;
@@ -1057,3 +1007,23 @@ bool HovToolkit::ExpandGetTimeInfo()
return true;
}
+
+MvRequest HovToolkit::buildMacroConverterRequest()
+{
+ const char* caux = origReq_.getVerb();
+ MvRequest oreq( caux );
+ oreq("_MACRO_DECODE_TAG") = 1; // extra info for the Macro Converter
+ oreq("_CLASS") = (const char*)origReq_("_CLASS") ? (const char*)origReq_("_CLASS") : caux;
+ oreq("_VERB") = (const char*)origReq_("_VERB") ? (const char*)origReq_("_VERB") : caux;
+ if ( strcmp((const char*)oreq("_CLASS"),"RETRIEVE") == 0 ||
+ strcmp((const char*)oreq("_CLASS"),"GRIB") == 0 )
+ {
+ MvRequest retReq = origReq_("DATA");
+ if ( (const char*)retReq("_NAME") )
+ oreq("_NAME") = (const char*)retReq("_NAME");
+ }
+ else if ( (const char*)origReq_("_NAME") )
+ oreq("_NAME") = (const char*)origReq_("_NAME");
+
+ return oreq;
+}
diff --git a/src/Hovmoeller/HovToolkit.h b/src/Hovmoeller/HovToolkit.h
index 98ae364..d030e67 100644
--- a/src/Hovmoeller/HovToolkit.h
+++ b/src/Hovmoeller/HovToolkit.h
@@ -138,6 +138,9 @@ public:
// Check if parameters between two requests are consistent
virtual bool consistencyCheck( MvRequest&, MvRequest& ) = 0;
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ MvRequest buildMacroConverterRequest();
protected:
diff --git a/src/Macro/extern.cc b/src/Macro/extern.cc
index f2a7588..643fe12 100644
--- a/src/Macro/extern.cc
+++ b/src/Macro/extern.cc
@@ -137,7 +137,12 @@ int ExternFunction::Compile(void)
char buf[2048];
char *newcmd = marstmp();
- sprintf(buf,"$METVIEW_BIN/compile %s \"%s\" %s %s 2>&1",
+ const char* mvVersion = getenv( "METVIEW_VERSION" );
+ const char* mvDir = getenv( "METVIEW_DIR" );
+
+
+ sprintf(buf,"env METVIEW_VVERSION=%s METVIEW_DDIR=%s $METVIEW_BIN/compile %s \"%s\" %s %s 2>&1",
+ mvVersion, mvDir,
(Context::Trace()>0)?"-d":"",
cmd,file,newcmd);
diff --git a/src/MacroEditor/ShellHelper.cc b/src/MacroEditor/ShellHelper.cc
index a493198..e531dbe 100644
--- a/src/MacroEditor/ShellHelper.cc
+++ b/src/MacroEditor/ShellHelper.cc
@@ -115,7 +115,7 @@ bool ShellHelper::isHeaderLine(const QString &text)
{
return (text.contains("#") &&
text.contains("bin") &&
- (text.contains("sh") || text.contains("ksh") || text.contains("csh")));
+ (text.contains("sh") || text.contains("ksh") || text.contains("csh") || text.contains("bash")));
}
diff --git a/src/Meteogram/CMakeLists.txt b/src/Meteogram/CMakeLists.txt
index 833f317..e5b7577 100644
--- a/src/Meteogram/CMakeLists.txt
+++ b/src/Meteogram/CMakeLists.txt
@@ -13,13 +13,3 @@ metview_module_files(ETC_FILES ObjectSpec.Meteogram
XPM_FILES MetPlus.xpm)
-
-set(local_metgram_script ${CMAKE_BINARY_DIR}/bin/metgram_client)
-
-configure_file(${MAGICS_METEOGRAM_SCRIPT} ${local_metgram_script} COPYONLY)
-
-install(FILES ${local_metgram_script}
- DESTINATION ${MV_BIN_DIR}
- PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
-
-
diff --git a/src/Meteogram/MetPlus.cc b/src/Meteogram/MetPlus.cc
index c1e5f0d..323c048 100644
--- a/src/Meteogram/MetPlus.cc
+++ b/src/Meteogram/MetPlus.cc
@@ -48,8 +48,8 @@ MetPlus::MetPlus() : MvService("MetPlus")
if ( setup.getVerb() == Cached("MetPlus") ) {
databases_["10_days_epsgram"] = "10_days";
databases_["15_days_epsgram"] = "15_days";
- databases_["10_days_metgram"] = "10_days_metgram";
databases_["10_days_wave_epsgram"] = "10_days_wave";
+ databases_["10_days_plumes"] = "10_days_plumes";
databases_["15_days_epsgram_with_climate"] = "15_days_with_clim";
break;
@@ -80,7 +80,7 @@ void substitute(string& xml, const string& var, const string& val)
static string toString(double val)
{
ostringstream tool;
- tool.width(7);
+ //tool.width(7);
tool.precision(5);
tool << val;
cout << "toString:" << val << "--->" << tool.str() << endl;
@@ -276,7 +276,7 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
string latitude_option = toString(station("LATITUDE"));
string longitude_option = toString(station("LONGITUDE"));
- mgrequest += "latitude='" + latitude_option + "' ";
+ mgrequest += "latitude='" + latitude_option + "' ";
mgrequest += "longitude='" + longitude_option + "' ";
@@ -301,7 +301,7 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
else if (format == "gif") format_option = "giffile";
else if (format == "jpeg") format_option = "jpgfile";
else if (format == "pdf") format_option = "pdffile";
- else format_option = "psfile";
+ else format_option = "pdffile";
// SVG????????????
@@ -338,9 +338,9 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
// we only support multiple stations with PostScript output
// (for backwards compatibility with the previous metgram module)
- if (tempFileNames.size() > 1 && format != "ps")
+ if (tempFileNames.size() > 1 && (format != "ps") && (format != "pdf"))
{
- setError(1, "Multiple stations only supported with PostScript output; use 'ps' output or use multiple calls. Aborting.");
+ setError(1, "Multiple stations only supported with PDF or PostScript output; use 'pdf' output or use multiple calls. Aborting.");
return;
}
@@ -369,9 +369,14 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
// run the metgram command
+ // which command to run to get the metgram - the 'classic' metgram requires a different script
+
+ string command;
+
+ command = "python ";
+ command += getenv("METVIEW_BIN");
+ command += "/metgram.py -i " + mgrequestfile;
- string command = getenv("METVIEW_BIN");
- command += "/metgram_client " + mgrequestfile;
cout << "Running command: " << command << endl;
int return_code = system (command.c_str());
@@ -399,11 +404,12 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
{
// copy the temporary files to their proper destinations
- if (format == "ps")
+ if (tempFileNames.size() > 1)
{
- if (tempFileNames.size() > 1)
+ // multiple metgrams - join them into one; format-dependent code here
+
+ if (format == "ps")
{
- // multiple metgrams - join them into one
string psJoinCommand = "psjoin -p ";
@@ -415,10 +421,22 @@ void MetPlus::serve( MvRequest& in, MvRequest& out )
psJoinCommand += " > " + outputFileName;
cout << "running: " << psJoinCommand;
-
system (psJoinCommand.c_str());
}
+ else if (format == "pdf")
+ {
+ string pdfJoinCommand = "gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=";
+ pdfJoinCommand += outputFileName + " ";
+
+ for (size_t i = 0; i < tempFileNames.size(); i++)
+ {
+ pdfJoinCommand += tempFileNames[i] + " ";
+ }
+
+ cout << "running: " << pdfJoinCommand;
+ system (pdfJoinCommand.c_str());
+ }
else
{
// otherwise, just one file so copy it to the dest filename
diff --git a/src/Meteogram/MetPlusDef b/src/Meteogram/MetPlusDef
index d00db08..2f3f21b 100644
--- a/src/Meteogram/MetPlusDef
+++ b/src/Meteogram/MetPlusDef
@@ -3,16 +3,16 @@ MetPlus; New Metgram module; MetPlus
type {
10_days_epsgram
15_days_epsgram
- 10_days_metgram
- 10_days_wave_epsgram
15_days_epsgram_with_climate
+ 10_days_wave_epsgram
+ 10_days_plumes
} = 15_days_epsgram
station
[ interface = icon, class = STATION, exclusive = false,
help = help_data,missing = fatal,
- help_directory = '/Metview/Defaults',
+ help_directory = '/System/Defaults',
help_name = Station for Meteogram,
help_class = STATIONS,
help_definition = ( STATIONS, NAME = Heathrow ) ]
@@ -45,12 +45,12 @@ MetPlus; New Metgram module; MetPlus
format {
- PostScript ; ps
PDF ; pdf
- GIF ; gif
PNG ; png
+ PostScript ; ps
+# GIF ; gif
# SVG ; svg
- } = PostScript
+ } = PDF
database { @ } = latest
diff --git a/src/Meteogram/ObjectSpec.Meteogram b/src/Meteogram/ObjectSpec.Meteogram
index f099a42..2d6b88d 100644
--- a/src/Meteogram/ObjectSpec.Meteogram
+++ b/src/Meteogram/ObjectSpec.Meteogram
@@ -14,7 +14,7 @@ object,
state,
class = MetPlus,
- output_class = PSFILE,
+ output_class = PDF,
service = MetPlus
MetPlus,
diff --git a/src/Stations/CMakeLists.txt b/src/Stations/CMakeLists.txt
index e88d0e7..1934da7 100644
--- a/src/Stations/CMakeLists.txt
+++ b/src/Stations/CMakeLists.txt
@@ -17,11 +17,10 @@ if(ENABLE_UI)
endif()
endif()
-
ecbuild_add_executable( TARGET writebase
SOURCES writebase.c
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
- INCLUDES
+ INCLUDES ${GDBM_INCLUDE}
LIBS ${GDBM_LIB}
)
diff --git a/src/Stations/stat.fmt b/src/Stations/stat.fmt
index 0dd7f8a..df3eaeb 100644
--- a/src/Stations/stat.fmt
+++ b/src/Stations/stat.fmt
@@ -1,20 +1,21 @@
01001 7093 -867 9 10 0 ---- JAN MAYEN
-01001 7094 -867 0 9 0 T-T- JAN MAYEN
-01002 8006 1625 8 8 0 ---- VERLEGENHUKEN
-01003 7700 1550 11 10 0 ---- HORNSUND
+01001 7094 -867 0 9 0 TTTT JAN MAYEN
+01002 8006 1625 7 8 0 ---- VERLEGENHUKEN
+01003 7700 1550 10 10 0 ---- HORNSUND
01004 7892 1193 8 8 0 --T- NY-ALESUND II
01004 7892 1192 0 16 0 --T- NY-ALESUND II
-01006 7825 2282 14 14 0 ---- EDGEOYA
+01006 7825 2282 13 14 0 ---- EDGEOYA
01007 7892 1193 8 8 0 ---- NY-ALESUND
01008 7825 1547 27 28 0 ---- SVALBARD AP
01009 8065 2501 0 5 0 ---- KARL XII OYA
01010 6931 1613 13 10 0 ---- ANDOYA
01010 6931 1613 0 10 0 T-T- ANDOYA
01011 8006 3150 0 10 0 ---- KVITOYA
+01013 7806 1362 9 7 0 ---- ISFJORD RADIO
01014 6923 1789 0 9 0 ---- SENJA-LAUKHELLA
01015 6959 1784 0 14 0 ---- HEKKINGEN LH
01016 7893 2889 0 20 0 ---- KONGSOYA
-01017 7769 1478 6 6 0 ---- AKSELOYA
+01017 7769 1478 7 6 0 ---- AKSELOYA
01018 6923 1600 0 436 0 ---- ANDOYA-TROLLTINDEN
01019 7752 2082 0 20 0 ---- SVARTTANGEN
01020 7648 1655 0 10 0 ---- SORKAPPOYA
@@ -24,13 +25,14 @@
01026 6965 1894 115 100 0 ---- TROMSO
01027 6965 1891 20 10 0 ---- TROMSO-HOLT
01028 7452 1900 0 18 0 ---- BJORNOYA
-01028 7450 1900 0 20 0 T-T- BJORNOYA
+01028 7450 1900 0 20 0 TTTT BJORNOYA
01030 6929 1813 0 982 0 ---- KISTEFJELL
01033 7025 1950 24 21 0 ---- TORSVAG LH
01034 7031 2014 38 37 0 ---- FUGLOYKALVEN FYR
01035 6956 2009 0 710 0 ---- LYNGEN GJERDVASSBU
01036 6956 2043 0 700 0 ---- NORDNESFJELLET
01037 6939 2028 20 20 0 ---- SKIBOTN 2
+01039 7823 1539 469 0 0 ---- SPITSBERGEN
01041 6973 2102 0 5 0 ---- NORDREISA-OYENG
01042 7061 2244 0 438 0 ---- HASVIK-SLUSKFJELLET
01043 7041 2282 0 10 0 ---- ROGNSUNDET
@@ -49,21 +51,21 @@
01064 6930 2535 0 591 0 ---- ISKORAS II
01065 6945 2550 131 131 0 ---- KARASJOK
01066 7106 2623 0 33 0 ---- HELNES FYR
-01068 7101 2598 13 14 0 ---- HONNINGSVAG AP
-01074 7103 2783 13 12 0 ---- MEHAMN AP
+01068 7101 2598 14 14 0 ---- HONNINGSVAG AP
+01074 7103 2783 12 12 0 ---- MEHAMN AP
01075 7040 2819 11 10 0 ---- RUSTEFJELBMA
01076 7020 2816 0 32 0 ---- TANABRU
01078 7108 2822 8 8 0 ---- SLETTNES LH
-01082 6915 2924 56 0 0 ---- NYRUD
+01082 6915 2924 55 0 0 ---- NYRUD
01083 7087 2903 13 13 0 ---- BERLEVAG AP
01084 6945 3004 27 0 0 ---- PASVIK
-01086 7059 2970 152 149 0 ---- BATSFJORD AP
+01086 7059 2970 149 149 0 ---- BATSFJORD AP
01088 7006 2984 39 39 0 ---- VADSO AP
01089 6973 2990 86 89 0 ---- KIRKENES
01091 6819 1779 0 740 0 ---- LOSISTUA
01092 7070 3007 0 9 0 ---- MAKKAUR LH
01098 7037 3110 15 14 0 ---- VARDO
-01099 7034 3104 12 13 0 ---- VARDO AP
+01099 7034 3104 13 13 0 ---- VARDO AP
01102 6520 1100 16 23 0 ---- SKLINNA LH
01103 6509 1170 0 47 0 ---- LEKA
01104 6837 1595 8 0 0 ---- ROTVAER
@@ -71,7 +73,7 @@
01106 6752 1210 2 4 0 ---- ROEST III
01107 6753 1210 2 4 0 ---- ROST AP
01108 6570 1186 9 4 0 ---- VEGA-VALLSJO
-01112 6545 1222 9 8 0 ---- BRONNOYSUND AP
+01112 6545 1222 8 8 0 ---- BRONNOYSUND AP
01113 6680 1398 39 39 0 ---- GLOMFJORD
01114 6690 1365 8 9 0 ---- REIPA
01115 6676 1249 17 17 0 ---- MYKEN
@@ -84,6 +86,7 @@
01133 6562 1329 0 50 0 ---- LAKSFORS
01134 6518 1342 339 339 0 ---- MAJAVATN III
01135 6613 1359 124 126 0 ---- SELJELIA
+01136 6522 1199 0 302 0 ---- SOMNA-KVALOYFJELLET
01139 6765 1272 4 4 0 ---- VAEROY HELIPORT
01141 6816 1362 26 25 0 ---- LEKNES AP
01143 6805 1607 0 19 0 ---- DRAG-AJLUOKTA
@@ -101,15 +104,15 @@
01156 6861 1443 8 7 0 ---- BO I VESTERALEN
01158 6717 1549 8 7 0 ---- SETSA
01160 6815 1465 11 11 0 ---- SKROVA LH
-01161 6825 1467 9 8 0 ---- SVOLVAER AP
+01161 6825 1467 8 8 0 ---- SVOLVAER AP
01162 6858 1503 3 3 0 ---- STOKMARKNES AP
01167 6870 1542 3 3 0 ---- SORTLAND
-01169 6694 1532 37 37 0 ---- SALTDAL-NORDNES
+01169 6694 1532 39 37 0 ---- SALTDAL-NORDNES
01172 6800 1562 0 53 0 ---- FINNOY I HAMAROY
01180 6880 1654 46 45 0 ---- HARSTAD
01183 6848 1668 26 26 0 ---- EVENES AP
01192 6843 1766 0 200 0 ---- STRAUMSNES
-01193 6844 1739 31 29 0 ---- NARVIK AP
+01193 6844 1739 29 29 0 ---- NARVIK AP
01194 6847 1750 23 17 0 ---- NARVIK III
01196 6875 1782 0 21 0 ---- TENNEVOLL
01198 6878 1970 204 204 0 ---- DIVIDALEN II
@@ -144,7 +147,7 @@
01240 6417 941 16 16 0 ---- HALTEN LH
01241 6370 960 9 10 0 ---- ORLAND III
01241 6371 961 0 10 0 T-T- ORLAND III
-01242 6397 1022 0 20 0 ---- AFJORD II
+01242 6397 1022 0 30 0 ---- AFJORD II
01245 6260 967 599 604 0 ---- OPPDAL-SETER
01250 6213 999 694 0 0 ---- FOLLDAL-FREDHEIM
01252 6282 1002 475 0 0 ---- BERKAK
@@ -178,7 +181,7 @@
01306 6075 472 23 0 0 ---- HELLISOY FYR
01307 6078 472 19 19 0 ---- FEDJE
01308 6129 504 7 0 0 ---- FURUNESET
-01310 6158 503 9 11 0 ---- FLORO AP
+01310 6158 503 11 11 0 ---- FLORO AP
01311 6029 523 50 48 0 ---- BERGEN/FLESLAND
01314 6052 572 0 10 0 ---- FOSSMARK
01315 6065 611 0 17 0 ---- EVANGER
@@ -188,7 +191,7 @@
01320 6183 610 60 60 0 ---- SANDANE AP
01321 6192 656 209 208 0 ---- STRYN
01322 6146 593 0 64 0 ---- FORDE-TEFRE
-01323 6139 576 321 319 0 ---- FORDE AP
+01323 6139 576 319 319 0 ---- FORDE AP
01325 6083 595 0 114 0 ---- MODALEN II
01326 6086 597 0 125 0 ---- MODALEN III
01327 6039 596 0 455 0 ---- KVAMSKOGEN-JONSHOGDI
@@ -206,7 +209,7 @@
01344 6070 694 0 695 0 ---- MJOLFJELL
01345 6072 721 0 960 0 ---- KLEVAVATNET
01346 6066 728 0 1162 0 ---- MIDTSTOVA
-01347 6116 714 497 498 0 ---- SOGNDAL AP
+01347 6116 714 498 498 0 ---- SOGNDAL AP
01350 6059 753 1210 1210 0 ---- FINSEVATN
01352 6018 748 0 1250 0 ---- SANDHAUG
01355 6110 750 4 2 0 ---- LAERDAL IV
@@ -216,7 +219,7 @@
01359 6053 819 774 772 0 ---- GEILO-OLDEBRATEN
01360 6190 790 0 664 0 ---- BRATA-SLETTOM
01361 6202 766 872 872 0 ---- GROTLI III
-01362 6168 836 1894 0 0 ---- JUVVASSHOE
+01362 6168 836 1893 0 0 ---- JUVVASSHOE
01363 6042 850 798 798 0 ---- DAGALI AP
01364 6118 811 955 956 0 ---- FILEFJELL
01365 6125 892 0 965 0 ---- BEITOSTOLEN II
@@ -245,12 +248,12 @@
01392 6061 1201 185 185 0 ---- FLISA II
01393 6189 1203 674 672 0 ---- DREVSJO
01397 6129 1227 361 360 0 ---- TRYSIL VEGSTASJON
-01400 5650 320 49 50 0 ---- EKOFISK
-01400 5655 321 0 52 0 T-T- EKOFISK
+01400 5654 322 49 50 0 ---- EKOFISK
+01400 5654 322 0 52 0 T-T- EKOFISK
01401 5998 225 48 48 0 ---- FRIGG
01403 5931 487 56 55 0 ---- UTSIRA LH
01406 5991 507 16 25 0 ---- SLATTEROY LH
-01408 5935 520 24 26 0 ---- HAUGESUND AP
+01408 5935 520 26 26 0 ---- HAUGESUND AP
01409 5915 525 7 7 0 ---- SKUDENES
01411 5907 541 22 21 0 ---- KVITSOY - NORDBO
01412 5866 556 26 24 0 ---- OBRESTAD
@@ -297,7 +300,7 @@
01463 5966 1078 89 0 0 ---- AS
01464 5834 852 6 0 0 ---- LANDVIK
01465 5840 878 15 12 0 ---- TORUNGEN LH
-01466 5997 1104 109 108 0 ---- KJELLER AP
+01466 5997 1104 108 108 0 ---- KJELLER AP
01467 5863 915 5 4 0 ---- LYNGOR LH
01468 6019 1201 0 148 0 ---- KONGSVINGER
01469 6017 1025 142 140 0 ---- HONEFOSS-HOYBY
@@ -582,14 +585,14 @@
02670 5668 1630 4 6 0 ---- KALMAR
02679 5692 1814 36 34 0 ---- HOBURG A
02680 5692 1814 39 40 0 ---- HOBURG
-02701 6905 2085 1009 1007 0 ---- KILPISJARVI SAANA
-02702 6913 2727 0 156 0 ---- INARI KAAMANEN
+02701 6904 2085 1009 1002 0 ---- KILPISJARVI SAANA
+02702 6914 2727 0 156 0 ---- INARI KAAMANEN
02703 6021 2474 32 31 0 ---- ESPOO SEPANKYLA
-02704 6112 2433 0 87 0 ---- HATTULA LEPAA AWS
+02704 6111 2432 0 87 0 ---- HATTULA LEPAA AWS
02705 6702 2722 488 491 0 ---- PELKOSENNIEMI PYHATUNTURI
-02706 6025 2405 0 37 0 ---- LOHJA PORLA
+02706 6024 2405 0 37 0 ---- LOHJA PORLA
02708 6218 2280 0 161 0 ---- KARVIA ALKKIA
-02710 6295 2640 0 127 0 ---- VESANTO SONKARI
+02710 6292 2642 0 120 0 ---- VESANTO SONKARI
02711 6310 2162 13 15 0 ---- VAASA KESKUSTA
02713 6122 2513 136 134 0 ---- HAMEENLINNA LAMMI EVO
02714 6450 2644 115 114 0 ---- VAALA PELSO
@@ -600,19 +603,19 @@
02719 6781 2775 0 240 0 ---- SODANKYLA LOKKA
02720 6770 2486 191 196 0 ---- KITTILA AIRPORT
02721 6395 2284 6 5 0 ---- KOKKOLA TANKAR
-02722 6842 2742 0 320 0 ---- INARI SAARISELKA
+02722 6842 2741 0 302 0 ---- INARI SAARISELKA
02723 6778 2485 200 522 0 ---- KITTILA LEVITUNTURI
02724 6012 2030 13 11 0 ---- LUMPARLAND LANGNAS HARBOUR
-02725 6345 2445 0 153 0 ---- HALSUA KANALA PUROLA
+02725 6345 2444 0 153 0 ---- HALSUA KANALA PUROLA
02726 6859 2358 371 374 0 ---- ENONTEKIO NAKKALA
-02727 6127 2552 76 80 0 ---- ASIKKALA PULKKILANHARJU
+02727 6127 2552 76 79 0 ---- ASIKKALA PULKKILANHARJU
02728 6130 2818 88 86 0 ---- TAIPALSAARI KYLANIEMI
02729 6188 2533 0 205 0 ---- JAMSA HIMOS
02730 6183 2885 157 155 0 ---- SAVONLINNA RUUNAVUORI
02731 6153 2820 127 125 0 ---- PUUMALA KK
-02732 6280 2790 87 86 0 ---- KUOPIO RITONIEMI
+02732 6280 2790 87 82 0 ---- KUOPIO RITONIEMI
02733 6104 2856 46 46 0 ---- LAPPEENRANTA KONNUNSUO
-02734 6145 2947 75 74 0 ---- PARIKKALA KOITSANLAHTI
+02734 6144 2946 75 74 0 ---- PARIKKALA KOITSANLAHTI
02735 6233 2354 140 138 0 ---- VIRRAT AIJANNEVA
02736 6189 2789 112 110 0 ---- JUVA PARTALA
02737 6382 2416 85 83 0 ---- TOHOLAMPI LAITALA
@@ -620,36 +623,37 @@
02739 6411 2834 163 161 0 ---- SOTKAMO KUOLANIEMI
02740 6588 2427 9 8 0 ---- TORNIO LIAKKA
02741 6018 1998 13 11 0 ---- JOMALA JOMALABY
-02743 5987 2220 0 8 0 ---- KEMIONSAARI VANO
+02743 5987 2219 0 8 0 ---- KEMIONSAARI VANO
02744 6150 2376 0 92 0 ---- TAMPERE SATAKUNNANKATU
02745 6716 2918 215 213 0 ---- SALLA NARUSKA
02746 5981 2292 28 11 0 ---- HANKO TULLINIEMI
02747 6038 2210 6 4 0 ---- TURKU RAJAKARI
02748 6217 2786 83 87 0 ---- JOROINEN VARKAUS AIRPORT
-02750 5985 2325 0 3 0 ---- HANKO TVARMINNE
-02751 6163 2138 5 3 0 ---- PORI TAHKOLUOTO
+02750 5984 2325 0 3 0 ---- HANKO TVARMINNE
+02751 6163 2138 5 3 0 ---- PORI TAHKOLUOTO HARBOUR
02752 6220 2117 22 0 0 ---- KRISTIINANKAUPUNKI LIGHTHOUSE
02753 6184 2246 123 122 0 ---- KANKAANPAA NIINISALO AIRFIELD
-02754 6100 2450 85 87 0 ---- HAMEENLINNA KATINEN
+02754 6100 2449 85 87 0 ---- HAMEENLINNA KATINEN
02755 6405 2472 76 76 0 ---- YLIVIESKA AIRFIELD
-02756 6037 2312 0 3 0 ---- SALO KARKKA
+02756 6037 2311 0 2 0 ---- SALO KARKKA
02757 5982 2358 23 15 0 ---- RAASEPORI JUSSARO
02758 6042 2440 44 42 0 ---- VIHTI MAASOJA
02759 6039 2561 24 22 0 ---- PORVOO HARABACKA
02760 6617 2914 307 305 0 ---- KUUSAMO RUKA TALVIJARVI
-02761 6115 2130 29 4 0 ---- RAUMA KYLMAPIHLAJA
+02761 6114 2130 29 4 0 ---- RAUMA KYLMAPIHLAJA
02762 6127 2225 39 37 0 ---- KOKEMAKI PEIPOHJA HYRKOLA
02763 6147 2375 86 85 0 ---- TAMPERE HARMALA
02764 6800 2421 0 270 0 ---- KITTILA LOMPOLONVUOMA
02765 6170 2551 83 81 0 ---- LUHANKA JUDINSALO
-02766 6315 3105 237 235 0 ---- ILOMANTSI POTSONVAARA
-02767 6105 2505 0 125 0 ---- HAMEENLINNA LAMMI PAPPILA
-02768 6122 2605 0 100 0 ---- HEINOLA ASEMANTAUS
+02766 6314 3104 237 235 0 ---- ILOMANTSI POTSONVAARA
+02767 6105 2504 0 125 0 ---- HAMEENLINNA LAMMI PAPPILA
+02768 6120 2605 0 92 0 ---- HEINOLA ASEMANTAUS
02769 6241 2218 95 93 0 ---- KAUHAJOKI KUJA-KOKKO
-02770 6185 2428 0 153 0 ---- JUUPAJOKI HYYTIALA
-02771 6188 2610 0 146 0 ---- JOUTSA LEIVONMAKI SAVENAHO
-02772 6207 2857 80 79 0 ---- RANTASALMI RUKKASLUOTO
+02770 6185 2429 0 153 0 ---- JUUPAJOKI HYYTIALA
+02771 6188 2609 0 146 0 ---- JOUTSA LEIVONMAKI SAVENAHO
+02772 6206 2857 80 76 0 ---- RANTASALMI RUKKASLUOTO
02773 6045 2218 9 8 0 ---- TURKU ARTUKAINEN
+02774 6063 2519 85 83 0 ---- MANTSALA HIRVIHAARA
02777 6046 2365 121 117 0 ---- SALO KIIKALA AIRFIELD
02778 6180 2932 80 78 0 ---- SAVONLINNA PUNKAHARJU
02780 6293 2119 3 1 0 ---- KORSNAS BREDSKARET
@@ -659,42 +663,42 @@
02788 6314 2731 91 90 0 ---- KUOPIO MAANINKA
02789 6338 2866 166 166 0 ---- RAUTAVAARA YLA-LUOSTA
02790 6026 2075 23 23 0 ---- KUMLINGE KK
-02791 6323 2923 0 116 0 ---- JUUKA NIEMELA
+02791 6323 2923 0 115 0 ---- JUUKA NIEMELA
02793 6255 2967 80 78 0 ---- LIPERI TUISKAVANLUOTO
02794 5992 2435 0 2 0 ---- KIRKKONUMMI MAKILUOTO
02795 6010 2498 6 3 0 ---- HELSINKI HARMAJA
02796 6332 3005 0 98 0 ---- LIEKSA LAMPELA
-02797 6415 2543 0 112 0 ---- HAAPAVESI
+02797 6414 2542 0 112 0 ---- HAAPAVESI MUSTIKKAMAKI
02798 6367 2883 0 115 0 ---- VALTIMO KK
02799 6430 3017 198 197 0 ---- KUHMO KALLIOJOKI
02800 6461 2390 24 0 0 ---- RAAHE NAHKIAINEN
02801 6905 2079 483 480 0 ---- ENONTEKIO KILPISJARVI
02803 6468 2509 50 48 0 ---- SIIKAJOKI REVONLAHTI
-02804 6556 2825 0 197 0 ---- TAIVALKOSKI KK KAUPPATIE
+02804 6558 2822 0 197 0 ---- TAIVALKOSKI KK URHEILUTIE
02805 6976 2701 106 107 0 ---- UTSJOKI KEVO
02807 6861 2741 145 147 0 ---- INARI IVALO AIRPORT
02808 6958 2885 132 130 0 ---- INARI SEVETTIJARVI
-02811 6637 2932 0 160 0 ---- KUUSAMO KIUTAKONGAS
-02812 6653 2465 0 91 0 ---- YLITORNIO MELTOSJARVI
+02811 6637 2931 0 165 0 ---- KUUSAMO KIUTAKONGAS
+02812 6653 2465 0 93 0 ---- YLITORNIO MELTOSJARVI
02813 6658 2601 107 106 0 ---- ROVANIEMI APUKKA
02814 6672 2716 209 208 0 ---- KEMIJARVI AIRFIELD
-02815 6728 2818 0 180 0 ---- SAVUKOSKI KK
+02815 6729 2818 0 180 0 ---- SAVUKOSKI KK
02816 6808 2718 249 248 0 ---- SODANKYLA VUOTSO
02817 6843 2744 438 437 0 ---- SAARISELKA KAUNISPAA
02818 6848 2830 255 253 0 ---- INARI RAJAJOOSEPPI
-02819 6775 2962 0 370 0 ---- SALLA VARRIOTUNTURI
+02819 6775 2961 0 360 0 ---- SALLA VARRIOTUNTURI
02820 6806 2403 762 760 0 ---- MUONIO LAUKUKERO
02821 6797 2412 566 565 0 ---- MUONIO SAMMALTUNTURI
02823 6795 2368 253 236 0 ---- MUONIO ALAMUONIO
02824 6798 2424 350 347 0 ---- KITTILA KENTTAROVA
-02825 7008 2795 0 35 0 ---- UTSJOKI NUORGAM
+02825 7008 2790 0 22 0 ---- UTSJOKI NUORGAM
02826 6737 2663 180 179 0 ---- SODANKYLA AWS
02827 6906 2749 124 123 0 ---- INARI VAYLA
02828 6039 2255 5 6 0 ---- KAARINA YLTOINEN
02829 6060 2480 88 86 0 ---- HYVINKAA HYVINKAANKYLA
-02830 6070 2682 0 33 0 ---- KOUVOLA ANJALA
-02831 6053 2768 0 5 0 ---- VIROLAHTI KOIVUNIEMI
-02832 6223 3035 0 90 0 ---- TOHMAJARVI KEMIE
+02830 6070 2681 0 33 0 ---- KOUVOLA ANJALA
+02831 6053 2767 0 5 0 ---- VIROLAHTI KOIVUNIEMI
+02832 6224 3035 0 90 0 ---- TOHMAJARVI KEMIE
02833 6294 2249 32 26 0 ---- SEINAJOKI PELMAA
02834 6384 2722 208 207 0 ---- VIEREMA KAARAKKALA
02835 6884 2830 123 121 0 ---- INARI NELLIM
@@ -704,22 +708,22 @@
02847 6650 2571 82 85 0 ---- ROVANIEMI RAUTATIEASEMA
02849 6683 2867 222 215 0 ---- SALLA KK MYLLYTIE
02850 6232 2791 84 83 0 ---- VARKAUS KOLSUANNIEMI
-02851 6493 2538 12 10 0 ---- OULU OULUNSALO PELLONPAA
+02851 6494 2537 12 10 0 ---- OULU OULUNSALO PELLONPAA
02852 6384 2312 8 6 0 ---- KOKKOLA HOLLIHAKA
02857 6890 2574 0 285 0 ---- INARI ANGELI LINTUPUOLISELKA
02858 6958 2889 0 106 0 ---- INARI KIRAKKAJARVI
02859 6466 2806 0 341 0 ---- PUOLANKA PALJAKKA
02860 6765 2490 0 181 0 ---- KITTILA KK
02862 6567 2452 3 3 0 ---- KEMI AJOS
-02863 6542 2413 19 19 0 ---- KEMI I LIGHTHOUSE
+02863 6539 2410 19 25 0 ---- KEMI I LIGHTHOUSE
02864 6578 2458 15 19 0 ---- KEMI-TORNIO AIRPORT
02866 6541 2696 120 120 0 ---- PUDASJARVI AIRFIELD
02868 6617 2915 363 500 0 ---- KUUSAMO RUKATUNTURI
02869 6600 2922 266 264 0 ---- KUUSAMO AIRPORT
-02872 6467 2441 2 2 0 ---- RAAHE LAPALUOTO
+02872 6467 2441 2 2 0 ---- RAAHE LAPALUOTO HARBOUR
02873 6504 2456 7 7 0 ---- HAILUOTO MARJANIEMI
02874 6502 2473 7 7 0 ---- HAILUOTO KESKIKYLA
-02875 6493 2537 15 12 0 ---- OULU AIRPORT
+02875 6493 2537 13 11 0 ---- OULU AIRPORT
02876 6501 2539 4 3 0 ---- OULU VIHREASAARI HARBOUR
02880 6584 2417 9 8 0 ---- TORNIO TORPPI
02881 6598 2637 163 161 0 ---- RANUA AIRFIELD
@@ -732,9 +736,9 @@
02901 6373 2258 13 11 0 ---- MASSKAR
02903 6372 2314 25 26 0 ---- KRUUNUPYY AIRPORT
02906 6017 2276 0 12 0 ---- KEMIONSAARI KEMIO
-02907 6433 2361 5 3 0 ---- KALAJOKI ULKOKALLA
+02907 6433 2345 5 3 0 ---- KALAJOKI ULKOKALLA
02910 6344 2106 11 4 0 ---- MUSTASAARI VALASSAARET
-02911 6305 2177 8 4 0 ---- VAASA AIRPORT
+02911 6306 2175 8 6 0 ---- VAASA AIRPORT
02913 6314 2305 46 44 0 ---- KAUHAVA AIRFIELD
02914 6312 2304 0 40 0 ---- KAUHAVA KK UUNIMAANTIE
02915 6308 2586 132 130 0 ---- VIITASAARI HAAPANIEMI
@@ -758,19 +762,19 @@
02943 6152 2375 98 98 0 ---- TAMPERE SIILINKARI
02944 6142 2362 109 122 0 ---- TAMPERE-PIRKKALA AIRPORT
02945 6186 2480 145 143 0 ---- JAMSA HALLI AIRFIELD
-02946 6187 2482 0 144 0 ---- JAMSA HALLI LENTOASEMANTIE
+02946 6186 2481 0 144 0 ---- JAMSA HALLI LENTOASEMANTIE
02947 6169 2720 100 99 0 ---- MIKKELI AIRPORT
02948 6195 2893 95 95 0 ---- SAVONLINNA AIRPORT
02949 6065 2381 0 143 0 ---- SOMERO SALKOLA
02950 6011 2170 5 3 0 ---- PARAINEN FAGERHOLM
-02952 6147 2180 17 13 0 ---- PORI AIRPORT
-02955 6290 2763 88 87 0 ---- KUOPIO SAVILAHTI
+02952 6147 2179 14 12 0 ---- PORI AIRPORT
+02955 6289 2763 88 83 0 ---- KUOPIO SAVILAHTI
02956 6089 2694 100 99 0 ---- KOUVOLA UTTI LENTOPORTINTIE
-02957 6310 2165 9 7 0 ---- VAASA KLEMETTILA
+02957 6310 2164 9 7 0 ---- VAASA KLEMETTILA
02958 6104 2815 106 106 0 ---- LAPPEENRANTA AIRPORT
-02959 6105 2822 115 103 0 ---- LAPPEENRANTA LEPOLA
+02959 6106 2821 114 103 0 ---- LAPPEENRANTA LEPOLA
02961 6113 2137 10 6 0 ---- KUUSKAJASKARI
-02963 6082 2350 103 104 0 T-T- JOKIOINEN OBSERVATORY
+02963 6081 2350 103 104 0 T-T- JOKIOINEN OBSERVATORY
02964 6072 2103 4 4 0 ---- KUSTAVI ISOKARI
02965 6096 2563 79 78 0 ---- LAHTI LAUNE
02966 6089 2694 100 99 0 ---- KOUVOLA UTTI AIRFIELD
@@ -778,18 +782,18 @@
02968 6038 2705 28 17 0 ---- KOTKA KIRKONMAA
02970 6012 1989 6 5 0 ---- JOMALA MARIEHAMN AIRPORT
02971 6015 1987 10 9 0 ---- JOMALA
-02972 6052 2227 59 47 0 ---- TURKU AIRPORT
+02972 6052 2228 59 45 0 ---- TURKU AIRPORT
02973 6040 2377 86 84 0 ---- SUOMUSJARVI
02974 6033 2496 54 51 0 ---- VANTAA HELSINKI-VANTAA AIRPORT
02975 6025 2505 28 17 0 ---- HELSINKI-MALMI
02976 6038 2696 13 11 0 ---- KOTKA RANKKI
-02978 6018 2495 4 4 0 ---- HELSINKI KAISANIEMI
-02979 5950 2035 16 4 0 ---- BOGSKAR
-02980 5997 1997 10 8 0 ---- NYHAMN
+02978 6018 2494 4 4 0 ---- HELSINKI KAISANIEMI
+02979 5951 2036 16 4 0 ---- KOKAR BOGSKAR
+02980 5996 1995 10 8 0 ---- LEMLAND NYHAMN
02981 5978 2137 7 9 0 ---- PARAINEN UTO
02982 5977 2295 7 5 0 ---- HANKO RUSSARO
02983 6051 2465 113 111 0 ---- NURMIJARVI GEOPHYSICAL OBSERVATORY
-02984 5993 2402 12 10 0 ---- BAGASKAR
+02984 5993 2401 12 12 0 ---- INKOO BAGASKAR
02985 6018 2479 8 6 0 ---- ESPOO TAPIOLA
02986 6029 2457 92 90 0 ---- ESPOO NUUKSIO
02987 5999 2560 23 0 0 ---- PORVOO KALLBADAGRUND
@@ -1384,7 +1388,7 @@
06600 4757 769 0 493 0 ---- ST. CHRISCHONA
06601 4754 758 317 316 0 ---- BASEL / BINNINGEN
06602 4735 735 439 439 0 ---- DELEMONT
-06603 4735 733 0 415 0 ---- DELEMONT
+06603 4647 682 0 405 0 ---- VEVEY
06604 4700 695 485 485 0 ---- NEUCHATEL
06605 4713 705 1595 1599 2 ---- CHASSERAL
06606 4705 706 432 431 0 ---- CRESSIER
@@ -1394,6 +1398,8 @@
06610 4681 694 490 490 0 T-T- PAYERNE
06611 4689 701 0 435 0 ---- AVENCHES
06612 4708 679 1018 1018 2 ---- LA CHAUX-DE-FONDS
+06613 4660 766 0 753 0 ---- FRUTIGEN
+06614 4612 702 0 990 0 ---- LES MARECOTTES
06616 4742 694 598 596 0 ---- FAHY
06617 4698 661 1050 1050 2 ---- LA BREVINE
06618 4674 657 437 437 0 ---- MATHOD
@@ -1420,18 +1426,18 @@
06639 4700 794 1405 1404 2 ---- NAPF
06640 4666 707 0 715 0 ---- MARSENS
06641 4757 788 345 344 0 ---- MOEHLIN
-06642 4735 777 0 735 0 ---- LANGENBRUCK
+06642 4663 975 0 1408 0 ---- LATSCH
06643 4726 779 423 422 0 ---- WYNAU
06644 4724 823 453 453 0 ---- MOSEN
06645 4743 788 613 611 2 ---- RUENENBERG
06646 4756 823 327 326 0 ---- BEZNAU
06647 4754 823 335 334 0 ---- WUERENLINGEN
06648 4718 800 523 521 0 ---- EGOLZWIL
-06649 4755 805 0 322 0 ---- LAUFENBURG
+06649 4738 961 409 409 0 ---- OBERRIET
06650 4704 830 455 454 0 ---- LUZERN
06651 4695 801 744 742 2 ---- SCHUEPFHEIM
-06652 4707 830 0 430 0 ---- EMMEN / RATHAUSEN
-06653 4720 817 0 693 0 ---- BEROMUENSTER
+06652 4689 802 0 940 0 ---- FLUEHLI
+06653 4700 852 0 521 0 ---- GERSAU
06654 4747 817 0 350 0 ---- BRUGG-WILDEGG
06655 4682 841 1036 1036 2 ---- ENGELBERG
06656 4674 806 569 567 0 ---- BRIENZ
@@ -1440,9 +1446,11 @@
06659 4698 825 2103 2106 2 ---- PILATUS
06660 4738 857 558 556 0 ---- ZUERICH / FLUNTERN
06661 4728 851 0 928 0 ---- ALBIS
-06662 4767 843 0 402 0 ---- TRASADINGEN
+06662 4708 864 0 790 0 ---- SATTEL-AEGERI
+06663 4663 919 0 1242 0 ---- VALS
06664 4743 852 444 444 0 ---- ZUERICH / AFFOLTERN
06666 4760 819 342 341 0 ---- LEIBSTADT
+06668 4667 859 0 1099 0 ---- GOESCHENEN
06669 4748 840 846 845 2 ---- LAEGERN
06670 4748 853 427 426 0 ---- ZUERICH / KLOTEN
06671 4767 898 399 398 0 ---- STECKBORN
@@ -1479,14 +1487,15 @@
06707 4662 671 0 859 0 ---- VILLARS-TIERCELIN
06708 4657 686 829 827 2 ---- ORON
06709 4639 686 375 374 0 ---- BOUVERET
-06710 4653 662 0 610 0 ---- LAUSANNE
+06710 4718 709 0 695 0 ---- COURTELARY
06711 4651 667 456 456 0 ---- PULLY
06712 4633 692 382 381 0 ---- AIGLE
+06713 4639 710 0 1412 0 ---- COL DES MOSSES
06714 4633 720 2964 2964 3 ---- LES DIABLERETS
06715 4618 703 482 482 0 ---- EVIONNAZ
-06716 4618 727 728 737 0 ---- FEY
+06716 4615 762 1580 1560 2 ---- MOTTEC
06717 4587 717 2487 2472 0 ---- COL DU GRAND ST-BERNARD
-06718 4620 702 0 665 0 ---- SAVATAN
+06718 4638 690 0 373 0 ---- NOVILLE
06719 4587 717 0 2460 0 ---- LE GRAND SAINT-BERNARD DOUANE
06720 4622 733 482 482 0 ---- SION
06721 4637 819 0 1448 0 ---- BINN
@@ -1529,6 +1538,7 @@
06768 4604 883 0 1625 0 ---- MONTE LEMA
06770 4600 896 301 273 0 ---- LUGANO
06771 4584 893 352 353 0 ---- STABIO
+06774 4646 967 0 1856 0 ---- BIVIO
06775 4600 891 0 279 0 ---- LUGANO-AGNO
06777 4593 902 1601 1600 2 ---- MONTE GENEROSO
06778 4665 1027 1969 1968 2 ---- BUFFALORA
@@ -1553,7 +1563,7 @@
06797 4641 1002 2260 2260 0 ---- PASSO DEL BERNINA
06798 4679 1028 1305 1304 2 ---- SCUOL
06799 4682 1026 2401 2400 3 ---- NALUNS / SCHLIVERA
-06801 4685 692 0 446 0 ---- PAYERNE
+06801 4685 692 0 443 0 ---- PAYERNE
06802 4622 734 0 483 0 ---- SION
06803 4673 811 0 577 0 ---- MEIRINGEN
06804 4695 827 0 440 0 ---- ALPNACH
@@ -1800,20 +1810,20 @@
07785 4300 936 113 104 0 ---- CAP CORSE
07790 4254 949 12 8 0 ---- BASTIA
08001 4337 -842 67 58 0 T-T- LA CORUNA
-08002 4331 -836 103 97 0 ---- LA CORUNA/ALVEDRO
+08002 4331 -836 103 98 0 ---- LA CORUNA/ALVEDRO
08005 4348 -823 9 6 0 ---- EL FERROL
08007 4317 -852 0 595 0 ---- CERCEDA
-08008 4312 -746 446 445 0 ---- LUGO/ROZAS
+08008 4311 -746 446 445 0 ---- LUGO/ROZAS
08011 4357 -604 130 127 0 ---- ASTURIAS/AVILES
08014 4356 -570 6 5 0 ---- GIJON-MUSEL
08015 4335 -587 339 336 0 ---- OVIEDO
-08019 4346 -630 0 923 0 ---- AGUION
+08019 4346 -630 927 923 0 ---- AGUION
08021 4343 -383 1 5 0 ---- SANTANDER/PARAYAS
08023 4349 -380 59 52 0 T-T- SANTANDER
08025 4330 -291 39 42 0 ---- BILBAO/AEROPUERTO
08027 4331 -204 259 251 0 ---- SAN SEBASTIAN/IGUELDO
08029 4336 -179 8 4 0 ---- SAN SEBASTIAN/FUENTERRABIA
-08042 4289 -841 367 370 0 ---- SANTIAGO/LABACOLLA
+08042 4289 -841 367 370 0 ---- SANTIAGO DE COMPOSTELA/LABACOLLA
08043 4240 -869 10 9 0 ---- MARIN
08044 4244 -861 108 108 0 ---- PONTEVEDRA
08045 4224 -861 258 261 0 ---- VIGO/PEINADOR
@@ -1821,33 +1831,34 @@
08048 4233 -786 147 143 0 ---- ORENSE
08053 4256 -660 550 534 0 ---- PONFERRADA
08055 4259 -565 914 916 9 ---- LEON/VIRGEN DEL CAMINO
-08072 4200 -459 0 874 9 ---- PALENCIA-AUTILLA PINO
+08072 4200 -459 860 874 9 ---- PALENCIA-AUTILLA PINO
08075 4236 -362 892 891 9 ---- BURGOS/VILLAFRIA
-08080 4287 -273 510 513 0 ---- VITORIA
-08081 4340 -284 0 576 0 ---- BAQUIO
+08080 4287 -273 510 513 0 ---- VITORIA/FORONDA
+08081 4340 -284 0 576 0 ---- BAKIO
08084 4245 -233 363 353 0 ---- LOGRONO/AGONCILLO
08085 4278 -165 453 459 0 ---- PAMPLONA/NOAIN
08087 4220 -147 295 295 0 ---- BARDENAS REALES
-08094 4208 -33 554 541 0 ---- HUESCA/MONFLORITE
+08094 4208 -33 554 541 0 ---- HUESCA/PIRINEOS
08112 4221 87 800 799 2 ---- TALARN
08117 4233 194 1702 1704 2 ---- LA MOLINA
-08130 4152 -573 667 656 0 ---- ZAMORA
-08140 4170 -484 846 846 9 ---- VALLADOLID/VILLANUBLA
-08141 4165 -476 735 735 0 ---- VALLADOLID
-08148 4177 -247 1082 1082 2 ---- SORIA
-08157 4111 -141 779 779 9 ---- DAROCA
-08160 4166 -101 258 263 0 T-T- ZARAGOZA/AEROPUERTO
-08162 4174 -54 0 820 0 ---- PERDIGUERA
-08171 4163 60 199 192 0 ---- LLEIDA
+08130 4152 -574 667 656 0 ---- ZAMORA
+08140 4171 -486 846 846 9 ---- VALLADOLID/VILLANUBLA
+08141 4164 -475 735 735 0 ---- VALLADOLID
+08148 4178 -248 1082 1082 2 ---- SORIA
+08157 4111 -141 779 779 9 ---- DAROCA I
+08160 4166 -100 258 263 0 ---- ZARAGOZA/AEROPUERTO
+08160 4168 -107 0 252 0 T-T- ZARAGOZA/BASE AEREA
+08162 4173 -55 0 820 0 ---- PERDIGUERA
+08171 4163 60 199 185 0 ---- LLEIDA
08175 4115 118 76 71 0 ---- REUS/AEROPUERTO
-08179 4141 189 0 651 0 ---- CORBERA
+08179 4141 188 0 647 0 ---- CORBERA, PIC D'AGULLES
08181 4129 206 5 4 0 ---- BARCELONA/AEROPUERTO
08184 4191 276 129 143 0 ---- GIRONA/COSTA BRAVA
08190 4138 212 91 95 0 T-T- BARCELONA SERVEI
08202 4096 -550 794 790 9 ---- SALAMANCA/MATACAN
08210 4065 -468 1132 1130 2 ---- AVILA
08213 4095 -413 1005 1005 2 ---- SEGOVIA
-08215 4078 -401 1888 1894 2 ---- NAVACERRADA
+08215 4079 -401 1888 1894 2 ---- NAVACERRADA, PUERTO
08219 4070 -376 998 1004 9 ---- COLMENAR VIEJO/FAMET
08220 4045 -372 669 664 0 ---- MADRID/C. UNIVERSITARIA
08221 4047 -356 582 609 0 ---- MADRID/BARAJAS
@@ -1855,52 +1866,52 @@
08222 4040 -368 667 667 0 ---- MADRID, RETIRO
08223 4038 -379 687 690 0 ---- MADRID/CUATRO VIENTOS
08224 4029 -372 617 620 0 ---- MADRID/GETAFE
-08226 4065 -317 640 639 0 ---- GUADALAJARA
-08227 4047 -345 612 607 0 ---- MADRID/TORREJON
+08226 4063 -315 724 721 0 ---- GUADALAJARA
+08227 4047 -344 612 607 0 ---- MADRID/TORREJON
08228 4018 -371 0 704 0 ---- TORREJON DE VELASCO
-08231 4007 -214 946 945 9 ---- CUENCA
-08232 4084 -189 1063 1056 2 ---- MOLINA DE ARAGON
-08233 4093 -130 889 890 9 ---- CALAMOCHA
+08231 4007 -213 946 945 9 ---- CUENCA
+08232 4084 -188 1063 1062 2 ---- MOLINA DE ARAGON
+08233 4093 -129 889 890 9 ---- CALAMOCHA
08235 4035 -112 902 900 9 ---- TERUEL
-08238 4082 49 50 44 0 ---- TORTOSA
-08261 3947 -634 405 405 0 ---- CACERES
-08262 3943 -628 0 652 0 ---- SIERRA DE FUENTES
+08238 4082 49 50 50 0 ---- TORTOSA
+08261 3947 -634 391 394 0 ---- CACERES
+08262 3943 -629 0 652 0 ---- SIERRA DE FUENTES
08272 3988 -405 516 515 0 ---- TOLEDO
08280 3895 -186 704 702 0 ---- ALBACETE/LOS LLANOS
-08284 3949 -47 62 69 0 ---- VALENCIA/AEROPUERTO
-08285 3947 -37 11 11 0 ---- VALENCIA
-08286 3995 -7 35 35 0 ---- CASTELLON
+08284 3947 -47 62 60 0 ---- VALENCIA/AEROPUERTO
+08285 3947 -37 11 11 0 ---- VALENCIA VIVEROS
+08286 3996 -7 44 43 0 ---- CASTELLON-ALMAZORA
08289 3918 -25 0 234 0 ---- CULLERA
-08301 3956 263 6 3 0 ---- PALMA DE MALLORCA
+08301 3954 263 6 3 0 ---- PALMA DE MALLORCA, CMT
08302 3961 271 41 41 0 T-T- MALLORCA-SON BONET
08306 3956 274 5 8 0 ---- PALMA DE MALLORCA/SON SAN JUAN
-08308 3938 279 0 113 0 ---- LLUCMAYOR
-08314 3985 422 86 91 0 ---- MENORCA/MAHON
+08308 3938 278 0 113 0 ---- LLUCMAYOR
+08314 3985 422 86 91 0 ---- MENORCA/AEROPUERTO
08330 3888 -683 192 185 0 ---- BADAJOZ/TALAVERA LA REAL
08335 3850 -513 541 540 0 ---- HINOJOSA DEL DUQUE
08348 3899 -392 629 628 0 ---- CIUDAD REAL
08349 3895 -374 622 622 0 ---- ALMAGRO-FAMET
08359 3836 -49 82 81 0 ---- ALICANTE
08360 3828 -56 31 43 0 ---- ALICANTE/EL ALTET
-08364 3827 -119 0 1261 0 ---- FORTUNA
+08364 3826 -119 0 1261 0 ---- FORTUNA
08373 3888 138 17 6 0 ---- IBIZA/ES CODOLA
08383 3728 -691 20 19 0 ---- HUELVA
08386 3769 -633 0 517 0 ---- CASTILLO LAS GUARDAS
08391 3742 -588 31 34 0 ---- SEVILLA/SAN PABLO
-08397 3715 -562 88 87 0 ---- MORON DE LA FRONTERA
-08410 3784 -484 92 90 0 ---- CORDOBA/AEROPUERTO
-08417 3778 -381 580 582 0 ---- JAEN
+08397 3715 -561 88 87 0 ---- MORON DE LA FRONTERA
+08410 3785 -484 92 90 0 ---- CORDOBA/AEROPUERTO
+08417 3778 -381 580 580 0 ---- JAEN
08419 3719 -379 570 567 0 ---- GRANADA/AEROPUERTO
08420 3714 -363 692 687 0 ---- GRANADA/BASE AEREA
08429 3796 -123 75 75 0 ---- MURCIA/AL CANTARILLA
08430 3800 -117 62 61 0 T-T- MURCIA
08433 3779 -80 3 4 0 ---- MURCIA/SAN JAVIER
-08449 3664 -633 23 21 0 ---- ROTA
+08449 3664 -633 23 21 0 ---- ROTA B.N. OBSERVATORIO
08451 3675 -606 28 27 0 ---- JEREZ DE LA FRONTERA AEROPUERTO
-08452 3650 -626 9 1 0 ---- CADIZ, OBS.
+08452 3650 -626 9 2 0 ---- CADIZ, OBS.
08458 3602 -560 25 32 0 ---- TARIFA
08475 3661 -466 0 1147 0 ---- ALHAURIN EL GRANDE
-08482 3668 -449 7 16 0 ---- MALAGA/AEROPUERTO
+08482 3667 -448 7 5 0 ---- MALAGA/AEROPUERTO
08487 3685 -236 21 21 0 ---- ALMERIA/AEROPUERTO
08489 3683 -208 0 486 0 ---- NIJAR
08495 3615 -535 0 5 0 ---- GIBRALTAR
@@ -1957,32 +1968,32 @@
08583 1682 -2505 18 20 0 ---- MINDELO
08589 1494 -2348 95 95 0 ---- PRAIA
08594 1673 -2295 56 54 0 --T- SAL
-08911 4277 -63 0 1540 0 ---- ARAGUES DEL PUERTO, LIZARRA
+08911 4276 -63 0 1540 0 ---- ARAGUES DEL PUERTO, LIZARRA
08912 4296 -80 0 1591 0 ---- ISABA, EL FERIAL
08913 4290 -80 0 1340 0 ---- ANSO, REFUGIO DE LINZA
-08914 4279 -53 0 1560 0 ---- CANDANCHU, ETUKSA
+08914 4279 -54 0 1560 0 ---- CANDANCHU, ETUKSA
08916 4282 -50 0 1730 0 ---- ASTUN, 'ESQUI 1730'
-08917 4276 -39 0 1780 0 ---- SALLENT DE GALLEGO, FURCO
-08918 4278 -37 0 1560 0 ---- SALLENT DE GALLEGO, FORMIGAL
-08920 4282 -28 0 2180 0 ---- SALLENT DE GALLEGO, RESPOMUSO
-08922 4276 -23 0 1660 0 ---- PANTICOSA, REFUGIO CASA PIEDRA
+08917 4276 -38 0 1855 0 ---- SALLENT DE GALLEGO, FURCO
+08918 4277 -37 0 1500 0 ---- SALLENT DE GALLEGO, FORMIGAL
+08920 4282 -30 0 2145 0 ---- SALLENT DE GALLEGO, RESPOMUSO
+08922 4276 -23 0 1645 0 ---- PANTICOSA, REFUGIO CASA PIEDRA
08924 4270 -28 0 1830 0 ---- PANTICOSA, ESQUI
-08925 4263 46 0 2150 0 ---- ERISTE, REFUGIO ANGEL ORUS
-08926 4266 1 0 2215 0 ---- FANLO, REFUGIO DE GORIZ
-08927 4267 10 0 1350 0 ---- BIELSA, REFUGIO DE PINETA
+08925 4263 46 0 2115 0 ---- ERISTE, REFUGIO ANGEL ORUS
+08926 4266 2 0 2195 0 ---- FANLO, REFUGIO DE GORIZ
+08927 4267 10 0 1240 0 ---- BIELSA, REFUGIO DE PINETA
08928 4268 48 0 1890 0 ---- BENASQUE, REFUGIO DE ESTOS
-08930 4257 55 0 2020 0 ---- CERLER, ESQU COTA 2000
+08930 4257 54 0 2020 0 ---- CERLER, ESQU COTA 2000
08932 4248 87 0 2280 0 ---- BOI TAHULL
08934 4270 95 0 1870 0 ---- BAQUEIRA
-08936 4241 112 0 680 0 ---- SORT
-08938 4242 121 0 2080 0 ---- PORT AINE
-08940 4264 125 0 1100 0 ---- TAVESCAN
-08942 4217 156 0 1750 0 ---- PORT DEL COMTE
+08936 4269 97 0 2467 0 ---- CAP DE VAQUEIRA
+08938 4241 121 0 2410 0 ---- PORT AINE, L'ORRI
+08940 4243 167 0 1940 0 ---- CAP DE RAC
+08942 4217 156 0 1813 0 ---- PORT DEL COMTE
08944 4233 190 0 2150 0 ---- MASELLA
08946 4239 216 0 1967 0 ---- NURIA
-08948 4244 227 0 2160 0 ---- VALLTER 2000
-08958 4011 -104 0 1520 0 ---- CAMARENA DE LA SIERRA
-08960 4038 -63 0 1975 0 ---- VALDELINARES, ESQUI
+08948 4243 227 0 2167 0 ---- VALLTER 2000
+08958 4011 -103 0 1520 0 ---- CAMARENA DE LA SIERRA
+08960 4038 -63 0 1955 0 ---- VALDELINARES, ESQUI
10004 5417 635 0 0 0 ---- UFS TW EMS
10006 5468 675 5 5 0 ---- NORDSEEBOJE III
10007 5418 743 0 0 0 ---- UFS DEUTSCHE BUCHT
@@ -2012,7 +2023,7 @@
10113 5371 715 16 11 0 T-T- NORDERNEY
10121 5378 792 0 2 0 ---- WANGEROOGE
10122 5352 787 20 7 0 ---- JEVER
-10124 5387 813 31 32 0 ---- LEUCHTTURM ALTE WESER
+10124 5386 813 31 32 0 ---- LEUCHTTURM ALTE WESER
10125 5350 805 0 5 0 ---- WILHELMSHAVEN-MARIENSIEL
10126 5355 767 12 8 0 ---- WITTMUNDHAVEN
10127 5353 817 10 6 0 ---- WILHELMSHAVEN (FLUGPLATZ)
@@ -2107,7 +2118,7 @@
10403 5123 650 38 37 0 ---- MOENCHENGLADBACH
10404 5173 627 43 31 0 ---- KALKAR
10406 5183 653 24 21 0 ---- BOCHOLT
-10410 5141 697 150 150 0 ---- ESSEN-BREDENEY
+10410 5140 697 150 150 0 ---- ESSEN-BREDENEY
10410 5141 697 153 153 0 T-T- ESSEN-BREDENEY
10412 5140 695 0 158 0 ---- ESSEN (RADAR)
10413 5165 717 0 74 0 ---- MARL/LOEMUEHLE
@@ -2539,14 +2550,14 @@
11450 4976 1338 372 360 0 ---- PLZEN-MIKULKA
11457 4907 1362 1122 1118 2 ---- CHURANOV
11464 5056 1393 843 831 9 ---- MILESOVKA
-11487 4947 1384 522 519 0 ---- KOCELOVICE
+11487 4947 1384 523 519 0 ---- KOCELOVICE
11502 5068 1404 379 375 0 ---- USTI NAD LABEM
11509 5046 1417 160 158 0 ---- DOKSANY
11518 5010 1426 365 380 0 ---- PRAHA/RUZYNE
11520 5001 1445 304 302 0 TTT- PRAHA-LIBUS
11538 4920 1434 508 500 0 ---- TEMELIN
11541 4895 1443 436 432 0 ---- CESKE BUDEJOVICE
-11546 4895 1447 396 395 0 ---- C. BUDEJOVICE-ROZNOV
+11546 4895 1447 403 395 0 ---- C. BUDEJOVICE-ROZNOV
11567 5012 1454 286 285 0 ---- PRAHA-KBELY
11603 5077 1502 401 398 0 ---- LIBEREC
11624 4994 1539 240 242 0 ---- CASLAV
@@ -2572,6 +2583,7 @@
11774 4932 1757 224 222 0 ---- HOLESOV
11782 4970 1812 252 257 0 ---- OSTRAVA/MOSNOV
11787 4955 1845 1327 1322 2 ---- LYSA HORA
+11791 4937 1782 666 664 255 ---- HOSTALKOVA, MARUSKA
11801 4840 1714 207 205 0 ---- MALACKY
11816 4820 1720 134 133 0 ---- BRATISLAVA-LETISKO
11819 4848 1767 178 176 0 ---- JASLOVSKE BOHUNICE
@@ -2757,7 +2769,7 @@
13577 4153 2070 1321 1332 2 ---- LAZAROPOLE
13578 4112 2080 761 760 2 ---- OHRID
13579 4110 2082 700 705 0 ---- OHRID-AERODROME
-13580 4085 2107 910 912 0 ---- PRETOR-PGC
+13580 4098 2106 910 912 0 ---- PRETOR-PGC
13581 4122 2147 0 0 2 ---- TOPOLCANI-PGC
13582 4137 2125 1230 0 2 ---- KRUSEVO
13583 4105 2137 589 586 0 ---- BITOLA
@@ -2879,7 +2891,7 @@
15025 4783 2722 111 110 1 ---- STANCA STEFANESTI
15033 4760 2465 1787 1785 2 ---- IEZER
15042 4734 2209 112 124 1 ---- SACUIENI
-15044 4746 2278 161 159 1 ---- SUPURU DE JOS
+15044 4746 2278 160 159 1 ---- SUPURU DE JOS
15047 4744 2387 365 363 1 ---- TARGU LAPUS
15052 4745 2557 1574 1572 2 ---- RARAU
15056 4736 2693 290 289 1 ---- COTNARI
@@ -3483,7 +3495,7 @@
17350 3700 3542 66 73 0 ---- ADANA/INCIRLIK
17351 3697 3535 27 27 0 T-T- ADANA/BOLGE
17352 3697 3529 20 20 0 ---- ADANA
-17355 3717 3617 120 120 0 ---- OSMANIYE
+17355 3710 3625 0 94 0 ---- OSMANIYE
17370 3658 3617 4 4 0 ---- ISKENDERUN
17372 3620 3617 100 100 0 ---- HATAY-ANTAKYA
17375 3629 3015 2 2 0 ---- FINIKE
@@ -4168,7 +4180,7 @@
28202 5835 5157 178 179 0 ---- FALENKI
28214 5813 5258 170 168 0 ---- GLAZOV
28216 5808 5468 226 238 0 ---- VERESCAGINO
-28224 5800 5667 171 171 0 ---- PERM'
+28224 5799 5634 171 171 0 ---- PERM'
28225 5795 5620 170 0 0 ---- PERM'
28225 5796 5620 170 170 0 T--- PERM'
28234 5812 5778 226 223 0 ---- LYS'VA
@@ -5093,6 +5105,7 @@
37537 4160 4408 1458 0 0 ---- TSALKA
37541 4193 4458 551 0 0 ---- MUHRANI
37545 4175 4477 428 427 4 ---- TBILISI
+37548 4176 4492 0 462 4 ---- TBILISI (RADAR STATION)
37549 4168 4495 462 0 0 T--- TBILISI-AMC
37553 4193 4551 566 568 4 ---- TELAVI
37556 4173 4533 806 0 0 ---- SAGAREDZO
@@ -5523,6 +5536,7 @@
40594 2855 4838 20 19 0 ---- NUWASIB
40595 2882 4877 6 5 0 ---- QARUH ISLAND
40596 2868 4865 8 7 0 ---- UMM-AL-MARADIM
+40598 2879 4767 193 0 4 ---- UMM QUDEER
40602 3679 4210 382 0 0 ---- RABIAH
40603 3636 4248 373 0 0 ---- TEL-AFER
40604 3632 4183 583 0 0 ---- SINJAR
@@ -5870,17 +5884,25 @@
41620 3135 6947 1407 1405 2 PPPP ZHOB
41624 3182 7092 173 172 0 PPPP DERA ISMAIL KHAN
41630 3143 7309 184 183 4 ---- FAISALABAD
+41633 3187 7190 186 0 0 ---- NOOR PUR THAL
+41634 3292 7284 519 0 0 ---- CHAKWAL
+41635 3250 7243 187 0 0 ---- JAUHARBAD
41636 3127 7231 153 0 0 ---- JHANG
41638 3098 7247 156 0 0 ---- TOBA TEK SINGH
+41639 3253 7409 233 0 0 ---- GUJRAT
41640 3155 7433 215 214 0 TPPP LAHORE CITY
41641 3152 7440 217 216 0 ---- LAHORE AIRPORT
41646 3080 7343 180 0 0 ---- OKARA
41652 3005 7063 125 123 0 ---- DERA GHAZI KHAN
41660 3025 6688 1589 1587 2 ---- QUETTA AIRPORT
41661 3027 6692 1621 1620 2 TPPP QUETTA (SHEIKH MANDA)
+41669 3162 7106 162 0 0 ---- BHAKKAR
+41670 3102 7097 151 0 0 ---- LAYYAH
41672 3078 7220 150 0 4 PPPP RAFIQUI
41675 3020 7143 123 122 0 TPPP MULTAN
+41676 3045 7095 133 0 0 ---- KOT ADDU
41678 2995 7325 163 162 0 PPPP BAHAWALNAGAR
+41679 3110 7447 218 0 0 ---- KASUR
41685 2988 6972 1098 1097 2 PPPP BARKHAN
41696 2903 6658 2017 2015 2 PPPP KALAT
41697 2955 6788 134 133 0 ---- SIBI
@@ -6187,6 +6209,7 @@
42699 2398 8537 611 611 0 ---- HAZARIBAGH
42701 2332 8532 646 646 0 TPT- M.O. RANCHI
42703 2378 8643 258 256 0 ---- DHANBAD
+42704 2347 8743 74 74 0 TPT- PANAGARH AFS
42705 2333 8642 255 255 0 ---- PURULIA
42706 2338 8708 99 100 0 ---- BANKURA
42708 2365 8770 59 59 0 ---- SHANTI NIKETAN
@@ -6608,12 +6631,12 @@
47088 3640 12828 0 90 0 P--- SANGJU RANGE
47090 3825 12856 19 19 0 T-T- SOKCHO
47091 3813 12860 13 11 0 ---- SOKCHO AIRPORT
-47092 3807 12866 72 74 0 ---- YANGYANG INT'L AIRPORT
+47092 3804 12866 74 73 0 ---- YANGYANG INT'L AIRPORT
47094 3811 12743 0 1064 0 ---- GWANGDEOKSAN
47095 3815 12730 155 154 0 ---- CHEORWON
47097 3726 12748 79 79 0 ---- ICHEON
47098 3790 12706 110 110 0 ---- DONGDUCHEON
-47099 3789 12677 31 30 0 ---- MUNSAN
+47099 3789 12677 31 30 0 ---- PAJU
47100 3768 12872 774 773 0 ---- DAEGWALLYEONG
47101 3790 12774 79 78 0 ---- CHUNCHEON
47102 3797 12463 146 145 0 T-T- BAENGNYEONGDO
@@ -6624,10 +6647,10 @@
47107 3772 12893 0 6 0 ---- GANGNEUNG AB
47108 3757 12697 87 86 0 ---- SEOUL
47109 3775 12865 0 1407 0 ---- HWANGBYEONGSAN
-47110 3754 12678 10 18 0 ---- GIMPO INT'L AIRPORT
+47110 3754 12680 10 18 0 ---- GIMPO INT'L AIRPORT
47111 3745 12710 0 21 0 ---- SEOUL AB
47112 3747 12662 69 69 0 ---- INCHEON
-47113 3747 12643 6 7 0 ---- INCHEON INT'L AIRPORT
+47113 3747 12643 7 7 0 ---- INCHEON INT'L AIRPORT
47114 3734 12795 150 149 0 ---- WONJU
47115 3747 13090 224 223 0 ---- ULLEUNGDO
47116 3744 12696 0 641 0 ---- GWANAKSAN
@@ -6644,61 +6667,61 @@
47127 3697 12795 117 116 0 ---- CHUNGJU
47128 3672 12750 0 53 0 ---- CHEONGJU AB
47129 3678 12649 30 29 0 ---- SEOSAN
-47130 3699 12941 51 51 0 ---- ULJIN
+47130 3699 12941 51 50 0 ---- ULJIN
47131 3664 12744 59 58 0 ---- CHEONGJU
-47132 3652 12632 0 46 0 ---- KOREA GAW CENTER, ANMYEONDO
+47132 3652 12632 0 46 0 ---- ANMYEONDO
47133 3636 12737 70 69 0 ---- DAEJEON
47134 3661 12835 0 107 0 ---- YECHEON AB
47135 3622 12799 246 245 0 ---- CHUPUNGNYEONG
-47136 3657 12871 142 141 0 ---- ANDONG
+47136 3657 12871 142 140 0 ---- ANDONG
47137 3640 12816 98 97 0 ---- SANGJU
47138 3603 12938 4 3 0 T-T- POHANG
47139 3597 12941 20 21 0 ---- POHANG AB
47140 3601 12676 25 24 0 ---- GUNSAN
47141 3590 12662 10 9 0 ---- GUNSAN AB
47142 3588 12866 0 36 0 ---- DAEGU AB
-47143 3589 12862 65 65 0 ---- DAEGU
+47143 3588 12865 55 53 0 ---- DAEGU
47144 3601 12678 0 232 0 ---- OSUNGSAN
47145 3678 12712 26 25 0 ---- CHEONAN
-47146 3582 12716 55 54 0 ---- JEONJU
+47146 3584 12712 63 61 0 ---- JEONJU
47147 3629 12722 0 145 0 P--- GYERYONGDAE
47148 3618 12900 0 1128 0 ---- MYONBONGSAN
47149 3668 12648 0 12 0 ---- SEOSAN AB
47150 3633 12656 17 16 0 ---- BORYEONG
-47151 3560 12935 9 13 0 ---- ULSAN AIRPORT
+47151 3558 12935 9 13 0 ---- ULSAN AIRPORT
47152 3556 12932 36 35 0 ---- ULSAN
47153 3517 12893 0 3 0 ---- GIMHAE AB
47154 3613 12832 50 49 0 ---- GUMI
47155 3517 12857 38 38 0 ---- CHANGWON
47156 3517 12689 74 73 0 ---- GWANGJU
-47157 3567 12791 222 222 0 ---- GEOCHANG
+47157 3567 12791 227 226 0 ---- GEOCHANG
47158 3511 12680 13 13 0 TTTT GWANGJU AB
47159 3510 12903 71 70 0 ---- BUSAN
47160 3511 12900 0 547 0 ---- GUDEOKSAN
47161 3507 12805 8 3 0 P--- SACHEON AB
-47162 3485 12844 34 33 0 ---- TONGYEONG
-47163 3497 12637 37 36 0 ---- MUAN INT'L AIRPORT
+47162 3485 12844 33 32 0 ---- TONGYEONG
+47163 3497 12638 9 16 0 ---- MUAN INT'L AIRPORT
47165 3482 12638 39 39 0 ---- MOKPO
47166 3477 12638 5 7 0 ---- MOKPO AIRPORT
-47167 3483 12762 21 20 0 ---- YEOSU AIRPORT
+47167 3483 12762 22 16 0 ---- YEOSU AIRPORT
47168 3474 12774 66 65 0 ---- YEOSU
47169 3469 12545 78 77 0 T-T- HEUKSANDO
47170 3440 12670 37 36 0 ---- WANDO
47171 3556 12687 46 45 0 ---- JEONGEUP
47172 3535 12660 56 55 0 ---- GOCHANG
-47173 3540 12733 92 91 0 ---- NAMWON
-47174 3508 12724 76 75 0 ---- SUNCHEON
+47173 3542 12740 134 133 0 ---- NAMWON
+47174 3502 12737 167 165 0 ---- SUNCHEON
47175 3447 12632 478 477 0 ---- JINDO
47178 3767 12568 0 107 0 ---- YEONPYEONGDO
47179 3750 13087 0 968 0 ---- ULLEUNGDO AB
47180 3725 12608 0 123 0 ---- DEOKJEOKDO
-47182 3352 12650 24 36 0 ---- JEJU INT'L AIRPORT
+47182 3350 12648 24 36 0 ---- JEJU INT'L AIRPORT
47184 3351 12653 22 21 0 ---- JEJU
47185 3329 12616 76 75 0 T-T- GOSAN
47187 3322 12625 0 181 0 ---- MOSEULPO
47188 3339 12688 19 18 0 ---- SEONGSAN
47189 3325 12657 50 50 0 ---- SEOGWIPO
-47192 3515 12804 32 31 0 ---- JINJU
+47192 3515 12804 30 29 0 ---- JINJU
47401 4542 14168 12 3 0 T-T- WAKKANAI
47402 4494 14258 8 7 0 ---- KITAMIESASHI
47404 4436 14169 10 8 0 ---- HABORO
@@ -7125,6 +7148,7 @@
48407 1525 10487 124 122 0 TPPP UBON RATCHATHANI
48408 1523 10503 131 130 0 ---- UBON RATCHATHANI AGROMET
48409 1509 10433 129 127 0 ---- SISAKET AGROMET
+48410 1537 10004 26 24 0 ---- UTHAITHANI
48413 1566 10111 70 68 0 ---- WICHIAN BURI
48415 1453 10072 10 8 0 ---- AYUTTHAYA AGROMET
48416 1532 10368 129 128 0 ---- THA TUM
@@ -7144,6 +7168,7 @@
48435 1464 10132 388 386 0 ---- PAK CHONG AGROMET
48436 1463 10272 182 179 0 ---- NANG RONG
48437 1523 10325 184 182 0 ---- BURIRAM
+48438 1341 10003 4 2 0 ---- SAMUTSONGKRAM
48439 1399 10170 12 11 0 ---- KABIN BURI
48440 1379 10203 43 41 0 ---- SRAKAEW
48450 1402 9954 29 28 0 ---- KANCHANA BURI
@@ -7227,6 +7252,7 @@
48803 2250 10397 97 104 0 ---- LAO CAI
48806 2133 10390 676 675 0 ---- SON LA
48808 2267 10625 243 244 0 ---- CAO BANG
+48811 2140 10301 491 491 0 T-T- DIEN BIEN PHU AP.
48820 2103 10580 6 5 0 T-T- HA NOI
48823 2043 10615 3 2 0 ---- NAM DINH
48825 2097 10577 8 6 0 ---- HA DONG
@@ -7300,7 +7326,7 @@
48995 1200 10545 14 14 0 ---- KOMPONG-CHAM
48997 1147 10532 13 13 0 ---- PREY VENG
48998 1108 10580 6 6 0 ---- SVAY RIENG
-50136 5213 12252 433 0 0 ---- MOHE
+50136 5297 12253 438 0 0 ---- MOHE
50353 5173 12663 176 0 0 ---- HUMA
50434 5048 12168 737 0 0 ---- TULIHE
50468 5025 12745 166 0 0 ---- AIHUI
@@ -7539,7 +7565,7 @@
56671 2665 10225 1788 0 0 ---- HUILI
56684 2640 10325 2189 0 0 ---- HUIZE
56691 2687 10428 2236 0 0 T-T- WEINING
-56739 2498 9850 1697 0 0 ---- TENGCHONG
+56739 2498 9851 1697 0 0 T-T- TENGCHONG
56739 2498 9851 1697 0 0 T-T- TENGCHONG
56748 2512 9918 1649 0 0 ---- BAOSHAN
56751 2570 10018 1992 0 0 ---- DALI
@@ -7807,7 +7833,7 @@
60376 3678 325 0 0 0 ---- BORDJ EL BAHRI
60379 3677 333 0 0 0 ---- REGHAIA
60380 3661 292 0 0 0 ---- TESSALA EL MERDJA
-60381 3672 305 0 0 0 ---- EL HARRACH
+60381 3672 315 0 51 0 ---- EL HARRACH
60387 3692 395 8 5 0 ---- DELLYS
60390 3668 322 29 25 0 T-T- DAR-EL-BEIDA
60393 3670 320 0 0 0 ---- DAR EL BEIDA VILLE
@@ -7840,7 +7866,7 @@
60490 3563 -60 91 91 0 ---- ORAN-SENIA
60492 3575 62 96 94 0 ---- RELIZANE
60506 3560 30 476 474 0 ---- MASCARA-MATEMORE
-60507 3522 23 513 516 0 ---- MASCARA-GHRISS
+60507 3535 15 513 516 0 ---- MASCARA-GHRISS
60511 3535 147 978 989 2 ---- TIARET
60514 3517 231 800 801 2 ---- KSAR CHELLALA
60515 3533 420 461 459 0 ---- BOU-SAADA
@@ -7852,7 +7878,7 @@
60531 3502 -147 247 248 0 ---- TLEMCEN-ZENATA
60535 3315 338 1185 1180 2 ---- DJELFA
60536 3486 15 752 750 2 ---- SAIDA
-60540 3353 7 1001 1000 2 ---- EL-KHEITER
+60540 3415 7 1001 1000 2 ---- EL-KHEITER
60545 3377 293 763 762 2 ---- LAGHOUAT
60549 3353 -28 1124 1123 2 ---- MECHERIA
60550 3367 100 1347 1341 2 ---- EL-BAYADH
@@ -7985,7 +8011,7 @@
61415 2093 -1703 3 5 0 PPTP NOUADHIBOU
61421 2052 -1307 224 226 0 PPPP ATAR
61437 1975 -1437 120 123 0 ---- AKJOUJT
-61442 1810 -1595 3 2 0 PPPP NOUAKCHOTT
+61442 1810 -1595 3 2 0 PPTP NOUAKCHOTT
61450 1857 -1143 402 396 0 ---- TIDJIKJA
61461 1753 -1468 75 77 0 ---- BOUTILIMIT
61470 1705 -1292 0 45 0 ---- ALEG
@@ -8113,7 +8139,7 @@
62332 3128 3224 6 2 0 ---- PORT SAID/EL GAMIL
62335 3121 3421 75 73 0 ---- RAFAH-AGRIMET
62336 3109 3382 17 27 0 ---- EL ARISH-AGRIMET
-62337 3107 3384 32 37 0 T--- EL ARISH
+62337 3107 3384 32 37 0 --T- EL ARISH
62339 3103 3047 0 2 0 ---- DAMANHOUR
62345 3065 3070 16 16 0 ---- TAHRIR
62354 3058 3150 13 8 0 ---- ZAGAZIG
@@ -8123,7 +8149,7 @@
62369 3014 3126 17 17 0 ---- BAHTIM AGRIMET
62371 3008 3128 26 34 0 ---- CAIRO H.Q
62375 3005 3122 23 19 0 ---- GIZA - AGRIMET
-62378 2986 3135 141 139 0 --T- HELWAN
+62378 2986 3135 141 139 0 T--- HELWAN
62381 2930 3085 23 23 0 ---- FAYOUM
62387 2808 3073 41 37 0 ---- MINYA
62389 2770 3075 45 44 0 ---- MALWY - AGRIMET
@@ -8312,7 +8338,7 @@
63971 -1027 4018 113 113 0 -PT- MTWARA
63980 -467 5552 3 3 0 ---- SEYCHELLES INTERNATIONAL AIRPORT
63981 -532 5568 3 3 0 ---- PRASLIN
-63985 -468 5552 4 4 0 T-T- SEYCHELLES INTER. AIRPORT (RAWINSONDE STATION)
+63985 -468 5552 4 4 0 --T- SEYCHELLES INTER. AIRPORT (RAWINSONDE STATION)
63994 -569 5365 3 3 0 ---- DESROCHES
63995 -935 4653 4 4 0 ---- ALDABRA
63996 -1010 5117 3 3 0 ---- FARQUHAR
@@ -8396,7 +8422,7 @@
64460 206 1403 550 549 0 ---- SOUANKE
64462 10 1355 408 0 0 ---- KELLE
64463 -558 1482 438 0 0 ---- EWO
-64500 45 942 15 12 0 ---- LIBREVILLE
+64500 45 942 15 12 0 --T- LIBREVILLE
64501 -70 875 4 4 0 ---- PORT-GENTIL
64503 -342 1065 34 31 0 ---- MAYUMBA
64504 100 960 0 16 0 ---- COCOBEACH
@@ -8435,7 +8461,7 @@
64707 1365 1650 0 301 0 ---- MOUSSORO
64708 1238 1705 301 300 0 ---- BOKORO
64709 936 1497 320 467 0 ---- PALA
-64750 915 1838 365 365 0 -PP- SARH
+64750 915 1838 365 365 0 -PT- SARH
64751 1322 1832 334 333 0 ---- ATI
64753 1800 1917 234 235 0 ---- FAYA
64754 1103 2028 436 433 0 ---- AM-TIMAN
@@ -8507,7 +8533,7 @@
65252 548 700 0 91 0 ---- OWERRI
65254 548 755 0 122 0 ---- UMUAHIA
65257 647 755 142 0 0 --T- ENUGU
-65260 550 792 38 0 0 ---- UYO
+65260 505 792 38 37 0 ---- UYO
65264 497 835 0 62 0 ---- CALABAR
65271 773 852 113 0 0 ---- MAKURDI
65272 667 880 117 0 0 ---- OGOJA
@@ -8515,11 +8541,11 @@
65274 660 932 0 285 0 ---- OBUDU
65275 667 880 0 117 0 ---- OGOJA
65306 1113 293 292 290 0 PPPP KANDI
-65319 1032 138 461 460 0 ---- NATITINGOU
+65319 1032 138 461 460 0 ---- PEPORIYAKOU-NATITINGOU
65330 935 262 393 392 0 PPPP PARAKOU
65335 802 247 200 199 0 ---- SAVE
65338 717 206 167 166 0 ---- BOHICON
-65344 635 238 9 5 0 PPPP COTONOU
+65344 635 238 9 5 0 PPTP COTONOU
65351 1087 25 330 329 0 ---- DAPAON
65352 1037 47 146 145 0 ---- MANGO
65355 977 110 343 342 0 ---- NIAMTOUGOU
@@ -8565,7 +8591,7 @@
65528 950 -757 421 434 0 ---- ODIENNE
65536 942 -562 381 381 0 ---- KORHOGO
65545 805 -278 370 369 0 ---- BONDOUKOU
-65548 738 -752 340 339 0 PPPP MAN
+65548 738 -752 340 339 0 PPTP MAN
65555 773 -507 376 376 0 ---- BOUAKE
65557 613 -595 210 205 0 ---- GAGNOA
65560 687 -647 277 276 0 ---- DALOA
@@ -8580,7 +8606,7 @@
65660 625 -1035 18 8 0 ---- ROBERTS FIELD
66104 -555 1218 20 25 0 ---- CABINDA
66116 -587 1343 0 0 0 ---- NOQUI
-66118 -627 1425 0 0 0 ---- NBANZA-KONGO
+66118 -627 1425 567 0 0 ---- NBANZA-KONGO
66121 -603 1512 920 920 2 ---- MAQUELA DO ZOMBO
66130 -723 1287 17 18 0 ---- N'ZETO (AMBRIZETE)
66136 -717 1427 0 540 0 ---- TOTO
@@ -8790,15 +8816,22 @@
68018 -1792 1977 0 1102 2 ---- RUNDU
68024 -2170 2165 1100 1131 2 ---- GHANZI
68026 -1837 2185 1000 1032 2 ---- SHAKAWE
+68027 -1936 2228 970 0 0 ---- TUBU
+68028 -1902 2397 931 0 0 ---- MABABE
68029 -1782 2515 1000 968 2 ---- KASANE
68030 -1853 2563 1071 0 0 ---- PANDAMATENGA
68031 -1932 2342 0 964 0 ---- MOREMI
68032 -1998 2342 900 945 2 ---- MAUN
68034 -2025 2508 0 927 0 ---- GWETA
-68038 -2056 2622 904 903 2 -PP- SUA-PAN
+68035 -2020 2526 998 0 0 ---- GWETA
+68037 -2013 2722 1045 0 0 ---- MAITENGWE
+68038 -2055 2608 904 903 2 -PP- SUA-PAN
68040 -2142 2560 985 986 2 ---- LETLHAKANE
68054 -2132 2747 0 1009 2 ---- FRANCISTOWN
68070 -2205 2782 892 0 0 ---- SELEBI-PHIKWE
+68084 -2234 2303 996 0 0 ---- XADE
+68086 -2241 2672 1100 0 0 ---- SEROWE
+68088 -2249 2870 840 0 0 ---- BAINES DRIFT
68098 -2298 1465 88 88 0 ---- WALVIS BAY AIRPORT
68102 -2011 1614 0 1250 2 ---- OUTJO
68104 -2288 1443 0 7 0 ---- WALVIS BAY (PELICAN POINT)
@@ -8809,6 +8842,7 @@
68112 -2248 1747 0 1719 2 ---- HOSEA KUTAKO INTERNATIONAL AIRPORT
68114 -2142 1593 1217 1217 2 ---- OMARURU
68116 -2247 1897 0 1445 2 ---- GOBABIS
+68140 -2313 2027 1240 0 0 ---- NCOJANE
68148 -2308 2680 1006 991 2 ---- MAHALAPYE
68151 -2336 2585 0 1020 0 ---- LEPHEPE
68155 -2368 2770 839 839 2 ---- LEPHALALE
@@ -8828,8 +8862,10 @@
68194 -2245 3132 202 202 0 ---- PAFURI
68196 -2268 3102 457 0 0 ---- PUNDA MARIA
68212 -2450 1787 1100 1108 2 ---- MARIENTAL
+68218 -2371 2108 1172 0 0 ---- NGWATLE
68220 -2367 2417 0 1100 0 ---- KHUTSE
68226 -2402 2188 1100 1118 2 ---- TSHANE
+68228 -2406 2330 1096 0 0 ---- MOTOKWE
68234 -2460 2467 1200 1189 2 ---- JWANENG
68239 -2583 2353 1181 1182 2 ---- POMFRET
68240 -2455 2592 0 1005 0 PPTP SERETSE KHAMA INTERNATIONAL AIRPORT
@@ -8866,6 +8902,7 @@
68320 -2527 2325 1000 1046 2 ---- WERDA
68322 -2647 2061 882 882 2 ---- TWEE RIVIEREN
68325 -2545 2542 1000 1275 2 ---- GOOD HOPE
+68326 -2687 2071 863 0 0 ---- VAALHOEK
68328 -2605 2245 1000 960 2 ---- TSABONG
68329 -2688 2205 938 930 2 ---- VAN ZYLSRUS
68331 -2767 2301 1186 1186 2 ---- KATHU
@@ -9044,76 +9081,76 @@
68992 -5440 328 42 42 0 ---- BOUVET ISLAND
68994 -4688 3786 24 0 0 T-T- MARION ISLAND
68999 -3396 1860 46 46 0 ---- CT-AWS
-70026 7129 -15676 16 15 0 T-T- BARROW/W. POST W. ROGERS, AK
+70026 7129 -15678 12 12 0 T-T- BARROW/W. POST W. ROGERS
70086 7013 -14363 15 2 0 ---- BARTER ISLAND
70104 6888 -16613 0 3 0 ---- CAPE LISBURNE AFS
70116 6562 -16805 5 9 0 ---- WALES
70117 6556 -16792 0 83 0 ---- TIN CITY AFS
70119 6525 -16687 5 3 0 ---- PORT CLARENCE
70121 6981 -16291 0 0 0 ---- POINT LAY
-70133 6689 -16260 5 5 0 T-T- KOTZEBUE, RALPH WIEN
+70133 6689 -16261 5 5 0 T-T- KOTZEBUE, RALPH WIEN
70162 6937 -15213 85 81 0 ---- UMIAT
70173 6600 -15369 0 389 0 ---- INDIAN MOUNTAIN AFS
70174 6692 -15152 196 196 0 ---- BETTLES
-70178 6518 -15211 67 69 0 ---- TANANA
+70178 6517 -15210 67 69 0 ---- TANANA
70194 6656 -14527 135 0 0 ---- FORT YUKON
70197 6548 -14466 252 0 0 PPPP CENTRAL, AK
-70200 6451 -16544 12 7 0 T-T- NOME, AK
+70200 6451 -16543 12 7 0 T-T- NOME, AK
70207 6388 -16080 6 6 0 ---- UNALAKLEET
70212 6178 -16603 0 146 0 ---- CAPE ROMANZOFF AFS
70218 6000 -16600 0 0 0 ---- NUNIVAK
70219 6078 -16184 42 33 0 T-T- BETHEL/BETHEL AIRPORT, AK
70222 6473 -15693 49 46 0 ---- GALENA A.
-70231 6295 -15560 103 103 0 T-T- MCGRATH, AK
+70231 6296 -15560 103 103 0 T-T- MCGRATH, AK
70232 6158 -15953 26 26 0 ---- ANIAK
70235 6110 -15557 0 484 0 ---- SPARREVOHN AFS
70246 6390 -15227 214 208 0 ---- MINCHUMINA
70248 6252 -15388 458 468 0 ---- FAREWELL/INTERMEDIATE FIELD
70249 6210 -15275 0 560 0 ---- PUNTILLA
-70251 6232 -15009 109 109 0 ---- TALKEETNA
+70251 6230 -15010 109 109 0 ---- TALKEETNA
70252 6230 -15041 151 0 0 PPPP TALKEETNA, AK
-70259 6057 -15124 29 28 0 ---- KENAI, AK
-70260 6455 -14907 0 110 0 T-T- NENANA/MUN.
-70261 6481 -14786 135 134 0 T-T- FAIRBANKS/INT., AK
+70259 6057 -15125 29 28 0 ---- KENAI
+70260 6455 -14908 0 110 0 ---- NENANA/MUN.
+70261 6481 -14788 135 134 0 T-T- FAIRBANKS/INT., AK
70264 6333 -14913 0 734 0 ---- SUMMIT
70265 6465 -14707 167 0 0 ---- FAIRBANKS/EIELSON AFB
70266 6397 -14569 398 0 0 T-TT FORT GREELY, AK
-70267 6399 -14572 391 0 0 ---- FORT GREELY/ALLEN AAF, AK
+70267 6400 -14572 391 0 0 ---- FORT GREELY/ALLEN AAF, AK
70268 6210 -14597 573 0 0 PPPP GLENNALLEN, AK
70270 6127 -14965 115 0 0 ---- FT. RICHARDSON/BRYANT AHP, AK
-70271 6215 -14546 481 481 0 ---- GULKANA/INTL. FLD, AK
+70271 6215 -14544 481 481 0 ---- GULKANA/INTL. FLD
70272 6125 -14980 59 0 0 ---- ANCHORAGE/ELMENDORF AFB
-70273 6118 -14999 44 52 0 T-T- ANCHORAGE/INT., AK
-70274 6160 -14909 0 71 0 ---- PALMER
+70273 6116 -14999 44 52 0 T-T- ANCHORAGE/INT., AK
+70274 6160 -14908 0 71 0 ---- PALMER
70275 6113 -14635 10 11 0 ---- VALDEZ
70277 6012 -14944 18 9 0 ---- SEWARD
70279 6023 -14665 56 56 0 ---- CAPE HINCHINBROOK
-70291 6296 -14193 525 523 0 ---- NORTHWAY
-70296 6049 -14547 13 12 0 ---- CORDOVA/MILE 13
+70291 6297 -14193 525 523 0 ---- NORTHWAY
+70296 6050 -14550 13 12 0 ---- CORDOVA/MILE 13
70298 6008 -14250 11 4 0 ---- YAKATAGA
70305 5865 -16207 0 161 0 ---- CAPE NEWENHAM AFS
-70308 5717 -17022 10 6 0 T-T- ST. PAUL ISLANDS, AK
-70316 5521 -16272 32 25 0 T-T- COLD BAY, AK
+70308 5715 -17022 9 10 0 T-T- ST. PAUL ISLANDS, AK
+70316 5520 -16272 32 25 0 T-T- COLD BAY, AK
70321 5905 -15852 29 26 0 ---- DILLINGHAM MUNI, AK
-70326 5868 -15665 16 8 0 T-T- KING SALMON, AK
+70326 5868 -15666 16 8 0 T-T- KING SALMON, AK
70333 5695 -15862 0 29 0 ---- PORT HEIDEN
-70340 5975 -15491 49 63 0 ---- ILIAMNA/ILIAMNA AIRPORT, AK
-70341 5965 -15147 22 24 0 ---- HOMER/MUNICIPAL, AK
+70340 5975 -15491 49 63 0 ---- ILIAMNA/ILIAMNA AIRPORT
+70341 5963 -15150 22 24 0 ---- HOMER/MUNICIPAL
70343 5943 -14633 14 27 0 ---- MIDDLETON ISLAND, AK
-70350 5775 -15249 34 6 0 T-T- KODIAK, AK
-70361 5950 -13966 14 12 0 T-T- YAKUTAT, AK
-70362 5946 -13531 5 16 0 ---- SKAGWAY
+70350 5774 -15249 35 5 0 T-T- KODIAK, AK
+70361 5952 -13966 13 11 0 T-T- YAKUTAT, AK
+70362 5947 -13530 5 16 0 ---- SKAGWAY
70367 5842 -13572 9 11 0 ---- GUSTAVUS
-70371 5705 -13536 20 6 0 ---- SITKA
-70381 5836 -13457 7 5 0 ---- JUNEAU
+70371 5707 -13535 20 6 0 ---- SITKA
+70381 5837 -13458 7 5 0 ---- JUNEAU
70383 5750 -13458 11 0 0 ---- ANGOON
70385 5727 -13362 11 0 0 ---- FIVE FINGER LIGHT
70386 5682 -13297 0 0 0 ---- PETERSBURG
70387 5648 -13237 13 13 0 ---- WRANGELL
-70395 5535 -13171 29 29 0 ---- KETCHIKAN, INTL.
-70398 5504 -13157 34 35 0 T-T- ANNETTE ISLAND, AK
+70395 5535 -13169 29 29 0 ---- KETCHIKAN, INTL.
+70398 5504 -13158 35 35 0 T-T- ANNETTE ISLAND, AK
70409 5283 17318 0 21 0 ---- ATTU
-70414 5271 17411 31 29 0 T-T- SHEMYA AFB
+70414 5272 17410 31 29 0 T-T- SHEMYA AFB
70482 5295 -16885 0 21 0 ---- NIKOLSKI
71001 6137 -13904 0 805 0 ---- BURWASH A, YT
71002 5356 -6411 0 440 0 ---- CHURCHILL FALLS A, NFLD
@@ -9237,6 +9274,7 @@
71123 5332 -11358 0 723 0 ---- EDMONTON INT'L A, ALTA
71124 5355 -11410 0 766 0 ---- EDMONTON STONY PLAIN CS, ALTA
71125 5413 -10852 0 481 0 ---- MEADOW LAKE A, SASK
+71126 5355 -11411 0 766 0 T-T- EDMONTON STONY PLAIN, ALTA
71127 5355 -11411 0 766 0 ---- EDMONTON STONY PLAIN CS, ALTA
71129 5152 -10918 0 694 0 ---- KINDERSLEY A, SASK
71130 5333 -10401 0 372 0 ---- NIPAWIN, SASK
@@ -10053,287 +10091,287 @@
71989 7623 -11935 0 2 0 ---- MOULD BAY CS, NWT
71990 6324 -13004 0 1379 0 ---- MACMILLAN PASS, YT
71999 5068 -12193 243 240 0 ---- LILLOOET, BC
-72201 2456 -8176 6 2 0 T-T- KEY WEST/INT., FL
+72201 2455 -8179 5 13 0 T-T- KEY WEST/INT., FL
72202 2575 -8038 5 4 0 ---- MIAMI, FL
72202 2575 -8038 5 4 0 T-T- MIAMI, FL
-72203 2668 -8009 6 7 0 T-T- WEST PALM BEACH/ INT. FL.
-72205 2842 -8131 32 29 0 T-T- ORLANDO/JETPORT FL.
+72203 2668 -8009 6 7 0 ---- WEST PALM BEACH/ INT. FL.
+72205 2843 -8131 32 29 0 ---- ORLANDO/JETPORT FL.
72206 3048 -8170 11 10 0 T-T- JACKSONVILLE/INTNL., FL.
-72207 3213 -8120 16 15 0 T-T- SAVANNAH/MUNICIPAL, GA.
-72208 3290 -8004 14 13 0 T-T- CHARLESTON/MUN., SC.
+72207 3213 -8120 15 15 0 ---- SAVANNAH/MUNICIPAL, GA.
+72208 3290 -8003 14 13 0 T-T- CHARLESTON/MUN., SC.
72209 3188 -8156 14 14 0 TPTP FT. STEWART, GA
-72210 2771 -8240 15 13 0 T-T- TAMPA BAY, FL.
-72211 2798 -8253 0 8 0 T-T- TAMPA/INT., FL.
-72212 2963 -8311 13 13 0 T-T- CROSS CITY/CROSS CITY A., FL.
+72210 2771 -8240 15 13 0 T-T- TAMPA BAY AREA, FL.
+72211 2797 -8253 3 8 0 ---- TAMPA/INT., FL.
+72212 2962 -8310 13 13 0 ---- CROSS CITY/CROSS CITY A., FL.
72213 3125 -8240 46 46 0 ---- WAYCROSS/WARE CO., GA
-72214 3039 -8435 53 53 0 T-T- TALLAHASSEE/MUN., FL.
-72215 3336 -8457 257 245 0 T-T- PEACHTREE CITY, GA.
-72216 3154 -8419 59 60 0 ---- ALBANY/MUN., GA
-72217 3269 -8365 110 108 0 T-T- MACON/LEWIS B.WILSON, GA.
-72218 3336 -8196 45 44 0 T-T- AUGUSTA/BUSH FIELD, GA.
-72219 3364 -8443 315 312 0 T-T- ATLANTA/MUN., GA.
-72220 2973 -8502 6 6 0 ---- APALACHICOLA/MUN., FL.
+72214 3045 -8430 53 53 0 T-T- TALLAHASSEE/MUN., FL.
+72215 3336 -8457 245 245 0 T-T- PEACHTREE CITY, GA.
+72216 3153 -8418 59 60 0 ---- ALBANY/MUN., GA
+72217 3270 -8365 110 108 0 ---- MACON/LEWIS B.WILSON, GA.
+72218 3336 -8197 45 44 0 ---- AUGUSTA/BUSH FIELD, GA.
+72219 3365 -8442 315 312 0 ---- ATLANTA/MUN., GA.
+72220 2973 -8503 6 6 0 ---- APALACHICOLA/MUN., FL.
72221 3048 -8652 29 0 0 --T- VALPARAISO/EGLIN AFB, FL.
72222 3048 -8718 38 36 0 ---- PENSACOLA, FL
-72223 3069 -8824 67 66 0 T-T- MOBILE/BATES FIELD, AL.
+72223 3068 -8825 67 66 0 ---- MOBILE/BATES FIELD, AL.
72224 2968 -8537 0 2 0 P-T- CAPE SAN BLAS, FL.
72225 3233 -8483 130 0 0 --TT FORT BENNING, GA (ARMY)
-72226 3229 -8641 62 67 0 T-T- MONTGOMERY/DANNELLY, AL.
+72226 3229 -8640 62 67 0 ---- MONTGOMERY/DANNELLY, AL.
72227 3392 -8452 326 0 0 ---- MARIETTA/DOBBINS AFB, GA.
-72228 3357 -8674 192 196 0 T-T- BIRMINGHAM/MUN., AL.
+72228 3357 -8675 192 196 0 ---- BIRMINGHAM/MUN., AL.
72229 3290 -8725 140 140 0 ---- CENTREVILLE, AL.
72230 3318 -8678 175 174 0 T-T- BIRMINGHAM, AL
-72231 2999 -9026 7 1 0 T-T- NEW ORLEANS/MOISANT INT., LA.
+72231 2998 -9025 9 1 0 ---- NEW ORLEANS/MOISANT INT., LA.
72232 3054 -9115 21 0 0 ---- BATON ROUGE, LA, BATON ROUGE METROPOLITAN, RYAN FIELD ARPT
72233 3034 -8982 11 10 0 T-T- SLIDELL/MUN. LA
-72234 3233 -8874 94 91 0 T-T- MERIDIAN/KEY, MS.
+72234 3233 -8875 94 91 0 ---- MERIDIAN/KEY, MS.
72235 3232 -9008 91 91 0 T-T- JACKSON/ALLEN C. THOMPSON FIELD, MS.
-72239 3104 -9319 3 0 0 --T- FORT POLK, LA. (ARMY)
-72240 3013 -9322 6 5 0 T-T- LAKE CHARLES/MUN., LA.
-72241 2995 -9402 5 5 0 T-T- PORT ARTHUR/JEFFERSON CO., TX.
-72242 2926 -9486 16 2 0 ---- GALVESTON, TX.
-72243 2998 -9534 33 30 0 T-T- HOUSTON/INTERCONTINENTAL, TX.
+72239 3103 -9303 110 0 0 --T- FORT POLK, LA. (ARMY)
+72240 3013 -9322 6 5 0 T-T- LAKE CHARLES/MUN., LA.
+72241 2995 -9402 7 5 0 ---- PORT ARTHUR/JEFFERSON CO., TX.
+72242 2930 -9480 16 2 0 ---- GALVESTON, TX.
+72243 2997 -9535 33 30 0 ---- HOUSTON/INTERCONTINENTAL, TX.
72244 2964 -9528 15 0 0 ---- HOUSTON, TX WILLIAM P HOBBY ARPT
-72247 3238 -9471 0 124 0 T-T- LONGVIEW, TX.
-72248 3245 -9382 85 85 0 T-T- SHREVEPORT/REG., LA.
+72247 3235 -9465 124 124 0 ---- LONGVIEW, TX
+72248 3245 -9384 85 85 0 T-T- SHREVEPORT/REG., LA.
72249 3284 -9730 199 195 0 T-T- FORT WORTH, TX.
-72250 2591 -9743 8 7 0 T-T- BROWNSVILLE/INT., TX
-72251 2778 -9751 15 15 0 T-T- CORPUS CHRISTI/INT., TX.
-72253 2953 -9847 242 247 0 T-T- SAN ANTONIO/INT., TX.
+72250 2592 -9742 8 7 0 T-T- BROWNSVILLE/INT., TX
+72251 2778 -9751 15 15 0 T-T- CORPUS CHRISTI/INT., TX.
+72253 2953 -9847 242 247 0 ---- SAN ANTONIO/INT., TX.
72254 3030 -9770 189 193 0 ---- AUSTIN/CTY, TX.
-72255 2885 -9692 36 32 0 T-T- VICTORIA/VICTORIA REGIONAL, TX.
-72256 3161 -9723 155 157 0 T-T- WACO, MADISON-COOPER, TX.
+72255 2885 -9692 36 32 0 ---- VICTORIA/VICTORIA REGIONAL, TX.
+72256 3162 -9722 155 157 0 ---- WACO, MADISON-COOPER, TX.
72257 3110 -9733 270 0 0 --T- FORT HOOD, TX. (ARMY)
72258 3285 -9685 156 0 0 ---- DALLAS, TX, DALLAS LOVE FIELD ARPT
-72259 3290 -9704 182 182 0 T-T- DALLAS-FORT WORTH/FORT WORTH REG.AIRPORT, TX.
+72259 3290 -9703 182 182 0 ---- DALLAS-FORT WORTH/FORT WORTH REG.AIRPORT, TX.
72260 3222 -9818 402 402 0 ---- STEPHENVILLE/CLARK FIELD MUN., TX.
72261 2937 -10092 315 314 0 T-T- DEL RIO/INT., TX.
-72262 3183 -10480 0 1662 0 T-T- GUADELUPE PASS, TX.
+72262 3183 -10480 0 1662 0 ---- GUADELUPE PASS, TX.
72262 3183 -10481 0 1692 0 T-T- PINE SPRINGS, TX
-72263 3137 -10049 582 584 0 T-T- SAN ANGELO/MATHIS, TX.
+72263 3137 -10050 582 584 0 ---- SAN ANGELO/MATHIS, TX.
72264 3037 -10402 1481 1478 0 ---- MARFA/MUN., TX.
72265 3194 -10219 874 875 0 T-T- MIDLAND/MIDLAND REG. AIR TERM., TX.
-72266 3240 -9968 546 542 0 T-T- ABILENE/MUN., TX.
-72267 3365 -10181 988 996 0 T-T- LUBBOCK/LUBBOCK INTERNATIONAL, TX.
-72268 3329 -10453 1118 1118 0 T-TP ROSWELL/INDUSTRIAL AIR CENTER, NM
+72266 3242 -9968 546 542 0 ---- ABILENE/MUN., TX.
+72267 3365 -10182 988 996 0 ---- LUBBOCK/LUBBOCK INTERNATIONAL, TX.
+72268 3329 -10453 1118 1118 0 ---P ROSWELL/INDUSTRIAL AIR CENTER, NM
72269 3238 -10648 1244 0 0 -TTT WHITE SANDS, NM.
-72270 3181 -10638 1194 1206 0 T-T- EL PASO/INT., TX.
-72271 3324 -10727 1481 1481 0 ---- TRUTH OR CONSEQUENCES, NM
+72270 3180 -10640 1194 1206 0 ---- EL PASO/INT., TX.
+72271 3322 -10727 1481 1481 0 ---- TRUTH OR CONSEQUENCES, NM
72272 3147 -10960 1251 0 0 ---- DOUGLAS BISBEE, AZ, BISBEE DOUGLAS INT. ARPT
72273 3158 -11033 1428 0 0 ---P FORT HUACHUCA, AZ.
-72274 3213 -11096 747 741 0 T-T- TUCSON, AZ.
-72278 3343 -11200 337 344 0 T-T- PHOENIX/SKY HARBOR, INT, AZ.
+72274 3222 -11096 747 751 0 T-T- TUCSON, AZ
+72278 3343 -11202 337 344 0 ---- PHOENIX/SKY HARBOR, INT, AZ.
72280 3265 -11460 34 0 0 --P- YUMA/YUMA INT., AZ.
72281 3282 -11568 18 0 0 ---- EL CENTRO NAF, CA.
72286 3390 -11725 468 0 0 ---- RIVERSIDE/MARCH AFB. CA.
72288 3420 -11836 0 0 0 ---- BURBANK, CA
72289 3422 -11807 0 1739 0 ---- MOUNT WILSON, CA.
-72290 3272 -11718 9 5 0 T-T- SAN DIEGO/LINDBERGH, CA.
-72291 3325 -11945 174 153 0 ---T SAN NICOLAS IS./NF, CA.
+72290 3272 -11717 9 5 0 ---- SAN DIEGO/LINDBERGH, CA.
+72291 3327 -11955 9 9 0 ---T SAN NICOLAS IS./NF, CA.
72292 3340 -11842 0 0 0 ---- AVALON, CA
-72293 3286 -11714 135 137 0 T-T- SAN DIEGO/MIRAMAR, NAS, CA.
-72295 3394 -11839 32 38 0 T-T- LOS ANGELES /INT., CA.
-72297 3381 -11815 12 18 0 T-T- LONG BEACH/LB AIRP. DAUGHERTY FIELD, CA.
+72293 3283 -11712 134 134 0 T-T- SAN DIEGO/MIRAMAR, NAS, CA.
+72295 3393 -11840 32 38 0 ---- LOS ANGELES /INT., CA.
+72297 3382 -11815 12 18 0 ---- LONG BEACH/LB AIRP. DAUGHERTY FIELD, CA.
72301 3574 -8139 357 0 0 ---- HICKORY, NC, HICKORY RGNL ARPT
72302 3427 -7790 10 10 0 ---- WILMINGTON, NC.
72303 3517 -7903 0 61 0 PPTT POPE AFB, NC.
72304 3527 -7555 3 2 0 ---- CAPE HATTERAS, NC.
72305 3478 -7688 11 11 0 T-T- NEWPORT, NC.
-72306 3588 -7879 134 132 0 T-T- RALEIGH/RALEIGH-DURHAM, NC.
+72306 3586 -7878 134 132 0 ---- RALEIGH/RALEIGH-DURHAM, NC.
72307 3626 -7618 12 0 0 ---- ELIZABETH CITY, NC, ELIZABETH CITY CG AIR STATION-RGNL ARPT
-72308 3690 -7619 9 8 0 T-T- NORFOLK/INT., VA.
-72309 3485 -7688 13 0 0 ---- CHERRY POINT/MCAS, NC.
-72310 3395 -8112 69 72 0 T-T- WEST COLUMBIA, SC.
-72311 3395 -8333 244 246 0 T-T- ATHENS/MUN., GA.
-72312 3490 -8221 296 293 0 T-T- GREER, SC.
-72314 3521 -8094 234 228 0 T-T- CHARLOTTE/DOUGLAS, NC.
-72315 3543 -8254 661 659 0 ---- FLETCHER, NC
+72308 3690 -7620 9 8 0 ---- NORFOLK/INT., VA.
+72309 3485 -7688 13 0 0 ---- CHERRY POINT/MCAS, NC.
+72310 3395 -8112 69 72 0 ---- COLUMBIA, SC.
+72311 3395 -8332 247 246 0 ---- ATHENS/MUN., GA.
+72312 3490 -8222 296 293 0 ---- GREENVILLE/GREENVILLE SPARTANBURG, SC.
+72314 3522 -8093 234 228 0 ---- CHARLOTTE/DOUGLAS, NC.
+72315 3543 -8255 661 659 0 ---- ASHEVILLE/MUN., NC.
72316 3154 -8251 44 0 0 ---- ALMA GA BACON COUNTY ARPT
72317 3610 -7994 277 277 0 T-T- GREENSBORO/G.-HIGH PT., NC.
72318 3720 -8041 642 639 0 T-T- BLACKSBURG, VA.
72319 3449 -8270 240 0 0 ---- ANDERSON RGNL ARPT
72320 3435 -8517 196 196 0 ---- ROME, GA
-72323 3464 -8679 196 191 0 T-T- HUNTSVILLE/MADISON CO., AL.
-72324 3502 -8520 210 208 0 T-T- CHATTANOOGA/LOVELL FIELD, TN.
+72323 3465 -8677 196 191 0 ---- HUNTSVILLE/MADISON CO., AL.
+72324 3503 -8520 210 208 0 ---- CHATTANOOGA/LOVELL FIELD, TN.
72325 3595 -8508 571 0 0 ---- CROSSVILLE, TN, CROSVILLE MEMORIAL-WHITSON FIELD ARPT
-72326 3581 -8399 299 299 0 T-T- KNOXVILLE/MUN., TN.
+72326 3582 -8398 299 299 0 ---- KNOXVILLE/MUN., TN.
72327 3622 -8655 173 180 0 ---- NASHVILLE/METROPOLITAN, TN.
72327 3625 -8656 173 180 0 T-T- NASHVILLE/OLD HICKORY, TN.
72328 3661 -8742 171 0 0 ---- CLARKSVILLE, TN OUTLASW FIELD ARPT
72329 3722 -8957 103 0 0 ---- CAPE GIRARDEAU, MO, CAPE GIRARDEAU RGNL ARPT
72330 3677 -9047 146 0 0 ---- POPLAR BLUFF, MO.
-72332 3427 -8877 110 110 0 ---- TUPELO/C.D. LEMONS MUN, MS
-72334 3506 -8998 87 101 0 T-T- MEMPHIS/INTNL., TN.
+72332 3427 -8877 0 110 0 ---- TUPELO/C.D. LEMONS MUN, MS
+72334 3504 -9000 87 101 0 ---- MEMPHIS/INTNL., TN.
72335 3647 -8240 469 0 0 ---- BRISTOL-JOHNSON-KINGSPORT, TN, TRI-CITIES RGNL TN-VA ARPT
72340 3484 -9226 173 173 0 T-T- LITTLE ROCK/ADAMS FLD, AR.
72341 3468 -9462 883 0 0 ---- PAGE, OK.
-72344 3533 -9436 141 143 0 T-T- FORT SMITH/MUN., AR.
+72344 3533 -9437 141 143 0 ---- FORT SMITH/MUN., AR.
72345 3626 -9316 421 0 0 ---- HARRISON, AR, BOONE COUNTY ARPT
72348 3672 -9185 308 307 0 ---- WEST PLAINS, MO
72349 3690 -9402 437 437 0 ---- MONETTE, MO.
-72351 3399 -9849 314 309 0 T-T- WICHITA FALLS/SHEPS AFB/WICHITA FALLS/MUN., TX.
+72351 3397 -9848 314 309 0 ---- WICHITA FALLS/SHEPS AFB/WICHITA FALLS/MUN., TX.
72352 3465 -9927 420 0 0 ---- ALTUS AFB, OK.
-72353 3539 -9760 397 395 0 T-T- OKLAHOMA CITY/W. ROGERS WORLD, OK.
+72353 3538 -9760 398 395 0 ---- OKLAHOMA CITY/W. ROGERS WORLD, OK.
72354 3542 -9738 397 0 0 ---- TINKER AFB, OK.
72355 3460 -9840 360 0 0 --TT FORT SILL, OK. (ARMY)
-72356 3620 -9589 195 207 0 T-T- TULSA/INT., OK.
+72356 3620 -9588 195 207 0 ---- TULSA/INT., OK.
72357 3518 -9744 345 345 0 T-T- NORMAN/MAX WESTHEIMER A, OK.
-72360 3644 -10315 1515 1515 0 T-T- CLAYTON/MUN., NM.
+72360 3645 -10315 1515 1515 0 ---- CLAYTON/MUN., NM.
72363 3522 -10171 1095 1095 0 T-T- AMARILLO/INTL., TX.
72364 3187 -10670 1254 1254 0 T-T- SANTA TERESA, NM.
-72365 3504 -10661 1619 1619 0 T-T- ALBUQUERQUE/INT., NM.
+72365 3504 -10662 1619 1619 0 T-T- ALBUQUERQUE/INT., NM.
72366 3443 -10029 595 0 0 ---- CHILDRESS, TX CHILDRESS MUNI ARPT
-72370 3526 -11394 1033 1050 0 T-T- KINGMAN/MOHAVE COUNTY A., AZ.
-72371 3694 -11145 1304 1314 0 T-T- PAGE/PAGE A., AZ
-72374 3503 -11072 1488 1505 0 T-T- WINSLOW, AZ.
-72376 3522 -11182 2182 2179 0 T-T- FLAGSTAFF, AZ
+72370 3527 -11393 1033 1050 0 ---- KINGMAN/MOHAVE COUNTY A., AZ.
+72371 3693 -11145 1304 1314 0 ---- PAGE/PAGE A., AZ
+72374 3502 -11073 1488 1505 0 ---- WINSLOW, AZ
+72376 3522 -11182 2181 2179 0 T-T- FLAGSTAFF, AZ
72381 3492 -11790 705 0 0 ---- EDWARDS AFB, CA.
72382 3463 -11808 774 775 0 ---- PALMDALE/INT., CA.
-72383 3474 -11872 1379 1377 0 T-T- SANDBERG, CA.
-72384 3543 -11905 150 149 0 T-T- BAKERSFIELD/MEADOWS, CA.
-72386 3607 -11516 698 697 0 T-T- LAS VEGAS/MCCARRAN, NV.
-72387 3661 -11602 1009 1006 0 T-T- MERCURY/DESERT ROCK, NV.
-72389 3678 -11972 100 101 0 T-T- FRESNO/AIR TERM., CA.
+72383 3475 -11873 1379 1377 0 ---- SANDBERG, CA.
+72384 3543 -11905 150 149 0 ---- BAKERSFIELD/MEADOWS, CA.
+72386 3608 -11517 664 662 0 ---- LAS VEGAS/MCCARRAN, NV.
+72387 3661 -11602 1006 1006 0 T-T- MERCURY/DESERT ROCK, NV.
+72389 3677 -11972 100 101 0 ---- FRESNO/AIR TERM., CA.
72390 3567 -12128 21 0 0 ---- SAN SIMEON/PT. PIEDRAS BLANCAS CGLS, CA.
72391 3411 -11912 0 0 0 ---- POINT MUGU/NAS, CA.
72393 3475 -12057 121 0 0 T-T- VANDENBERG AFB, CA.
72394 3490 -12045 73 79 0 ---- SANTA MARIA, CA.
72398 3834 -7551 20 0 0 ---- SALISBURY, MD, WSALISBURY-OCEAN CITY WICOMICO RGNL ARPT
72399 4019 -7676 96 0 0 ---- HARRISBURG, PA, HARRISBURG INT. ARPT
-72401 3751 -7731 50 51 0 T-T- RICHMOND/BYRD, VA.
+72401 3750 -7733 54 51 0 ---- RICHMOND/BYRD, VA.
72402 3793 -7548 12 12 0 T-T- WALLOPS ISLAND, VA.
72403 3895 -7745 98 95 0 ---- WASHINGTON/DULLES INT., VA.
72403 3897 -7748 89 88 0 T-T- STERLING, VA.
-72404 3828 -7640 14 0 0 ---- PATUXENT RIVER/NAS, MD.
-72405 3885 -7704 20 5 0 T-T- WASHINGTON/NAT., VA.
-72406 3917 -7667 47 48 0 T-T- BALTIMORE/BALTIMORE-WASHINGTON INT., MD.
-72407 3946 -7458 20 21 0 T-T- ATLANTIC CITY, NJ.
-72408 3986 -7525 9 4 0 T-T- PHILADELPHIA/INT., PA.
+72404 3828 -7640 14 0 0 ---- PATUXENT RIVER/NAS, MD.
+72405 3885 -7703 20 5 0 ---- WASHINGTON/NAT., VA.
+72406 3918 -7667 47 48 0 ---- BALTIMORE/BALTIMORE-WASHINGTON INT., MD.
+72407 3945 -7456 20 21 0 ---- ATLANTIC CITY, NJ.
+72408 3988 -7525 9 4 0 ---- PHILADELPHIA/INT., PA.
72409 4003 -7431 24 0 0 ---- LAKEHURST/NAS, NJ.
-72410 3733 -7920 286 285 0 T-T- LYNCHBURG/MUN. P. GLENN, VA.
-72411 3733 -7998 358 358 0 T-T- ROANOKE/MUN., VA.
-72412 3779 -8112 766 763 0 T-T- BECKLEY (RALEIGH CTY. MEMORIAL AIRPORT), WV.
-72414 3836 -8159 299 299 0 T-T- CHARLESTON/KANAWHA., WV.
-72417 3889 -7986 603 606 0 T-T- ELKINS/ELKINS-RANDOLPH CO., WV.
+72410 3733 -7920 286 285 0 ---- LYNCHBURG/MUN. P. GLENN, VA.
+72411 3732 -7997 358 358 0 ---- ROANOKE/MUN., VA.
+72412 3778 -8112 766 763 0 ---- BECKLEY (RALEIGH CTY. MEMORIAL AIRPORT), WV.
+72414 3836 -8159 299 299 0 ---- CHARLESTON/KANAWHA., WV.
+72417 3888 -7984 609 606 0 ---- ELKINS/ELKINS-RANDOLPH CO., WV.
72418 3967 -7559 23 0 0 ---- WILMINGTON, DE, NEW CASTLE ARPT
72419 3759 -8331 414 0 0 ---- JACKSON, KY, JULIAN CARROL ARPT
72420 4082 -8252 396 0 0 ---- MANSFIELD, OH, MANSFIELD LAHM RGNL ARPT
-72421 3904 -8467 267 271 0 T-T- CINCINNATI/GREATER CINCINNATI, OH.
-72422 3804 -8461 301 298 0 T-T- LEXINGTON/BLUE GRASS, KY.
-72423 3817 -8574 149 151 0 T-T- LOUISVILLE/STANDIFORD, KY.
+72421 3904 -8467 267 271 0 ---- CINCINNATI/GREATER CINCINNATI, OH.
+72422 3803 -8460 301 298 0 ---- LEXINGTON/BLUE GRASS, KY.
+72423 3818 -8573 149 151 0 ---- LOUISVILLE/STANDIFORD, KY.
72424 3790 -8597 230 0 0 --T- FT.KNOX, KY. (ARMY)
72425 3836 -8255 255 252 0 ---- HUNTINGTON, WV.
-72426 3943 -8379 323 323 0 T-T- WILMINGTON, OH.
+72426 3942 -8382 323 323 0 T-T- WILMINGTON, OH.
72427 3602 -8423 279 0 0 ---- OAK RIDGE, TN
-72428 4000 -8289 249 247 0 T-T- COLUMBUS/PORT COLUMBUS, OH.
-72429 3990 -8422 306 307 0 T-T- DAYTON/. COX, OH.
+72428 4000 -8288 254 247 0 ---- COLUMBUS/PORT COLUMBUS, OH.
+72429 3986 -8412 306 307 0 ---- DAYTON/. COX, OH.
72429 3986 -8412 0 0 0 ---- SULPHUR GROVE, OH.
-72432 3804 -8753 118 127 0 T-T- EVANSVILLE/REG., IN.
-72434 3875 -9036 169 174 0 T-T- ST.LOUIS/LAMBERT, ST.LOUIS INT., MO.
-72435 3707 -8877 126 0 0 T-T- PADUCAH, KY.
-72438 3972 -8629 246 243 0 T-T- INDIANAPOLIS/I.-MUN/WEIR COOK, IN.
-72439 3984 -8968 187 181 0 T-T- SPRINGFIELD/CAPITAL, IL.
-72440 3724 -9340 390 391 0 T-T- SPRINGFIELD/MUN., MO.
+72432 3804 -8753 118 127 0 ---- EVANSVILLE/REG., IN.
+72434 3875 -9037 172 174 0 ---- ST.LOUIS/LAMBERT, ST.LOUIS INT., MO.
+72435 3707 -8877 126 0 0 ---- PADUCAH, KY.
+72438 3972 -8627 246 243 0 ---- INDIANAPOLIS/I.-MUN/WEIR COOK, IN.
+72439 3985 -8967 187 181 0 ---- SPRINGFIELD/CAPITAL, IL.
+72440 3722 -9340 390 391 0 T-T- SPRINGFIELD/MUN., MO.
72441 3977 -9491 252 0 0 ---- ST JOSEPH, MO, ROSECRANS MEMORIAL ARPT
72442 3813 -9177 344 0 0 ---- ROLLA-VICHY, MO, ROLLA NATIONAL ARPT
72443 3994 -9119 237 0 0 ---- QUINCY, IL, QUINCY RGNL-BALDWIN FIELD ARPT
-72445 3882 -9220 274 271 0 T-T- COLUMBIA/REGIONAL, MO.
-72446 3929 -9472 312 316 0 T-T- KANSAS CITY, INTNL., MO.
+72445 3882 -9222 274 271 0 ---- COLUMBIA/REGIONAL, MO.
+72446 3928 -9475 313 316 0 ---- KANSAS CITY, INTNL., MO.
72449 3977 -9492 249 252 0 ---- ST. JOSEPH/ROSE-CRANS, MO.
-72450 3765 -9743 408 406 0 T-T- WICHITA/MID-CONTINENT, KS.
-72451 3777 -9997 790 790 0 T-T- DODGE CITY/MUN., KS.
-72452 3728 -9855 469 0 0 T-T- MEDICINE LODGE, KS
+72450 3765 -9743 409 406 0 ---- WICHITA/MID-CONTINENT, KS.
+72451 3776 -9997 790 786 0 T-T- DODGE CITY/MUN., KS.
+72452 3729 -9858 468 0 0 ---- MEDICINE LODGE, KS
72453 3672 -9710 309 0 0 ---- PONCA CITY, OK PONCA CITY RGNL ARPT
72455 3910 -9677 320 0 0 --TT FORT RILEY, KS. (ARMY)
72456 3907 -9563 269 268 0 T-T- TOPEKA/MUN., KS.
-72458 3954 -9765 452 453 0 T-T- CONCORDIA/BLOSSER MUN., KS.
+72458 3954 -9765 452 453 0 ---- CONCORDIA/BLOSSER MUN., KS.
72460 3700 -10188 1102 0 0 ---- ELKHART/ELKHART-MORTON COUNTY A., KS
-72462 3744 -10587 2299 2297 0 T-T- ALAMOSA, CO.
-72464 3828 -10452 1439 1441 0 T-T- PUEBLO/MEMORIAL, CO.
-72465 3936 -10170 1124 1114 0 T-T- GOODLAND/RENNER FIELD/GOODLAND/MUN. KS.
-72466 3881 -10470 1881 1873 0 T-T- COLORADO SPRINGS/MUNICIPAL, CO.
+72462 3743 -10587 2299 2297 0 ---- ALAMOSA, CO.
+72464 3828 -10450 1439 1441 0 ---- PUEBLO/MEMORIAL, CO.
+72465 3936 -10168 1124 1114 0 ---- GOODLAND/RENNER FIELD/GOODLAND/MUN. KS.
+72466 3882 -10472 1881 1873 0 ---- COLORADO SPRINGS/MUNICIPAL, CO.
72468 3870 -10477 1789 0 0 --TT FORT CARSON, CO. (ARMY)
72469 3977 -10487 1612 1611 0 T-T- DENVER/STAPLETON INT., CO.
-72470 3961 -11075 1785 1796 0 T-T- PRICE/CARBON COUNTY A., UT.
+72470 3961 -11075 1799 1796 0 ---- PRICE/CARBON COUNTY A., UT.
72475 3842 -11302 1536 1536 0 ---- MILFORD MUNICIPAL, UT.
72476 3911 -10852 1473 1474 0 T-T- GRAND JUNCTION/WALKER FIELD, CO.
72477 3960 -11601 1811 0 0 ---- EUREKA, NV, RAMOS
-72480 3736 -11836 1263 1255 0 T-T- BISHOP, CA.
+72480 3736 -11837 1263 1255 0 ---- BISHOP, CA.
72481 3736 -12057 60 0 0 PPPP MERCED/CASTLE AFB, CA.
72483 3852 -12150 8 6 0 ---- SACRAMENTO/EXECUTIVE CA.
72486 3929 -11485 1908 1907 0 ---- ELY/YELLAND, NV.
72487 3761 -11452 1335 0 0 ---- CALIENTE, NV.
-72488 3947 -11977 1341 1344 0 T-T- RENO/INT., NV.
+72488 3950 -11978 1341 1344 0 ---- RENO/INT., NV.
72489 3957 -11980 1515 1518 0 T-T- RENO, NV.
72491 3660 -12185 46 0 0 ---- MONTEREY/NAF, CA.
-72492 3789 -12123 8 9 0 T-T- STOCKTON/METROPOLITAN CA.
-72493 3772 -12222 4 3 0 T-T- OAKLAND/METROP. OAKLAND INT., CA.
-72494 3765 -12244 5 6 0 T-T- SAN FRANCISCO/INT., CA.
+72492 3790 -12125 8 9 0 ---- STOCKTON/METROPOLITAN CA.
+72493 3774 -12222 4 3 0 T-T- OAKLAND/METROP. OAKLAND INT., CA.
+72494 3761 -12238 5 6 0 ---- SAN FRANCISCO/INT., CA.
72495 3799 -12205 12 0 0 ---- CONCORD, CA BUCHANAN FIELD ARPT
72501 4086 -7286 26 20 0 T-T- UPTON, NY.
-72502 4069 -7417 9 5 0 ---- NEWARK/INT., NJ.
-72503 4078 -7387 9 7 0 T-T- NEW YORK/LA GUARDIA, NY.
-72504 4116 -7313 5 3 0 ---- BRIDGEPORT/IGOR I. SIKORSKY MEM., CT.
+72502 4070 -7417 9 5 0 ---- NEWARK/INT., NJ.
+72503 4077 -7390 9 7 0 ---- NEW YORK/LA GUARDIA, NY.
+72504 4117 -7313 5 3 0 ---- BRIDGEPORT/IGOR I. SIKORSKY MEM., CT.
72505 4079 -7309 44 0 0 ---- ISLIP, NY, LONG ISLAND ARTHUR ARPT
72506 4078 -7397 48 0 0 ---- NEW YORK, NY, CENTRAL PARK
-72507 4172 -7143 19 17 0 T-T- PROVIDENCE/GREEN STATE, RI.
-72508 4194 -7268 55 53 0 T-T- WINDSOR LOCKS, CT.
-72509 4236 -7101 9 6 0 T-T- BOSTON/LOGAN INT., MA.
+72507 4173 -7143 19 17 0 ---- PROVIDENCE/GREEN STATE, RI.
+72508 4193 -7268 55 53 0 ---- HARTFORD/BRADLEY INTNL., CT
+72509 4237 -7103 9 6 0 ---- BOSTON/LOGAN INT., MA.
72510 4227 -7188 306 0 0 ---- WORCESTER, MA, WORCESTER RGNL ARPT
-72513 4134 -7572 289 292 0 T-T- WILKES-BARRE-SCRANTON, PA.
-72514 4124 -7692 160 161 0 ---P WILLIAMSPORT/LYCOMING COUNTY, PA.
-72515 4221 -7598 499 497 0 T-T- BINGHAMTON/BROOME CO., NY.
+72513 4133 -7573 289 292 0 ---- WILKES-BARRE-SCRANTON, PA.
+72514 4125 -7692 160 161 0 ---P WILLIAMSPORT/LYCOMING COUNTY, PA.
+72515 4222 -7598 497 497 0 ---- BINGHAMTON/BROOME CO., NY.
72516 4289 -7325 0 0 0 T-T- BENNINGTON, VT
-72517 4065 -7544 117 118 0 T-T- ALLENTOWN/A.-BETHLEHEM-EASTON, PA.
-72518 4275 -7380 89 88 0 ---- ALBANY COUNTY AIRPORT, NY.
-72518 4269 -7383 89 93 0 T-T- ALBANY, NY.
-72519 4311 -7611 125 128 0 ---P SYRACUSE/HANCOCK, NY.
+72517 4065 -7543 117 118 0 ---- ALLENTOWN/A.-BETHLEHEM-EASTON, PA.
+72518 4275 -7380 89 88 0 ---- ALBANY COUNTY AIRPORT, NY.
+72518 4269 -7383 92 95 0 T-T- ALBANY, NY.
+72519 4312 -7612 124 128 0 ---P SYRACUSE/HANCOCK, NY.
72520 4052 -8022 359 361 0 ---- PITTSBURGH/GREATER PITTSBURGH INT., PA.
72520 4053 -8022 359 361 0 T-T- PITTSBURGH, PA.
-72521 4092 -8144 377 374 0 T-T- AKRON/AKRON-CANTON REG. OH.
+72521 4092 -8143 377 374 0 ---- AKRON/AKRON-CANTON REG. OH.
72522 4334 -7361 104 0 0 ---- GLENN FALLS, NY, FLOYD BENNETT MEMORIAL ARPT
-72523 4257 -7770 209 0 0 T-T- DANSVILLE/MUNICIPAL, NY.
-72524 4141 -8184 245 241 0 T-T- CLEVELAND/CLEVELAND-HOPKINS, OH.
-72525 4126 -8068 361 365 0 T-T- YOUNGSTOWN, OH.
-72526 4208 -8018 225 223 0 T-T- ERIE/INT., PA.
+72523 4257 -7772 209 202 0 ---- DANSVILLE/MUNICIPAL, NY.
+72524 4142 -8187 245 241 0 ---- CLEVELAND/CLEVELAND-HOPKINS, OH.
+72525 4127 -8067 361 365 0 ---- YOUNGSTOWN, OH.
+72526 4208 -8018 225 223 0 ---- ERIE/INT., PA.
72528 4294 -7872 218 218 0 T-T- BUFFALO/GREATER BUFFALO INT., NY.
-72529 4312 -7767 169 171 0 T-T- ROCHESTER/ROCHESTER-MONROE CO., NY.
-72530 4198 -8790 205 203 0 T-T- CHICAGO/O'HARE, IL.
-72531 4029 -8815 228 0 0 ---- RANTOUL/CHANUTE AFB, IL.
-72532 4067 -8968 202 201 0 T-T- PEORIA/GREATER PEORIA MUN., IL.
-72533 4098 -8520 252 245 0 T-TP FORT WAYNE/MUN., BAER FLD., IN.
-72534 4179 -8775 190 189 0 ---- CHICAGO/MIDWAY, IL.
-72535 4171 -8632 236 241 0 T-T- SOUTH BEND/ST.JOSEPH CO., IN.
-72536 4159 -8381 211 208 0 T-T- TOLEDO/EXPRESS, OH.
-72537 4221 -8335 202 195 0 T-T- DETROIT/METROPOLITAN, MI.
-72539 4277 -8460 266 261 0 T-T- LANSING/CAPITAL CITY, MI.
+72529 4312 -7767 169 171 0 ---- ROCHESTER/ROCHESTER-MONROE CO., NY.
+72530 4198 -8790 205 203 0 ---- CHICAGO/O'HARE, IL.
+72531 4029 -8815 228 0 0 ---- RANTOUL/CHANUTE AFB, IL.
+72532 4067 -8968 202 201 0 ---- PEORIA/GREATER PEORIA MUN., IL.
+72533 4100 -8520 252 245 0 ---P FORT WAYNE/MUN., BAER FLD., IN.
+72534 4178 -8775 190 189 0 ---- CHICAGO/MIDWAY, IL.
+72535 4170 -8632 236 241 0 ---- SOUTH BEND/ST.JOSEPH CO., IN.
+72536 4160 -8380 211 208 0 ---- TOLEDO/EXPRESS, OH.
+72537 4223 -8333 202 195 0 ---- DETROIT/METROPOLITAN, MI.
+72539 4277 -8460 266 261 0 ---- LANSING/CAPITAL CITY, MI.
72540 4025 -9372 270 271 0 ---- SPICKARD, MO.
72542 4078 -9112 212 0 0 ---- BURLINGTON, IA SOUTHEAST IOWA RGNL ARPT
-72543 4220 -8909 226 224 0 T-T- ROCKFORD/GREATER ROCKFORD, IL.
-72544 4145 -9051 181 180 0 T-T- MOLINE/QUAD CITY, IL.
-72545 4188 -9171 265 263 0 ---- CEDAR RAPIDS, IA.
-72546 4153 -9366 294 292 0 T-T- DES MOINES/MUN., IA.
-72547 4240 -9071 329 328 0 ---- DUBUQUE/MUN., IA.
-72548 4256 -9240 268 266 0 ---- WATERLOO/MUN., IA.
+72543 4220 -8910 226 224 0 ---- ROCKFORD/GREATER ROCKFORD, IL.
+72544 4145 -9052 181 180 0 ---- MOLINE/QUAD CITY, IL.
+72545 4188 -9170 265 263 0 ---- CEDAR RAPIDS, IA.
+72546 4153 -9365 294 292 0 ---- DES MOINES/MUN., IA.
+72547 4240 -9070 329 328 0 ---- DUBUQUE/MUN., IA.
+72548 4255 -9240 268 266 0 ---- WATERLOO/MUN., IA.
72549 4255 -9418 355 354 0 ---- FORT DODGE, IA
-72550 4130 -9589 299 300 0 T-T- EPPLEY FIELD, OMAHA, NE.
-72551 4085 -9676 362 365 0 T-T- LINCOLN/MUN., NE.
-72552 4097 -9831 566 563 0 T-T- GRAND ISLAND/GR. IS. COUNTY, NE.
+72550 4130 -9590 299 300 0 ---- EPPLEY FIELD, OMAHA, NE.
+72551 4085 -9675 362 365 0 ---- LINCOLN/MUN., NE.
+72552 4095 -9832 566 563 0 ---- GRAND ISLAND/GR. IS. COUNTY, NE.
72553 4137 -9602 406 399 0 ---- OMAHA, NE.
72554 4112 -9590 315 0 0 ---- OMAHA/OFFUTT AFB, NE.
-72556 4199 -9743 473 479 0 T-T- NORFOLK/KARL STEFAN, NE.
-72557 4240 -9638 336 334 0 T-T- SIOUX CITY/MUN., IA.
+72556 4198 -9743 473 479 0 ---- NORFOLK/KARL STEFAN, NE.
+72557 4240 -9638 336 334 0 ---- SIOUX CITY/MUN., IA.
72558 4132 -9637 352 352 0 T-T- VALLEY, NE.
-72561 4110 -10298 1312 1314 0 T-T- SIDNEY/MUN., NE.
-72562 4113 -10070 846 849 0 T-T- NORTH PLATTE/LEE BIRD, NE.
-72564 4115 -10481 1872 1876 0 T-T- CHEYENNE, WY.
-72565 3986 -10467 1656 1656 0 T-T- DENVER INTERNATIONAL AIRPORT, CO.
+72561 4110 -10298 1312 1314 0 ---- SIDNEY/MUN., NE.
+72562 4113 -10070 848 849 0 T-T- NORTH PLATTE/LEE BIRD, NE.
+72564 4115 -10482 1872 1876 0 ---- CHEYENNE, WY.
+72565 3986 -10467 1656 1656 0 ---- DENVER INTERNATIONAL AIRPORT, CO.
72566 4187 -10360 1206 1209 0 ---- SCOTTSBLUFF, COUNTY, NE.
-72567 4288 -10055 792 788 0 T-T- VALENTINE/MILLER, NE.
-72569 4291 -10646 1612 1630 0 T-T- CASPER/NATRONA COUNTY, INTNL, WY.
-72570 4050 -10752 1915 0 0 ---- CRAIG/CRAIG-MOFFAT A., CO.
-72572 4078 -11197 1289 1289 0 T-T- SALT LAKE CITY/INTNL UT.
-72575 4120 -11201 1353 0 0 T-T- OGDEN, UT
+72567 4287 -10055 792 788 0 ---- VALENTINE/MILLER, NE.
+72569 4292 -10647 1612 1630 0 ---- CASPER/NATRONA COUNTY, INTNL, WY.
+72570 4050 -10753 1915 0 0 ---- CRAIG/CRAIG-MOFFAT A., CO.
+72572 4077 -11196 1289 1289 0 T-T- SALT LAKE CITY/INTNL UT.
+72575 4120 -11201 0 1353 0 T-T- OGDEN, UT
72576 4282 -10873 1694 1703 0 ---- LANDER/HUNT, WY.
72578 4292 -11260 1365 1355 0 ---- POCATELLO/MUN., ID.
72581 4072 -11403 1292 1291 0 ---- WENDOVER/AF. AUX. FIELD, UT.
@@ -10344,14 +10382,14 @@
72592 4050 -12230 0 153 0 ---- REDDING/MUN, CA
72593 3665 -12160 24 0 0 ---- SALINAS, CA, SALINAS MUNI ARPT
72594 4079 -12417 18 13 0 ---- EUREKA, CA.
-72597 4237 -12287 399 398 0 T-T- MEDFORD/MEDFORD-JACKSON COUNTY, OR.
+72597 4238 -12288 399 398 0 T-T- MEDFORD/MEDFORD-JACKSON COUNTY, OR.
72604 4422 -7175 287 0 0 ---- FRANCONIA, NH
72605 4320 -7150 105 103 0 ---- CONCORD/MUN., NH.
72606 4365 -7031 19 23 0 ---- PORTLAND/INTNL. JET PORT, ME.
72607 4481 -6881 60 0 0 ---- BANGOR, ME BANGOR INT. ARPT
72608 4492 -6700 23 24 0 ---- EASTPORT, ME.
72612 4493 -7220 233 233 0 ---- NEWPORT, VT.
-72613 4427 -7130 1910 1909 0 ---- MOUNT WASHINGTON, NH.
+72613 4427 -7130 1910 1909 0 ---- MOUNT WASHINGTON, NH.
72614 4442 -7202 217 203 0 ---- ST.JOHNSBURY, VT.
72616 4458 -7118 0 0 0 ---- BERLIN, NH
72617 4447 -7315 104 102 0 ---- BURLINGTON/INT., VT.
@@ -10362,7 +10400,7 @@
72635 4288 -8552 245 242 0 ---- GRAND RAPIDS/KENT CO., MI.
72636 4317 -8625 193 191 0 ---- MUSKEGON/COUNTY, MI.
72637 4297 -8375 233 238 0 ---- FLINT/BISHOP, MI.
-72638 4435 -8467 354 351 0 ---- HOUGHTON LAKE/ROSCOMMON COUNTY, MI.
+72638 4437 -8468 0 351 0 ---- HOUGHTON LAKE/ROSCOMMON COUNTY, MI.
72639 4507 -8357 211 210 0 ---- ALPENA/PHELPS COLLINS, MI.
72640 4295 -8790 211 220 0 ---- MILWAUKEE/GEN. MITCHELL, WI.
72641 4313 -8933 264 263 0 ---- MADISON/DANE COUNTY REGIONAL WI.
@@ -10376,56 +10414,56 @@
72652 4307 -9853 453 453 0 ---- PICKSTOWN, SD.
72653 4380 -9932 530 530 0 ---- CHAMBERLAIN, SD
72654 4438 -9822 393 392 0 ---- HURON/HURON REGIONAL SD.
-72655 4554 -9405 312 313 0 ---- ST.CLOUD/WHITNEY, MN.
+72655 4555 -9407 312 313 0 ---- ST.CLOUD/WHITNEY, MN.
72656 4438 -10029 527 0 0 ---- PIERRE, SD, PIERRE RGNL ARPT
72658 4488 -9322 255 256 0 ---- MINNEAPOLIS/ST.PAUL INT., MN.
72659 4546 -9841 400 398 0 T-T- ABERDEEN/REG., SD.
72661 4527 -10353 925 924 0 ---- REDIG, SD.
72662 4407 -10320 1030 0 0 ---- RAPID CITY/REGIONAL AIRPORT, SD.
72662 4407 -10321 1031 1029 0 T-T- RAPID CITY WFO, SD.
-72665 4435 -10553 1230 1230 0 ---- GILLETTE/GILLETTE-CAMPBELL COUNTY A., WY.
+72665 4435 -10553 1230 1230 0 ---- GILLETTE/GILLETTE-CAMPBELL COUNTY A., WY.
72666 4477 -10697 1209 1226 0 ---- SHERIDAN/COUNTY, WY.
72669 4181 -10720 2065 0 0 ---- RAWLINGS, WY, RAWLINGS MUNI-HARVEY FIELD ARPT
72670 4452 -10902 1553 1551 0 ---- CODY/MUN., WY.
-72671 4258 -11011 2124 2124 0 ---- BIG PINEY, WY
-72672 4306 -10844 1698 1699 0 T-T- RIVERTON, WY.
+72671 4257 -11010 2124 2124 0 ---- BIG PINEY, WY
+72672 4307 -10848 1698 1699 0 T-T- RIVERTON, WY.
72677 4580 -10853 1088 1099 0 ---- BILLINGS/LOGAN INT., MT
-72681 4357 -11624 873 873 0 T-T- BOISE/MUN., ID.
+72681 4357 -11621 873 873 0 T-T- BOISE/MUN., ID.
72683 4358 -11895 1271 1265 0 ---- BURNS, OR.
72688 4568 -11885 456 455 0 ---- PENDLETON, OR.
72692 4425 -12115 936 0 0 ---- ROBERT FIELD ARPT
-72693 4412 -12322 114 111 0 ---- EUGENE/MAHLON SWEET, OR.
-72694 4490 -12300 61 62 0 T-T- SALEM/MCNARY, OR.
+72693 4412 -12322 114 111 0 ---- EUGENE/MAHLON SWEET, OR.
+72694 4491 -12301 62 62 0 T-T- SALEM/MCNARY, OR.
72698 4560 -12260 12 7 0 ---- PORTLAND/INT., OR.
-72712 4687 -6801 192 191 0 T-T- CARIBOU/MUN., ME.
+72712 4687 -6801 191 191 0 T-T- CARIBOU/MUN., ME.
72713 4668 -6805 146 163 0 ---- PRESQUE ISLE, ME.
72741 4593 -9045 469 462 0 ---- PARK FALLS, WI.
72743 4653 -8755 434 434 0 ---- MARQUETTE, MI.
-72744 4717 -8850 329 333 0 ---- HOUGHTON/HOUGHTON COUNTY, MI.
+72744 4717 -8850 329 333 0 ---- HOUGHTON/HOUGHTON COUNTY, MI
72745 4683 -9218 432 436 0 ---- DULUTH/INT., MN.
-72747 4857 -9340 362 357 0 T-T- INT.FALLS/FALLS INT. MN.
+72747 4856 -9340 362 357 0 T-T- INT.FALLS/FALLS INT. MN.
72750 4660 -9432 390 0 0 ---- PEQUOT LAKE, MN
-72753 4692 -9681 274 274 0 ---- FARGO/HECTOR FIELD, ND.
+72753 4690 -9680 274 274 0 ---- FARGO/HECTOR FIELD, ND.
72755 4750 -9493 420 423 0 ---- BEMIDJI/MUN., MN.
72756 4893 -9535 328 0 0 ---- WARROAD, MN
72757 4795 -9718 257 0 0 ---- GRAND FORKS, ND, GRAND FORKS INT. ARPT
72758 4810 -9887 443 439 0 ---- DEVILS LAKE, ND.
72763 4680 -10280 791 0 0 ---- DICKINSON, ND, DICKINSON - THEODORE ROOSEVELT RGNL ARPT
-72764 4677 -10075 505 506 0 T-T- BISMARCK/MUN., ND.
+72764 4677 -10076 505 506 0 T-T- BISMARCK/MUN., ND.
72765 4775 -10183 624 0 0 ---- ROSEGLEN, ND.
72767 4818 -10363 581 592 0 ---- WILLISTON/SLOULIN FIELD INT., ND.
-72768 4821 -10662 694 693 0 T-T- GLASGOW/INT., MT.
+72768 4821 -10663 694 693 0 T-T- GLASGOW/INT., MT.
72769 4861 -11238 1175 0 0 ---- CUT BANK, MT, CUT BANK MUNI ARPT
72770 4526 -11255 1591 0 0 ---- DILLON, MT, DILLON ARPT
72772 4660 -11200 1188 1186 0 ---- HELENA/COUNTY-CITY, MT.
72773 4692 -11408 972 976 0 ---- MISSOULA / JOHNSON-BELL FIELD, MT.
72774 4595 -11251 1688 0 0 ---- BUTTE, MT BERT MOONEY ARPT
72775 4748 -11137 1115 1118 0 ---- GREAT FALLS/INT., MT.
-72776 4746 -11138 1132 1134 0 T-T- GREAT FALLS, MT.
+72776 4746 -11138 1131 1132 0 T-T- GREAT FALLS, MT.
72777 4855 -10977 792 789 0 ---- HAVRE/CITY COUNTY, MT.
72779 4830 -11427 906 906 0 ---- KALISPELL/GLACIER PARK INT., MT.
72781 4657 -12053 325 332 0 ---- YAKIMA/YAKIMA AIR TERMINAL, WA.
-72783 4637 -11702 438 438 0 ---- LEWISTON/LEWISTON-NEZ PERCE CO., ID.
+72783 4638 -11702 438 438 0 ---- LEWISTON/LEWISTON-NEZ PERCE CO., ID.
72784 4657 -11960 223 0 0 ---- HANFORD, WA.
72785 4763 -11753 721 720 0 ---- SPOKANE/INT., WA.
72786 4768 -11763 729 729 0 T-T- SPOKANE, WA.
@@ -10435,21 +10473,23 @@
72790 4730 -11951 384 0 0 ---- EPHRATA, WA, EPHRATA MUNI ARPT
72791 4615 -12388 0 7 0 ---- ASTORIA/CLATSOP, OR.
72792 4697 -12290 61 62 0 ---- OLYMPIA, WA.
-72793 4745 -12230 137 130 0 ---- SEATTLE/S.-TACOMA, WA.
-72797 4794 -12456 57 57 0 T-T- QUILLAYUTE, WA.
+72793 4745 -12230 137 130 0 ---- SEATTLE/S.-TACOMA, WA.
+72797 4793 -12456 57 57 0 T-T- QUILLAYUTE, WA.
74001 3460 -8663 175 0 0 ---- REDSTONE ARSENAL, AL.
74002 3950 -7617 5 0 0 ---- ABERDEEN PROVING GROUNDS, MD.
74003 4017 -11293 1325 0 0 ---- DUGWAY PROVING GROUNDS, UT.
-74004 3250 -11400 231 0 0 ---- YUMA PROVING GROUNDS AZ.
-74201 4813 -12340 9 5 0 ---- PORT ANGELES/CGAS, WA.
-74206 4715 -12248 87 0 0 ---- TACOMA/MC CHORD AFB, WA.
-74207 4712 -12255 87 0 0 ---- FORT LEWIS/GRAY AAF, WA.
-74230 4643 -10588 803 0 0 T-T- MILES CITY, MT
+74004 3286 -11433 131 0 0 TTTT YUMA PG, tower 3555
+74005 3286 -11403 0 231 0 TTTT YUMA PG,TOWER 31
+74006 3292 -11380 0 145 0 TTTT YUMA PG,TOWER M
+74201 4813 -12340 9 5 0 ---- PORT ANGELES/CGAS, WA.
+74206 4715 -12248 87 0 0 ---- TACOMA/MC CHORD AFB, WA.
+74207 4712 -12255 87 0 0 ---- FORT LEWIS/GRAY AAF, WA.
+74230 4643 -10587 801 0 0 ---- MILES CITY, MT
74341 4467 -9545 0 319 0 PPPP WOOD LAKE, MN.
74357 4322 -9053 0 226 0 PPPP BLUE RIVER, WI.
74365 4483 -8455 387 0 0 ---- GRAYING AF RANGE, MI.
74370 4405 -7573 207 0 0 ---- FORT DRUM/WHEELER-SACK AAF, NY
-74389 4389 -7025 118 125 0 T-T- GRAY/PORTLAND, ME.
+74389 4389 -7026 118 125 0 T-T- GRAY, ME.
74392 4388 -6993 24 0 0 ---- BRUNSWICK/NAS, ME.
74393 4353 -7009 7 0 0 ---- PORTLAND, ME.
74413 4253 -11570 1108 0 0 ---- SAYLOR CREEK GUNNERY RANGE, ID.
@@ -10461,7 +10501,7 @@
74440 4010 -9733 0 433 0 PPPP FAIRBURY, NE.
74445 4220 -9780 0 524 0 PPPP NELIGH, NE.
74449 4190 -9370 0 315 0 PPPP SLATER, IA.
-74455 4161 -9059 231 231 0 T-T- QUAD CITY, IA.
+74455 4161 -9058 231 231 0 T-T- QUAD CITY, IA.
74460 4137 -8868 225 223 0 ---- MARSEILLES, IL
74465 4178 -8753 0 0 0 ---- DUNNE CRIB IL.
74466 4082 -8705 0 212 0 PPPP WOLCOTT, IN.
@@ -10470,7 +10510,7 @@
74483 4288 -7288 482 0 0 ---- WILMINGTON, VT.
74484 4293 -7287 595 0 0 ---- WEST DOVER, VT.
74486 4065 -7378 7 4 0 ---- NEW YORK/JOHN F. KENNEDY INT., NY.
-74490 4247 -7129 41 41 0 ---- BEDFORD/HANSCOM AFB, MA.
+74490 4247 -7128 41 41 0 ---- BEDFORD/HANSCOM AFB, MA.
74491 4220 -7253 75 0 0 ---- CHICOPEE FALLS/WESTOVER AFB, MA.
74492 4222 -7112 0 195 0 ---- BLUE HILL OBS. MA.
74494 4166 -6995 16 15 0 T-T- CHATHAM, MA.
@@ -10502,7 +10542,7 @@
74606 3465 -12057 112 0 0 ---- SOUTH VANDENBERG AFB CA.
74611 3528 -11662 716 0 0 ---- BICYCLE LAKE AAF, CA
74612 3568 -11768 696 0 0 --P- CHINA LAKE, NAF, CA.
-74614 3624 -11503 952 0 0 ---- LAS VEGAS, NV.
+74614 3653 -11590 972 0 0 ---- INDIAN SPRINGS GUNNERY RANGE, NV.
74618 3527 -11743 864 0 0 ---- CUDDLEBACK GUNNERY RANGE, CA.
74619 3633 -11710 962 0 0 ---- SUPERIOR VALLEY GUNNERY RANGE, CA
74626 3345 -11195 384 386 0 --P- WFO PHOENIX, AZ.
@@ -10518,10 +10558,10 @@
74648 3579 -9578 0 212 0 PPPP HASKELL, OK.
74649 3497 -9752 0 331 0 PPPP PURCELL, OK.
74662 3688 -8997 0 130 0 PPPP BLOOMFIELD, MO.
-74671 3667 -8750 174 0 0 ---- FORT CAMPBELL AAF, KY.
+74671 3667 -8750 174 0 0 ---- FORT CAMPBELL AAF, KY.
74693 3513 -7893 74 0 0 ---- FORT BRAGG / SIMMONS AAF, NC.
74695 3567 -7590 3 0 0 ---- DARE COUNTY GUNNERY RANGE, NC.
-74699 3347 -7758 0 0 0 ---- FRYING PAN SHOALS, NC.
+74699 3347 -7758 0 0 0 ---- FRYING PAN SHOALS, NC.
74702 3633 -11995 73 0 0 ---- LEMOORE, CA. (NAS)
74718 3322 -11587 -69 0 0 T-T- SALTON SEA, CA. (AFS)
74724 3243 -11268 269 0 0 ---- GILA BEND AAF, AZ.
@@ -10539,7 +10579,7 @@
74750 3178 -9572 0 119 0 PPPP PALESTINE, TX.
74752 3411 -9428 0 195 0 PPPP DEQUEEN, AR.
74753 3190 -9278 141 93 0 PPPP WINNFIELD, LA.
-74754 3133 -9255 27 0 0 ---- ALEXANDRIA, LA.
+74754 3132 -9255 27 0 0 ---- ENGLAND AFB, LA.
74755 3113 -9257 67 0 0 --PP CLAIBORNE RANGE, LA. (AFS)
74756 2969 -8227 46 0 0 ---- GAINSVILLE, FL GAINSVILLE RGNL ARPT
74757 3041 -8907 16 0 0 ---- GULFPORT, MS, GULFPORT-BILOXI INT. ARPT
@@ -10597,6 +10637,7 @@
76499 2377 -9820 0 21 0 ---- SOTO LA MARINA, TAMPS.
76519 2210 -10327 0 1736 0 ---- COLOTLAN, JAL.
76525 2278 -10257 0 2612 0 ---- ZACATECAS, ZAC. (LA BUFA, ZAC.)
+76526 2275 -10251 0 2257 0 T-T- ZACATECAS, ZAC.
76539 2220 -10102 0 1883 1 ---- SAN LUIS POTOSI, S.L.P.
76543 2200 -9878 0 23 0 ---- TAMUIN, S.L.P.
76548 2220 -9785 0 25 0 ---- TAMPICO, TAMPS
@@ -10651,7 +10692,7 @@
76848 1623 -9213 0 1646 1 ---- COMITAN, CHIS.
76855 1565 -9648 0 43 0 ---- PUERTO ANGEL, OAX.
76903 1492 -9225 0 118 0 ---- TAPACHULA, CHIS
-78016 3236 -6468 130 0 0 T-T- L F WADE INTERNATIONAL AIRPORT
+78016 3236 -6468 4 0 0 T-T- L F WADE INTERNATIONAL AIRPORT
78061 2670 -7897 4 2 0 ---- WEST END, GRAND BAHAMA
78062 2655 -7870 11 2 0 ---- FREEPORT, GRAND BAHAMA
78065 2652 -7706 3 0 0 ---- MARSH HARBOUR, ABACO
@@ -10865,8 +10906,10 @@
78808 898 -7955 66 0 0 --T- ALBROOK
78825 1029 -10923 2 1 0 ---- CLIPPERTON
78846 1820 -6305 29 0 0 ---- ANGUILLA
+78850 1679 -6219 167 167 0 ---- JOHN A. OSBORNE AIRPORT
78857 1728 -6273 9 30 0 ---- BASSETERRE
78858 1730 -6272 67 67 0 ---- R.L. BRADSHAW INT'L AIRPORT
+78859 1721 -6259 17 17 0 ---- V.W AMORY INT'L AIRPORT
78861 1712 -6178 10 0 0 --TP COOLIDGE FIELD, ANTIGUA (AUX.AFB)
78862 1712 -6178 10 8 0 ---- VC BIRD INT'L AIRPORT ANTIGUA
78866 1803 -6312 4 3 0 T-T- JULIANA AIRPORT, ST. MAARTEN
@@ -11728,7 +11771,7 @@
84773 -1768 -7134 9 9 0 ---- ILO
84775 -1770 -7138 50 0 1 ---- PUNTA COLES
84782 -1805 -7027 469 468 0 ---- TACNA
-84950 -2299 -4342 7 0 0 ---- RIO DE JANEIRO
+84950 -2299 -4342 7 0 1 ---- RIO DE JANEIRO
85033 -1082 -6534 0 130 0 ---- GUAYARAMERIN
85041 -1103 -6878 0 235 0 ---- COBIJA
85043 -1100 -6612 0 141 0 ---- RIBERALTA
@@ -11773,7 +11816,7 @@
85448 -2992 -7120 0 146 0 ---- LA SERENA
85460 -2632 -7062 0 30 0 ---- CHANARAL
85467 -2726 -7078 0 210 0 ---- DESIERTO DE ATACAMA
-85469 -2716 -10943 0 172 0 T--- ISLA DE PASCUA
+85469 -2716 -10943 0 172 1 T--- ISLA DE PASCUA
85470 -2730 -7042 0 290 0 ---- COPIAPO
85486 -2860 -7077 0 526 0 ---- VALLENAR
85488 -2992 -7120 0 142 0 ---- LA SERENA
@@ -11803,7 +11846,7 @@
85896 -5238 -7512 0 56 0 ---- ISLOTES EVANGELISTAS
85921 -5167 -7253 0 0 0 ---- PUERTO NATALES
85930 -5240 -7509 52 0 0 ---- FARO EVANGELISTA
-85934 -5300 -7084 0 38 0 --T- PUNTA ARENAS
+85934 -5300 -7084 0 38 1 --T- PUNTA ARENAS
85968 -5493 -6762 0 27 0 ---- PUERTO WILLIAMS
85972 -5647 -6873 0 11 0 ---- ISLA DIEGO RAMIREZ
86011 -1953 -5937 143 0 0 ---- BASE A. GRAL ADRIAN JARA
@@ -12309,7 +12352,7 @@
89049 -8567 -4638 1860 0 0 ---- AGO-2
89050 -6220 -5889 15 14 0 ---- BELLINGSHAUSEN
89052 -6217 -5847 2 3 0 ---- ARCTOWSKI
-89053 -6223 -5863 11 0 0 ---- BASE JUBANY
+89053 -6223 -5863 11 0 0 ---- BASE CARLINI
89054 -6218 -5885 17 0 0 ---- DINAMET-URUGUAY
89055 -6423 -5672 200 208 0 --T- BASE MARAMBIO (CENTRO MET. ANTARTICO)
89056 -6218 -5898 0 48 0 ---- CENTRO MET. ANTARTICO PDTE. EDUARDO FREI
@@ -12325,6 +12368,7 @@
89066 -6812 -6713 7 0 0 ---- BASE SAN MARTIN
89069 -6525 -6427 11 0 0 ---- FARADAY
89070 -6298 -6068 0 12 0 ---- GABRIEL DE CASTILLA
+89079 -8400 -7948 1285 0 0 ---- CRIOSFERA 1
89081 -8030 -8133 905 0 0 ---- PATRIOT HILLS AWS
89083 -7592 -8392 914 0 0 ---- SIPLE STATION
89087 -8520 -8788 1634 0 0 ---- THIEL MOUNTAINS AWS
@@ -12362,7 +12406,7 @@
89507 -7500 0 2892 0 0 ---- KOHNEN EP9
89512 -7077 1183 124 119 0 T--- NOVOLAZAREVSKAJA
89514 -7077 1175 0 0 0 ---- MAITRI
-89526 -7195 2335 0 1397 0 --T- PRINCESS ELISABETH
+89526 -7195 2335 0 1397 0 --T- PRINCESS ELISABETH/UTSTEINEN
89528 -8277 2858 2912 0 0 ---- AGO-3
89532 -6901 3958 22 18 0 T-T- SYOWA
89536 -7865 3564 3620 0 0 ---- PLATEAU STATION B EP12
@@ -12411,7 +12455,7 @@
89757 -7383 5567 2741 2741 0 ---- MAWSON (LGB 20 AWS)
89758 -7130 5922 2620 2617 0 ---- MAWSON (LGB10 AWS)
89762 -6865 6112 1830 1830 0 ---- MAWSON (LGB 00 GE 03 AWS)
-89767 -7089 6987 84 84 0 ---- G3
+89767 -7089 6987 84 84 0 ---- AMERY ICE SHELF (G3)
89768 -7855 16665 920 0 0 ---- MINNA BLUFF
89769 -7847 16838 50 0 0 ---- LINDA
89773 -6945 7142 0 65 0 ---- AMERY ICE SHELF AM01
@@ -12529,14 +12573,14 @@
91371 947 17025 3 2 0 ---- WOTJE ATOLL, MARSHALL IS.
91374 890 17085 0 3 0 ---- MALEOLAP, ATOLL AWS, MARSHALL IS.
91375 712 17135 0 0 0 ---- MAJURA, MARSHALL IS.
-91376 709 17139 3 3 0 T-T- MAJURO/MARSHALL IS. INTNL.
+91376 709 17129 3 3 0 T-T- MAJURO/MARSHALL IS. INTNL.
91377 610 17140 0 2 0 ---- MILI ATOLL AWS, MARSHALL IS.
91378 608 17173 4 3 0 ---- MILI ATOLL, MARSHALL IS.
91385 588 -16205 2 0 0 ---- PALMYRA ISLAND
91408 734 13449 30 30 0 T-T- WEATHER SERVICE OFFICE, KOROR, PALAU WCI.
91410 302 13118 5 3 0 ---- TOBI ISLAND, CAROLINE IS.
91411 830 13747 0 3 0 ---- NGULU ATOLL AWS, CAROLINE IS.
-91413 950 13808 15 16 0 T-T- WEATHER SERVICE OFFICE, YAP, CAROLINE IS.
+91413 950 13808 28 27 0 T-T- WEATHER SERVICE OFFICE, YAP, CAROLINE IS.
91425 385 15502 4 2 0 ---- NUKUORO ATOLL, CAROLINE IS.
91434 108 15477 3 0 0 ---- KAPINGAMARANGI ATOLL, CAROLINE IS.
91442 459 16868 0 3 0 ---- EBON ATOLL AWS, MARSHALL IS.
@@ -12607,6 +12651,7 @@
91680 -1775 17745 24 13 0 T-P- NADI AIRPORT
91682 -1814 17742 9 8 0 ---- SIGATOKA
91683 -1805 17857 7 5 0 ---- NAUSORI
+91688 -1776 17745 31 0 1 ---- NADI
91689 -1813 17843 2 0 0 ---- SUVA
91690 -1814 17845 9 6 0 ---- LAUTHALA BAY
91691 -1823 -17880 3 2 0 ---- LAKEBA
@@ -12657,12 +12702,14 @@
91812 -1088 -16582 0 0 0 ---- PUKAPUKA AWS*
91819 -1323 -16308 0 3 0 ---- SUWARROW
91822 -1907 -16992 22 20 0 ---- ALOFI
+91823 -1905 -16992 7 3 0 ---- ALOFI WHARF
91824 -1907 -16993 59 59 0 ---- HANAN AIRPORT
91826 -1807 -16318 4 3 0 ---- PALMERSTON *
91831 -1882 -15977 0 5 0 ---- AITUTAKI AWS
91841 -2017 -15735 0 25 0 ---- MAUKE AWS
91843 -2120 -15982 7 7 0 T-P- RAROTONGA
91844 -2120 -15978 0 0 0 ---- RAROTONGA
+91845 -2120 -15981 0 0 0 ---- RARATONGA AERO
91848 -2192 -15794 0 41 0 ---- MANGAIA AWS
91901 -38 -16002 2 0 0 ---- JARVIS ISLAND
91902 -405 -15500 2 0 0 ---- MALDEN ISLAND (NORPAX)
@@ -13890,7 +13937,7 @@
96615 -185 10997 9 0 0 ---- KETAPANG/RAHADI USMAN
96633 -127 11690 3 0 0 P-P- BALIKPAPAN/SEPINGGAN
96645 -270 11170 25 0 0 TPT- PANGKALAN BUN/ISKANDAR
-96655 -222 11400 27 0 0 P-P- PALANGKA RAYA/TJILIK RIWUT
+96655 -222 11394 27 0 0 P-P- PALANGKA RAYA/TJILIK RIWUT
96685 -343 11475 20 0 0 TPTP BANJARMASIN/SYAMSUDIN NOOR
96695 -340 11622 18 0 0 ---- KOTA BARU/STAGEN
96737 -612 10613 40 0 0 PPP- SERANG
diff --git a/src/Thermo/BufrThermo.cc b/src/Thermo/BufrThermo.cc
index 4af2614..3fe7e4f 100644
--- a/src/Thermo/BufrThermo.cc
+++ b/src/Thermo/BufrThermo.cc
@@ -23,53 +23,49 @@ BufrThermo::BufrThermo() :
pCount_(0),
nlev_(0),
nTIME_STR_(13)
-{
- //type_ = "MXSECTION";
- //view_ = "MXSECTIONVIEW";
-}
+{ }
BufrThermo::BufrThermo(const char* kw) :
Thermo(kw)
-{
- //type_ = kw;
- //view_ = "MXSECTIONVIEW";
-}
+{ }
void
BufrThermo::allocateDataMemory()
{
- pCount_ = 0;
- T_.clear(); TD_.clear();
- U_.clear(); V_.clear();
- P_.clear();
+ pCount_ = 0;
+ T_.clear(); TD_.clear();
+ U_.clear(); V_.clear();
+ P_.clear();
- // Allocate memory
- if ( nlev_ > 0 )
- {
- T_.resize(nlev_);
- TD_.resize(nlev_);
- U_.resize(nlev_);
- V_.resize(nlev_);
- P_.resize(nlev_);
- }
+ // Allocate memory
+ if ( nlev_ > 0 )
+ {
+ T_.resize(nlev_);
+ TD_.resize(nlev_);
+ U_.resize(nlev_);
+ V_.resize(nlev_);
+ P_.resize(nlev_);
+ }
}
void
BufrThermo::initialiseDataMemory()
{
- pCount_ = 0;
- for ( int i = 0; i < nlev_; i++ )
- {
- T_[i] = MissingValue;
- TD_[i] = MissingValue;
- U_[i] = MissingValue;
- V_[i] = MissingValue;
- P_[i] = MissingValue;
- }
+ pCount_ = 0;
+ for ( int i = 0; i < nlev_; i++ )
+ {
+ T_[i] = MissingValue;
+ TD_[i] = MissingValue;
+ U_[i] = MissingValue;
+ V_[i] = MissingValue;
+ P_[i] = MissingValue;
+ }
}
bool BufrThermo::getAppParameters( MvRequest& in )
{
+ // It is expected that the input request is expanded
+
// Get station input parameter
station_ = in.getSubrequest("STATION");
if ( !station_ )
@@ -82,9 +78,10 @@ bool BufrThermo::getAppParameters( MvRequest& in )
}
// The data structure contains vectors for Temp, Td, Wind and Pressure.
-// There is only one Pressure vector related to the other 3 data. This means
-// that these 3 data may contain different number of Missing values, which will
-// be allocated in those positions when there is no Pressure level defined.
+// There is only one Pressure vector related to the other 3 data. This
+// means that these 3 data may contain different number of Missing
+// values, which will be allocated in those positions when there is no
+// Pressure level defined.
bool BufrThermo::processData()
{
// If it is not a BUFR data then it has been already processed
@@ -335,22 +332,12 @@ bool BufrThermo::ncInit(MvNetCDF &netcdf, MvObs& obs)
bool BufrThermo::createOutputRequest(MvRequest& out)
{
- //MUDE ESTE TESTE PARA UMA FUNCAO. SUBSTITUA TAMBEM NA SUBROUTINA ACIMA
- // If it is not a GRIB data then it has been already processed
-// if ( strcmp(pars_.dataReq_.getVerb(),"GRIB") != 0 )
-// return createSimpleOutputRequest(out);
-
// Get default parameter to be plotted
//ParamInfo* parInfo = plotVariable(params);
//if ( !parInfo )
// return false;
// Create netCDF data request
- // Get action mode
- string actionMode = this->actionMode();
-//(actionMode == "analyse" || actionMode == "prepare") )
-//verb = "NETCDF";
-
MvRequest ncDataReq("NETCDF");
ncDataReq("PATH") = this->ncFileName().c_str();
ncDataReq("TEMPORARY") = 1;
@@ -371,10 +358,12 @@ bool BufrThermo::createOutputRequest(MvRequest& out)
gReq("GRAPH_MISSING_DATA_THICKNESS") = 8;
gReq("_CLASS") = "MGRAPH";
gReq("_MODULEID") = thermoId;
+ gReq("_SKIP_MACRO") = 1; // skip macro converter
MvRequest dataReq = dReq + gReq;
// Create Dewpoint output request
dReq("NETCDF_X_VARIABLE") = sDEWPOINT.c_str();
+ dReq("_SKIP_MACRO") = 1; // skip macro converter
gReq("GRAPH_LINE_STYLE") = "dash",
gReq("GRAPH_MISSING_DATA_STYLE") = "dash";
@@ -387,15 +376,21 @@ bool BufrThermo::createOutputRequest(MvRequest& out)
wdReq("NETCDF_X_COMPONENT_VARIABLE") = sU.c_str();
wdReq("NETCDF_Y_COMPONENT_VARIABLE") = sV.c_str();
wdReq("_MODULEID") = thermoId;
+ wdReq("_SKIP_MACRO") = 1; // skip macro converter
MvRequest wReq("MWIND");
wReq("WIND_FIELD_TYPE") = "flags";
wReq("WIND_FLAG_COLOUR") = "black";
wReq("_CLASS") = "MWIND";
wReq("_MODULEID") = thermoId;
+ wReq("_SKIP_MACRO") = 1; // skip macro converter
dataReq = dataReq + dReq + gReq + wdReq + wReq;
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ dataReq("_ORIGINAL_REQUEST") = this->buildMacroConverterRequest();
+
// Create a default ThermoView request
MvRequest viewReq("THERMOVIEW");
//viewReq("X_AUTOMATIC") = "on"; //Not working 20140304, Sylvie is going to fixed.
@@ -403,6 +398,17 @@ bool BufrThermo::createOutputRequest(MvRequest& out)
viewReq("MAXIMUM_TEMPERATURE") = -40;
viewReq("_MODULEID") = thermoId;
+ // Add title information.
+ // It must be positioned before the Data+Visdef set of requests to avoid the
+ // following problem in uPlot: if another visdef (MGRAPH or MWIND) is defined
+ // after the GribThermo requests then it will not be associated to the GribThermo's
+ // output data because the existence of a MTEXT request between them.
+ MvRequest titleReq("MTEXT");
+ titleReq("TEXT_LINE_1") = this->title().c_str();
+ titleReq("TEXT_FONT_SIZE") = 0.5;
+ titleReq("_MODULEID") = thermoId;
+ titleReq("_SKIP_MACRO") = 1; // skip macro converter
+
// If action is not visualisation related then return the netcdf data.
// Also, add the visualisation and original requests as hidden parameters.
// These may be used later to help the visualisation of the netcdf data.
@@ -410,24 +416,13 @@ bool BufrThermo::createOutputRequest(MvRequest& out)
{
out = ncDataReq;
out("_VIEW") = "THERMOVIEW";
- out("_VISUALISE") = dataReq;
- out("_CARTESIANVIEW") = viewReq;
- out("_ORIGINAL_REQUEST") = origReq_;
+ out("_VISUALISE") = titleReq + dataReq;
+ out("_VIEW_REQUEST") = viewReq;
out("_MODULEID") = thermoId;
return true;
}
- // Add title information.
- // It must be positioned before the Data+Visdef set of requests to avoid the
- // following problem in uPlot: if another visdef (MGRAPH or MWIND) is defined
- // after the GribThermo requests then it will not be associated to the GribThermo's
- // output data because the existence of a MTEXT request between them.
- MvRequest titleReq("MTEXT");
- titleReq("TEXT_LINE_1") = this->title().c_str();
- titleReq("TEXT_FONT_SIZE") = 0.5;
- titleReq("_MODULEID") = thermoId;
-
// Final output request
out = viewReq + titleReq + dataReq;
diff --git a/src/Thermo/GribThermo.cc b/src/Thermo/GribThermo.cc
index 5dd9908..fd2112d 100644
--- a/src/Thermo/GribThermo.cc
+++ b/src/Thermo/GribThermo.cc
@@ -17,29 +17,18 @@ static const char* sPointSelection[] = { "AREA_AVERAGE", "COORDINATES", "STATION
GribThermo::GribThermo() :
Thermo("GRIB_THERMO"),
windFlag_(false)
-{
- //type_ = "MXSECTION";
- //view_ = "MXSECTIONVIEW";
-}
+{ }
GribThermo::GribThermo(const char*kw) :
Thermo(kw),
windFlag_(false)
-{
- //type_ = kw;
- //view_ = "MXSECTIONVIEW";
-}
+{ }
-GribThermo::~GribThermo()
-{
-}
+GribThermo::~GribThermo() {}
bool GribThermo::getAppParameters( MvRequest& expReq )
{
-//IMPORTANT: REVISE IF THIS EXPANSION IS NEEDED
-// Make sure that all parameters are defined
-//MvRequest expReq = in;
-//expReq = expReq.ExpandRequest("ThermoDataDef","ThermoDataRules",EXPAND_DEFAULTS);
+ // It is expected that the input request is expanded
// Retrieve point selection
string ps = (const char*)expReq("POINT_SELECTION");
@@ -313,11 +302,6 @@ bool GribThermo::createOutputRequest(MvRequest& out)
// return false;
// Create netCDF data request
- // Get action mode
- string actionMode = this->actionMode();
-//(actionMode == "analyse" || actionMode == "prepare") )
-//verb = "NETCDF";
-
MvRequest ncDataReq("NETCDF");
ncDataReq("PATH") = this->ncFileName().c_str();
ncDataReq("TEMPORARY") = 1;
@@ -335,6 +319,7 @@ bool GribThermo::createOutputRequest(MvRequest& out)
gReq("GRAPH_LINE_THICKNESS") = 8;
gReq("_CLASS") = "MGRAPH";
gReq("_MODULEID") = thermoId;
+ gReq("_SKIP_MACRO") = 1; // skip macro converter
outd = outd + gReq;
// Create Dewpoint output request
@@ -343,6 +328,7 @@ bool GribThermo::createOutputRequest(MvRequest& out)
outtd("NETCDF_Y_VARIABLE") = sPRESSURE.c_str();
outtd("NETCDF_X_VARIABLE") = sDEWPOINT.c_str();
outtd("_MODULEID") = thermoId;
+ outtd("_SKIP_MACRO") = 1; // skip macro converter
gReq("GRAPH_LINE_COLOUR") = "red";
gReq("GRAPH_LINE_STYLE") = "dash",
@@ -359,20 +345,37 @@ bool GribThermo::createOutputRequest(MvRequest& out)
outw("NETCDF_X_COMPONENT_VARIABLE") = sU.c_str();
outw("NETCDF_Y_COMPONENT_VARIABLE") = sV.c_str();
outw("_MODULEID") = thermoId;
+ outw("_SKIP_MACRO") = 1; // skip macro converter
MvRequest wReq("MWIND");
wReq("WIND_FIELD_TYPE") = "flags";
wReq("WIND_FLAG_COLOUR") = "black";
wReq("_CLASS") = "MWIND";
wReq("_MODULEID") = thermoId;
+ wReq("_SKIP_MACRO") = 1; // skip macro converter
outd = outd + outw + wReq;
}
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ outd("_ORIGINAL_REQUEST") = this->buildMacroConverterRequest();
+
// Create a default THERMOVIEW request
MvRequest viewReq("THERMOVIEW");
viewReq("_MODULEID") = thermoId;
+ // Add title information.
+ // It must be positioned before the Data+Visdef set of requests to avoid the
+ // following problem in uPlot: if another visdef (MGRAPH or MWIND) is defined
+ // after the GribThermo requests then it will not be associated to the GribThermo's
+ // output data because the existence of a MTEXT request between them.
+ MvRequest titleReq("MTEXT");
+ titleReq("TEXT_LINE_1") = title_.c_str();
+ titleReq("TEXT_FONT_SIZE") = 0.5;
+ titleReq("_MODULEID") = thermoId;
+ titleReq("_SKIP_MACRO") = 1; // skip macro converter
+
// If action is not visualisation related then return the netcdf data.
// Also, add the visualisation and original requests as hidden parameters.
// These may be used later to help the visualisation of the netcdf data.
@@ -380,24 +383,13 @@ bool GribThermo::createOutputRequest(MvRequest& out)
{
out = ncDataReq;
out("_VIEW") = "THERMOVIEW";
- out("_VISUALISE") = outd;
- out("_CARTESIANVIEW") = viewReq;
- out("_ORIGINAL_REQUEST") = origReq_;
+ out("_VISUALISE") = titleReq + outd;
+ out("_VIEW_REQUEST") = viewReq;
out("_MODULEID") = thermoId;
return true;
}
- // Add title information.
- // It must be positioned before the Data+Visdef set of requests to avoid the
- // following problem in uPlot: if another visdef (MGRAPH or MWIND) is defined
- // after the GribThermo requests then it will not be associated to the GribThermo's
- // output data because the existence of a MTEXT request between them.
- MvRequest titleReq("MTEXT");
- titleReq("TEXT_LINE_1") = title_.c_str();
- titleReq("TEXT_FONT_SIZE") = 0.5;
- titleReq("_MODULEID") = thermoId;
-
// Final output request
out = viewReq + titleReq + outd;
diff --git a/src/Thermo/Thermo.cc b/src/Thermo/Thermo.cc
index 1000a4a..50bce25 100644
--- a/src/Thermo/Thermo.cc
+++ b/src/Thermo/Thermo.cc
@@ -204,6 +204,32 @@ void Thermo::createProcessedOutputRequest( MvRequest& out )
out = viewReq + out1;
}
+MvRequest Thermo::buildMacroConverterRequest()
+{
+ const char* caux = origReq_.getVerb();
+ MvRequest oreq( caux );
+ oreq("_MACRO_DECODE_TAG") = 1; // extra info for the Macro Converter
+
+ oreq("_CLASS") = (const char*)origReq_("_CLASS") ? (const char*)origReq_("_CLASS") : caux;
+
+ oreq("_VERB") = (const char*)origReq_("_VERB") ? (const char*)origReq_("_VERB") : caux;
+
+ // Check if the input data is a MARS retrieval (RETRIEVE)
+ // or a file (GRIB/BUFR)
+ if ( strcmp((const char*)oreq("_CLASS"),"RETRIEVE") == 0 ||
+ strcmp((const char*)oreq("_CLASS"),"GRIB") == 0 ||
+ strcmp((const char*)oreq("_CLASS"),"BUFR") == 0 )
+ {
+ MvRequest retReq = origReq_("DATA");
+ if ( (const char*)retReq("_NAME") )
+ oreq("_NAME") = (const char*)retReq("_NAME");
+ }
+ else if ( (const char*)origReq_("_NAME") )
+ oreq("_NAME") = (const char*)origReq_("_NAME");
+
+ return oreq;
+}
+
//------------------------------------------------------------------------------
int main(int argc,char **argv)
diff --git a/src/Thermo/Thermo.h b/src/Thermo/Thermo.h
index d284bd0..99d1ae4 100644
--- a/src/Thermo/Thermo.h
+++ b/src/Thermo/Thermo.h
@@ -64,6 +64,10 @@ public:
// Get the application (original) view request
MvRequest getAppView ( MvRequest& );
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ MvRequest buildMacroConverterRequest();
+
protected:
Thermo(const char*);
diff --git a/src/Thermo/ThermoDataDef b/src/Thermo/ThermoDataDef
index 73be07c..b66740a 100644
--- a/src/Thermo/ThermoDataDef
+++ b/src/Thermo/ThermoDataDef
@@ -75,6 +75,7 @@ GRIB_THERMO; Data Type Grib
DEW_POINT_FORMULATION
{
SATURATION_OVER_WATER
+ SATURATION_OVER_ICE
MIXED_PHASE_0_TO_-23
} = SATURATION_OVER_WATER
diff --git a/src/XSection/Average.cc b/src/XSection/Average.cc
index 17d6e1f..d2c8f5e 100644
--- a/src/XSection/Average.cc
+++ b/src/XSection/Average.cc
@@ -184,23 +184,34 @@ MvRequest Average::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* par
// Create NetCDF output request
string varname = getNetcdfVarname(parInfo->ParamName()).c_str();
MvRequest out1("NETCDF_XY_MATRIX");
+ out1("NETCDF_DATA") = xs;
out1("NETCDF_MISSING_ATTRIBUTE") = "_FillValue";
out1("NETCDF_VALUE_VARIABLE") = varname.c_str();
out1("NETCDF_Y_VARIABLE") = getNetcdfLevelVarname(varname).c_str();
out1("NETCDF_X_VARIABLE") = (inputMode_ == AVERAGE_NS ) ? "lon" : "lat";
- out1("NETCDF_DATA") = xs;
- // Create customised Cartesian View request.
- // If an icon was dropped into a view, uPlot will ignore it.
- // Mode-specific options
- MvRequest axis("HORIZONTAL_AXIS");
- axis("AXIS_TICK_LABEL_TYPE") = (inputMode_ == AVERAGE_NS ) ? "longitude" : "latitude";
- MvRequest viewReq("CARTESIANVIEW");
- viewReq("X_AUTOMATIC") = "on";
- viewReq("HORIZONTAL_AXIS") = axis;
- viewReq("Y_AUTOMATIC") = "on";
- if ( appInfo.levelType() != cML_UKMO_ND ) // UK MetOffice model levels are 'upside-down'
- viewReq("Y_AUTOMATIC_REVERSE") = "on";
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ out1("_ORIGINAL_REQUEST") = buildMacroConverterRequest();
+
+ // Create View request using some parameters from the xaverage data request
+ MvRequest viewReq("MXAVERAGEVIEW");
+ if ( (const char*)origReq_("AREA") )
+ {
+ viewReq.addValue("AREA",(double)origReq_("AREA",0));
+ viewReq.addValue("AREA",(double)origReq_("AREA",1));
+ viewReq.addValue("AREA",(double)origReq_("AREA",2));
+ viewReq.addValue("AREA",(double)origReq_("AREA",3));
+ }
+ if ( (const char*)origReq_("DIRECTION") )
+ viewReq("DIRECTION") = origReq_("DIRECTION");
+
+ viewReq("_CLASS") = "MXAVERAGEVIEW";
+ viewReq("_DEFAULT") = true;
+ viewReq("_DATAATTACHED") = "YES";
+ if ( appInfo.levelType() != cML_UKMO_ND &&
+ appInfo.levelType() != XS_ML_GHBC ) // UK MetOffice model levels and GHBC fields are 'upside-down'
+ viewReq("_Y_AUTOMATIC_REVERSE") = "on";
// If action is not visualisation related then return the netcdf data.
// Also, add the visualisation and original requests as hidden parameters.
@@ -209,8 +220,7 @@ MvRequest Average::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* par
{
xs("_VIEW") = view_.c_str();
xs("_VISUALISE") = out1;
- xs("_CARTESIANVIEW") = viewReq;
- xs("_ORIGINAL_REQUEST") = origReq_;
+ xs("_VIEW_REQUEST") = viewReq;
return xs;
}
diff --git a/src/XSection/CrossS.cc b/src/XSection/CrossS.cc
index 5c9379e..ebba197 100644
--- a/src/XSection/CrossS.cc
+++ b/src/XSection/CrossS.cc
@@ -761,6 +761,7 @@ MvRequest CrossS::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* parI
// Create NetCDF output request
string varname = getNetcdfVarname(parInfo->ParamName()).c_str();
MvRequest out1("NETCDF_XY_MATRIX");
+ out1("NETCDF_DATA") = xs;
out1("NETCDF_MISSING_ATTRIBUTE") = "_FillValue";
out1("NETCDF_VALUE_VARIABLE") = varname.c_str();
out1("NETCDF_Y_VARIABLE") = getNetcdfLevelVarname(varname).c_str();
@@ -788,7 +789,10 @@ MvRequest CrossS::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* parI
// Add flag to indicate that a MWIND visdef should be applied to this data
out1("_VISDEF") = "MWIND";
}
- out1("NETCDF_DATA") = xs;
+
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ out1("_ORIGINAL_REQUEST") = buildMacroConverterRequest();
// Add the orography curve visualiser
if ( appInfo.haveLNSP() && (appInfo.levelType() == XS_ML_LNSP || appInfo.levelType() == XS_PL) )
@@ -800,6 +804,7 @@ MvRequest CrossS::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* parI
out_orog("NETCDF_X_VARIABLE") = "orography_x_values";
out_orog("NETCDF_X2_VARIABLE") = "orography_x_values";//"orography_x2_values";
out_orog("NETCDF_MISSING_ATTRIBUTE") = "_FillValue";
+ out_orog("_SKIP_MACRO") = 1; // tell MacroConverter to ignore this request
// create Graph Plotting subrequest
// OBS: itt should use a definition from the Default folder
@@ -820,8 +825,22 @@ MvRequest CrossS::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* parI
out1 = out1 + out_orog + empty;
}
- // Create View request
+ // Create View request using some parameters from the xsection data request
MvRequest viewReq("MXSECTIONVIEW");
+ if ( (const char*)origReq_("LINE") )
+ {
+ viewReq.addValue("LINE",(double)origReq_("LINE",0));
+ viewReq.addValue("LINE",(double)origReq_("LINE",1));
+ viewReq.addValue("LINE",(double)origReq_("LINE",2));
+ viewReq.addValue("LINE",(double)origReq_("LINE",3));
+ }
+ if ( (const char*)origReq_("WIND_PARALLEL") )
+ viewReq("WIND_PARALLEL") = origReq_("WIND_PARALLEL");
+ if ( (const char*)origReq_("WIND_PERPENDICULAR") )
+ viewReq("WIND_PERPENDICULAR") = origReq_("WIND_PERPENDICULAR");
+ if ( (const char*)origReq_("WIND_INTENSITY") )
+ viewReq("WIND_INTENSITY") = origReq_("WIND_INTENSITY");
+
viewReq("_CLASS") = "MXSECTIONVIEW";
viewReq("_DEFAULT") = true;
viewReq("_DATAATTACHED") = "YES";
@@ -839,9 +858,7 @@ MvRequest CrossS::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* parI
{
xs("_VIEW") = view_.c_str();
xs("_VISUALISE") = out1;
- xs("_CARTESIANVIEW") = viewReq;
- //xs("_VIEW_REQUEST") = viewReq;
- xs("_ORIGINAL_REQUEST") = origReq_;
+ xs("_VIEW_REQUEST") = viewReq;
return xs;
}
diff --git a/src/XSection/MVProfileDef b/src/XSection/MVProfileDef
index 97a806c..a1e58de 100644
--- a/src/XSection/MVProfileDef
+++ b/src/XSection/MVProfileDef
@@ -19,10 +19,10 @@ MVPROFILE; Metview; Specific Application
INPUT_MODE
{
- POINT ; POINT
- NEAREST_GRIDPOINT ; GPOINT
- AREA ; AREA
- AREA_2 ; AREA2
+ POINT
+ NEAREST_GRIDPOINT
+ AREA
+ AREA_2
} = POINT
POINT [
diff --git a/src/XSection/MVProfileRules b/src/XSection/MVProfileRules
index e21fe00..b2fae2b 100644
--- a/src/XSection/MVProfileRules
+++ b/src/XSection/MVProfileRules
@@ -1,7 +1,7 @@
-%if INPUT_MODE = POINT %then
- %unset AREA
+%if INPUT_MODE = POINT %or INPUT_MODE = NEAREST_GRIDPOINT %then
+ %unset AREA
-%if INPUT_MODE = AREA %then
+%if INPUT_MODE = AREA %or INPUT_MODE = AREA_2 %then
%unset POINT
%if OUTPUT_MODE = NORMAL %then
diff --git a/src/XSection/MVProfileViewDef b/src/XSection/MVProfileViewDef
index 25458ae..5022afc 100644
--- a/src/XSection/MVProfileViewDef
+++ b/src/XSection/MVProfileViewDef
@@ -2,10 +2,10 @@ MVPROFILEVIEW; PlotMod Icon; Metview
{
INPUT_MODE
{
- POINT ; POINT
- NEAREST_GRIDPOINT ; GPOINT
- AREA ; AREA
- AREA_2 ; AREA2
+ POINT
+ NEAREST_GRIDPOINT
+ AREA
+ AREA_2
} = POINT
POINT [
diff --git a/src/XSection/MVProfileViewRules b/src/XSection/MVProfileViewRules
index 56b05f4..f889082 100644
--- a/src/XSection/MVProfileViewRules
+++ b/src/XSection/MVProfileViewRules
@@ -1,7 +1,7 @@
-%if INPUT_MODE = POINT %or INPUT_MODE = GPOINT %then
+%if INPUT_MODE = POINT %or INPUT_MODE = NEAREST_GRIDPOINT %then
%unset AREA
-%if INPUT_MODE = AREA %or INPUT_MODE = AREA2 %then
+%if INPUT_MODE = AREA %or INPUT_MODE = AREA_2 %then
%unset POINT
%include PageFrameRules
diff --git a/src/XSection/MXAverageViewDef b/src/XSection/MXAverageViewDef
index d8b34d5..05bf0da 100644
--- a/src/XSection/MXAverageViewDef
+++ b/src/XSection/MXAverageViewDef
@@ -35,8 +35,8 @@ MXAVERAGEVIEW; uPlot Icon; Metview
DIRECTION
{
- NORTH SOUTH ; NS ; NS
- EAST WEST ; EW ; EW
+ NORTH SOUTH ; NS
+ EAST WEST ; EW
} = NS
MAP_PROJECTION [ visible = false ]
diff --git a/src/XSection/VertProfDef b/src/XSection/VertProfDef
index f93d390..b98443b 100644
--- a/src/XSection/VertProfDef
+++ b/src/XSection/VertProfDef
@@ -20,10 +20,10 @@ PM_VPROF; Metview; Specific Application
INPUT_MODE
{
- POINT ; POINT
- NEAREST_GRIDPOINT ; GPOINT
- AREA ; AREA
- AREA_2 ; AREA2
+ POINT
+ NEAREST_GRIDPOINT
+ AREA
+ AREA_2
} = POINT
POINT
diff --git a/src/XSection/VertProfRules b/src/XSection/VertProfRules
index 938a4ec..d6af78e 100644
--- a/src/XSection/VertProfRules
+++ b/src/XSection/VertProfRules
@@ -1,5 +1,5 @@
-%if INPUT_MODE = POINT %or INPUT_MODE = GPOINT %then
+%if INPUT_MODE = POINT %or INPUT_MODE = NEAREST_GRIDPOINT %then
%unset AREA
-%if INPUT_MODE = AREA %or INPUT_MODE = AREA2 %then
+%if INPUT_MODE = AREA %or INPUT_MODE = AREA_2 %then
%unset POINT
diff --git a/src/XSection/VertProfViewDef b/src/XSection/VertProfViewDef
index 5e429d4..7b28e08 100644
--- a/src/XSection/VertProfViewDef
+++ b/src/XSection/VertProfViewDef
@@ -2,10 +2,10 @@ VERTPROFVIEW; PlotMod Icon; Metview
{
INPUT_MODE
{
- POINT ; POINT
- NEAREST_GRIDPOINT ; GPOINT
- AREA ; AREA
- AREA_2 ; AREA2
+ POINT
+ NEAREST_GRIDPOINT
+ AREA
+ AREA_2
} = POINT
POINT
diff --git a/src/XSection/VertProfViewRules b/src/XSection/VertProfViewRules
index 3d08aeb..196e787 100644
--- a/src/XSection/VertProfViewRules
+++ b/src/XSection/VertProfViewRules
@@ -1,7 +1,7 @@
-%if INPUT_MODE = POINT %or INPUT_MODE = GPOINT %then
+%if INPUT_MODE = POINT %or INPUT_MODE = NEAREST_GRIDPOINT %then
%unset AREA
-%if INPUT_MODE = AREA %or INPUT_MODE = AREA2 %then
+%if INPUT_MODE = AREA %or INPUT_MODE = AREA_2 %then
%unset POINT
%include PageFrameRules
diff --git a/src/XSection/Vprofile.cc b/src/XSection/Vprofile.cc
index 7934a01..39c61e7 100644
--- a/src/XSection/Vprofile.cc
+++ b/src/XSection/Vprofile.cc
@@ -600,14 +600,35 @@ MvRequest Vprofile::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* pa
out1("NETCDF_Y_VARIABLE") = XS_VARLEVEL.c_str();
out1("NETCDF_X_VARIABLE") = parInfo->ParamName().c_str();
- // Create customised Cartesian View request.
- // If an icon was dropped into a view, uPlot will ignore it.
- // Mode-specific options
- MvRequest viewReq("CARTESIANVIEW");
- viewReq("X_AXIS_TYPE") = "regular";
- viewReq("X_AUTOMATIC") = "on";
- viewReq("Y_AUTOMATIC") = "on";
- viewReq("Y_AUTOMATIC_REVERSE") = "on";
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ out1("_ORIGINAL_REQUEST") = buildMacroConverterRequest();
+
+ // Create View request using some parameters from the vprofile data request
+ MvRequest viewReq("MVPROFILEVIEW");
+ if ( (const char*)origReq_("INPUT_MODE") )
+ viewReq("INPUT_MODE") = origReq_("INPUT_MODE");
+
+ if ( (const char*)origReq_("AREA") )
+ {
+ viewReq.addValue("AREA",(double)origReq_("AREA",0));
+ viewReq.addValue("AREA",(double)origReq_("AREA",1));
+ viewReq.addValue("AREA",(double)origReq_("AREA",2));
+ viewReq.addValue("AREA",(double)origReq_("AREA",3));
+ }
+
+ if ( (const char*)origReq_("POINT") )
+ {
+ viewReq.addValue("POINT",(double)origReq_("POINT",0));
+ viewReq.addValue("POINT",(double)origReq_("POINT",1));
+ }
+
+ viewReq("_CLASS") = "MVPROFILEVIEW";
+ viewReq("_DEFAULT") = true;
+ viewReq("_DATAATTACHED") = "YES";
+ if ( appInfo.levelType() != cML_UKMO_ND &&
+ appInfo.levelType() != XS_ML_GHBC ) // UK MetOffice model levels and GHBC fields are 'upside-down'
+ viewReq("_Y_AUTOMATIC_REVERSE") = "on";
// If action is not visualisation related then return the netcdf data.
// Also, add the visualisation and original requests as hidden parameters.
@@ -616,13 +637,11 @@ MvRequest Vprofile::createOutputRequest( ApplicationInfo& appInfo, ParamInfo* pa
{
xs("_VIEW") = view_.c_str();
xs("_VISUALISE") = out1;
- xs("_CARTESIANVIEW") = viewReq;
- xs("_ORIGINAL_REQUEST") = origReq_;
+ xs("_VIEW_REQUEST") = viewReq;
return xs;
}
// Final output request
- out1("NETCDF_DATA") = xs;
MvRequest out = viewReq + out1;
return out;
}
diff --git a/src/XSection/Xsect.cc b/src/XSection/Xsect.cc
index 4a079d6..9c4f2f9 100644
--- a/src/XSection/Xsect.cc
+++ b/src/XSection/Xsect.cc
@@ -941,9 +941,9 @@ MvRequest Xsect::createOutputRequest( MvRequest& in)
// Create NetCDF output request
MvRequest data = in.getSubrequest("DATA");
MvRequest out1 = data.getSubrequest("_VISUALISE");
- MvRequest viewReq = data.getSubrequest("_CARTESIANVIEW");
+ MvRequest viewReq = data.getSubrequest("_VIEW_REQUEST");
data.unsetParam("_VISUALISE"); // to avoid duplication of info
- data.unsetParam("_CARTESIANVIEW"); // to avoid duplication of info
+ data.unsetParam("_VIEW_REQUEST"); // to avoid duplication of info
data.unsetParam("_ORIGINAL_REQUEST"); // to avoid duplication of info
out1("NETCDF_DATA") = data;
@@ -1047,6 +1047,26 @@ MvNcVar* Xsect::getNetcdfVariableLevel( MvNetCDF& cdf, const string& varname, Ap
return ncv;
}
+MvRequest Xsect::buildMacroConverterRequest()
+{
+ const char* caux = origReq_.getVerb();
+ MvRequest oreq( caux );
+ oreq("_MACRO_DECODE_TAG") = 1; // extra info for the Macro Converter
+ oreq("_CLASS") = (const char*)origReq_("_CLASS") ? (const char*)origReq_("_CLASS") : caux;
+ oreq("_VERB") = (const char*)origReq_("_VERB") ? (const char*)origReq_("_VERB") : caux;
+ if ( strcmp((const char*)oreq("_CLASS"),"RETRIEVE") == 0 ||
+ strcmp((const char*)oreq("_CLASS"),"GRIB") == 0 )
+ {
+ MvRequest retReq = origReq_("DATA");
+ if ( (const char*)retReq("_NAME") )
+ oreq("_NAME") = (const char*)retReq("_NAME");
+ }
+ else if ( (const char*)origReq_("_NAME") )
+ oreq("_NAME") = (const char*)origReq_("_NAME");
+
+ return oreq;
+}
+
//------------------------------------------------------------------------------
int main(int argc,char **argv)
diff --git a/src/XSection/Xsect.h b/src/XSection/Xsect.h
index 195bc64..1606a29 100644
--- a/src/XSection/Xsect.h
+++ b/src/XSection/Xsect.h
@@ -144,6 +144,10 @@ protected:
// Free memory
void deleteAuxiliaryMemory(double*, ParamMap&);
+ // Add information to help the Macro Converter to translate
+ // the output request to a Macro code
+ MvRequest buildMacroConverterRequest();
+
// Variables
MvRequest origReq_; // input request
string type_; // application type: MVPROFILE, MXSECTION, MXAVERAGE
diff --git a/src/libFTimeUtil/CMakeLists.txt b/src/libFTimeUtil/CMakeLists.txt
index 63b09b7..cb39afb 100644
--- a/src/libFTimeUtil/CMakeLists.txt
+++ b/src/libFTimeUtil/CMakeLists.txt
@@ -11,4 +11,5 @@ ecbuild_add_library( TARGET FTimeUtil
INCLUDES ${METVIEW_STANDARD_INCLUDES}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
LIBS ${METVIEW_EXTRA_LIBRARIES}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libMetview/CMakeLists.txt b/src/libMetview/CMakeLists.txt
index 89c38e4..05fcd88 100644
--- a/src/libMetview/CMakeLists.txt
+++ b/src/libMetview/CMakeLists.txt
@@ -38,6 +38,7 @@ ecbuild_add_library( TARGET Metview
INCLUDES ${METVIEW_STANDARD_INCLUDES}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
LIBS ${METVIEW_EXTRA_LIBRARIES}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libMetview/MvRequest.cc b/src/libMetview/MvRequest.cc
index 1dab38a..a4bd26e 100644
--- a/src/libMetview/MvRequest.cc
+++ b/src/libMetview/MvRequest.cc
@@ -9,6 +9,7 @@
#include <Metview.h>
#include <MvPath.hpp>
+#include <MvScanFileType.h>
MvRequest::MvRequest(const char *verb)
{
@@ -868,11 +869,11 @@ void MvRequest :: update_value(request *r,const char *parname,const char *valnam
if(append)
{
- value *a = p->values,*b= NULL,*c=NULL;
+ value *a = p->values,*b= NULL;
while(a)
{
b = a;
- c = b;
+// c = b;
a = a->next;
}
v = new_value(strcache(valname));
@@ -1155,42 +1156,83 @@ void MvRequest::importSubObjects(string& path, request* obj)
return;
// Read the definition file
- request* l = read_language_file(defFile);
- if ( !l )
+ request* rdef = read_language_file(defFile);
+ if ( !rdef )
return;
- // Skip auxiliary requests
- while(l && (l->name != this->getVerb()))
- l = l->next;
-
- // Check each parameter to find out if it needs to be expanded
- parameter* p = l->params;
- MvRequest reqAux;
- while (p)
+ // This request may be structured as a set of requests.
+ // Loop each request and expand all parameters that are subrequests.
+ this->rewind();
+ while (CurrentRequest)
{
- // Search for parameters that have an icon interface
- const char *cicon = get_value(p->interface,"interface",0);
- if (cicon && (strcmp(cicon,"icon") == 0))
+ // Find the correspondent definition request
+ request* rl = rdef;
+ while(rl && (rl->name != this->getVerb()))
+ rl = rl->next;
+
+ // Skip this request if there is no related definition request
+ if ( !rl )
+ continue;
+
+ // Check each parameter to find out if it needs to be expanded
+ parameter* p = rl->params;
+ MvRequest reqAux;
+ while (p)
{
- // Build all subrequests and add to this parameter
- int i = 0;
- const char *q;
- while ( (q = get_value(CurrentRequest,p->name,i++)) )
- {
- // Build subrequest
- string fullPath = path + "/" + q;;
- reqAux.read(fullPath.c_str(),true);
-
- // Add subrequest to this parameter
- if ( i == 1 ) // clean parameter values once
- this->unsetParam(p->name);
-
- this->addValue(p->name,reqAux);
+ // Search for parameters that have an icon interface
+ const char *cicon = get_value(p->interface,"interface",0);
+ if (cicon && (strcmp(cicon,"icon") == 0))
+ {
+ // Build all subrequests and add to this parameter
+ const char* cclass = get_value(p->interface,"class",0);
+ const char *q;
+ for ( int i = 0; i < this->countValues(p->name); i++ )
+ {
+ // Build subrequest
+ this->getValue(q,p->name,i);
+ string fullPath = (path[path.size()-1] == '/') ? path + q : path + "/" + q;
+ if ( !IsBinaryOrMissingFile(fullPath.c_str()) )
+ {
+ // Read request from file and add parameter _CLASS.
+ // Do not add parameter _NAME because this request
+ // will be built by loading the contents of a file.
+ // Adding parameter _NAME will make further routines to
+ // read the file again.
+ reqAux.read(fullPath.c_str(),true);
+ reqAux("_CLASS") = reqAux.getVerb();
+ }
+ else
+ {
+ // Build request manually
+ reqAux.setVerb(cclass);
+
+ // Add hidden parameters
+ reqAux("_CLASS") = cclass;
+
+ // Name without the Metview user directory path
+ string user_dir = GetUserDirectory();
+ std::size_t found = fullPath.find(user_dir);
+ if (found != std::string::npos)
+ reqAux("_NAME") = fullPath.substr(found+user_dir.size()).c_str();
+ else
+ reqAux("_NAME") = fullPath.c_str();
+ }
+
+ // Add subrequest to this parameter
+ if ( i == 0 ) // clean parameter values once
+ this->unsetParam(p->name);
+
+ this->addValue(p->name,reqAux);
+ }
}
+
+ p = p->next;
}
- p = p->next;
+ CurrentRequest = CurrentRequest->next;
}
+
+ this->rewind();
}
request* MvRequest::findRequestObject()
@@ -1213,3 +1255,29 @@ request* MvRequest::findRequestObject()
return NULL;
}
+
+bool MvRequest::checkParameters( MvRequest& req, vector<string>& params )
+{
+ const char *par, *v1, *v2;
+ int i,j,cnt1,cnt2;
+
+ for (i = 0; i < (signed)params.size(); i++ )
+ {
+ par = params[i].c_str();
+ cnt1 = this->iterInit(par);
+ cnt2 = req.iterInit(par);
+ if ( cnt1 && (cnt1 == cnt2) )
+ {
+ for (j = 0; j < cnt1; j++)
+ {
+ this->iterGetNextValue( v1 );
+ req.iterGetNextValue( v2 );
+ if ( v1 != v2 )
+ return false;
+ }
+ }
+
+ }
+
+ return true;
+}
diff --git a/src/libMetview/MvRequest.h b/src/libMetview/MvRequest.h
index 3f8d22d..6278d94 100644
--- a/src/libMetview/MvRequest.h
+++ b/src/libMetview/MvRequest.h
@@ -590,7 +590,9 @@ public:
bool getValueId(const char* par,string& value,const std::map<string,string>& idMap,bool canBeEmpty,string &errTxt);
bool getValue(const char* par,string& value,bool canBeEmpty,string &errTxt);
bool getValue(const char* par,std::vector<string>& value,bool canBeEmpty,string &errTxt);
-
+
+ // Check if the input request has the same contents given a set of parameters
+ bool checkParameters( MvRequest&, std::vector<string>& );
};
//! Convenience class (not used currently)
diff --git a/src/libMvMotif/CMakeLists.txt b/src/libMvMotif/CMakeLists.txt
index 82251e7..558a89b 100644
--- a/src/libMvMotif/CMakeLists.txt
+++ b/src/libMvMotif/CMakeLists.txt
@@ -43,4 +43,5 @@ ecbuild_add_library( TARGET MvMotif
INCLUDES ${METVIEW_STANDARD_INCLUDES}
TEMPLATES ${common_templates}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libMvNetCDF/CMakeLists.txt b/src/libMvNetCDF/CMakeLists.txt
index c9b1600..8a0c91a 100644
--- a/src/libMvNetCDF/CMakeLists.txt
+++ b/src/libMvNetCDF/CMakeLists.txt
@@ -12,4 +12,5 @@ ecbuild_add_library( TARGET MvNetCDF
INCLUDES ${METVIEW_STANDARD_INCLUDES}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
LIBS ${METVIEW_EXTRA_LIBRARIES}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libMvQtGui/CMakeLists.txt b/src/libMvQtGui/CMakeLists.txt
index afba8d2..fe4dcce 100644
--- a/src/libMvQtGui/CMakeLists.txt
+++ b/src/libMvQtGui/CMakeLists.txt
@@ -152,4 +152,5 @@ ecbuild_add_library( TARGET MvQtGui
TEMPLATES ${common_templates}
INCLUDES ${METVIEW_QT_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ../uPlot ${METVIEW_STANDARD_INCLUDES}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libMvQtUtil/CMakeLists.txt b/src/libMvQtUtil/CMakeLists.txt
index 2d094ba..c8ce044 100644
--- a/src/libMvQtUtil/CMakeLists.txt
+++ b/src/libMvQtUtil/CMakeLists.txt
@@ -35,4 +35,5 @@ ecbuild_add_library( TARGET MvQtUtil
TEMPLATES ${common_templates}
INCLUDES ${libmvqtutil_includes}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libUtil/CMakeLists.txt b/src/libUtil/CMakeLists.txt
index db80910..92983b4 100644
--- a/src/libUtil/CMakeLists.txt
+++ b/src/libUtil/CMakeLists.txt
@@ -65,4 +65,5 @@ ecbuild_add_library( TARGET Util
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
LIBS ${METVIEW_EXTRA_LIBRARIES}
# LIBS ${METVIEW_EXTRA_LIBRARIES} MvMars Metview ${GRIB_API_LIBRARIES}
+ DEPENDS mvmarsxdr
)
diff --git a/src/libUtil/CMakeLists.txt b/src/libUtil/CMakeLists.txt.orig
similarity index 91%
copy from src/libUtil/CMakeLists.txt
copy to src/libUtil/CMakeLists.txt.orig
index db80910..b0de1c0 100644
--- a/src/libUtil/CMakeLists.txt
+++ b/src/libUtil/CMakeLists.txt.orig
@@ -64,5 +64,10 @@ ecbuild_add_library( TARGET Util
INCLUDES ${METVIEW_STANDARD_INCLUDES} ${LOCAL_EXTRA_INCLUDE_DIRS}
DEFINITIONS ${METVIEW_EXTRA_DEFINITIONS}
LIBS ${METVIEW_EXTRA_LIBRARIES}
+<<<<<<< HEAD
+# LIBS ${METVIEW_EXTRA_LIBRARIES} MvMars Metview ${ECCODES_LIBRARIES}
+=======
# LIBS ${METVIEW_EXTRA_LIBRARIES} MvMars Metview ${GRIB_API_LIBRARIES}
+ DEPENDS mvmarsxdr
+>>>>>>> develop
)
diff --git a/src/libUtil/MvMiscelaneous.cc b/src/libUtil/MvMiscelaneous.cc
index 25f7364..0712d36 100644
--- a/src/libUtil/MvMiscelaneous.cc
+++ b/src/libUtil/MvMiscelaneous.cc
@@ -269,6 +269,7 @@ double ozonePPMV(double r)
double dewPointFromQ(double p, double t, double q, const string& formula)
{
const string cMixedFormula( "MIXED_PHASE_0_TO_-23" );
+ const string cSaturationIce( "SATURATION_OVER_ICE" );
double ZCVM3, ZCVM4;
if( formula == cMixedFormula )
@@ -280,7 +281,7 @@ double dewPointFromQ(double p, double t, double q, const string& formula)
ZCVM3 = foealfa*cR3LES + (1.-foealfa)*cR3IES;
ZCVM4 = foealfa*cR4LES + (1.-foealfa)*cR4IES;
}
- else
+ else if ( formula == cSaturationIce )
{
if( t > cTMELT )
{
@@ -293,6 +294,11 @@ double dewPointFromQ(double p, double t, double q, const string& formula)
ZCVM4=cR4IES;
}
}
+ else // SATURATION OVER WATER
+ {
+ ZCVM3=cR3LES;
+ ZCVM4=cR4LES;
+ }
double ZFRAC = log(p*q/(cR2ES*(1.+cVTMPC1*q)))/ZCVM3;
diff --git a/src/libUtil/MvPath.cc b/src/libUtil/MvPath.cc
index 7fe19b5..636ac25 100644
--- a/src/libUtil/MvPath.cc
+++ b/src/libUtil/MvPath.cc
@@ -14,51 +14,29 @@
#include "MvPath.hpp"
#include "UtilitiesC.h"
-static Cached user_dir = getenv("METVIEW_USER_DIRECTORY");
+static string user_dir = getenv("METVIEW_USER_DIRECTORY");
static Cached tmp_dir = getenv("METVIEW_TMPDIR");
static Cached metv_dir = getenv("METVIEW_DIR_SHARE");
string
GetUserDirectory()
{
- return (const char*)user_dir;
+ return user_dir;
}
-Cached
-MakeUserPath(const Cached& name)
-{
-// FII0710 I think this code is not correct. It should try
-// to build an absolute path taking into consideration the
-// relative part of the path "../" Alternatively, leave
-// the relative part of the path as it is.
-#if 0
- // Strip off any relative part of the name "../.. etc"
- // to try to build a correct absolute path.
- bool found = false;
- const char *cptr = name;
- int i;
-
- if ( strlen(name) > 3 )
- {
- for ( i = strlen(name)-1; i >=2; i-- )
- {
- if ( name[i] == '/' && name[i-1] == '.' && name[i-2] == '.' )
- {
- found = true;
- break;
- }
- }
- }
-
- if ( found )
- cptr += i;
-
- Cached fname = user_dir + (Cached)"/" + Cached(cptr);
-#endif
+string
+MakeUserPath(const string& name)
+{
+ // If "user_dir" is already part of the input string then do nothing
+ std::size_t found = name.find(user_dir);
+ if (found != std::string::npos)
+ return name;
- Cached fname = user_dir + (Cached)"/" + name;
+ // Build the output string taking into consideration
+ // if the input string has already the character '/'
+ string fname = (name[0] == '/') ? user_dir + name : user_dir + "/" + name;
- return fname;
+ return fname;
}
string
@@ -66,7 +44,7 @@ MakeUserDefPath(const char* name, bool absolutePath)
{
string fname;
if ( absolutePath )
- fname += (const char*)user_dir;
+ fname += user_dir;
fname += "/System/Defaults/";
fname += name;
@@ -77,7 +55,7 @@ MakeUserDefPath(const char* name, bool absolutePath)
string
MakeUserPrefPath(const char* name)
{
- string fname = (const char*)user_dir;
+ string fname = user_dir;
fname += "/System/Preferences/";
fname += name;
@@ -105,7 +83,7 @@ MakeTmpPath(const char* name)
Cached
MakeFilePath (const char* reqName )
{
- Cached path = user_dir + Cached("/") + Cached ( dirname ( reqName ));
+ Cached path = user_dir.c_str() + Cached("/") + Cached ( dirname ( reqName ));
return path;
}
diff --git a/src/libUtil/MvPath.hpp b/src/libUtil/MvPath.hpp
index f8d1e4d..ae6378d 100644
--- a/src/libUtil/MvPath.hpp
+++ b/src/libUtil/MvPath.hpp
@@ -15,7 +15,7 @@
#include <string>
using std::string;
-Cached MakeUserPath ( const Cached& name );
+string MakeUserPath ( const string& name );
string MakeUserDefPath ( const char* name, bool absolutePath=true );
string MakeUserPrefPath( const char* name );
string MakeSystemEtcPath ( const string& name );
diff --git a/src/uPlot/AverageView.cc b/src/uPlot/AverageView.cc
index 20e2976..3a5a69d 100644
--- a/src/uPlot/AverageView.cc
+++ b/src/uPlot/AverageView.cc
@@ -26,14 +26,8 @@ AverageViewFactory::Build ( Page& page,
const MvRequest& contextRequest,
const MvRequest& setupRequest )
{
- // Expand request
- MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
-
- // Copy hidden parameters
- expReq.mars_merge(contextRequest);
-
// Instantiate a Average view
- return new AverageView ( page, expReq, setupRequest );
+ return new AverageView ( page, contextRequest, setupRequest );
}
//--------------------------------------------------------
@@ -120,7 +114,7 @@ AverageView::DescribeYourself ( ObjectInfo& description )
{
// Convert my request to macro
set<Cached> skipSet;
- description.ConvertRequestToMacro ( viewRequest_, PUT_END,
+ description.ConvertRequestToMacro ( appViewReq_, PUT_END,
MacroName().c_str(),"maverageview", skipSet);
description.PutNewLine (" " );
@@ -255,3 +249,20 @@ void AverageView::ApplicationInfo ( const MvRequest& req )
else if ( (const char*)req("_Y_AUTOMATIC_REVERSE") )
yReverse_ = (const char*)req("_Y_AUTOMATIC_REVERSE");
}
+
+bool AverageView::ConsistencyCheck( MvRequest& req1, MvRequest& req2 )
+{
+ // Build a list of parameters to be checked
+ vector<string> params;
+ params.push_back("AREA");
+ params.push_back("DIRECTION");
+
+ // Expand requests using the same expansion flag to avoid
+ // problems with parameters with multiple values (e.g.
+ // NS or NORTH_SOUTH are valid values for parameter DIRECTION
+ MvRequest t1 = ObjectList::ExpandRequest(req1,EXPAND_DEFAULTS);
+ MvRequest t2 = ObjectList::ExpandRequest(req2,EXPAND_DEFAULTS);
+
+ // Call a function to perform the consistency check
+ return t1.checkParameters(t2,params);
+}
diff --git a/src/uPlot/AverageView.h b/src/uPlot/AverageView.h
index 94195e6..794d2c5 100644
--- a/src/uPlot/AverageView.h
+++ b/src/uPlot/AverageView.h
@@ -112,6 +112,9 @@ public:
// Update view
virtual bool UpdateView ();
+ // Check consistency between the View and Data Module
+ virtual bool ConsistencyCheck( MvRequest&, MvRequest& );
+
private:
// Save some data specific to some DataApplication
diff --git a/src/uPlot/CommonXSectView.cc b/src/uPlot/CommonXSectView.cc
index 2cf1ee4..bdf67c0 100644
--- a/src/uPlot/CommonXSectView.cc
+++ b/src/uPlot/CommonXSectView.cc
@@ -28,8 +28,19 @@ CommonXSectView::CommonXSectView ( Page& owner,
PlotModService ( setupRequest("service"), this ),
appViewReq_ ( viewRequest )
{
- yMin_ = viewRequest_("BOTTOM_LEVEL");
- yMax_ = viewRequest_("TOP_LEVEL");
+ // Get min/max values
+ if ( (const char*)viewRequest_("BOTTOM_LEVEL") && (const char*)viewRequest_("TOP_LEVEL") )
+ {
+ yMin_ = viewRequest_("BOTTOM_LEVEL");
+ yMax_ = viewRequest_("TOP_LEVEL");
+ }
+ else
+ {
+ // Expand request
+ MvRequest expReq = ObjectList::ExpandRequest(viewRequest_,EXPAND_DEFAULTS);
+ yMin_ = expReq("BOTTOM_LEVEL");
+ yMax_ = expReq("TOP_LEVEL");
+ }
}
CommonXSectView::CommonXSectView(const CommonXSectView &old) :
@@ -63,11 +74,24 @@ bool CommonXSectView::CallService(const MvRequest &dataReq, PmContext & context,
if ( dataReq.getVerb() != GRIB && dataReq.getVerb() != NETCDF && dataReq.getVerb() != BUFR )
return false;
+ // Build a request to send to the Service.
+ // The _CONTEXT subrequest is an important information to the Service and
+ // needs to be attached to the main request. To avoid duplication of messages
+ // remove the _CONTEXT subrequest from the DATA request, if it exists.
MvRequest appRequest(ApplicationName().c_str());
- appRequest("DATA") = dataReq;
+ if ( (const char*)dataReq("_CONTEXT") )
+ {
+ MvRequest auxReq(dataReq.getVerb());
+ CopyAndRemoveParameters ( dataReq, auxReq, "_CONTEXT");
+ appRequest("DATA") = auxReq;
+ }
+ else
+ appRequest("DATA") = dataReq;
+
appRequest("_CONTEXT") = viewRequest_;
appRequest("_ACTION") = (const char*)dataReq("_ACTION") ? (const char*)dataReq("_ACTION") : "prepare";
appRequest("_VERB") = (const char*)dataReq("_VERB") ? (const char*)dataReq("_VERB") : "";
+ appRequest("_CLASS") = (const char*)dataReq("_CLASS") ? (const char*)dataReq("_CLASS") : "";
//( new PlotModTask (this, context, serviceName_.c_str(), appRequest ) )->run();
PlotModTask* pmt = new PlotModTask (this, context, serviceName_.c_str(), appRequest );
@@ -116,11 +140,12 @@ void CommonXSectView::Drop ( PmContext& context )
// Process data coming from special Modules (i.e. tag _MODULEID)
MvRequest replyRequest;
-
- if ( this->DropFromModule(dropRequest,replyRequest) )
+ bool consistency_check;
+ if ( this->DropFromModule(dropRequest,replyRequest,consistency_check) )
{
// Insert reply request to the database
- duList = this->InsertDataRequest ( replyRequest );
+ if ( consistency_check )
+ duList = this->InsertDataRequest ( replyRequest );
// The drop request has been already advanced
continue;
@@ -214,21 +239,40 @@ void CommonXSectView::Drop ( PmContext& context )
}
bool
-CommonXSectView::DropFromModule ( MvRequest& dropRequest, MvRequest& replyRequest )
+CommonXSectView::DropFromModule ( MvRequest& dropRequest, MvRequest& replyRequest, bool& consistency_check )
{
// If a request comes from a Module, identified by a tag _MODULEID, then group
// all the relative requests. These requests should be processed together.
// There are two possible set of requests coming from a Module:
// A) main verb is NETCDF: this is the case when the Module was called to
- // compute the data but not to visualise it. All the relevant visualisation
- // requests are under parameter _VISUALISE.
+ // compute the data but not to visualise it. This happens, for instance, when
+ // function mcross_sect is called inside a Macro and used in a PLOT command
+ // afterwards. All the relevant visualisation data requests are under parameter
+ // _VISUALISE.
+ // If the request also contains a hidden parameter describing the internal VIEW
+ // to be used with this dataunit, then it needs to be checked against the current
+ // VIEW. This situation can happen, for instance, in a Macro program:
+ // xs = mcross_sect ( line : [ 0,-180,0,10],... )
+ // view = mxsectview( line : [10,-180,0,10],... )
+ // plot(view, xs)
+ // Output parameter consistency_check will indicate if the consistency check
+ // has failed.
+ //
// B) others: group all subsequent requests with the same tag id.
+
// Process option A
+ consistency_check = true; // by default the consistency check returns true
if ( (const char*)dropRequest.getVerb() == string("NETCDF") )
{
replyRequest = dropRequest.getSubrequest("_VISUALISE");
+
+ // Consistency check
+ MvRequest origReq = dropRequest.getSubrequest("_VIEW_REQUEST");
dropRequest.advance();
+ if ( origReq )
+ consistency_check = this->ConsistencyCheck(viewRequest_,origReq);
+
return true;
}
diff --git a/src/uPlot/CommonXSectView.h b/src/uPlot/CommonXSectView.h
index 5a4da98..335d57f 100644
--- a/src/uPlot/CommonXSectView.h
+++ b/src/uPlot/CommonXSectView.h
@@ -89,6 +89,9 @@ public:
int ParentDataUnitId () { return parentDataUnitId_; }
+ virtual bool ConsistencyCheck( MvRequest&, MvRequest&)
+ { return true; }
+
protected:
void ApplicationName( const string& appname )
@@ -108,7 +111,7 @@ protected:
// Get output requests from executing a Module (they all have the
// same tag _MODULEID
- bool DropFromModule ( MvRequest&, MvRequest& );
+ bool DropFromModule ( MvRequest&, MvRequest&, bool& );
#if 0
// Provide Axis information
diff --git a/src/uPlot/HovmoellerView.cc b/src/uPlot/HovmoellerView.cc
index 1031436..a2dc274 100644
--- a/src/uPlot/HovmoellerView.cc
+++ b/src/uPlot/HovmoellerView.cc
@@ -64,31 +64,6 @@ HovmoellerViewM3Factory::Translate ( const MvRequest& in )
// Copy Line parameter
MvRequest viewReq("MHOVMOELLERVIEW");
-#if 0
- viewReq.addValue("LINE",(double)req("LINE",0));
- viewReq.addValue("LINE",(double)req("LINE",1));
- viewReq.addValue("LINE",(double)req("LINE",2));
- viewReq.addValue("LINE",(double)req("LINE",3));
-
- // Translate Levels interval
- viewReq("BOTTOM_LEVEL") = (double)req("BOTTOM_PRESSURE");
- viewReq("TOP_LEVEL") = (double)req("TOP_PRESSURE");
-
- // Copy Wind parameters
- viewReq("WIND_PARALLEL") = (const char*)req("WIND_PARALLEL");
- viewReq("WIND_PERPENDICULAR") = (const char*)req("WIND_PERPENDICULAR");
- viewReq("WIND_INTENSITY") = (const char*)req("WIND_INTENSITY");
-
- // Translate Vertical scaling parameter
- viewReq("VERTICAL_SCALING") = (const char*)req("PRESSURE_LEVEL_AXIS");
-
- // Overlay Control parameter is not translated
- PlotMod::Instance().MetviewError ("The Metview 3 CROSS SECTION VIEW icon is deprecated. Parameter OVERLAY CONTROL will not be internally translated.\n","WARNING");
-
- // Copy Page and Subpage parameters
- CopySomeParameters ( req,viewReq,"Subpage");
- CopySomeParameters ( req,viewReq,"Page");
-#endif
// Expand output request
MvRequest out = ObjectList::ExpandRequest(viewReq,EXPAND_DEFAULTS);
@@ -101,7 +76,9 @@ HovmoellerViewM3Factory::Translate ( const MvRequest& in )
HovmoellerView::HovmoellerView ( Page& owner,
const MvRequest& viewRequest,
const MvRequest& setupRequest ):
- CommonXSectView ( owner, viewRequest, setupRequest )
+ CommonXSectView ( owner, viewRequest, setupRequest ),
+ bDataUnit_(false),
+ bUpdateDate_(true)
{
SetVariables(viewRequest,true);
ApplicationName(type_.c_str());
@@ -110,11 +87,13 @@ HovmoellerView::HovmoellerView ( Page& owner,
HovmoellerView::HovmoellerView ( const HovmoellerView &old ) :
CommonXSectView(old)
{
- type_ = old.type_;
- bDateMin_ = old.bDateMin_;
- bDateMax_ = old.bDateMax_;
- dateMin_ = old.dateMin_;
- dateMax_ = old.dateMax_;
+ type_ = old.type_;
+ dateMin_ = old.dateMin_;
+ dateMax_ = old.dateMax_;
+ bAutoDate_ = old.bAutoDate_;
+ swapAxes_ = old.swapAxes_;
+ bDataUnit_ = old.bDataUnit_;
+ bUpdateDate_ = old.bUpdateDate_;
}
string HovmoellerView::Name()
@@ -129,7 +108,7 @@ void HovmoellerView::DescribeYourself ( ObjectInfo& description )
{
// Convert my request to macro
set<Cached> skipSet;
- description.ConvertRequestToMacro ( viewRequest_, PUT_END, MacroName().c_str(),"hovmoellerview", skipSet);
+ description.ConvertRequestToMacro ( appViewReq_, PUT_END, MacroName().c_str(),"mhovmoellerview", skipSet);
description.PutNewLine (" " );
}
@@ -150,49 +129,119 @@ void HovmoellerView::SetVariables(const MvRequest &in, bool)
lonMin_ = in(param,1);
lonMax_ = in(param,3);
+ // Check if coordinates follow Mars rules (n/w/s/e)
+ bool swap = false;
+ if ( lonMin_ > lonMax_ )
+ {
+ double W = lonMin_;
+ lonMin_ = lonMax_;
+ lonMax_ = W;
+ swap = true;
+ }
+ if( latMin_ > latMax_ )
+ {
+ double W = latMin_;
+ latMin_ = latMax_;
+ latMax_ = W;
+ swap = true;
+ }
+
+ // Send a warning message
+ if ( swap )
+ PlotMod::Instance().MetviewError ("Input geographical coordinates do not follow MARS rules (n/w/s/e). Values have been swapped ","WARNING");
+
// Set date limits
+ bool bDateMin, bDateMax;
if ( strcmp((const char*)in("DATE_MIN"),"AUTOMATIC") == 0 )
{
- bDateMin_ = true;
- dateMin_ = "2013-01-01";
+ bDateMin = true;
+ dateMin_ = "2013-01-01";
}
else
{
- bDateMin_ = false;
- dateMin_ = (const char*)in("DATE_MIN");
+ bDateMin = false;
+ dateMin_ = (const char*)in("DATE_MIN");
}
if ( strcmp((const char*)in("DATE_MAX"),"AUTOMATIC") == 0 )
{
- bDateMax_ = true;
- dateMax_ = "2013-01-01 00:01:00";
+ bDateMax = true;
+ dateMax_ = "2013-01-01 00:01:00";
+ }
+ else
+ {
+ bDateMax = false;
+ dateMax_ = (const char*)in("DATE_MAX");
}
+
+ // Both date values must be automatic or non-automatic
+ if ( bDateMin && bDateMax )
+ bAutoDate_ = true;
+ else if ( !bDateMin && !bDateMax )
+ bAutoDate_ = false;
else
{
- bDateMax_ = false;
- dateMax_ = (const char*)in("DATE_MAX");
+ PlotMod::Instance().MetviewError ("Hovmoeller Error: both parameters DATE_MIN and DATE_MAX must be automatic or non-automatic.\n","ERROR");
+ bAutoDate_ = false;
}
+
+ // Set swapAxes flag
+ swapAxes_ = ( (const char*)in("SWAP_AXES") &&
+ strcmp(in("SWAP_AXES"),"YES") == 0) ? true : false;
+
+ return;
}
bool HovmoellerView::UpdateView ()
{
- // It has already been updated
+ // Check if the View needs to be updated
if ( string(viewRequest_.getVerb()) == CARTESIANVIEW )
+ {
+ // The View has already been updated to CARTESIANVIEW,
+ // but there is one case where the Date parameter needs to be
+ // updated again: when parameters DATE_MIN and DATE_MAX in the
+ // HovmoellerView were defined as AUTOMATIC and when the
+ // CARTESIANVIEW was first created with no DataUnit attached
+ // (i.e. an empty View was plotted - in this case MAGICS needs to
+ // receive a default X/Y_DATE_MIN/MAX values). This code would not
+ // be necessary if MAGICS was able to receive a AUTOMATIC value
+ // without a DataUnit attached.
+ if ( bUpdateDate_ )
+ {
+ if ( (const char*)viewRequest_("X_AXIS_TYPE") &&
+ ( strcmp((const char*)viewRequest_("X_AXIS_TYPE"),"DATE") == 0 ) )
+ {
+ if ( bAutoDate_ )
+ {
+ viewRequest_("X_AUTOMATIC") = "ON";
+ viewRequest_.unsetParam("X_DATE_MIN");
+ viewRequest_.unsetParam("X_DATE_MAX");
+ bUpdateDate_ = false;
+ }
+ }
+ else if ( (const char*)viewRequest_("Y_AXIS_TYPE") &&
+ ( strcmp((const char*)viewRequest_("Y_AXIS_TYPE"),"DATE") == 0 ) )
+ {
+ if ( bAutoDate_ )
+ {
+ viewRequest_("Y_AUTOMATIC") = "ON";
+ viewRequest_.unsetParam("Y_DATE_MIN");
+ viewRequest_.unsetParam("Y_DATE_MAX");
+ bUpdateDate_ = false;
+ }
+ }
+ }
return true;
-
- // Translate common parameters
- //GetCommonParameters ( req, cartView );
- bool swapAxes = ( (const char*)viewRequest_("SWAP_AXES") &&
- strcmp(viewRequest_("SWAP_AXES"),"YES") == 0) ? true : false;
+ }
// Translate specific parameters
MvRequest cartView("CARTESIANVIEW");
if ( type_ == HOVLINE )
- UpdateViewLine( swapAxes, viewRequest_, cartView );
+ UpdateViewLine( cartView );
else if ( type_ == HOVAREA )
- UpdateViewArea( swapAxes, viewRequest_, cartView );
+ UpdateViewArea( cartView );
else
- UpdateViewVert( viewRequest_, cartView );
+ UpdateViewVert( cartView );
// Copy PAGE and SUBPAGE definition
CopySomeParameters( viewRequest_,cartView,"PAGE" );
@@ -220,89 +269,88 @@ void HovmoellerView::UpdateView ( MvRequest& view )
this->ApplicationInfo(view);
}
-void HovmoellerView::UpdateViewLine ( bool swapAxes, MvRequest& in, MvRequest& cartView )
+void HovmoellerView::UpdateViewLine ( MvRequest& cartView )
{
- // Check where the axes min/max values should be taken from
- if ( (const char*)viewRequest_("_DEFAULT") &&
- (int)viewRequest_("_DEFAULT") == 1 &&
- (const char*)viewRequest_("_DATAATTACHED") &&
- strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0
- )
- {
- cartView("X_AUTOMATIC") = "on";
- cartView("Y_AUTOMATIC") = "on";
- }
- else
- {
- cartView("X_AUTOMATIC") = "off";
- cartView("Y_AUTOMATIC") = "off";
- }
-
// Translate Geographical and Time coordinates
- if ( swapAxes )
+ // IMPORTANT:
+ // 1) The definition of the min/max/lat/lon coordinates must
+ // match the organisation of the netCDF data matrix, which is:
+ // | [LatNorth,LonWest] ... [LatNorth,LonEast] |
+ // | ... |
+ // | [LatSouth,LonWest] ... [LatSouth,LonEast] |
+ //
+ // 2) Hovmoeller computes values from North to South (first value
+ // in the netCDF matrix is [LatNorth,LonWest] and Magics plots them
+ // from bottom to top by default.
+ if ( swapAxes_ )
{
- cartView("Y_AXIS_TYPE") = "geoline";
+ cartView("Y_AUTOMATIC") = "OFF";
+ cartView("Y_AXIS_TYPE") = "GEOLINE";
cartView("Y_MIN_LATITUDE") = latMin_;
cartView("Y_MAX_LATITUDE") = latMax_;
- cartView("Y_MIN_LONGITUDE") = lonMin_;
- cartView("Y_MAX_LONGITUDE") = lonMax_;
+ cartView("Y_MIN_LONGITUDE") = lonMax_;
+ cartView("Y_MAX_LONGITUDE") = lonMin_;
- cartView("X_AXIS_TYPE") = "date";
- cartView("X_DATE_MIN") = dateMin_.c_str();
- cartView("X_DATE_MAX") = dateMax_.c_str();
+ cartView("X_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
+ {
+ cartView("X_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
+ }
+ else
+ {
+ cartView("X_AUTOMATIC") = "OFF";
+ cartView("X_DATE_MIN") = dateMin_.c_str();
+ cartView("X_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
+ }
// Copy axis definition
- cartView.setValue("HORIZONTAL_AXIS",in.getSubrequest("TIME_AXIS"));
- cartView.setValue("VERTICAL_AXIS",in.getSubrequest("GEO_AXIS"));
+ cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
+ cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("GEO_AXIS"));
}
else
{
- cartView("X_AXIS_TYPE") = "geoline";
- cartView("X_MIN_LATITUDE") = latMin_;
- cartView("X_MAX_LATITUDE") = latMax_;
+ cartView("X_AUTOMATIC") = "OFF";
+ cartView("X_AXIS_TYPE") = "GEOLINE";
+ cartView("X_MIN_LATITUDE") = latMax_;
+ cartView("X_MAX_LATITUDE") = latMin_;
cartView("X_MIN_LONGITUDE") = lonMin_;
cartView("X_MAX_LONGITUDE") = lonMax_;
- cartView("Y_AXIS_TYPE") = "date";
- cartView("Y_DATE_MIN") = dateMin_.c_str();
- cartView("Y_DATE_MAX") = dateMax_.c_str();
+ cartView("Y_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
+ {
+ cartView("Y_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
+ }
+ else
+ {
+ cartView("Y_AUTOMATIC") = "OFF";
+ cartView("Y_DATE_MIN") = dateMin_.c_str();
+ cartView("Y_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
+ }
// Copy axis definition
- cartView.setValue("HORIZONTAL_AXIS",in.getSubrequest("GEO_AXIS"));
- cartView.setValue("VERTICAL_AXIS",in.getSubrequest("TIME_AXIS"));
+ cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("GEO_AXIS"));
+ cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
}
}
-void HovmoellerView::UpdateViewArea ( bool swapAxes, MvRequest& in, MvRequest& cartView )
+void HovmoellerView::UpdateViewArea ( MvRequest& cartView )
{
// Get geo axis
- MvRequest geoAxisReq = in.getSubrequest("GEO_AXIS");
+ MvRequest geoAxisReq = viewRequest_.getSubrequest("GEO_AXIS");
if ( !geoAxisReq )
geoAxisReq.setVerb("MAXIS");
- // Check where the axes min/max values should be taken from
- bool axisAuto;
- if ( (const char*)viewRequest_("_DEFAULT") &&
- (int)viewRequest_("_DEFAULT") == 1 &&
- (const char*)viewRequest_("_DATAATTACHED") &&
- strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0
- )
- {
- cartView("X_AUTOMATIC") = "on";
- cartView("Y_AUTOMATIC") = "on";
- axisAuto = true;
- }
- else
- {
- cartView("X_AUTOMATIC") = "off";
- cartView("Y_AUTOMATIC") = "off";
- axisAuto = false;
- }
-
// Translate Geographical and Time coordinates
- string dir = (const char*)in("AVERAGE_DIRECTION");
+ string dir = (const char*)viewRequest_("AVERAGE_DIRECTION");
int hAxis, vAxis; // 1 - time, 2 - latitude, 3 - longitude
- if ( swapAxes )
+ if ( swapAxes_ )
{
hAxis = ( dir == "EAST_WEST" ) ? 2 : 1;
vAxis = ( dir == "EAST_WEST" ) ? 1 : 3;
@@ -315,21 +363,27 @@ void HovmoellerView::UpdateViewArea ( bool swapAxes, MvRequest& in, MvRequest& c
if ( hAxis == 1 ) // Horizontal time axis
{
- cartView("X_AXIS_TYPE") = "date";
- cartView("X_DATE_MIN") = dateMin_.c_str();
- cartView("X_DATE_MAX") = dateMax_.c_str();
+ cartView("X_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
+ {
+ cartView("X_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
+ }
+ else
+ {
+ cartView("X_AUTOMATIC") = "OFF";
+ cartView("X_DATE_MIN") = dateMin_.c_str();
+ cartView("X_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
+ }
geoAxisReq("AXIS_ORIENTATION") = "VERTICAL";
if ( vAxis == 2 ) // vertical latitude axis
{
geoAxisReq("AXIS_TICK_LABEL_TYPE") = "LATITUDE";
- if ( axisAuto )
- cartView("Y_AUTOMATIC_REVERSE") = "on";
- else
- {
- cartView("Y_MIN") = latMin_;
- cartView("Y_MAX") = latMax_;
- }
+ cartView("Y_MIN") = latMin_;
+ cartView("Y_MAX") = latMax_;
}
else // vertical longitude axis
{
@@ -339,7 +393,7 @@ void HovmoellerView::UpdateViewArea ( bool swapAxes, MvRequest& in, MvRequest& c
}
// Set axes definitions
- cartView.setValue("HORIZONTAL_AXIS",in.getSubrequest("TIME_AXIS"));
+ cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
cartView.setValue("VERTICAL_AXIS",geoAxisReq);
}
else if ( hAxis == 2 ) // Horizontal latitude axis
@@ -349,13 +403,24 @@ void HovmoellerView::UpdateViewArea ( bool swapAxes, MvRequest& in, MvRequest& c
geoAxisReq("AXIS_ORIENTATION") = "HORIZONTAL";
geoAxisReq("AXIS_TICK_LABEL_TYPE") = "LATITUDE";
- cartView("Y_AXIS_TYPE") = "date";
- cartView("Y_DATE_MIN") = dateMin_.c_str();
- cartView("Y_DATE_MAX") = dateMax_.c_str();
+ cartView("Y_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
+ {
+ cartView("Y_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
+ }
+ else
+ {
+ cartView("Y_AUTOMATIC") = "OFF";
+ cartView("Y_DATE_MIN") = dateMin_.c_str();
+ cartView("Y_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
+ }
// Set axes definitions
cartView.setValue("HORIZONTAL_AXIS",geoAxisReq);
- cartView.setValue("VERTICAL_AXIS",in.getSubrequest("TIME_AXIS"));
+ cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
}
else // Horizontal longitude axis
{
@@ -364,87 +429,74 @@ void HovmoellerView::UpdateViewArea ( bool swapAxes, MvRequest& in, MvRequest& c
geoAxisReq("AXIS_ORIENTATION") = "HORIZONTAL";
geoAxisReq("AXIS_TICK_LABEL_TYPE") = "LONGITUDE";
- cartView("Y_AXIS_TYPE") = "date";
- cartView("Y_DATE_MIN") = dateMin_.c_str();
- cartView("Y_DATE_MAX") = dateMax_.c_str();
+ cartView("Y_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
+ {
+ cartView("Y_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
+ }
+ else
+ {
+ cartView("Y_AUTOMATIC") = "OFF";
+ cartView("Y_DATE_MIN") = dateMin_.c_str();
+ cartView("Y_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
+ }
// Set axes definitions
cartView.setValue("HORIZONTAL_AXIS",geoAxisReq);
- cartView.setValue("VERTICAL_AXIS",in.getSubrequest("TIME_AXIS"));
+ cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
}
}
-void HovmoellerView::UpdateViewVert ( MvRequest& in, MvRequest& cartView )
+void HovmoellerView::UpdateViewVert ( MvRequest& cartView )
{
// Vertical scaling mode
- const char* vs = "regular";
- if ( (const char*)in("VERTICAL_SCALING") && strcmp((const char*)in("VERTICAL_SCALING"),"LOG") == 0 )
- vs = "logarithmic";
-
- // Check where the axes min/max values should be taken from
- if ( (const char*)viewRequest_("_DEFAULT") &&
- (int)viewRequest_("_DEFAULT") == 1 &&
- (const char*)viewRequest_("_DATAATTACHED") &&
- strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0
- )
+ const char* vs = "REGULAR";
+ if ( (const char*)viewRequest_("VERTICAL_SCALING") && strcmp((const char*)viewRequest_("VERTICAL_SCALING"),"LOG") == 0 )
+ vs = "LOGARITHMIC";
+
+ // Translate Vertical and Time coordinates
+ cartView("X_AXIS_TYPE") = "DATE";
+ if ( bAutoDate_ && bDataUnit_ )
{
- cartView("X_AUTOMATIC") = "on";
- cartView("Y_AUTOMATIC") = "on";
+ cartView("X_AUTOMATIC") = "ON";
+ bUpdateDate_ = false;
}
else
{
- cartView("X_AUTOMATIC") = "off";
- cartView("Y_AUTOMATIC") = "off";
+ cartView("X_AUTOMATIC") = "OFF";
+ cartView("X_DATE_MIN") = dateMin_.c_str();
+ cartView("X_DATE_MAX") = dateMax_.c_str();
+ if ( !bAutoDate_ )
+ bUpdateDate_ = false;
}
- // Translate Vertical and Time coordinates
- cartView("X_AXIS_TYPE") = "date";
- cartView("X_DATE_MIN") = dateMin_.c_str();
- cartView("X_DATE_MAX") = dateMax_.c_str();
-
+ cartView("Y_AUTOMATIC") = "OFF";
cartView("Y_AXIS_TYPE") = vs;
cartView("Y_MIN") = yMin_;
cartView("Y_MAX") = yMax_;
// Copy axis definition
- cartView.setValue("HORIZONTAL_AXIS",in.getSubrequest("TIME_AXIS"));
- cartView.setValue("VERTICAL_AXIS",in.getSubrequest("VERTICAL_AXIS"));
+ cartView.setValue("HORIZONTAL_AXIS",viewRequest_.getSubrequest("TIME_AXIS"));
+ cartView.setValue("VERTICAL_AXIS",viewRequest_.getSubrequest("VERTICAL_AXIS"));
}
-void HovmoellerView::ApplicationInfo( const MvRequest& req)
+void HovmoellerView::ApplicationInfo( const MvRequest& in)
{
- // If it is not a VIEW request, try to find a hidden VIEW in the request
- MvRequest viewReq;
- if ( ObjectList::IsView(req.getVerb()) )
- viewReq = req;
- else
+ // Check if there is a Data Unit attached
+ MvRequest req = in;
+ while (req)
{
- MvRequest aux = req.getSubrequest("NETCDF_DATA");
- if ( (const char*)aux("_CARTESIANVIEW") )
- viewReq = aux.getSubrequest("_CARTESIANVIEW");
- else
+ if ( ObjectList::IsDataUnit(req.getVerb()) )
{
- PlotMod::Instance().MetviewError ("Missing View Request in HovmoellerView::ApplicationInfo","WARNING");
+ bDataUnit_ = true;
return;
}
+ req.advance();
}
-
- // Update the DATE_MIN/MAX parameters in the View if the original values
- // were AUTOMATIC and the Hovmoeller application provided new values
- if ( bDateMin_ )
- {
- string str = (const char*)viewReq("X_DATE_MIN") ? "X_DATE_MIN" : "Y_DATE_MIN";
- dateMin_ = (const char*)viewReq(str.c_str());
- viewRequest_(str.c_str()) = dateMin_.c_str();
- bDateMin_ = false;
- }
- if ( bDateMax_ )
- {
- string str = (const char*)viewReq("X_DATE_MAX") ? "X_DATE_MAX" : "Y_DATE_MAX";
- dateMax_ = (const char*)viewReq(str.c_str());
- viewRequest_(str.c_str()) = dateMax_.c_str();
- bDateMax_ = false;
- }
-
+
+ bDataUnit_ = false;
return;
}
diff --git a/src/uPlot/HovmoellerView.h b/src/uPlot/HovmoellerView.h
index 393a430..e498620 100644
--- a/src/uPlot/HovmoellerView.h
+++ b/src/uPlot/HovmoellerView.h
@@ -117,16 +117,21 @@ private:
void ApplicationInfo( const MvRequest& );
// Update View according to the Hovmoeller type
- void UpdateViewLine ( bool, MvRequest&, MvRequest& );
- void UpdateViewArea ( bool, MvRequest&, MvRequest& );
- void UpdateViewVert ( MvRequest&, MvRequest& );
+ void UpdateViewLine ( MvRequest& );
+ void UpdateViewArea ( MvRequest& );
+ void UpdateViewVert ( MvRequest& );
// Variable members
- string type_; // Line, Area, Vertical
- string dateMin_; // date 1 current used in the axis
- string dateMax_; // date 2 current used in the axis
- bool bDateMin_; // true: date 1 has a default value 'automatic'
- bool bDateMax_; // true: date 2 has a default value 'automatic'
+ string type_; // Line, Area, Vertical
+ string dateMin_; // date 1 current used in the axis
+ string dateMax_; // date 2 current used in the axis
+ bool bAutoDate_; // true: dates min&max have a default value 'automatic'
+ bool swapAxes_; // true: vertical axis is geoline
+ bool bDataUnit_; // true: there is a DU to be plotted (e.g. plot is not
+ // empty). If there is no DU, default Date values
+ // must be assigned to dateMin_/dateMax_ because
+ // Magics do not accept value AUTOMATIC.
+ bool bUpdateDate_; // true: parameter Date needs to be updated
};
#endif
diff --git a/src/uPlot/MacroConverter.cc b/src/uPlot/MacroConverter.cc
index 7f82938..7de639d 100644
--- a/src/uPlot/MacroConverter.cc
+++ b/src/uPlot/MacroConverter.cc
@@ -22,17 +22,28 @@ DefaultMacroConverter defaultConverterInstance("Default");
ReadMacroConverter readConverterInstance("READ");
// Family converter
-FamilyMacroConverter familyConverterInstance("FAMILY");
-CurveFamilyMacroConverter curvefamilyConverterInstance("CURVES_FAMILY");
-FamilyMacroConverter divrotfamilyConverterInstance("DIVROT_FAMILY");
-FamilyMacroConverter vectorsfamilyConverterInstance("VECTORS_FAMILY");
-FamilyMacroConverter spectrafamilyConverterInstance("SPECTRA_FAMILY");
-FamilyMacroConverter pottfamilyConverterInstance("POTT_FAMILY");
-FamilyMacroConverter velstrfamilyConverterInstance("VELSTR_FAMILY");
-FamilyMacroConverter tephigramfamilyConverterInstance("TEPHIGRAM_FAMILY");
-FamilyMacroConverter tephidatafamilyConverterInstance("TEPHIDATA_FAMILY");
-FamilyMacroConverter odbManagerFamilyConverterInstance("ODBVISUALISER_FAMILY");
-FamilyMacroConverter netcdfManagerFamilyConverterInstance("NETCDFPLUS_FAMILY");
+FamilyMacroConverter familyFMC ("FAMILY");
+FamilyMacroConverter divrotFMC ("DIVROT_FAMILY");
+FamilyMacroConverter vectorsFMC ("VECTORS_FAMILY");
+FamilyMacroConverter spectraFMC ("SPECTRA_FAMILY");
+FamilyMacroConverter pottFMC ("POTT_FAMILY");
+FamilyMacroConverter velstrFMC ("VELSTR_FAMILY");
+FamilyMacroConverter tephigramFMC ("TEPHIGRAM_FAMILY");
+FamilyMacroConverter tephidataFMC ("TEPHIDATA_FAMILY");
+FamilyMacroConverter odbFMC ("ODBVISUALISER_FAMILY");
+FamilyMacroConverter netcdfFMC ("NETCDFPLUS_FAMILY");
+
+// Hovmoeller application uses the Family converter
+FamilyMacroConverter lineHFMC ("LINE_HOVM");
+FamilyMacroConverter areaHFMC ("AREA_HOVM");
+FamilyMacroConverter verticalHFMC ("VERTICAL_HOVM");
+FamilyMacroConverter expandHFMC ("EXPAND_HOVM");
+
+// Thermo dynamics application uses the Family converter
+FamilyMacroConverter gribThermo ("GRIB_THERMO");
+FamilyMacroConverter bufrThermo ("BUFR_THERMO");
+
+CurveFamilyMacroConverter curveMC("CURVES_FAMILY");
// Simple Formula Family converter
FormulaFamilyMacroConverter simpleformulafamilyConverterInstance("SIMPLE_FORMULA_FAMILY");
@@ -65,9 +76,8 @@ ConverterTraits::DefaultObject()
/////////////// DefaultMacroConverter ///////////////
Cached DefaultMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
{
- // Convert the request and return the object name.
+ // Convert the request and return the object name
Cached duName = ObjectInfo::GenerateName(req);
-
Cached macroName = ObjectList::MacroName(req.getVerb());
oi->ConvertRequestToMacro ( req, PUT_END,duName,macroName );
@@ -84,26 +94,35 @@ Cached ReadMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
Cached FamilyMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
{
- Cached returnName;
- MvRequest tmpReq = req;
+ Cached returnName;
+ MvRequest tmpReq = req;
- const char *name = tmpReq("_NAME");
- Cached duName = ObjectInfo::GenerateName(req);
+ const char *name = tmpReq("_NAME");
+ Cached duName = ObjectInfo::GenerateName(req);
- // First request contains just the family part, so skip it
- tmpReq.advance();
+ // Usually, first request contains just the family part.
+ // If this is the case then skip it
+ string sverb = (const char*)tmpReq.getVerb();
+ if ( sverb.empty() )
+ {
+ oi->PutNewLine("# ERROR: Could not convert the Family icon");
+ returnName = "error";
+ }
+ std::size_t found = sverb.find("_FAMILY");
+ if ( found != std::string::npos )
+ tmpReq.advance();
- if ( name && ! (const char *)tmpReq("_NAME") )
- tmpReq("_NAME") = name;
+ if ( name && ! (const char *)tmpReq("_NAME") )
+ tmpReq("_NAME") = name;
- // Get the macroname to call and convert it to lowercase.
- Cached familyType = ObjectList::MacroName(tmpReq.getVerb() );
+ // Get the macroname to call and convert it to lowercase.
+ Cached familyType = ObjectList::MacroName(tmpReq.getVerb() );
- returnName = ObjectInfo::SpaceToUnderscore ( duName );
+ returnName = ObjectInfo::SpaceToUnderscore ( duName );
- oi->ConvertRequestToMacro ( tmpReq, PUT_END, returnName,familyType);
+ oi->ConvertRequestToMacro ( tmpReq, PUT_END, returnName,familyType);
- return returnName;
+ return returnName;
}
Cached FormulaFamilyMacroConverter::Convert(MvRequest &req,ObjectInfo *oi )
@@ -339,23 +358,32 @@ Cached ComputeMacroConverter::Convert(MvRequest & req,ObjectInfo *oi )
}
-Cached DataMacroConverter::Convert(MvRequest &req,ObjectInfo *oi)
+Cached DataMacroConverter::Convert(MvRequest &req, ObjectInfo *oi)
{
// Obtain the object name
Cached duName = ObjectInfo::GenerateName(req);
// Obtain the fully qualified path to the object
- const char* mvPath = req( "_NAME" );
+ string filename;
+ const char* mvPath = req("_PATH");
+ if ( mvPath )
+ filename = mvPath;
+ else
+ {
+ mvPath = req( "_NAME" );
+ if ( mvPath )
+ filename = MakeUserPath(mvPath);
+ }
+
if ( mvPath )
{
// Get the full path and check if it can be opened
- Cached filename = MakeUserPath(mvPath);
- if ( !FileCanBeOpened(filename,"r") )
- filename = Cached("Please provide here an input filename");
+ if ( !FileCanBeOpened(filename.c_str(),"r") )
+ filename = "Please provide here an input filename";
oi->PutNewLine ( "" );
oi->PutNewLine ( Cached ( "# Importing ") + duName );
- oi->PutNewLine ( duName + Cached(" = read ( \"") + filename + Cached("\")") );
+ oi->PutNewLine ( duName + Cached(" = read ( \"") + filename.c_str() + Cached("\")") );
}
else
duName = "";
diff --git a/src/uPlot/MapView.cc b/src/uPlot/MapView.cc
index 52e03c8..49ee639 100644
--- a/src/uPlot/MapView.cc
+++ b/src/uPlot/MapView.cc
@@ -217,6 +217,7 @@ void MapView::DecodeDataUnit ( MvIcon& dataUnit )
// retrieve the data offset and matching info
// Pass this information to the page for matching
int dimFlag = 0;
+ bool swap;
while ( decoder->ReadNextData() )
{
long offset = decoder->CurrentOffset();
@@ -233,7 +234,7 @@ void MapView::DecodeDataUnit ( MvIcon& dataUnit )
MatchingInfo nextDataInfo = decoder->CreateMatchingInfo();
// Are they companions ?
- if ( !matchingCriteria_.IsPair( dataInfo, nextDataInfo ) ||
+ if ( !matchingCriteria_.IsPair( dataInfo, nextDataInfo, swap ) ||
!matchingCriteria_.Match ( dataInfo, nextDataInfo ))
{
// No, so plot them separately
@@ -244,9 +245,18 @@ void MapView::DecodeDataUnit ( MvIcon& dataUnit )
}
else
{
- // Yes, so plot them together
+ // Yes, so plot them together.
+ // Insert dataunit using the correct order of the offsets
+ // (i.e. u/v not v/u). This is a Magics requirement.
dimFlag = dimFlag | 2;
- if ( Owner().InsertDataUnit ( dataUnit.Id(), offset, nextDataOffset, dataInfo, subpageId) == false ) break;
+ bool flag;
+ if ( swap )
+ flag = Owner().InsertDataUnit ( dataUnit.Id(), nextDataOffset, offset, dataInfo, subpageId );
+ else
+ flag = Owner().InsertDataUnit ( dataUnit.Id(), offset, nextDataOffset, dataInfo, subpageId );
+
+ if ( flag == false )
+ break;
}
}
else // An isolated field, who just happens to have a companion defined.
diff --git a/src/uPlot/MatchingCriteria.cc b/src/uPlot/MatchingCriteria.cc
index 2720c20..b6da0cc 100644
--- a/src/uPlot/MatchingCriteria.cc
+++ b/src/uPlot/MatchingCriteria.cc
@@ -64,17 +64,33 @@ MatchingCriteria::~MatchingCriteria ()
}
// Match
-// compare two matching informations
-//
+// Compare two matching informations.
+// In case the two input arguments are considered a pair, also checks if
+// they are given in the correct order, i.e., the first input argument is
+// expected to be the "first" companion (e.g. pair u/v the u is the first
+// companion)
bool
-MatchingCriteria::IsPair(const MatchingInfo& lhs, const MatchingInfo& rhs) const
+MatchingCriteria::IsPair(const MatchingInfo& arg1, const MatchingInfo& arg2, bool& swap) const
{
- MvRequest lhsRequest = lhs.matchingRequest_;
- MvRequest rhsRequest = rhs.matchingRequest_;
- Cached companionExpected = lhsRequest( "MY_COMPANION" );
- Cached parameter = rhsRequest( "PARAM" );
-
- return ( companionExpected == parameter );
+ MvRequest req1 = arg1.matchingRequest_;
+ MvRequest req2 = arg2.matchingRequest_;
+ string companionExpected = (const char*)req1( "MY_COMPANION" );
+ string parameter = (const char*)req2( "PARAM" );
+
+ // The elements are companions
+ // Check if they are given in the correct order
+ if ( companionExpected == parameter )
+ {
+ if ( (const char*)req1("FIRST_COMPANION") &&
+ (int)req1("FIRST_COMPANION") == 1 )
+ swap = false;
+ else
+ swap = true;
+
+ return true;
+ }
+
+ return false;
}
bool
diff --git a/src/uPlot/MatchingCriteria.h b/src/uPlot/MatchingCriteria.h
index f47b340..9b7017f 100644
--- a/src/uPlot/MatchingCriteria.h
+++ b/src/uPlot/MatchingCriteria.h
@@ -56,14 +56,14 @@ class MatchingInfo;
class MatchingCriteria {
public:
- MatchingCriteria ( const MvRequest& matchingRequest );
- ~MatchingCriteria();
+ MatchingCriteria ( const MvRequest& matchingRequest );
+ ~MatchingCriteria();
- bool Match ( const MatchingInfo&, const MatchingInfo& ) const;
- bool IsPair( const MatchingInfo&, const MatchingInfo& ) const;
+ bool Match ( const MatchingInfo&, const MatchingInfo& ) const;
+ bool IsPair( const MatchingInfo&, const MatchingInfo&, bool& ) const;
private:
- MvRequest matchingRequest_;
+ MvRequest matchingRequest_;
};
#endif
diff --git a/src/uPlot/MvGribDecoder.cc b/src/uPlot/MvGribDecoder.cc
index 468f6ff..f6c645b 100644
--- a/src/uPlot/MvGribDecoder.cc
+++ b/src/uPlot/MvGribDecoder.cc
@@ -101,30 +101,34 @@ GribDecoder::CreateMatchingInfo ()
// we will later need to decide whether to apply automatic scaling or not
//ir matchingRequest("DERIVED") = metadataRequest_("DERIVED");
- // Is it an image field?
- const char* repres = metadataRequest_("REPRES");
- if ( ObjectList::IsImage( repres ) )
- matchingRequest( "DATA_TYPE" ) = "IMAGE";
- else
- {
- // Get parameter name
- char acc0[64];
- size_t nsize;
- field* ff = currentField_.libmars_field();
- grib_get_string( ff->handle, "shortName", acc0, &nsize );
- matchingRequest ( "PARAM" ) = acc0;
- matchingRequest( "DATA_TYPE" ) = "GRIB";
-
- // Has this parameter a companion?
- string pair,mode;
- ObjectList::GetCompanion( string(acc0), pair, mode );
- if ( pair != "no_pair" )
- {
- matchingRequest ( "MY_COMPANION" ) = pair.c_str();
- if ( !mode.empty() )
- matchingRequest ( "WIND_MODE" ) = mode.c_str();
- }
- }
-
- return MatchingInfo( matchingRequest );
+ // Is it an image field?
+ const char* repres = metadataRequest_("REPRES");
+ if ( ObjectList::IsImage( repres ) )
+ matchingRequest( "DATA_TYPE" ) = "IMAGE";
+ else
+ {
+ // Get parameter name
+ const size_t cMaxBuf = 99;
+ char acc0[cMaxBuf+1];
+ size_t nsize = cMaxBuf;
+
+ field* ff = currentField_.libmars_field();
+ grib_get_string( ff->handle, "shortName", acc0, &nsize );
+ matchingRequest ( "PARAM" ) = acc0;
+ matchingRequest( "DATA_TYPE" ) = "GRIB";
+
+ // Has this parameter a companion?
+ string pair,mode;
+ bool first_companion;
+ ObjectList::GetCompanion( string(acc0), pair, mode, first_companion );
+ if ( pair != "no_pair" )
+ {
+ matchingRequest ( "MY_COMPANION" ) = pair.c_str();
+ matchingRequest ( "FIRST_COMPANION" ) = first_companion;
+ if ( !mode.empty() )
+ matchingRequest ( "WIND_MODE" ) = mode.c_str();
+ }
+ }
+
+ return MatchingInfo( matchingRequest );
}
diff --git a/src/uPlot/MvMain.cc b/src/uPlot/MvMain.cc
index 798c152..e516135 100644
--- a/src/uPlot/MvMain.cc
+++ b/src/uPlot/MvMain.cc
@@ -11,6 +11,7 @@
#include "MvRequest.h"
#include "Root.h"
#include "MvDebugPrintControl.h"
+#include "MvScanFileType.h"
#include "PlotModInteractive.h"
#include "uPlotApp.h"
#include "MagPlusInteractiveService.h"
@@ -19,33 +20,79 @@
using namespace std;
-bool SetUplotEnv (int argc, char **argv, MvRequest &req, bool &reqExists)
-{
- // Create Root instance
- Root::Create();
-
- // Initialize Mars communication
- marsinit(&argc,argv,0,0,0);
- mvSetMarslogLevel();
-
- // Read the input request, if available
- reqExists = false;
- if (argc > 1)
- {
- //Check if the input request exists
- if ( access(argv[1],F_OK) == 0 )
- {
- //Read the initial input request saved by uPlotManager
- req.read(argv[1]);
- req.print();
+const string PLOT_STAND_ALONE = "plotSA";
- // Skip UPLOT_MANAGER request
- if ( strcmp(req.getVerb(),"UPLOT_MANAGER") == 0)
- req.advance();
-
- reqExists = true;
- }
- }
+bool SetUplotEnv (int argc, char **argv, string& mode, MvRequest &req, bool &reqExists, string& errorMessage)
+{
+ // Create Root instance
+ Root::Create();
+
+ // Initialize Mars communication
+ marsinit(&argc,argv,0,0,0);
+ mvSetMarslogLevel();
+
+ // Check if the input filename exists.
+ // If the filename does not exist then uPlot is running in the
+ // INTERACTIVE mode and should continue running.
+ // If uPlot is running STANDALONE mode then the filename does exist
+ // because this is checked in the Metview initialisation script.
+ reqExists = false;
+ if (argc <= 1 || access(argv[1],F_OK) != 0 )
+ return true;
+
+ // Read the input file or request
+ if ( mode == PLOT_STAND_ALONE )
+ {
+ // uPlot is running stand alone.
+ // First, find out the type of the input filename
+ const char* filename = (const char*)argv[1];
+ string stype = ScanFileType(filename);
+ if ( stype == string("BAD") )
+ {
+ errorMessage = "<<< METVIEW ERROR >>>\n\n\nInput file type not recognised!\n\nFilename: ";
+ errorMessage += string(filename) + "\n\nFile type: ";
+ errorMessage += stype + "\n";
+ return false;
+ }
+
+ // Only file types GRIB/BUFR/GEOPOINTS can be directly visualised
+ if ( stype == "GRIB" || stype == "BUFR" || stype == "GEOPOINTS" )
+ {
+ // Build a request
+ req.setVerb( stype.c_str() );
+ req.setValue( "PATH", filename );
+ req.setValue( "_NAME",filename );
+ req.setValue( "_CLASS",stype.c_str() );
+ req.setValue( "_PATH",filename );
+
+ // Use contour ecChart convention
+ if ( stype == "GRIB" )
+ {
+ MvRequest req1("MCONT");
+ req1("CONTOUR_AUTOMATIC_SETTING") = "ECCHART";
+
+ req = req + req1;
+ }
+ }
+ else
+ {
+ errorMessage = "<<< METVIEW ERROR >>>\n\n\nOnly file types GRIB/BUFR/GEOPOINTS can be directly visualised!\n\nFilename: ";
+ errorMessage += string(filename) + "\n\nFile type: ";
+ errorMessage += stype + "\n";
+ return false;
+ }
+ }
+ else
+ {
+ //Read the initial input request saved by uPlotManager
+ req.read(argv[1]);
+
+ // Skip UPLOT_MANAGER request
+ if ( strcmp(req.getVerb(),"UPLOT_MANAGER") == 0)
+ req.advance();
+ }
+
+ reqExists = true;
//DOES IT NEED TO TEST FOR INTERACTIVE MODE?????
// CHECK THIS CODE LATER WHEN THE EXPORT BUTTON IS ACTIVATED
@@ -75,75 +122,87 @@ bool SetUplotEnv (int argc, char **argv, MvRequest &req, bool &reqExists)
return PlotMod::Instance().IsWindow();
#endif
- return true;
+
+ return true;
}
-string GetProcessName ()
+string GetProcessName (string& mode)
{
- // Build a process name according to the process id
- char name[64];
- sprintf(name,"uPlot%ld",(long int)getpid());
-
- return string(name);
+ // Build process name: a) stand alone plotting or
+ // b) according to the process id
+ string name;
+ if ( mode == PLOT_STAND_ALONE )
+ name = "uPlot";
+ else
+ name = "uPlot%ld" + (long int)getpid();
+
+ return name;
}
int main(int argc, char **argv)
{
- // Get process name
- string name = GetProcessName();
-
- MvRequest req;
- bool reqExists;
-
- // Setup uPlot environment
- if ( SetUplotEnv(argc,argv,req,reqExists) )
- {
- //Initialise resorces from a static library (libMvQtGui)
- Q_INIT_RESOURCE(window);
- Q_INIT_RESOURCE(keyDialog);
-
- // Start uPlot interactively with Qt facilities
- uPlotApp app(argc, argv, name.c_str());
- MagPlusInteractiveService* magplus = new MagPlusInteractiveService();
- MagPlusService::Instance(magplus);
-
- PlotModInteractive* pm = new PlotModInteractive();
- PlotMod::Instance(pm);
-
- // Instantiate uPlot Display Window
- uPlotBase *pw = new uPlot;
- magplus->setPlotApplication(pw);
- SuperPage::setPlotApplication(pw);
- pm->setPlotApplication(pw);
-
- //PlotModInteractive* pm = new PlotModInteractive();
- //PlotMod::Instance(pm);
-
- // Instantiate uPlot Display Window
- //uPlot *pw = new uPlot;
-
- // Initialize plotting dimension
- double x = 29.7;
- double y = 21.;
- pw->setPlotWidgetSize(x,y);
-
- // Enable Drag and Drop
- pw->EnableDropAction(name);
-
- // Call myself to execute the initial request
- // It needs to be execute after uPlot window has been created
- if(reqExists)
- MvApplication::callService ( name.c_str(),req,0 );
-
- // Show uPlot
- pw->show();
-
- return app.exec();
- }
+ // Retrieve the processing mode
+ string metviewMode = (const char*)getenv("METVIEW_MODE");
+ string name = GetProcessName(metviewMode);
+
+ MvRequest req;
+ bool reqExists;
+
+ // Setup uPlot environment
+ string errorMessage;
+ bool ok = SetUplotEnv(argc,argv,metviewMode,req,reqExists,errorMessage);
+
+ //Initialise resorces from a static library (libMvQtGui)
+ Q_INIT_RESOURCE(window);
+ Q_INIT_RESOURCE(keyDialog);
+
+ // Start uPlot interactively with Qt facilities
+ uPlotApp app(argc, argv, name.c_str());
+ MagPlusInteractiveService* magplus = new MagPlusInteractiveService();
+ MagPlusService::Instance(magplus);
+
+ PlotModInteractive* pm = new PlotModInteractive();
+ PlotMod::Instance(pm);
+
+ // If function SetUplotEnv returned an error then send an error
+ // message and abort uPlot.
+ // This test is performed here because class PlotMod needs to be
+ // intantiated before function errorMessage can be used. This error
+ // message is issued when uPlot is running in the standalone mode and
+ // there is a problem in the input filename. In this case, function
+ // errorMessage must be called, instead of "exit(0)" for instance,
+ // because Event needs also to be terminated.
+ if ( !ok )
+ PlotMod::Instance().errorMessage(errorMessage.c_str());
+
+ // Instantiate uPlot Display Window
+ uPlotBase *pw = new uPlot;
+ magplus->setPlotApplication(pw);
+ SuperPage::setPlotApplication(pw);
+ pm->setPlotApplication(pw);
+
+ // Initialize plotting dimension
+ double x = 29.7;
+ double y = 21.;
+ pw->setPlotWidgetSize(x,y);
+
+ // Enable Drag and Drop
+ pw->EnableDropAction(name);
+
+ // Call myself to execute the initial request
+ // It needs to be execute after uPlot window has been created
+ if(reqExists)
+ MvApplication::callService ( name.c_str(),req,0 );
+
+ // Show uPlot
+ pw->show();
+
+ return app.exec();
//DOES IT NEED TO TEST FOR INTERACTIVE MODE?????
// CHECK THIS CODE LATER WHEN THE EXPORT BUTTON IS ACTIVATED
+#if 0
else
{
// Start uPlot without a window (eg. batch mode or interactive mode
@@ -156,6 +215,7 @@ int main(int argc, char **argv)
// app.run();
}
+#endif
- Root::ServerDead(0,0);
+ Root::ServerDead(0,0);
}
diff --git a/src/uPlot/MvQLayerContentsIcon.cc b/src/uPlot/MvQLayerContentsIcon.cc
index 94a47b1..b853f88 100644
--- a/src/uPlot/MvQLayerContentsIcon.cc
+++ b/src/uPlot/MvQLayerContentsIcon.cc
@@ -97,7 +97,7 @@ void MvQLayerContentsIcon::startEditor()
//MvRequest iconRequest = icon_.Request();
MvRequest req;
- req.read(MakeUserPath(path_.toStdString().c_str()));
+ req.read(MakeUserPath(path_.toStdString().c_str()).c_str());
//cout << "ContentsItem::Edit " << endl;
req.print();
diff --git a/src/uPlot/ObjectInfo.cc b/src/uPlot/ObjectInfo.cc
index 73e8caf..a0101bd 100644
--- a/src/uPlot/ObjectInfo.cc
+++ b/src/uPlot/ObjectInfo.cc
@@ -92,8 +92,8 @@ ObjectInfo::ConvertRequestToMacro( MvRequest& inRequest,
// Can we follow subRequest also ?
if ( (const char *)subRequest("_NAME") )
{
- Cached fullName = MakeUserPath(subRequest("_NAME") );
- if ( FileCanBeOpened(fullName,"r") )
+ string fullName = MakeUserPath((const char*)subRequest("_NAME") );
+ if ( FileCanBeOpened(fullName.c_str(),"r") )
{
Cached returnName = Convert(subRequest);
if ( strcmp(returnName,"") )
@@ -120,22 +120,22 @@ ObjectInfo::ConvertRequestToMacro( MvRequest& inRequest,
{
// Try to find out if this is a file reference.
// We need to get the full path
- Cached tmpName = value;
+ string tmpName = value;
if ( IsParameterSet(inRequest,"_NAME") )
- tmpName = dirname(inRequest("_NAME")) + Cached("/") + value;
+ tmpName = string(dirname(inRequest("_NAME"))) + "/" + value;
- Cached refName = MakeUserPath(tmpName);
- if ( access( refName, R_OK ) == 0 )
+ string refName = MakeUserPath(tmpName);
+ if ( access( refName.c_str(), R_OK ) == 0 )
{
// If it is a DATA (binary) file, creates a dummy request.
// The crucial information needed is parameter _NAME
- if ( ! IsBinaryOrMissingFile( refName ) )
- subRequest.read ( (const char*) refName);
+ if ( ! IsBinaryOrMissingFile(refName.c_str()) )
+ subRequest.read(refName.c_str());
else
subRequest.setVerb("DATA");
if ( ! IsParameterSet(subRequest,"_NAME") )
- subRequest("_NAME") = tmpName;
+ subRequest("_NAME") = tmpName.c_str();
Cached returnName = Convert(subRequest);
if ( strcmp(returnName,"") )
@@ -155,10 +155,10 @@ ObjectInfo::ConvertRequestToMacro( MvRequest& inRequest,
// Convert macroName to lower case.
char *macrolower = new char[ strlen(macroName) + 1];
strcpy(macrolower,macroName);
-
for (i = 0; i < (int)strlen(macrolower); i++ )
- macrolower[i] = tolower(macrolower[i]);
+ macrolower[i] = tolower(macrolower[i]);
+ PutNewLine("");
PutNewLine( ObjectInfo::SpaceToUnderscore(varName) + Cached(" = ") + Cached(macrolower) + Cached("(") );
delete [] macrolower;
@@ -260,13 +260,17 @@ ObjectInfo::ConvertDataUnitToMacro ( MvIcon& dataUnit )
}
}
- int use_mode = duRequest("_USE_MODE");
-
- if ( ! use_mode )
- objectName = Convert(duRequest);
-
- else
- {
+ int use_mode = duRequest("_USE_MODE");
+ if ( ! use_mode )
+ {
+ MvRequest reqAux = duRequest.getSubrequest("_ORIGINAL_REQUEST");
+ if ( reqAux && (const char*)reqAux("_MACRO_DECODE_TAG") )
+ objectName = Convert(reqAux);
+ else
+ objectName = Convert(duRequest);
+ }
+ else
+ {
MvRequest modeRequest = duRequest.getSubrequest("_MODE");
if ( (const char *) duRequest("_NAME") )
modeRequest("_NAME") = duRequest("_NAME");
@@ -275,10 +279,10 @@ ObjectInfo::ConvertDataUnitToMacro ( MvIcon& dataUnit )
if ( (const char *) duRequest("_APPL") )
modeRequest("_APPL") = duRequest("_APPL");
- MvIcon tmpIcon(modeRequest);
// Call itself with the mode request.
+ MvIcon tmpIcon(modeRequest);
objectName = ConvertDataUnitToMacro(tmpIcon);
- }
+ }
return objectName;
}
@@ -366,9 +370,6 @@ ObjectInfo::ObjectPath ( const MvRequest& request )
Cached path;
const char* mPath = request( "_PATH" );
-// if ( ! mPath )
-// mPath = request( "_PATH" );
-
if ( mPath )
// Path contains file name, it shouldn't but .....
// If it's been corrected, use following commented line
@@ -389,7 +390,7 @@ ObjectInfo::ObjectPath ( const MvRequest& request )
{
// Obtain the fully qualified path to the object
const char* mvPath = request ( "_NAME" );
- path = MakeUserPath ( dirname ( mvPath ) );
+ path = MakeUserPath( dirname(mvPath) ).c_str();
}
// Try to open a directory - if failed, set the path to METVIEW_USER_DIR
@@ -515,36 +516,13 @@ ObjectInfo::CalledFromMacro ( const MvRequest& request )
//
// -- PURPOSE: Indicate the icon Class
//
-// -- INPUT : a fully-qualified path
-// the name of the icon
+// -- INPUT : Request
//
// -- OUTPUT : The class of the icon
//
-// -- NOTES : This method uses the "hidden" user interface
-// requestes, which are also used by MetvuewUI
-// to identify the objects
Cached
ObjectInfo::IconClass ( const MvRequest &req )
{
- Cached path = ObjectPath(req);
- Cached iconName = ObjectName(req);
-
- // Create a path to a hidden file (MetviewUI)
- Cached hiddenFileName = path + Cached("/.") + iconName;
-
- // If the file exists, read it (MetviewUI)
- if ( FileCanBeOpened ( hiddenFileName, "r" ) == true )
- {
- MvRequest uiRequest;
- uiRequest.read ( (const char*) hiddenFileName );
-
- // Obtain the value of the icon class
- Cached iconClass;
- uiRequest.getValue ( iconClass, "ICON_CLASS", 0 );
-
- return iconClass;
- }
-
// Get info from parameter _CLASS (Desktop)
if ( (const char*)req("_CLASS") )
return (const char*)req("_CLASS");
@@ -656,46 +634,52 @@ ObjectInfo::CheckVisDefClass (const MvRequest& req1, const MvRequest& req2)
Cached
ObjectInfo::Convert(MvRequest &req)
{
- int first = 0;
- Cached returnName, oneReqName;
+ int first = 0;
+ Cached returnName, oneReqName;
- while ( req )
- {
+ while ( req )
+ {
Cached iconClass = ObjectInfo::IconClass ( req );
MacroConverter & converter = MacroConverter::Find(iconClass );
- Cached fileName = ObjectInfo::ObjectPath(req) + Cached("/") +
- ObjectInfo::ObjectName(req);
+ string objName = (const char*)ObjectInfo::ObjectName(req);
+ string fileName = (const char*)ObjectInfo::ObjectPath(req);
+ fileName += (fileName[fileName.size()-1] == '/') ? objName : "/" + objName;
+
oneReqName = "";
- if ( ! IsBinaryOrMissingFile( fileName ) )
- {
- MvRequest fileReq;
- fileReq.read(fileName);
+ if ( ! IsBinaryOrMissingFile( fileName.c_str() ) )
+ {
+ MvRequest fileReq;
+ fileReq.read(fileName.c_str(),true);
- // Just in case further expansion is needed.
- fileReq("_NAME") = req("_NAME");
- oneReqName = converter.Convert(fileReq, this);
- }
+ // Just in case further expansion is needed
+ if ( !(const char*)fileReq("_PATH") && (const char*)req("_PATH") )
+ fileReq("_PATH") = req("_PATH");
+ if ( !(const char*)fileReq("_NAME") && (const char*)req("_NAME") )
+ fileReq("_NAME") = req("_NAME");
+
+ oneReqName = converter.Convert(fileReq, this);
+ }
if ( oneReqName == Cached("") )
- oneReqName = converter.Convert(req, this);
+ oneReqName = converter.Convert(req, this);
if ( first == 1 )
- returnName = Cached("[") + returnName;
+ returnName = Cached("[") + returnName;
if ( first > 0 )
- returnName = returnName + Cached(", ");
+ returnName = returnName + Cached(", ");
returnName = returnName + oneReqName;
first++;
req.advance();
- }
+ }
- if ( first > 1 )
- returnName = returnName + Cached("] ");
+ if ( first > 1 )
+ returnName = returnName + Cached("] ");
- return returnName;
+ return returnName;
}
void ObjectInfo::FormatLine(const Cached ¶m, const Cached &val, const Cached &comma, int width)
diff --git a/src/uPlot/ObjectList.cc b/src/uPlot/ObjectList.cc
index fe6baee..599df7b 100644
--- a/src/uPlot/ObjectList.cc
+++ b/src/uPlot/ObjectList.cc
@@ -798,31 +798,45 @@ ObjectList::CalledFromMacro ( const MvRequest& request )
// -- PURPOSE: Return the expected parameter to make a pair in a vector field.
// ex. U/V, D/T... and the correspondent wind mode
//
-// -- INPUT : A parameter (the first in the pair)
+// -- INPUT : param: parameter name
//
-// -- OUTPUT : The second parameter of the pair and the related wind mode plotting
-// or "no_pair" for scalar data
-//
-void ObjectList::GetCompanion ( const string& param, string& pair, string& mode )
+// -- OUTPUT : pair : pair name ("no_pair" for scalar data)
+// mode : wind mode plotting
+// first: true - if there is a companion and the input parameter
+// is the primarely/first element, i.e. it is not
+// the friend element
+void ObjectList::GetCompanion ( const string& param, string& pair, string& mode, bool& first )
{
- MvRequest& objectList = ObjectList::Instance();
+ MvRequest& objectList = ObjectList::Instance();
+ objectList.rewind();
- objectList.rewind();
- string comp("companion");
- while ( objectList )
- {
- if ( objectList.getVerb() == comp && (const char*)objectList("class") == param )
- {
+ string comp("companion");
+ while ( objectList )
+ {
+ if ( objectList.getVerb() == comp )
+ {
+ if ( (const char*)objectList("class") == param )
+ {
pair = (const char*)objectList( "friend" );
mode = (const char*)objectList("mode") ? (const char*)objectList("mode") : "";
+ first = true;
return;
- }
- objectList.advance();
- }
+ }
+ else if ( (const char*)objectList("friend") == param )
+ {
+ pair = (const char*)objectList( "class" );
+ mode = (const char*)objectList("mode") ? (const char*)objectList("mode") : "";
+ first = false;
+ return;
+ }
+ }
+ objectList.advance();
+ }
- pair = "no_pair";
- mode = "";
- return;
+ pair = "no_pair";
+ mode = "";
+ first= false;
+ return;
}
// Check if two variables are companions
diff --git a/src/uPlot/ObjectList.h b/src/uPlot/ObjectList.h
index 3029f15..0e413b8 100644
--- a/src/uPlot/ObjectList.h
+++ b/src/uPlot/ObjectList.h
@@ -116,7 +116,7 @@ public:
static Cached MacroName ( const Cached& iconClass );
- static void GetCompanion ( const string&, string&, string& );
+ static void GetCompanion ( const string&, string&, string&, bool& );
private:
diff --git a/src/uPlot/Presentable.cc b/src/uPlot/Presentable.cc
index 1e8e105..15bda70 100644
--- a/src/uPlot/Presentable.cc
+++ b/src/uPlot/Presentable.cc
@@ -1127,31 +1127,32 @@ Presentable::DescribeDrops ( ObjectInfo& myDescription, MacroVisDefMap& vdMap )
while ( du != dataUnitList.end() )
{
MvIcon currentDataUnit = *du;
- if ( (int)currentDataUnit.Request()("_SKIP_MACRO") )
+ if ( !(int)currentDataUnit.Request()("_SKIP_MACRO") )
{
- ++du;
- continue;
- }
-
- int use_mode = currentDataUnit.Request()("_USE_MODE");
-
- // Convert the data unit to macro
- string dataUnitName = (const char*)myDescription.ConvertDataUnitToMacro ( currentDataUnit );
- if ( dataUnitName.empty() )
- {
- ++du;
- continue;
- }
-
- listDrops = listDrops + string(", ") + dataUnitName;
-
- if ( use_mode )
- {
- ++du;
- continue;
+ // Convert the data unit to macro
+ string dataUnitName = (const char*)myDescription.ConvertDataUnitToMacro ( currentDataUnit );
+ if ( dataUnitName.empty() )
+ {
+ ++du;
+ continue;
+ }
+
+ listDrops = listDrops + string(", ") + dataUnitName;
+
+ int use_mode = currentDataUnit.Request()("_USE_MODE");
+ if ( use_mode )
+ {
+ ++du;
+ continue;
+ }
}
- // Find all visdefs associated to the data unit
+ // Find all visdefs associated to the data unit even if it
+ // is tagged as _SKIP_MACRO. This is to cope with requests
+ // built by some applications, e.g., XSection:
+ // (netcdf_xy_matrix, mcont, netcdf_xy_points, mgraph).
+ // In this case, althought the netcdf_xy_points request has
+ // a tag _SKIP_MACRO, the mgraph request must be processed.
visdefList.erase(visdefList.begin(),visdefList.end() );
dataBase.RetrieveVisDefList ( (*du) , visdefList );
DescribeVisDefList(myDescription,visdefList,*du,listDrops,true,vdMap );
diff --git a/src/uPlot/ThermoView.cc b/src/uPlot/ThermoView.cc
index 4b93ac0..2a27de6 100644
--- a/src/uPlot/ThermoView.cc
+++ b/src/uPlot/ThermoView.cc
@@ -56,14 +56,14 @@ ThermoViewFactory::Build ( Page& page,
ThermoView::ThermoView ( Page& owner,
const MvRequest& viewRequest,
const MvRequest& setupRequest ):
- CommonXSectView ( owner, viewRequest, setupRequest ),
- type_ ("TEPHIGRAM")
+ CommonXSectView ( owner, viewRequest, setupRequest ),
+ type_("TEPHIGRAM")
{
SetVariables(viewRequest,true);
}
ThermoView::ThermoView ( const ThermoView &old ) :
- CommonXSectView(old)
+ CommonXSectView(old)
{
type_ = old.type_;
}
@@ -80,7 +80,7 @@ void ThermoView::DescribeYourself ( ObjectInfo& description )
{
// Convert my request to Macro
set<Cached> skipSet;
- description.ConvertRequestToMacro ( viewRequest_, PUT_END, MacroName().c_str(),"thermoview", skipSet);
+ description.ConvertRequestToMacro ( appViewReq_, PUT_END, MacroName().c_str(),"thermoview", skipSet);
description.PutNewLine (" " );
}
@@ -96,14 +96,16 @@ bool ThermoView::UpdateView ()
if ( string(viewRequest_.getVerb()) == CARTESIANVIEW )
return true;
- // Translate common parameters
- //GetCommonParameters ( req, cartView );
-
- // Translate axes min/max values
+ // Create a Cartesian View request related to Tephigram
+ // Magics requires that the value for parameter map_projection be
+ // in lower case
MvRequest cartView("CARTESIANVIEW");
- cartView("MAP_PROJECTION") = "tephigram";
+ string sdata = type_;
+ std::transform(sdata.begin(), sdata.end(), sdata.begin(), ::tolower);
+ cartView("MAP_PROJECTION") = sdata.c_str();
- // Check where the axes min/max values should be taken from
+ // Translate axes min/max values
+ // Check where the values should be taken from
if ( (const char*)viewRequest_("_DEFAULT") &&
(int)viewRequest_("_DEFAULT") == 1 &&
(const char*)viewRequest_("_DATAATTACHED") &&
@@ -117,16 +119,14 @@ bool ThermoView::UpdateView ()
{
cartView("X_AUTOMATIC") = "off";
cartView("Y_AUTOMATIC") = "off";
+
+ // Get min/max axes coordinates
cartView("X_MIN") = viewRequest_("MINIMUM_TEMPERATURE");
cartView("X_MAX") = viewRequest_("MAXIMUM_TEMPERATURE");
cartView("Y_MIN") = viewRequest_("BOTTOM_PRESSURE");
cartView("Y_MAX") = viewRequest_("TOP_PRESSURE");
}
-//ostringstream oss;
-//oss << "Thermo: Diagram type not implemented yet: " << type_;
-//PlotMod::Instance().MetviewError (oss.str().c_str(),"WARNING");
-
// Copy ThermoGrid definition
MvRequest reqGrid = viewRequest_.getSubrequest("THERMO_GRID");
if ( reqGrid )
@@ -200,42 +200,23 @@ void ThermoView::UpdateView ( MvRequest& viewRequest )
//Owner().InitZoomStacks();
}
-void ThermoView::ApplicationInfo( const MvRequest& )
+void ThermoView::ApplicationInfo( const MvRequest& req)
{
- #if 0
- // If it is not a VIEW request, try to find a hidden VIEW in the request
+ // Get the VIEW request
MvRequest viewReq;
if ( ObjectList::IsView(req.getVerb()) )
viewReq = req;
else
{
- MvRequest aux = req.getSubrequest("NETCDF_DATA");
- if ( (const char*)aux("_CARTESIANVIEW") )
- viewReq = aux.getSubrequest("_CARTESIANVIEW");
- else
+ // Try to find a hidden VIEW in the request
+ viewReq = req.getSubrequest("_VIEW_REQUEST");
+ if ( !viewReq )
{
- PlotMod::Instance().MetviewError ("Missing View Request in ThermoView::ApplicationInfo","WARNING");
+ // Nothing to be done
return;
}
}
- // Update the DATE_MIN/MAX parameters in the View if the original values
- // were AUTOMATIC and the Thermo application provided new values
- if ( bDateMin_ )
- {
- string str = (const char*)viewReq("X_DATE_MIN") ? "X_DATE_MIN" : "Y_DATE_MIN";
- dateMin_ = (const char*)viewReq(str.c_str());
- viewRequest_(str.c_str()) = dateMin_.c_str();
- bDateMin_ = false;
- }
- if ( bDateMax_ )
- {
- string str = (const char*)viewReq("X_DATE_MAX") ? "X_DATE_MAX" : "Y_DATE_MAX";
- dateMax_ = (const char*)viewReq(str.c_str());
- viewRequest_(str.c_str()) = dateMax_.c_str();
- bDateMax_ = false;
- }
-#endif
return;
}
diff --git a/src/uPlot/VertProfView.cc b/src/uPlot/VertProfView.cc
index 1883b12..7a05704 100644
--- a/src/uPlot/VertProfView.cc
+++ b/src/uPlot/VertProfView.cc
@@ -21,14 +21,7 @@ VertProfViewFactory::Build ( Page& page,
const MvRequest& contextRequest,
const MvRequest& setupRequest )
{
- // Expand request
- MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
-
- // Copy hidden parameters
- expReq.mars_merge(contextRequest);
-
- // Instantiate a VerticalProfile view
- return new VertProfView ( page, expReq, setupRequest );
+ return new VertProfView ( page, contextRequest, setupRequest );
}
//--------------------------------------------------------
@@ -195,14 +188,14 @@ bool VertProfView::UpdateView ()
return true;
}
- // Check where the axes min/max values should be taken from
- bool axisAuto = false;
- if ( (const char*)viewRequest_("_DEFAULT") &&
- (int)viewRequest_("_DEFAULT") == 1 &&
- (const char*)viewRequest_("_DATAATTACHED") &&
- strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0
- )
- axisAuto = true;
+ // Check where the axes min/max values should be taken from
+ bool axisAuto = false;
+ if ( (const char*)viewRequest_("_DEFAULT") &&
+ (int)viewRequest_("_DEFAULT") == 1 &&
+ (const char*)viewRequest_("_DATAATTACHED") &&
+ strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0
+ )
+ axisAuto = true;
// Translate X coordinates
bool ierror = false;
@@ -214,18 +207,30 @@ bool VertProfView::UpdateView ()
{
cartView("X_AUTOMATIC") = "OFF";
int nvals = viewRequest_.countValues("X_MIN_MAX");
- if ( nvals != 2 )
+ if ( nvals != 0 && nvals != 2 )
ierror = true;
else
{
- // Read X values
- string sx1 = (const char*)viewRequest_("X_MIN_MAX",0);
- string sx2 = (const char*)viewRequest_("X_MIN_MAX",1);
+ string sx1,sx2;
+ if ( nvals == 0 )
+ {
+ sx1 = "AUTO";
+ sx2 = "AUTO";
+ }
+ else
+ {
+ // Read X values
+ sx1 = (const char*)viewRequest_("X_MIN_MAX",0);
+ sx2 = (const char*)viewRequest_("X_MIN_MAX",1);
+ }
+
if ( sx1 == "AUTO" && sx2 == "AUTO" )
{
xValuesAuto_ = true;
- if ( (const char*)viewRequest_("_DATAATTACHED") &&
- strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0 )
+
+ // it seems that this is no longer needed
+ //if ( (const char*)viewRequest_("_DATAATTACHED") &&
+ //strcmp((const char*)viewRequest_("_DATAATTACHED"),"YES") == 0 )
cartView("X_AUTOMATIC") = "ON";
}
else if ( sx1 == "AUTO" || sx2 == "AUTO" )
@@ -271,12 +276,7 @@ bool VertProfView::UpdateView ()
CopySomeParameters( viewRequest_,cartView,"PAGE" );
CopySomeParameters( viewRequest_,cartView,"SUBPAGE" );
- // Copy the original request without certain parameteres (to avoid duplication)
-// RemoveParameters( viewRequest_, "VALUE_AXIS" );
-// RemoveParameters( viewRequest_, "LEVEL_AXIS" );
- RemoveParameters( viewRequest_, "PAGE" );
- RemoveParameters( viewRequest_, "SUBPAGE" );
-// RemoveParameters( viewRequest_, "_" );
+ // Save the original request
cartView("_ORIGINAL_REQUEST") = viewRequest_;
// Update request
@@ -296,3 +296,17 @@ void VertProfView::ApplicationInfo ( const MvRequest& req )
else if ( (const char*)req("_Y_AUTOMATIC_REVERSE") )
yReverse_ = (const char*)req("_Y_AUTOMATIC_REVERSE");
}
+
+bool VertProfView::ConsistencyCheck( MvRequest& req1, MvRequest& req2 )
+{
+ // Build a list of parameters to be checked
+ vector<string> params;
+ params.push_back("INPUT_MODE");
+ if ( (const char*)req1("POINT") )
+ params.push_back("POINT");
+ else
+ params.push_back("AREA");
+
+ // Call a function to perform the consistency check
+ return req1.checkParameters(req2,params);
+}
\ No newline at end of file
diff --git a/src/uPlot/VertProfView.h b/src/uPlot/VertProfView.h
index 4965055..c898f06 100644
--- a/src/uPlot/VertProfView.h
+++ b/src/uPlot/VertProfView.h
@@ -109,6 +109,9 @@ public:
// Update the current view
virtual bool UpdateView ();
+ // Check consistency between the View and Data Module
+ virtual bool ConsistencyCheck( MvRequest&, MvRequest& );
+
private:
// Save some data specific to some DataApplication
diff --git a/src/uPlot/XSectView.cc b/src/uPlot/XSectView.cc
index 8da4b6b..5b9a46f 100644
--- a/src/uPlot/XSectView.cc
+++ b/src/uPlot/XSectView.cc
@@ -27,14 +27,8 @@ XSectViewFactory::Build ( Page& page,
const MvRequest& contextRequest,
const MvRequest& setupRequest )
{
- // Expand request
- MvRequest expReq = ObjectList::ExpandRequest(contextRequest,EXPAND_DEFAULTS);
-
- // Copy hidden parameters
- expReq.mars_merge(contextRequest);
-
// Instantiate a Xsection view
- return new XSectView ( page, expReq, setupRequest );
+ return new XSectView ( page, contextRequest, setupRequest );
}
//--------------------------------------------------------
@@ -241,3 +235,16 @@ void XSectView::ApplicationInfo ( const MvRequest& req )
else if ( (const char*)req("_Y_AUTOMATIC_REVERSE") )
yReverse_ = (const char*)req("_Y_AUTOMATIC_REVERSE");
}
+
+bool XSectView::ConsistencyCheck( MvRequest& req1, MvRequest& req2 )
+{
+ // Build a list of parameters to be checked
+ vector<string> params;
+ params.push_back("LINE");
+ params.push_back("WIND_PARALLEL");
+ params.push_back("WIND_PERPENDICULAR");
+ params.push_back("WIND_INTENSITY");
+
+ // Call a function to perform the consistency check
+ return req1.checkParameters(req2,params);
+}
diff --git a/src/uPlot/XSectView.h b/src/uPlot/XSectView.h
index 20d998b..e371094 100644
--- a/src/uPlot/XSectView.h
+++ b/src/uPlot/XSectView.h
@@ -111,6 +111,10 @@ public:
// Update view
virtual bool UpdateView ();
+ // Check consistency between the View and Data Module
+ virtual bool ConsistencyCheck( MvRequest&, MvRequest& );
+
+
private:
// Save some data specific to some DataApplication
--
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