Skip to content

Commit c056ffe

Browse files
committed
Merge branch 'release/2.29.0'
2 parents 2a3b560 + 49dc5dd commit c056ffe

File tree

580 files changed

+1398
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

580 files changed

+1398
-1197
lines changed

.appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ build_script:
7777
-D ENABLE_AEC=0 ^
7878
-D IEEE_LE=1 ^
7979
-D ENABLE_MEMFS=1 ^
80-
-D ENABLE_EXPERIMENTAL_BUILD_WITH_CXX=1 ^
8180
-D ENABLE_EXTRA_TESTS=ON ^
8281
-D WINDOWS_TESTING_BASHRC=%WINDOWS_TESTING_BASHRC% ^
8382
..

CMakeLists.txt

+13-41
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
2121
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
2222

2323
# Initialise project
24-
project( eccodes VERSION 2.28.1 LANGUAGES C )
24+
project( eccodes VERSION 2.29.0 LANGUAGES CXX )
25+
set(CMAKE_CXX_STANDARD 11)
26+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
27+
2528

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

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

7879
ecbuild_add_option( FEATURE PRODUCT_GRIB
@@ -138,17 +139,7 @@ ecbuild_add_option( FEATURE AEC
138139

139140
ecbuild_find_python( VERSION 2.6 NO_LIBS )
140141
find_package( NumPy )
141-
ecbuild_add_option( FEATURE PYTHON2
142-
DESCRIPTION "Build the ecCodes Python2 interface (deprecated)"
143-
DEFAULT OFF
144-
#CONDITION Python_FOUND AND NumPy_FOUND
145-
CONDITION PYTHON_FOUND AND NUMPY_FOUND
146-
)
147-
# For Python2 we build our own bindings (using SWIG) in the build directory
148-
# but for Python3 one has to add the eccodes from pip3 AFTER the install
149-
if( PYTHON_VERSION_MAJOR EQUAL 3 )
150-
set( HAVE_PYTHON 0 )
151-
endif()
142+
set( HAVE_PYTHON 0 )
152143

153144
## TODO REQUIRED_LANGUAGES Fortran
154145
ecbuild_add_option( FEATURE FORTRAN
@@ -432,15 +423,6 @@ if( HAVE_BUILD_TOOLS )
432423
endif()
433424
add_subdirectory( fortran )
434425

435-
if( PYTHON_VERSION_MAJOR GREATER 2 )
436-
# Python3 is no longer built with SWIG but is a separate
437-
# package. User should do: pip3 install eccodes
438-
#add_subdirectory( python3 )
439-
set( ECCODES_PYTHON_DIR "python3" )
440-
else()
441-
add_subdirectory( python )
442-
set( ECCODES_PYTHON_DIR "python" )
443-
endif()
444426
add_subdirectory( tests )
445427
add_subdirectory( examples )
446428
add_subdirectory( data )
@@ -478,7 +460,7 @@ ecbuild_pkgconfig(
478460
IGNORE_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
479461
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
480462
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
481-
HAVE_NETCDF HAVE_PYTHON2 HAVE_FORTRAN HAVE_PNG HAVE_AEC
463+
HAVE_NETCDF HAVE_FORTRAN HAVE_PNG HAVE_AEC
482464
)
483465
if( HAVE_FORTRAN )
484466
ecbuild_pkgconfig(
@@ -490,7 +472,7 @@ if( HAVE_FORTRAN )
490472
${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
491473
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
492474
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
493-
HAVE_NETCDF HAVE_PYTHON2 HAVE_PNG HAVE_AEC
475+
HAVE_NETCDF HAVE_PNG HAVE_AEC
494476
)
495477
endif()
496478

@@ -513,10 +495,6 @@ ecbuild_info(" | ecCodes version ${eccodes_VERSION} |")
513495
ecbuild_info(" +--------------------------+")
514496
ecbuild_info("")
515497

516-
if( HAVE_PYTHON2 )
517-
ecbuild_deprecate("Python2 support is deprecated and will be discontinued")
518-
endif()
519-
520498
ecbuild_info(" +--------------------------------------+")
521499
ecbuild_info(" | Please note: |")
522500
ecbuild_info(" | For Python3 support, first install |")
@@ -525,9 +503,3 @@ ecbuild_info(" | bindings from PyPI with: |")
525503
ecbuild_info(" | $ pip3 install eccodes |")
526504
ecbuild_info(" +--------------------------------------+")
527505
ecbuild_info("")
528-
529-
if( HAVE_EXPERIMENTAL_BUILD_WITH_CXX )
530-
ecbuild_warn("Please note:\n"
531-
"The option of building with C++ is currently experimental."
532-
"Do not use in operations.")
533-
endif()

INSTALL

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ You can also pass options to the cmake command above. Some typical examples are:
4545
-DENABLE_ECCODES_THREADS=ON Enable POSIX threads
4646
-DENABLE_JPG=ON Enable JPEG encoding/decoding (for GRIB packing)
4747
-DCMAKE_Fortran_COMPILER=pgf90 Set Fortran compiler to Portland Group F90 compiler
48-
-DCMAKE_C_FLAGS="-O2 -Wall" Prepend the specified flags at the front
49-
of the compilation command for C source files
48+
-DCMAKE_CXX_FLAGS="-O2 -Wall" Prepend the specified flags at the front
49+
of the compilation command for C++ source files
5050

5151
By default the ctest step above does NOT require any data to be downloaded and only runs basic sanity tests.
5252
However if you wish to exercise more of the functionality of ecCodes, you are advised to configure the build with:

definitions/grib2/template.5.200.def

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# (C) Copyright 2005- ECMWF.
2+
3+
# Grid point data - Run length encoding
4+
5+
unsigned[1] bitsPerValue : dump;
6+
unsigned[2] maxLevelValue : dump;
7+
unsigned[2] numberOfLevelValues : dump;
8+
unsigned[1] decimalScaleFactor : dump;
9+
level_value_list list(numberOfLevelValues) {
10+
unsigned[2] levelValues : dump;
11+
}

definitions/grib2/template.7.200.def

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# (C) Copyright 2005- ECMWF.
2+
3+
# Grid point data - Run length encoding
4+
5+
meta codedValues data_run_length_packing(
6+
section7Length,
7+
offsetBeforeData,
8+
offsetSection7,
9+
numberOfValues,
10+
bitsPerValue,
11+
maxLevelValue,
12+
numberOfLevelValues,
13+
decimalScaleFactor,
14+
levelValues
15+
): read_only;
16+
17+
meta values data_apply_bitmap(codedValues,
18+
bitmap,
19+
missingValue,
20+
binaryScaleFactor,
21+
numberOfDataPoints,
22+
numberOfValues) : dump;
23+
24+
alias data.packedValues = codedValues;
25+
26+
template statistics "common/statistics_grid.def";
27+
template missing_values "common/missing_values_grid.def";
28+

examples/python/bufr_attributes.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#
1515
#
1616

17-
from __future__ import print_function
18-
1917
import sys
2018
import traceback
2119

examples/python/bufr_check_table.py

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
# Description: Verify the given BUFR table (B or D) are correctly formed for ecCodes
1111
#
1212

13-
from __future__ import print_function
14-
1513
import os
1614
import sys
1715

examples/python/bufr_copy_data.py

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# Description: How to copy all the values in the data section that are present in the same
1414
# position in the data tree and with the same number of values to the output handle
1515
#
16-
from __future__ import print_function
1716

1817
import sys
1918
import traceback

examples/python/bufr_copy_data2.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# position in the data tree and with the same number of values to the output handle.
1515
# This example is for messages which use the operator 203YYY (overridden reference values)
1616
#
17-
from __future__ import print_function
1817

1918
import sys
2019
import traceback

examples/python/bufr_copy_data3.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# position in the data tree and with the same number of values to the output handle.
1515
# In this example we add the WIGOS sequence 301150 to a SYNOP
1616
#
17-
from __future__ import print_function
1817

1918
import sys
2019
import traceback

examples/python/bufr_ecc-448.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# granted to it by virtue of its status as an intergovernmental organisation
88
# nor does it submit to any jurisdiction.
99

10-
from __future__ import print_function
1110

1211
import sys
1312
import traceback

examples/python/bufr_ecc-869.py

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# and then edited to add the bitmap.
33
# See ECC-869
44

5-
from __future__ import print_function
6-
75
import sys
86
import traceback
97

examples/python/bufr_encode_flight.py

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
# Description: how to encode flight dataset into BUFR
1212

13-
from __future__ import print_function
14-
1513
import sys
1614
import traceback
1715
from datetime import datetime

examples/python/bufr_expanded.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Description: how to read values of different type of keys from BUFR messages.
1414
#
1515

16-
from __future__ import absolute_import, print_function
16+
from __future__ import absolute_import
1717

1818
import sys
1919
import traceback

examples/python/bufr_get_keys.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#
1515
#
1616

17-
from __future__ import print_function
18-
1917
import sys
2018
import traceback
2119

examples/python/bufr_keys_iterator.py

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# keys in a BUFR message.
1616

1717

18-
from __future__ import print_function
19-
2018
import sys
2119
import traceback
2220

examples/python/bufr_read_header.py

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#
1616
#
1717

18-
from __future__ import print_function
19-
2018
import sys
2119
import traceback
2220

examples/python/bufr_read_sample.py

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# Description: read key values from a BUFR sample message.
1414
#
1515

16-
from __future__ import print_function
17-
1816
import sys
1917
import traceback
2018

examples/python/bufr_read_scatterometer.py

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
# understand the structure of these messages.
2020
#
2121

22-
from __future__ import print_function
23-
2422
import sys
2523
import traceback
2624

examples/python/bufr_read_synop.py

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
# messages than the one used in the example. It is advised to use bufr_dump to
1919
# understand the structure of the messages.
2020

21-
from __future__ import print_function
22-
2321
import sys
2422
import traceback
2523

examples/python/bufr_read_temp.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# messages than the one used in the example. It is advised to use bufr_dump to
2020
# understand the structure of the messages.
2121
#
22-
from __future__ import print_function
2322

2423
import sys
2524
import traceback

examples/python/bufr_read_tempf.py

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
# messages than the one used in the example. It is advised to use bufr_dump to
2323
# understand the structure of the messages.
2424
#
25-
from __future__ import print_function
2625

2726
import sys
2827
import traceback

examples/python/bufr_read_tropical_cyclone.py

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# understand the structure of the messages.
1717
#
1818

19-
from __future__ import print_function
20-
2119
import collections
2220
import sys
2321
import traceback

examples/python/bufr_set_keys.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#
1515
#
1616

17-
from __future__ import print_function
18-
1917
import sys
2018
import traceback
2119

examples/python/bufr_subset.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#
1515
#
1616

17-
from __future__ import print_function
18-
1917
import sys
2018
import traceback
2119

examples/python/get_product_kind.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# Description: how to process a file containing a mix of messages
1515
# and print the kind of product (e.g. GRIB, BUFR etc)
1616

17-
from __future__ import print_function
1817

1918
import sys
2019
import traceback

examples/python/grib_ccsds.py

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# granted to it by virtue of its status as an intergovernmental organisation
88
# nor does it submit to any jurisdiction.
99

10-
from __future__ import print_function
11-
1210
import sys
1311
import traceback
1412

examples/python/grib_count_messages.py

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# nor does it submit to any jurisdiction.
1010
#
1111

12-
from __future__ import print_function
13-
1412
import sys
1513
import traceback
1614

examples/python/grib_get_keys.py

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# Description: how to get values using keys from GRIB messages
1313
#
1414

15-
from __future__ import print_function
16-
1715
import sys
1816
import traceback
1917

examples/python/grib_get_message_offset.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# Description: how to get the message offset
1515
#
1616

17-
from __future__ import print_function
18-
1917
import sys
2018
import traceback
2119

examples/python/grib_index.py

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# Description: How to create and use an index to access GRIB messages from
1313
# a file
1414

15-
from __future__ import print_function
16-
1715
import os
1816
import sys
1917
import traceback

0 commit comments

Comments
 (0)