Merge branch 'develop' into feature/mtg2_parameters

This commit is contained in:
Matthew Griffith 2024-12-18 16:19:05 +00:00
commit 433ce10b31
29 changed files with 58 additions and 40 deletions

View File

@ -29,11 +29,6 @@ transient masterDir="grib2/tables/[tablesVersion]";
if (tablesVersion > tablesVersionLatest) {
transient masterDir="grib2/tables/[tablesVersionLatest]";
}
when (tablesVersion!=255) {
set masterDir="grib2/tables/[tablesVersion]";
} else {
set masterDir="grib2/tables/4";
}
codetable[1] localTablesVersion 'grib2/tables/local/[centreForLocal]/1.1.table' ;
alias versionNumberOfGribLocalTables=localTablesVersion;

View File

@ -2,4 +2,4 @@
1 1 Initial operational version number
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -36,4 +36,4 @@
34 34 Version implemented on 18 November 2024
35 35 Pre-operational to be implemented by next amendment
# 36-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -2,4 +2,4 @@
1 1 Initial operational version number
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -12,4 +12,4 @@
10 10 Version implemented on 7 November 2012
11 11 Pre-operational to be implemented by next amendment
# 12-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -12,4 +12,4 @@
10 10 Version implemented on 7 November 2012
11 11 Pre-operational to be implemented by next amendment
# 12-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -20,4 +20,4 @@
18 18 Version implemented on 2 November 2016
19 19 Pre-operational to be implemented by next amendment
# 20-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -21,4 +21,4 @@
19 19 Version implemented on 3 May 2017
20 20 Pre-operational to be implemented by next amendment
# 21-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -4,4 +4,4 @@
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
# 4-254 Future operational version numbers
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -22,4 +22,4 @@
20 20 Version implemented on 8 November 2017
21 21 Pre-operational to be implemented by next amendment
# 22-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -23,4 +23,4 @@
21 21 Version implemented on 2 May 2018
22 22 Pre-operational to be implemented by next amendment
# 23-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -24,4 +24,4 @@
22 22 Version implemented on 7 November 2018
23 23 Version implemented on 15 May 2019
# 24-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -24,4 +24,4 @@
22 22 Version implemented on 7 November 2018
23 23 Version implemented on 15 May 2019
# 24-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -25,4 +25,4 @@
23 23 Version implemented on 15 May 2019
24 24 Version implemented on 6 November 2019
# 25-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -26,4 +26,4 @@
24 24 Version implemented on 6 November 2019
25 25 Version implemented on 6 May 2020
# 26-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -27,4 +27,4 @@
25 25 Version implemented on 6 May 2020
26 26 Version implemented on 16 November 2020
# 27-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -29,4 +29,4 @@
27 27 Version implemented on 15 June 2021
28 28 Pre-operational to be implemented by next amendment
# 29-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -30,4 +30,4 @@
28 28 Version implemented on 15 November 2021
29 29 Pre-operational to be implemented by next amendment
# 30-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -4,4 +4,4 @@
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
# 4-254 Future operational version numbers
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -4,4 +4,4 @@
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
# 4-254 Future operational version numbers
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -7,4 +7,4 @@
5 5 Version implemented on 4 November 2009
6 6 Pre-operational to be implemented by next amendment
# 7-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -8,5 +8,5 @@
6 6 Version implemented on 15 September 2010
7 7 Pre-operational to be implemented by next amendment
# 8-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -9,4 +9,4 @@
7 7 Version implemented on 4 May 2011
8 8 Pre-operational to be implemented by next amendment
# 9-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -10,4 +10,4 @@
8 8 Version implemented on 2 November 2011
9 9 Pre-operational to be implemented by next amendment
# 10-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -11,4 +11,4 @@
9 9 Version implemented on 2 May 2012
10 10 Pre-operational to be implemented by next amendment
# 11-254 Future versions
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -4,4 +4,4 @@
2 2 Previous operational version number
3 3 Current operational version number implemented on 2 November 2005
# 4-254 Future operational version numbers
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
255 255 Missing

View File

@ -73,9 +73,7 @@ static int check_grid_pl_array(grib_handle* h)
}
pl = (long*)grib_context_malloc_clear(c, sizeof(long) * plsize);
if (!pl) {
return GRIB_OUT_OF_MEMORY;
}
if (!pl) return GRIB_OUT_OF_MEMORY;
if ((ret = grib_get_long_array(h, "pl", pl, &plsize)) != GRIB_SUCCESS)
return ret;
@ -90,10 +88,26 @@ static int check_grid_pl_array(grib_handle* h)
return GRIB_SUCCESS;
}
static int check_geoiterator(grib_handle* h)
{
//printf("DEBUG %s \n", __func__);
int err = 0;
grib_iterator* iter = grib_iterator_new(h, 0, &err);
if (err == GRIB_NOT_IMPLEMENTED || err == GRIB_SUCCESS) {
grib_iterator_delete(iter);
return GRIB_SUCCESS; // GRIB_NOT_IMPLEMENTED is OK e.g., for spectral fields
}
grib_context_log(h->context, GRIB_LOG_ERROR, "%s", grib_get_error_message(err));
grib_iterator_delete(iter);
return err;
}
typedef int (*proj_func)(grib_handle*);
static proj_func check_functions[] = {
check_field_values,
check_grid_pl_array
check_grid_pl_array,
check_geoiterator
};
int grib_accessor_message_is_valid_t::unpack_long(long* val, size_t* len)

View File

@ -17,6 +17,13 @@ tempFilt=temp.$label.filt
sample=$ECCODES_SAMPLES_PATH/reduced_gg_pl_32_grib2.tmpl
grib_check_key_equals $sample isMessageValid 1
# Check regular lat/lon
# ------------------------------
${tools_dir}/grib_set -s Nj=0 $data_dir/sample.grib2 $tempGrib
grib_check_key_equals $tempGrib isMessageValid 0 2>$tempText
grep -q "Regular grid Geoiterator" $tempText
# Check reduced Gaussian grid Ni
# ------------------------------
cat >$tempFilt<<EOF

View File

@ -248,7 +248,7 @@ static void test_assertion_catching()
list = string_split(empty, " ");
Assert(assertion_caught == 1);
Assert( list == NULL );
Assert(list == NULL);
/* Restore everything */
codes_set_codes_assertion_failed_proc(NULL);
@ -858,15 +858,17 @@ static void test_grib_get_binary_scale_fact()
{
printf("Running %s ...\n", __func__);
int err = 0;
long result = 0;
long result = grib_get_binary_scale_fact(INFINITY, 0, 0, &err);
Assert(err == GRIB_OUT_OF_RANGE);
Assert(result == 0);
result = grib_get_binary_scale_fact(100, 0, 65, &err); // bpv too big
Assert( err == GRIB_OUT_OF_RANGE);
Assert( result == 0 );
Assert(err == GRIB_OUT_OF_RANGE);
Assert(result == 0);
result = grib_get_binary_scale_fact(100, 0, 0, &err); // bpv 0
Assert( err == GRIB_ENCODING_ERROR);
Assert( result == 0 );
Assert(err == GRIB_ENCODING_ERROR);
Assert(result == 0);
}
static void test_filepool()