mirror of https://github.com/ecmwf/eccodes.git
avoid unaliasing mars.levelist by only alias it when neccessary
This commit is contained in:
parent
9b49125133
commit
31db16b387
|
@ -64,11 +64,15 @@ if (extraDim) {
|
||||||
alias mars.levelist = dimension;
|
alias mars.levelist = dimension;
|
||||||
alias mars.levtype = dimensionType;
|
alias mars.levtype = dimensionType;
|
||||||
} else {
|
} else {
|
||||||
|
# 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
|
||||||
|
transient tempLevtype = levtype; # Faster to copy the concept so we evaluate it once
|
||||||
# See GRIB-74 why we store the pressureUnits in a transient
|
# See GRIB-74 why we store the pressureUnits in a transient
|
||||||
transient tempPressureUnits=pressureUnits;
|
transient tempPressureUnits=pressureUnits;
|
||||||
# Same as typeOfLevel != "surface" but much quicker to evaluate
|
# Same as typeOfLevel != "surface" but much quicker to evaluate
|
||||||
# than via the concept
|
# than via the concept
|
||||||
if ( ! (typeOfFirstFixedSurface == 1 && typeOfSecondFixedSurface == 255) ) {
|
if ( ! ((typeOfFirstFixedSurface == 1 && typeOfSecondFixedSurface == 255) || tempLevtype is "sfc" || tempLevtype is "o2d")) {
|
||||||
if (tempPressureUnits is "Pa") {
|
if (tempPressureUnits is "Pa") {
|
||||||
meta marsLevel scale(level,one,hundred) : read_only;
|
meta marsLevel scale(level,one,hundred) : read_only;
|
||||||
alias mars.levelist=marsLevel;
|
alias mars.levelist=marsLevel;
|
||||||
|
@ -76,13 +80,6 @@ if (extraDim) {
|
||||||
alias mars.levelist = level;
|
alias mars.levelist = level;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# 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
|
|
||||||
transient tempLevtype = levtype; # Faster to copy the concept so we evaluate it once
|
|
||||||
if (tempLevtype is "sfc" || tempLevtype is "o2d") {
|
|
||||||
unalias mars.levelist;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# See ECC-854, ECC-1435, ECC-1451, ECC-1462
|
# See ECC-854, ECC-1435, ECC-1451, ECC-1462
|
||||||
|
|
Loading…
Reference in New Issue