@@ -64,25 +64,22 @@ if (extraDim) {
64
64
alias mars.levelist = dimension;
65
65
alias mars.levtype = dimensionType;
66
66
} else {
67
+ # ECC-1333: levtype should be read-only in GRIB2
68
+ concept mars.levtype(unknown,"marsLevtypeConcept.def",conceptsDir2,conceptsDir1):no_copy, read_only;
69
+ # GRIB-372: levelist alias does not pertain to surface parameters
70
+ transient tempLevtype = levtype; # Faster to copy the concept so we evaluate it once
67
71
# See GRIB-74 why we store the pressureUnits in a transient
68
72
transient tempPressureUnits=pressureUnits;
69
73
# Same as typeOfLevel != "surface" but much quicker to evaluate
70
74
# than via the concept
71
- if ( ! (typeOfFirstFixedSurface == 1 && typeOfSecondFixedSurface == 255) ) {
75
+ if ( ! (( typeOfFirstFixedSurface == 1 && typeOfSecondFixedSurface == 255) || tempLevtype is "sfc" || tempLevtype is "o2d") ) {
72
76
if (tempPressureUnits is "Pa") {
73
77
meta marsLevel scale(level,one,hundred) : read_only;
74
78
alias mars.levelist=marsLevel;
75
79
} else {
76
80
alias mars.levelist = level;
77
81
}
78
82
}
79
- # ECC-1333: levtype should be read-only in GRIB2
80
- concept mars.levtype(unknown,"marsLevtypeConcept.def",conceptsDir2,conceptsDir1):no_copy, read_only;
81
- # GRIB-372: levelist alias does not pertain to surface parameters
82
- transient tempLevtype = levtype; # Faster to copy the concept so we evaluate it once
83
- if (tempLevtype is "sfc" || tempLevtype is "o2d") {
84
- unalias mars.levelist;
85
- }
86
83
}
87
84
88
85
# See ECC-854, ECC-1435, ECC-1451, ECC-1462
0 commit comments