GRIB2 product template selection: Debug messages

This commit is contained in:
shahramn 2024-10-21 12:46:54 +01:00
parent e16dc172e5
commit ba91574919
2 changed files with 5 additions and 3 deletions

View File

@ -384,6 +384,7 @@ static int grib_concept_apply(grib_accessor* a, const char* name)
// is instantaneous but paramId/shortName being set is for accum/avg etc
if (STR_EQUAL(values[i].name, "typeOfStatisticalProcessing")) {
// Switch from instantaneous to interval-based
grib_context_log(h->context, GRIB_LOG_DEBUG, "%s: Switch to statistically processed", __func__);
if (grib_set_long(h, "selectStepTemplateInterval", 1) == GRIB_SUCCESS) {
resubmit = true;
grib_set_values(h, &values[i], 1);
@ -398,6 +399,7 @@ static int grib_concept_apply(grib_accessor* a, const char* name)
}
if (resubmit) {
grib_context_log(h->context, GRIB_LOG_DEBUG, "%s: Resubmitting key/values", __func__);
err = grib_set_values(h, values, count);
}
}

View File

@ -1801,15 +1801,15 @@ int grib_set_values_silent(grib_handle* h, grib_values* args, size_t count, int
h->values[stack] = args;
h->values_count[stack] = count;
for (i = 0; i < count; i++)
args[i].error = GRIB_NOT_FOUND;
if (h->context->debug) {
for (i = 0; i < count; i++) {
grib_print_values("ECCODES DEBUG about to set key/value pair", &args[i], stderr, 1);
}
}
for (i = 0; i < count; i++)
args[i].error = GRIB_NOT_FOUND;
while (more) {
more = 0;
for (i = 0; i < count; i++) {