/usr/share/eccodes/definitions/grib1/section.1.def is in libeccodes-data 2.6.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | # Copyright 2005-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
constant ECMWF = 98 : hidden;
constant ECMWF_s = "ecmf" : hidden;
constant WMO= 0;
constant conceptsMasterDir="grib1" : hidden;
constant conceptsLocalDirECMF="grib1/localConcepts/ecmf" : hidden;
constant conceptsLocalDirAll="grib1/localConcepts/[centre:s]" : hidden;
constant tablesMasterDir="grib1" : hidden;
constant tablesLocalDir="grib1/local/[centre:s]" : hidden;
transient productionStatusOfProcessedData=0;
position offsetSection1;
section_length[3] section1Length ;
meta section1Pointer section_pointer(offsetSection1,section1Length,1);
constant wrongPadding=0;
# GRIB tables Version No.
# (currently 3 for international exchange)
unsigned[1] table2Version : edition_specific,dump;
alias gribTablesVersionNo=table2Version;
#assert(section1Length > 5);
# Identification of originating/generating centre
codetable[1] centre 'common/c-1.table' : dump,string_type;
alias identificationOfOriginatingGeneratingCentre=centre;
meta centreDescription codetable_title(centre);
alias parameter.centre=centre;
alias originatingCentre=centre;
alias ls.centre = centre;
# Generating process identification number
# (allocated by originating centre)
unsigned[1] generatingProcessIdentifier : dump ;
alias generatingProcessIdentificationNumber=generatingProcessIdentifier;
alias process=generatingProcessIdentifier;
unsigned[1] gridDefinition = 255 : edition_specific ;
flags[1] section1Flags 'grib1/1.table' = 128 : hidden ; # = section 2 present
alias centreForTable2=centre;
codetable[1] indicatorOfParameter 'grib1/2.[centreForTable2:l].[table2Version:l].table' : edition_specific,no_copy,dump;
meta parameterName codetable_title(indicatorOfParameter);
meta parameterUnits codetable_units(indicatorOfParameter);
# Local comes before Master to give precedence to the local, centre-specific table
codetable[1] indicatorOfTypeOfLevel ('3.table',tablesLocalDir,tablesMasterDir) : edition_specific,no_copy,dump,string_type;
alias levelType=indicatorOfTypeOfLevel;
transient pressureUnits="hPa";
concept_nofail typeOfLevelECMF (unknown, "typeOfLevel.def",conceptsMasterDir,conceptsLocalDirECMF);
concept_nofail vertical.typeOfLevel (typeOfLevelECMF, "typeOfLevel.def",conceptsMasterDir,conceptsLocalDirAll);
when ( typeOfLevel is "isobaricInPa" ) { set pressureUnits="Pa"; }
else { set pressureUnits="hPa";}
alias ls.typeOfLevel=typeOfLevel;
if ( indicatorOfTypeOfLevel == 101 or
indicatorOfTypeOfLevel == 104 or
indicatorOfTypeOfLevel == 106 or
indicatorOfTypeOfLevel == 108 or
indicatorOfTypeOfLevel == 110 or
indicatorOfTypeOfLevel == 112 or
indicatorOfTypeOfLevel == 114 or
indicatorOfTypeOfLevel == 116 or
indicatorOfTypeOfLevel == 120 or
indicatorOfTypeOfLevel == 121 or
indicatorOfTypeOfLevel == 128 or
indicatorOfTypeOfLevel == 141 )
{
unsigned[1] topLevel : can_be_missing,dump;
unsigned[1] bottomLevel : can_be_missing,dump;
meta levels sprintf("%d-%d",topLevel,bottomLevel) : dump;
alias ls.levels=levels;
alias vertical.level = topLevel;
alias vertical.topLevel = topLevel;
alias vertical.bottomLevel = bottomLevel;
}
else
{
unsigned[2] level : can_be_missing,dump;
if (indicatorOfTypeOfLevel == 210) {
meta marsLevel scale(level,oneConstant,hundred) : read_only;
alias mars.levelist = marsLevel;
}
alias vertical.level=level;
alias vertical.topLevel = level;
alias vertical.bottomLevel = level;
alias ls.level=level;
alias lev=level;
}
if( indicatorOfTypeOfLevel == 109 ||
indicatorOfTypeOfLevel == 100 ||
indicatorOfTypeOfLevel == 110 ||
indicatorOfTypeOfLevel == 113 ||
indicatorOfTypeOfLevel == 117)
{
alias mars.levelist = level;
}
unsigned[1] yearOfCentury : edition_specific ;
unsigned[1] month ;
unsigned[1] day ;
unsigned[1] hour ;
unsigned[1] minute ;
transient second = 0;
codetable[1] unitOfTimeRange 'grib1/4.table' = 1 : edition_specific;
alias unitOfTime=unitOfTimeRange;
alias indicatorOfUnitOfTimeRange=unitOfTimeRange;
unsigned[1] P1 : edition_specific;
unsigned[1] P2 : edition_specific;
# Local comes before Master to give precedence to the local, centre-specific table
codetable[1] timeRangeIndicator ('5.table',tablesLocalDir,tablesMasterDir) = 1 : dump,edition_specific;
unsigned[2] numberIncludedInAverage;
meta mybits bits(numberIncludedInAverage,0,12);
unsigned[1] numberMissingFromAveragesOrAccumulations;
unsigned[1] centuryOfReferenceTimeOfData ;
codetable[1] subCentre 'grib1/0.[centre].table' : dump;
if(table2Version >= 128) {
_if (centre != 98 && subCentre == 98) {
alias centreForTable2 = subCentre;
} else {
alias centreForTable2 = centre;
}
} else {
alias centreForTable2 = WMO;
}
#if ( subCentre == 98 ) {
# alias conceptsLocalDir=conceptsLocalDirECMF;
#} else {
# alias conceptsLocalDir=conceptsLocalDirAll;
#}
concept paramIdECMF (defaultParameter,"paramId.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy;
concept paramId (paramIdECMF,"paramId.def",conceptsMasterDir,conceptsLocalDirAll): long_type,dump;
concept cfNameECMF(defaultName,"cfName.def",conceptsMasterDir,conceptsLocalDirECMF) : dump,no_copy,read_only;
concept cfName(cfNameECMF,"cfName.def",conceptsMasterDir,conceptsLocalDirAll) : dump,no_copy,read_only;
concept cfVarNameECMF(defaultName,"cfVarName.def",conceptsMasterDir,conceptsLocalDirECMF) : dump,no_copy,read_only;
concept cfVarName(cfVarNameECMF,"cfVarName.def",conceptsMasterDir,conceptsLocalDirAll) : dump,no_copy,read_only;
concept unitsECMF(defaultName,"units.def",conceptsMasterDir,conceptsLocalDirECMF) : no_copy,read_only;
concept units(unitsECMF,"units.def",conceptsMasterDir,conceptsLocalDirAll) : dump,no_copy,read_only;
concept nameECMF(defaultName,"name.def",conceptsMasterDir,conceptsLocalDirECMF) : dump,no_copy,read_only;
concept name(nameECMF,"name.def",conceptsMasterDir,conceptsLocalDirAll) : dump,no_copy,read_only;
signed[2] decimalScaleFactor :dump;
transient setLocalDefinition= 0 : no_copy;
# Try different values of binaryScaleFactor and decimalScaleFactor to reduce packing error
transient optimizeScaleFactor = 0;
meta dataDate g1date(centuryOfReferenceTimeOfData,yearOfCentury,month,day) : dump;
meta year evaluate(dataDate / 10000) ;
meta dataTime time(hour,minute,second) : dump;
meta julianDay julian_day(dataDate,hour,minute,second) : edition_specific;
codetable[1] stepUnits 'stepUnits.table' = 1 : transient,dump,no_copy;
concept_nofail stepType (timeRangeIndicator, "stepType.def", conceptsMasterDir, conceptsLocalDirAll);
#alias stepTypeInternal=stepType;
#alias lengthOfTimeRange=numberIncludedInAverage;
#alias indicatorOfUnitForTimeRange=unitOfTimeRange;
#alias indicatorOfUnitForTimeIncrement=zero;
#alias timeIncrement=zero;
#if (timeRangeIndicator==113) {
# alias lengthOfTimeRange=numberIncludedInAverage;
# alias indicatorOfUnitForTimeRange=unitOfTimeRange;
# alias indicatorOfUnitForTimeIncrement=unitOfTimeRange;
# alias timeIncrement=P2;
# alias forecastTime=P1;
#}
#if (stepType is "accum") {
# transient accumulationRange=P2-P1;
# alias lengthOfTimeRange=accumulationRange;
# alias forecastTime=P1;
# alias indicatorOfUnitForTimeRange=unitOfTimeRange;
#}
#conversion 1->2
_if (stepType is "instant" ) {
alias productDefinitionTemplateNumber=zero;
} else {
alias productDefinitionTemplateNumber=eight;
}
meta stepRange g1step_range(P1,P2,timeRangeIndicator,unitOfTimeRange,stepUnits,stepType) : dump;
meta startStep long_vector(stepRange,0) : dump,no_copy;
meta endStep long_vector(stepRange,1) : dump,no_copy;
alias stepInHours = endStep;
alias ls.stepRange = stepRange;
alias ls.dataDate = dataDate;
alias mars.step = endStep;
alias mars.date = dataDate;
alias mars.levtype = indicatorOfTypeOfLevel;
alias mars.time = dataTime;
#alias mars.param = paramId;
meta marsParam mars_param(paramId,gribTablesVersionNo,indicatorOfParameter): read_only,dump;
alias mars.param = marsParam;
# GRIB-860: JRA55 rule for MARS.
# subCentre of 241 means Japanese Reanalysis Project
if (centre == 34 && subCentre == 241)
{
alias mars.param = paramId;
if (indicatorOfTypeOfLevel == 101) {
# See ECC-467
constant sfc_levtype = "sfc";
alias mars.levtype = sfc_levtype;
}
}
meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits);
meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits);
transient deleteLocalDefinition=0;
if(((section1Length > 40) or new() or setLocalDefinition> 0) and deleteLocalDefinition==0)
{
constant localUsePresent = 1 : edition_specific;
alias grib2LocalSectionPresent=present;
if( (centre == ECMWF) or
(centre != ECMWF and
subCentre == ECMWF))
{
pad reservedNeedNotBePresent(12);
codetable[1] localDefinitionNumber 'grib1/localDefinitionNumber.98.table' = 1 : dump;
template localDefinition "grib1/local.98.[localDefinitionNumber:l].def";
if (changed(localDefinitionNumber)) {
if(!new() && localDefinitionNumber!=4 ) {
section_padding localExtensionPadding : read_only;
}
}
template_nofail marsKeywords "mars/grib.[stream:s].[type:s].def";
#template marsKeywords "mars/grib.[stream:s].[type:s].def";
}
else
{
if ( !new() || setLocalDefinition ) {
# Other centres
pad reservedNeedNotBePresent(12);
template_nofail localDefinition "grib1/local.[centre:l].def";
section_padding localExtensionPadding : read_only;
}
}
}
else
{
constant localUsePresent = 0 : edition_specific;
# template defaultMarsLabeling "mars/default_labeling.def";
}
section_padding section1Padding : read_only;
#if (!wrongPadding) {
# padtoeven evenpadding_sec1(offsetSection1,section1Length);
#}
concept shortNameECMF (defaultShortName,"shortName.def",conceptsMasterDir,conceptsLocalDirECMF) : no_copy;
concept ls.shortName (shortNameECMF,"shortName.def",conceptsMasterDir,conceptsLocalDirAll) : no_copy,dump;
meta ifsParam ifs_param(paramId,type);
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
alias parameter=paramId;
alias short_name=shortName;
alias time.stepRange=stepRange;
alias time.stepUnits=stepUnits;
alias time.dataDate=dataDate;
alias time.dataTime=dataTime;
alias time.startStep=startStep;
alias time.endStep=endStep;
alias time.stepType=stepType;
# ECC-457: GRIB1 to GRIB2 conversion
concept_nofail stepTypeForConversion (unknown, "stepTypeForConversion.def", conceptsMasterDir, conceptsLocalDirAll);
if (stepTypeForConversion is "accum" ) {
alias productDefinitionTemplateNumber=eight;
}
meta md5Section1 md5(offsetSection1,section1Length);
# md5(start,length,blacklisted1,blacklisted2,...);
meta md5Product md5(offsetSection1,section1Length,gridDefinition,section1Flags,decimalScaleFactor);
|