Skip to content

Commit

Permalink
GRIB2 product template selection: probability forecasts
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Dec 17, 2024
1 parent 6f5265b commit 9872c7e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/accessor/grib_accessor_class_concept.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,20 @@ static int grib_concept_apply(grib_accessor* a, const char* name)
}
}
else if (STR_EQUAL(values[i].name, "sourceSinkChemicalPhysicalProcess")) {
grib_context_log(h->context, GRIB_LOG_DEBUG, "%s: Switch to chemical src/sink", __func__);
grib_context_log(h->context, GRIB_LOG_DEBUG, "%s: Switch to chemical src/sink", __func__);
if (grib_set_long(h, "is_chemical_srcsink", 1) == GRIB_SUCCESS) {
resubmit = true;
grib_set_values(h, &values[i], 1);
}
}
else if (STR_EQUAL(values[i].name, "probabilityType")) {
grib_context_log(h->context, GRIB_LOG_DEBUG, "%s: Switch to probability forecasts", __func__);
// TODO(masn): Add a new key e.g. is_probability_forecast
if (grib_set_long(h, "productDefinitionTemplateNumber", 5) == GRIB_SUCCESS) {
resubmit = true;
grib_set_values(h, &values[i], 1);
}
}
}
}

Expand Down

0 comments on commit 9872c7e

Please sign in to comment.