Definitions: Faster to copy the concept so we evaluate it once

This commit is contained in:
shahramn 2024-04-17 15:32:58 +01:00
parent 303a8ea9a5
commit 09f7774abd
2 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,8 @@ if (extraDim) {
# ECC-1333: levtype should be read-only in GRIB2
concept mars.levtype(unknown,"marsLevtypeConcept.def",conceptsDir2,conceptsDir1):no_copy, read_only;
# GRIB-372: levelist alias does not pertain to surface parameters
if (levtype is "sfc" || levtype is "o2d") {
transient tempLevtype = levtype; # Faster to copy the concept so we evaluate it once
if (tempLevtype is "sfc" || tempLevtype is "o2d") {
unalias mars.levelist;
}
}

View File

@ -237,6 +237,7 @@ static const char* concept_evaluate(grib_accessor* a)
grib_concept_value* c = action_concept_get_concept(a);
grib_handle* h = grib_handle_of_accessor(a);
// fprintf(stderr, "DEBUG: concept_evaluate: %s %s\n", a->name, c->name);
while (c) {
grib_concept_condition* e = c->conditions;
int cnt = 0;