Skip to content

Commit

Permalink
Merge branch 'release/2.29.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Mar 14, 2023
2 parents 2a3b560 + 49dc5dd commit c056ffe
Show file tree
Hide file tree
Showing 580 changed files with 1,398 additions and 1,197 deletions.
1 change: 0 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ build_script:
-D ENABLE_AEC=0 ^
-D IEEE_LE=1 ^
-D ENABLE_MEMFS=1 ^
-D ENABLE_EXPERIMENTAL_BUILD_WITH_CXX=1 ^
-D ENABLE_EXTRA_TESTS=ON ^
-D WINDOWS_TESTING_BASHRC=%WINDOWS_TESTING_BASHRC% ^
..
Expand Down
54 changes: 13 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)

# Initialise project
project( eccodes VERSION 2.28.1 LANGUAGES C )
project( eccodes VERSION 2.29.0 LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


###############################################################################
# system checks needed for eccodes_config.h and some options like MEMFS
Expand Down Expand Up @@ -65,14 +68,12 @@ ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)")
###############################################################################
# some variables/options of this project

ecbuild_add_option( FEATURE EXPERIMENTAL_BUILD_WITH_CXX
DESCRIPTION "Build ecCodes with a C++ compiler (Experimental)"
DEFAULT OFF )
if( HAVE_EXPERIMENTAL_BUILD_WITH_CXX )
enable_language( CXX )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray" )
set(CMAKE_CXX_FLAGS "-hstd=c++11 ${CMAKE_CXX_FLAGS}")
endif()
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
ecbuild_add_cxx_flags("-Wno-write-strings -Wno-deprecated")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
ecbuild_add_cxx_flags("-Wno-write-strings -Wno-deprecated")
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Cray" )
set(CMAKE_CXX_FLAGS "-hstd=c++11 ${CMAKE_CXX_FLAGS}")
endif()

