Skip to content

Commit 9e6bdfc

Browse files
committed
Merge release/2.38.0 to master
2 parents 2194357 + b2996f8 commit 9e6bdfc

File tree

4,768 files changed

+26315
-76946
lines changed

Some content is hidden

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

4,768 files changed

+26315
-76946
lines changed

.github/ci-hpc-config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ build:
77
parallel: 64
88
cmake_options:
99
- -DENABLE_EXTRA_TESTS=1
10+
- -DENABLE_ECCODES_OMP_THREADS=1

.github/ci-nightly-test.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -e
3+
set -eu
44

55
# We do not want to come across the ecCodes tools in the toolbox
66
module unload ecmwf-toolbox
@@ -14,12 +14,17 @@ module load python3
1414

1515
version=$(cat $TMPDIR/eccodes/VERSION)
1616

17-
# regression_suite_dir=$TMPDIR/eccodes-regression-tests
18-
# mkdir -p $regression_suite_dir
19-
# git clone [email protected]:ecmwf/eccodes-regression-tests.git $regression_suite_dir
20-
# cd $regression_suite_dir
17+
# Note:
18+
# The environment variable "GH_TOKEN" needs to be there for the clone to succeed
19+
#
2120

22-
cd ~masn/REGRESSION_TESTING/ecCodes
21+
regression_suite_dir=$TMPDIR/eccodes-regression-tests
22+
mkdir -p $regression_suite_dir
23+
git clone https://${GH_TOKEN}@github.com/ecmwf/eccodes-regression-tests.git $regression_suite_dir
24+
cd $regression_suite_dir
25+
26+
# Launch the regression tests in parallel (This script uses GNU parallel)
27+
# cd ~masn/REGRESSION_TESTING/ecCodes
2328
./par-suite.sh -w $TMPDIR/install/eccodes/$version
2429

2530
# For debugging specific test(s)

.github/nightly-ci-hpc-config.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
build:
2+
modules:
3+
- ecbuild
4+
- ninja
5+
- aec
6+
- netcdf4
7+
parallel: 64
8+
cmake_options:
9+
- -DENABLE_EXTRA_TESTS=1
10+
- -DENABLE_PNG=1
11+
- -DENABLE_NETCDF=1
12+
force_build: true
13+
post_script: .github/ci-nightly-test.sh
14+
env:
15+
- GH_TOKEN=${GH_TOKEN}
16+
compiler_cc: gcc
17+
compiler_cxx: g++
18+
compiler_fc: gfortran

.github/workflows/nightly.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ on:
55

66
# Run at 20:00 UTC every day (on default branch)
77
schedule:
8-
- cron: '0 20 * * *'
8+
- cron: "0 20 * * *"
99

1010
jobs:
1111
test-hpc:
12-
uses: ./.github/workflows/reusable-ci-hpc.yml
13-
with:
14-
eccodes: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
15-
nightly_test: true
16-
secrets: inherit
12+
runs-on: [self-hosted, linux, hpc]
13+
env:
14+
GH_TOKEN: ${{ secrets.GH_REPO_READ_TOKEN }}
15+
steps:
16+
- uses: ecmwf-actions/reusable-workflows/ci-hpc@v2
17+
with:
18+
github_user: ${{ secrets.BUILD_PACKAGE_HPC_GITHUB_USER }}
19+
github_token: ${{ secrets.GH_REPO_READ_TOKEN }}
20+
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
21+
repository: ecmwf/eccodes@${{ github.event.pull_request.head.sha || github.sha }}
22+
build_config: .github/nightly-ci-hpc-config.yml
1723

1824
test-macos:
1925
strategy:
@@ -63,6 +69,8 @@ jobs:
6369
secrets:
6470
url_debian_11: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_DEBIAN_11 }}
6571
token_debian_11: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
72+
url_debian_12: ${{ secrets.NEXUS_TEST_REPO_URL_DEBIAN_12 }}
73+
token_debian_12: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
6674
url_centos_7: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_CENTOS_7 }}
6775
token_centos_7: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
6876
url_rocky_8: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_ROCKY_8 }}

.github/workflows/notify_new_pr.yml

-15
This file was deleted.

