diff --git a/.appveyor.yml b/.appveyor.yml index 0c617e235..e75d7c1c7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,7 +2,7 @@ # general configuration # #---------------------------------# -version: 2.11.0-{build}-{branch} +version: 2.12.2-{build}-{branch} branches: only: diff --git a/CMakeLists.txt b/CMakeLists.txt index c81aaaace..ac1069483 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,6 +351,21 @@ get_directory_property( COMPILE_DEFINITIONS ECCODES_DEFINITIONS ) foreach( _tpl ${ECCODES_TPLS} ) string( TOUPPER ${_tpl} TPL ) if( ${TPL}_FOUND ) + if( REPLACE_TPL_ABSOLUTE_PATHS ) + # replace TPL absolute paths with their library names + # this helps make ecCodes relocatable + set( _TMP "" ) + + foreach( _lib ${${TPL}_LIBRARIES} ) + get_filename_component( _lib_name ${_lib} NAME_WE ) + string( REGEX REPLACE "^lib" "" _name ${_lib_name} ) + list( APPEND _TMP "-l${_name}" ) + endforeach() + + set( ${TPL}_LIBRARIES ${_TMP} ) + set( _TMP "" ) + endif() + list( APPEND ECCODES_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ) list( APPEND ECCODES_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_INCLUDE_DIR} ) list( APPEND ECCODES_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ) diff --git a/VERSION.cmake b/VERSION.cmake index 1f4932340..a8ab90833 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1 +1 @@ -set( ${PROJECT_NAME}_VERSION_STR "2.12.1" ) +set( ${PROJECT_NAME}_VERSION_STR "2.12.2" ) diff --git a/definitions/mars/grib.edmm.an.def b/definitions/mars/grib.edmm.an.def index c0cd1875f..23352e770 100644 --- a/definitions/mars/grib.edmm.an.def +++ b/definitions/mars/grib.edmm.an.def @@ -4,3 +4,5 @@ alias mars.step = startStep; alias mars.number=perturbationNumber; +alias monthlyVerificationTime = validityTime; +alias monthlyVerificationDate = dataDate; diff --git a/definitions/mars/grib.edmm.fc.def b/definitions/mars/grib.edmm.fc.def index 5abcbfa63..5d94b1664 100644 --- a/definitions/mars/grib.edmm.fc.def +++ b/definitions/mars/grib.edmm.fc.def @@ -8,6 +8,8 @@ meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); +alias monthlyVerificationTime = validityTime; + # class e4 # constant six = 6; diff --git a/definitions/mars/grib.edmo.an.def b/definitions/mars/grib.edmo.an.def index db73d6ba5..09791db5d 100644 --- a/definitions/mars/grib.edmo.an.def +++ b/definitions/mars/grib.edmo.an.def @@ -1,6 +1,9 @@ # NOTE: MARS step is startStep. See GRIB-378 alias mars.step = startStep; +alias monthlyVerificationTime = zero; +alias monthlyVerificationDate = dataDate; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.edmo.fc.def b/definitions/mars/grib.edmo.fc.def index d0744e69a..dda3104a0 100644 --- a/definitions/mars/grib.edmo.fc.def +++ b/definitions/mars/grib.edmo.fc.def @@ -9,6 +9,8 @@ meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); +alias monthlyVerificationTime = zero; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.ewmm.an.def b/definitions/mars/grib.ewmm.an.def index 942668e19..5202a2231 100644 --- a/definitions/mars/grib.ewmm.an.def +++ b/definitions/mars/grib.ewmm.an.def @@ -1,2 +1,5 @@ alias mars.step = startStep; alias mars.number=perturbationNumber; + +alias monthlyVerificationTime = validityTime; +alias monthlyVerificationDate = dataDate; diff --git a/definitions/mars/grib.ewmm.fc.def b/definitions/mars/grib.ewmm.fc.def index e452c8e4c..ed1cf7d98 100644 --- a/definitions/mars/grib.ewmm.fc.def +++ b/definitions/mars/grib.ewmm.fc.def @@ -8,6 +8,8 @@ meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); +alias monthlyVerificationTime = validityTime; + # # See GRIB-422, GRIB-497, GRIB-766, GRIB-833 # diff --git a/definitions/mars/grib.ewmo.an.def b/definitions/mars/grib.ewmo.an.def index 38e4bb841..c28a8be78 100644 --- a/definitions/mars/grib.ewmo.an.def +++ b/definitions/mars/grib.ewmo.an.def @@ -1,6 +1,9 @@ # NOTE: step is startStep alias mars.step = startStep; +alias monthlyVerificationTime = zero; +alias monthlyVerificationDate = dataDate; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.ewmo.fc.def b/definitions/mars/grib.ewmo.fc.def index d0744e69a..dda3104a0 100644 --- a/definitions/mars/grib.ewmo.fc.def +++ b/definitions/mars/grib.ewmo.fc.def @@ -9,6 +9,8 @@ meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); +alias monthlyVerificationTime = zero; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.mnth.an.def b/definitions/mars/grib.mnth.an.def index e06aac5ae..a300aae3b 100644 --- a/definitions/mars/grib.mnth.an.def +++ b/definitions/mars/grib.mnth.an.def @@ -1,2 +1,5 @@ # class e4 alias mars.step = startStep; + +alias monthlyVerificationTime = validityTime; +alias monthlyVerificationDate = dataDate; diff --git a/definitions/mars/grib.mnth.fc.def b/definitions/mars/grib.mnth.fc.def index 44a3b924a..fc25f40af 100644 --- a/definitions/mars/grib.mnth.fc.def +++ b/definitions/mars/grib.mnth.fc.def @@ -7,7 +7,9 @@ meta verificationYear evaluate(verificationDate/10000); meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); -# + +alias monthlyVerificationTime = validityTime; + # See GRIB-497, GRIB-766, GRIB-833 # if (class is "em" || class is "e2" || class is "ea" || class is "ep" || diff --git a/definitions/mars/grib.moda.an.def b/definitions/mars/grib.moda.an.def index a2d44724e..3afa70813 100644 --- a/definitions/mars/grib.moda.an.def +++ b/definitions/mars/grib.moda.an.def @@ -2,6 +2,9 @@ alias mars.step = startStep; +alias monthlyVerificationTime = zero; +alias monthlyVerificationDate = dataDate; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.moda.fc.def b/definitions/mars/grib.moda.fc.def index ad96bb391..ab21b8b45 100644 --- a/definitions/mars/grib.moda.fc.def +++ b/definitions/mars/grib.moda.fc.def @@ -4,6 +4,8 @@ meta verificationDate g1verificationdate(dataDate, dataTime, endStep) : r meta monthlyVerificationDate g1monthlydate(verificationDate) : dump,no_copy; alias mars.date = monthlyVerificationDate; +alias monthlyVerificationTime = zero; + meta verificationYear evaluate(verificationDate/10000); meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); diff --git a/definitions/mars/grib.wamd.an.def b/definitions/mars/grib.wamd.an.def index a2d44724e..3afa70813 100644 --- a/definitions/mars/grib.wamd.an.def +++ b/definitions/mars/grib.wamd.an.def @@ -2,6 +2,9 @@ alias mars.step = startStep; +alias monthlyVerificationTime = zero; +alias monthlyVerificationDate = dataDate; + # class 3 is "er" which is 15 year re-analysis (ERA15) # Only ERA15 has time and step if(class != 3) { diff --git a/definitions/mars/grib.wamd.fc.def b/definitions/mars/grib.wamd.fc.def index ad96bb391..ab21b8b45 100644 --- a/definitions/mars/grib.wamd.fc.def +++ b/definitions/mars/grib.wamd.fc.def @@ -4,6 +4,8 @@ meta verificationDate g1verificationdate(dataDate, dataTime, endStep) : r meta monthlyVerificationDate g1monthlydate(verificationDate) : dump,no_copy; alias mars.date = monthlyVerificationDate; +alias monthlyVerificationTime = zero; + meta verificationYear evaluate(verificationDate/10000); meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); diff --git a/definitions/mars/grib.wamo.an.def b/definitions/mars/grib.wamo.an.def index 0807371d8..2e623021e 100644 --- a/definitions/mars/grib.wamo.an.def +++ b/definitions/mars/grib.wamo.an.def @@ -1 +1,4 @@ alias mars.step = startStep; + +alias monthlyVerificationTime = validityTime; +alias monthlyVerificationDate = dataDate; diff --git a/definitions/mars/grib.wamo.fc.def b/definitions/mars/grib.wamo.fc.def index 72cbbd335..180df73d0 100644 --- a/definitions/mars/grib.wamo.fc.def +++ b/definitions/mars/grib.wamo.fc.def @@ -8,6 +8,8 @@ meta monthlyVerificationYear evaluate(monthlyVerificationDate/10000); meta verificationMonth evaluate( (verificationDate/100)%100 ); meta monthlyVerificationMonth evaluate( (monthlyVerificationDate/100)%100 ); +alias monthlyVerificationTime = validityTime; + # # See GRIB-497, GRIB-766, GRIB-833 # diff --git a/src/grib_util.c b/src/grib_util.c index 4b0eeae97..0da9bfe27 100644 --- a/src/grib_util.c +++ b/src/grib_util.c @@ -1280,9 +1280,13 @@ grib_handle* grib_util_set_spec2(grib_handle* h, break; } } - if (!strcmp(input_packing_type,"grid_simple_matrix")) { + if (strcmp(input_packing_type,"grid_simple_matrix")==0) { long numberOfDirections,numberOfFrequencies; - if (h->context->keep_matrix) { + int keep_matrix = h->context->keep_matrix; + if (packing_spec->packing_type == GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE) { + keep_matrix = 0; /* ECC-911 */ + } + if (keep_matrix) { int ret; SET_STRING_VALUE("packingType","grid_simple_matrix"); ret=grib_get_long(h,"numberOfDirections",&numberOfDirections); diff --git a/version.sh b/version.sh index c195766c2..b64ccacfc 100644 --- a/version.sh +++ b/version.sh @@ -15,7 +15,7 @@ PACKAGE_NAME='eccodes' # Package version ECCODES_MAJOR_VERSION=2 ECCODES_MINOR_VERSION=12 -ECCODES_REVISION_VERSION=1 +ECCODES_REVISION_VERSION=2 ECCODES_CURRENT=1 ECCODES_REVISION=0