GRIB2: Error when setting localDefinitionNumber (centre=98)
@@ -333,8 +333,14 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
break;
default:
- grib_context_log(a->context, GRIB_LOG_ERROR, "Invalid localDefinitionNumber %d", localDefinitionNumber);
+#ifdef DEBUG
+ /* In test & development mode, fail so we remember to adjust PDTN */
+ grib_context_log(a->context, GRIB_LOG_ERROR,
+ "grib_accessor_local_definition: Invalid localDefinitionNumber %d", localDefinitionNumber);
return GRIB_ENCODING_ERROR;
+#endif
+ /* ECC-1253: Do not fail in operations. Leave PDTN as is */
+ productDefinitionTemplateNumberNew = productDefinitionTemplateNumber;
break;
}