ecbuild_add_option( FEATURE PRODUCT_GRIB
Expand Down Expand Up @@ -138,17 +139,7 @@ ecbuild_add_option( FEATURE AEC

ecbuild_find_python( VERSION 2.6 NO_LIBS )
find_package( NumPy )
ecbuild_add_option( FEATURE PYTHON2
DESCRIPTION "Build the ecCodes Python2 interface (deprecated)"
DEFAULT OFF
#CONDITION Python_FOUND AND NumPy_FOUND
CONDITION PYTHON_FOUND AND NUMPY_FOUND
)
# For Python2 we build our own bindings (using SWIG) in the build directory
# but for Python3 one has to add the eccodes from pip3 AFTER the install
if( PYTHON_VERSION_MAJOR EQUAL 3 )
set( HAVE_PYTHON 0 )
endif()
set( HAVE_PYTHON 0 )

## TODO REQUIRED_LANGUAGES Fortran
ecbuild_add_option( FEATURE FORTRAN
Expand Down Expand Up @@ -432,15 +423,6 @@ if( HAVE_BUILD_TOOLS )
endif()
add_subdirectory( fortran )

if( PYTHON_VERSION_MAJOR GREATER 2 )
# Python3 is no longer built with SWIG but is a separate
# package. User should do: pip3 install eccodes
#add_subdirectory( python3 )
set( ECCODES_PYTHON_DIR "python3" )
else()
add_subdirectory( python )
set( ECCODES_PYTHON_DIR "python" )
endif()
add_subdirectory( tests )
add_subdirectory( examples )
add_subdirectory( data )
Expand Down Expand Up @@ -478,7 +460,7 @@ ecbuild_pkgconfig(
IGNORE_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
HAVE_NETCDF HAVE_PYTHON2 HAVE_FORTRAN HAVE_PNG HAVE_AEC
HAVE_NETCDF HAVE_FORTRAN HAVE_PNG HAVE_AEC
)
if( HAVE_FORTRAN )
ecbuild_pkgconfig(
Expand All @@ -490,7 +472,7 @@ if( HAVE_FORTRAN )
${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
HAVE_NETCDF HAVE_PYTHON2 HAVE_PNG HAVE_AEC
HAVE_NETCDF HAVE_PNG HAVE_AEC
)
endif()

Expand All @@ -513,10 +495,6 @@ ecbuild_info(" | ecCodes version ${eccodes_VERSION} |")
ecbuild_info(" +--------------------------+")
ecbuild_info("")

if( HAVE_PYTHON2 )
ecbuild_deprecate("Python2 support is deprecated and will be discontinued")
endif()

ecbuild_info(" +--------------------------------------+")
ecbuild_info(" | Please note: |")
ecbuild_info(" | For Python3 support, first install |")
Expand All @@ -525,9 +503,3 @@ ecbuild_info(" | bindings from PyPI with: |")
ecbuild_info(" | $ pip3 install eccodes |")
ecbuild_info(" +--------------------------------------+")
ecbuild_info("")

if( HAVE_EXPERIMENTAL_BUILD_WITH_CXX )
ecbuild_warn("Please note:\n"
"The option of building with C++ is currently experimental."
"Do not use in operations.")
endif()
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ You can also pass options to the cmake command above. Some typical examples are:
-DENABLE_ECCODES_THREADS=ON Enable POSIX threads
-DENABLE_JPG=ON Enable JPEG encoding/decoding (for GRIB packing)
-DCMAKE_Fortran_COMPILER=pgf90 Set Fortran compiler to Portland Group F90 compiler
-DCMAKE_C_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C source files
-DCMAKE_CXX_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C++ source files

By default the ctest step above does NOT require any data to be downloaded and only runs basic sanity tests.
However if you wish to exercise more of the functionality of ecCodes, you are advised to configure the build with:
Expand Down
11 changes: 11 additions & 0 deletions definitions/grib2/template.5.200.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# (C) Copyright 2005- ECMWF.

# Grid point data - Run length encoding

unsigned[1] bitsPerValue : dump;
unsigned[2] maxLevelValue : dump;
unsigned[2] numberOfLevelValues : dump;
unsigned[1] decimalScaleFactor : dump;
level_value_list list(numberOfLevelValues) {
unsigned[2] levelValues : dump;
}
28 changes: 28 additions & 0 deletions definitions/grib2/template.7.200.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# (C) Copyright 2005- ECMWF.

# Grid point data - Run length encoding

meta codedValues data_run_length_packing(
section7Length,
offsetBeforeData,
offsetSection7,
numberOfValues,
bitsPerValue,
maxLevelValue,
numberOfLevelValues,
decimalScaleFactor,
levelValues
): read_only;

meta values data_apply_bitmap(codedValues,
bitmap,
missingValue,
binaryScaleFactor,
numberOfDataPoints,
numberOfValues) : dump;

alias data.packedValues = codedValues;

template statistics "common/statistics_grid.def";
template missing_values "common/missing_values_grid.def";

2 changes: 0 additions & 2 deletions examples/python/bufr_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_check_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# Description: Verify the given BUFR table (B or D) are correctly formed for ecCodes
#

from __future__ import print_function

import os
import sys

Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_copy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# Description: How to copy all the values in the data section that are present in the same
# position in the data tree and with the same number of values to the output handle
#
from __future__ import print_function

import sys
import traceback
Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_copy_data2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# position in the data tree and with the same number of values to the output handle.
# This example is for messages which use the operator 203YYY (overridden reference values)
#
from __future__ import print_function

import sys
import traceback
Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_copy_data3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# position in the data tree and with the same number of values to the output handle.
# In this example we add the WIGOS sequence 301150 to a SYNOP
#
from __future__ import print_function

import sys
import traceback
Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_ecc-448.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

from __future__ import print_function

import sys
import traceback
Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_ecc-869.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# and then edited to add the bitmap.
# See ECC-869

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_encode_flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

# Description: how to encode flight dataset into BUFR

from __future__ import print_function

import sys
import traceback
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion examples/python/bufr_expanded.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Description: how to read values of different type of keys from BUFR messages.
#

from __future__ import absolute_import, print_function
from __future__ import absolute_import

import sys
import traceback
Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_get_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_keys_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# keys in a BUFR message.


from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_read_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_read_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# Description: read key values from a BUFR sample message.
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_read_scatterometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# understand the structure of these messages.
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_read_synop.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
# messages than the one used in the example. It is advised to use bufr_dump to
# understand the structure of the messages.

from __future__ import print_function

import sys
import traceback

Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_read_temp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# messages than the one used in the example. It is advised to use bufr_dump to
# understand the structure of the messages.
#
from __future__ import print_function

import sys
import traceback
Expand Down
1 change: 0 additions & 1 deletion examples/python/bufr_read_tempf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# messages than the one used in the example. It is advised to use bufr_dump to
# understand the structure of the messages.
#
from __future__ import print_function

import sys
import traceback
Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_read_tropical_cyclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
# understand the structure of the messages.
#

from __future__ import print_function

import collections
import sys
import traceback
Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_set_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/bufr_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#
#

from __future__ import print_function

import sys
import traceback

Expand Down
1 change: 0 additions & 1 deletion examples/python/get_product_kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# Description: how to process a file containing a mix of messages
# and print the kind of product (e.g. GRIB, BUFR etc)

from __future__ import print_function

import sys
import traceback
Expand Down
2 changes: 0 additions & 2 deletions examples/python/grib_ccsds.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/grib_count_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# nor does it submit to any jurisdiction.
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/grib_get_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# Description: how to get values using keys from GRIB messages
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/grib_get_message_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# Description: how to get the message offset
#

from __future__ import print_function

import sys
import traceback

Expand Down
2 changes: 0 additions & 2 deletions examples/python/grib_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# Description: How to create and use an index to access GRIB messages from
# a file

from __future__ import print_function

import os
import sys
import traceback
Expand Down
Loading

0 comments on commit c056ffe

Please sign in to comment.