.github/workflows/reusable-ci-hpc.yml

-33
This file was deleted.

.github/workflows/reusable-ci.yml

-30
This file was deleted.

CMakeLists.txt

+33-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@
1818

1919
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
2020

21-
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
21+
find_package( ecbuild 3.7 HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
22+
if(NOT ecbuild_FOUND)
23+
message(STATUS "Fetching ecbuild...")
24+
include(FetchContent)
25+
FetchContent_Populate(ecbuild
26+
GIT_REPOSITORY https://github.com/ecmwf/ecbuild.git
27+
GIT_TAG 3.8.5
28+
)
29+
find_package( ecbuild 3.7 REQUIRED HINTS ${ecbuild_SOURCE_DIR})
30+
endif()
2231

2332
# Initialise project
2433
project( eccodes LANGUAGES CXX )
@@ -50,9 +59,9 @@ check_symbol_exists( fdatasync "unistd.h" ECCODES_HAVE_FDATASYNC)
5059

5160
check_c_source_compiles(
5261
" typedef int foo_t;
53-
static inline foo_t static_foo(){return 0;}
54-
foo_t foo(){return 0;}
55-
int main(int argc, char *argv[]){return 0;}
62+
static inline foo_t static_foo(void){return 0;}
63+
foo_t foo(void){return 0;}
64+
int main(int argc, char *argv[]){ return static_foo(); }
5665
" ECCODES_HAVE_C_INLINE
5766
)
5867

@@ -99,6 +108,10 @@ ecbuild_add_option( FEATURE BUILD_TOOLS
99108
DESCRIPTION "Build the command line tools"
100109
DEFAULT ON )
101110

111+
ecbuild_add_option( FEATURE GEOGRAPHY
112+
DESCRIPTION "Support for Geoiterator and nearest neighbour"
113+
DEFAULT ON )
114+
102115
ecbuild_add_option( FEATURE JPG
103116
DESCRIPTION "Support for JPG decoding/encoding"
104117
DEFAULT ON )
@@ -375,6 +388,16 @@ if( HAVE_FORTRAN AND CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_Fortr
375388
ecbuild_add_fortran_flags("-fallow-argument-mismatch")
376389
endif()
377390

391+
if(GIT_FOUND AND NOT ${GIT_EXECUTABLE} STREQUAL "")
392+
ecbuild_info("Found git: ${GIT_EXECUTABLE} (found version \"${GIT_VERSION_STRING}\")")
393+
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
394+
OUTPUT_VARIABLE eccodes_GIT_BRANCH
395+
RESULT_VARIABLE nok ERROR_VARIABLE error
396+
OUTPUT_STRIP_TRAILING_WHITESPACE
397+
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" )
398+
ecbuild_info("ecCodes branch = ${eccodes_GIT_BRANCH}" )
399+
endif()
400+
378401
###############################################################################
379402
# contents
380403

@@ -457,7 +480,7 @@ ecbuild_pkgconfig(
457480
DESCRIPTION "The ecCodes library"
458481
LIBRARIES eccodes
459482
IGNORE_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
460-
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
483+
VARIABLES HAVE_MEMFS HAVE_GEOGRAPHY HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
461484
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
462485
HAVE_NETCDF HAVE_FORTRAN HAVE_PNG HAVE_AEC
463486
)
@@ -469,7 +492,7 @@ if( HAVE_FORTRAN )
469492
DESCRIPTION "The ecCodes library for Fortran 90"
470493
IGNORE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran
471494
${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS} ${NETCDF_INCLUDE_DIRS}
472-
VARIABLES HAVE_MEMFS HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
495+
VARIABLES HAVE_MEMFS HAVE_GEOGRAPHY HAVE_JPEG HAVE_LIBJASPER HAVE_LIBOPENJPEG
473496
HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS
474497
HAVE_NETCDF HAVE_PNG HAVE_AEC
475498
)
@@ -494,11 +517,8 @@ ecbuild_info(" | ecCodes version ${eccodes_VERSION} |")
494517
ecbuild_info(" +--------------------------+")
495518
ecbuild_info("")
496519

497-
ecbuild_info(" +--------------------------------------+")
498-
ecbuild_info(" | Please note: |")
499-
ecbuild_info(" | For Python3 support, first install |")
500-
ecbuild_info(" | ecCodes and then install the Python |")
501-
ecbuild_info(" | bindings from PyPI with: |")
502-
ecbuild_info(" | $ pip3 install eccodes |")
503-
ecbuild_info(" +--------------------------------------+")
520+
ecbuild_info("Please note:")
521+
ecbuild_info(" For Python3 support, you must install the Python bindings.")
522+
ecbuild_info(" See:")
523+
ecbuild_info(" https://confluence.ecmwf.int/display/ECC/ecCodes+installation")
504524
ecbuild_info("")

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.37.0
1+
2.38.0

data/grib_data_files.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ mercator.grib2
9191
run_length_packing.grib2
9292
boustrophedonic.grib1
9393
reduced_gaussian_sub_area.legacy.grib1
94-
94+
grid_complex_spatial_differencing.grib2

data/statistics.out.good

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
Will set values...
12
values=2 2 2 2
23
max=2 min=2 average=2
4+
max=2 min=2 average=2
5+
Will set values...
36
values=2 5 2 2
47
max=5 min=2 average=2.75

definitions/bufr/boot.def

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ transient missingValue=999999 : hidden;
1212
transient setToMissingIfOutOfRange=0 : hidden;
1313

1414
# This gets updated twice a year by WMO.
15-
# See https://community.wmo.int/activity-areas/wmo-codes/manual-codes/latest-version
16-
constant masterTablesVersionNumberLatest = 41;
15+
# See https://community.wmo.int/en/wis/latest-version
16+
constant masterTablesVersionNumberLatest = 42;
1717

1818
#negative value=not used
1919
transient inputDelayedDescriptorReplicationFactor={-1} : hidden;

definitions/bufr/rdb_key.def

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# RDB stands for REPORT DATA BASE
2+
# See https://confluence.ecmwf.int/pages/viewpage.action?pageId=24316441
23
unsigned[1] rdbType : dump;
34
unsigned[1] oldSubtype: dump;
45

definitions/bufr/section.3.def

+16-15
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ unsigned[1] reservedSection3 = 0;
5050
unsigned[2] numberOfSubsets : dump;
5151
alias ls.numberOfSubsets=numberOfSubsets;
5252

53-
if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
53+
if (section2Present && bufrHeaderCentre == 98 && section2Length == 52) {
5454
if ( rdbType == 2 || rdbType == 3 || rdbType == 8 || rdbType == 12 || rdbType == 30 ) {
5555
transient isSatelliteType=1;
5656
} else {
@@ -69,10 +69,11 @@ if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
6969
meta localLatitude2 bits(keyMore,32,25,-9000000,100000) : dump,no_copy;
7070

7171
# This rule is taken from BUFRDC. See bufrdc_wmo/buukey.F
72-
# Also see ECC-686
73-
if (oldSubtype == 255 || numberOfSubsets>255 ||
74-
( oldSubtype>=121 && oldSubtype <=130 ) ||
75-
oldSubtype==31) {
72+
# See ECC-686
73+
# and https://confluence.ecmwf.int/pages/viewpage.action?pageId=24316441
74+
if (oldSubtype == 255 || numberOfSubsets > 255 ||
75+
( oldSubtype >= 121 && oldSubtype <= 130 ) ||
76+
oldSubtype == 31) {
7677
meta ls.localNumberOfObservations bits(keySat,0,16) : dump,long_type,no_copy;
7778
meta ls.satelliteID bits(keySat,16,16) : dump,long_type,no_copy;
7879
} else {
@@ -114,16 +115,16 @@ meta bufrdcExpandedDescriptors bufrdc_expanded_descriptors(expandedCodes) : no_c
114115
#smart_table NAME (VALUES,FILE_NAME,MASTER_DIRECTORY,LOCAL_DIRECTORY,WIDTH_OF_CODE_IN_BITS,EXTRA_DIRECTORY,EXTRA_FILE_NAME);
115116
#Note: The WIDTH_OF_CODE_IN_BITS has to be big enough so 2^width > the highest BUFR descriptor code
116117
smart_table expandedOriginalCodes (expandedCodes,"element.table",tablesMasterDir,tablesLocalDir,18,rootTablesDir,"operators.table") :no_copy;
117-
meta expandedAbbreviations smart_table_column(expandedOriginalCodes,0,1) : string_type,no_copy;
118-
meta expandedTypes smart_table_column(expandedOriginalCodes,1,0) : string_type,no_copy;
119-
meta expandedNames smart_table_column(expandedOriginalCodes,2,0) : string_type,no_copy;
120-
meta expandedUnits smart_table_column(expandedOriginalCodes,3,0) : string_type,no_copy;
121-
meta expandedOriginalScales smart_table_column(expandedOriginalCodes,4,0) : long_type,no_copy;
122-
meta expandedOriginalReferences smart_table_column(expandedOriginalCodes,5,0) : long_type,no_copy;
123-
meta expandedOriginalWidths smart_table_column(expandedOriginalCodes,6,0) : long_type,no_copy;
124-
meta expandedCrex_units smart_table_column(expandedOriginalCodes,7,0) : long_type,no_copy;
125-
meta expandedCrex_scales smart_table_column(expandedOriginalCodes,8,0) : long_type,no_copy;
126-
meta expandedCrex_widths smart_table_column(expandedOriginalCodes,9,0) : long_type,no_copy;
118+
meta expandedAbbreviations smart_table_column(expandedOriginalCodes,0,1) : string_type,no_copy;
119+
meta expandedTypes smart_table_column(expandedOriginalCodes,1,0) : string_type,no_copy;
120+
meta expandedNames smart_table_column(expandedOriginalCodes,2,0) : string_type,no_copy;
121+
meta expandedUnits smart_table_column(expandedOriginalCodes,3,0) : string_type,no_copy;
122+
meta expandedOriginalScales smart_table_column(expandedOriginalCodes,4,0) : long_type,no_copy;
123+
meta expandedOriginalReferences smart_table_column(expandedOriginalCodes,5,0) : long_type,no_copy;
124+
meta expandedOriginalWidths smart_table_column(expandedOriginalCodes,6,0) : long_type,no_copy;
125+
meta expandedCrex_units smart_table_column(expandedOriginalCodes,7,0) : long_type,no_copy;
126+
meta expandedCrex_scales smart_table_column(expandedOriginalCodes,8,0) : long_type,no_copy;
127+
meta expandedCrex_widths smart_table_column(expandedOriginalCodes,9,0) : long_type,no_copy;
127128

128129
position endDescriptors;
129130
section_padding section3Padding;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
0 0 ANTARCTICA
2+
1 1 REGION I
3+
2 2 REGION II
4+
3 3 REGION III
5+
4 4 REGION IV
6+
5 5 REGION V
7+
6 6 REGION VI
8+
7 7 MISSING VALUE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
0 0 INCREASING, THEN DECREASING; ATMOSPHERIC PRESSURE THE SAME OR HIGHER THAN THREE HOURS AGO
2+
1 1 INCREASING, THEN STEADY; OR INCREASING, THEN INCREASING MORE SLOWLY
3+
2 2 INCREASING (STEADILY OR UNSTEADILY)
4+
3 3 DECREASING OR STEADY, THEN INCREASING; OR INCREASING, THEN INCREASING MORE RAPIDLY
5+
4 4 STEADY; ATMOSPHERIC PRESSURE THE SAME AS THREE HOURS AGO
6+
5 5 DECREASING, THEN INCREASING; ATMOSPHERIC PRESSURE THE SAME OR LOWER THAN THREE HOURS AGO
7+
6 6 DECREASING, THEN STEADY; OR DECREASING, THEN DECREASING MORE SLOWLY
8+
7 7 DECREASING (STEADILY OR UNSTEADILY)
9+
8 8 STEADY OR INCREASING, THEN DECREASING; OR DECREASING, THEN DECREASING MORE RAPIDLY
10+
15 15 MISSING VALUE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0 0 SUBSONIC
2+
1 1 TRANSONIC
3+
2 2 SUPERSONIC
4+
7 7 MISSING VALUE

0 commit comments

Comments
 (0)