Performance: remove the label statements or use underscore so grib_push_accessor does not add them to cache

This commit is contained in:
Shahram Najm 2017-06-14 15:33:37 +01:00
parent 9c7fd259df
commit 17885b337f
50 changed files with 21 additions and 74 deletions

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -1,4 +1,3 @@
label "JMA - extension";
# Japanese Meteorological Agency
codetable[1] localDefinitionNumber 'grib1/localDefinitionNumber.34.table' = 1 : dump;
template localDefinition "grib1/local.34.[localDefinitionNumber:l].def";

View File

@ -7,4 +7,4 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label empty;
label "_empty";

View File

@ -1 +1 @@
label "empty section";
label "_empty section";

View File

@ -1,3 +1,3 @@
label "empty section";
label "_empty section";

View File

@ -1,3 +1,3 @@
label "local 98.1";
label "_local 98.1";

View File

@ -7,6 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "empty section";
label "_empty section";
# END 1/local.98.5 ----------------------------------------------------------------------

View File

@ -1,4 +1,3 @@
# Override for sub-hourly steps
# See ECC-438
label "subhourly";
alias defaultStepUnits=indicatorOfUnitOfTimeRange;

View File

@ -7,6 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Empty file";
label "_Empty file";
#meta area g1area(latitudeOfFirstGridPoint,longitudeOfFirstGridPoint,latitudeOfLastGridPoint,longitudeOfLastGridPoint,angleMultiplier,angleDivisor);

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 5 DATA REPRESENTATION SECTION";
position offsetBSection5;
# START grib2::section

View File

@ -7,7 +7,7 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 6 BIT-MAP SECTION";
# START grib2::section
# SECTION 6, BIT-MAP SECTION
# Length of section in octets

View File

@ -7,7 +7,7 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 7 data";
# START grib2::section
# SECTION 7, DATA SECTION
# Length of section in octets

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Spherical harmonics";
constant sphericalHarmonics=1;
# constant dataRepresentationType = 50;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Stretching information";
# Latitude of the pole of stretching
signed[4] latitudeOfThePoleOfStretching : edition_specific,no_copy;

View File

@ -8,7 +8,7 @@
#
# test template
label "test template";
label "_test template";

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Categorical Forecast";
# Total number of forecast probabilities
unsigned[1] numberOfCategories : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Circular cluster";
# Cluster identifier
unsigned[1] clusterIdentifier : dump;
alias number=clusterIdentifier;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Derived forecast";
# Derived forecast
codetable[1] derivedForecast ('4.7.table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "EPS information";
# Type of ensemble forecast
codetable[1] typeOfEnsembleForecast ('4.6.table',masterDir,localDir) = 255 : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -9,9 +9,6 @@
# GRIB-530: This template is to be used by template.4.44.def ONLY
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir): dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir): dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Parameter information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir): dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Tile information";
# Parameter category
codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Percentile forecast";
# Percentile value
# (from 100% to 0%)
unsigned[1] percentileValue : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Forecast probability";
# Forecast probability number
unsigned[1] forecastProbabilityNumber : dump;

View File

@ -7,8 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "Rectangular cluster";
# Cluster identifier
unsigned[1] clusterIdentifier : dump ;
alias number=clusterIdentifier;

View File

@ -1,5 +1,3 @@
label "S2S reforecasts";
# The Model Version Date
# This is the date when the reforecast is produced with a particular version of the model

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "statistical processing";
# Year of end of overall time interval
unsigned[2] yearOfEndOfOverallTimeInterval =0 : edition_specific;

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 5 template 5.4";
# START 2/template.5.4 ----------------------------------------------------------------------
# TEMPLATE 5.4, Grid point data - IEEE packing
# added for conversion from other packing

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 5 template 5.6";
# START 2/template.5.6 ----------------------------------------------------------------------
# Grid point data - Simple packing with preprocessing

View File

@ -7,7 +7,6 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
label "grib 2 Section 5 template 5.61";
# START 2/template.5.61 ----------------------------------------------------------------------
# Grid point data - Simple packing with logarithmic preprocessing
constant typeOfPreProcessing=1;

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -1,2 +1,2 @@
label "x";
label "_x";

View File

@ -7,6 +7,5 @@
#alias mars.step = startStep;
#}
label "x";
alias mars.number=perturbationNumber;

View File

@ -1,3 +1,2 @@
label "x";
alias mars.anoffset=offsetToEndOf4DvarWindow;

View File

@ -1,3 +1,2 @@
label "x";
alias mars.anoffset=offsetToEndOf4DvarWindow;

View File

@ -1,3 +1,2 @@
label "x";
alias mars.anoffset=offsetToEndOf4DvarWindow;

View File

@ -1,3 +1,2 @@
label "x";
alias mars.anoffset=offsetToEndOf4DvarWindow;

View File

@ -1,4 +1,3 @@
label "model errors";
#alias mars.number=perturbationNumber;
alias mars.anoffset=offsetToEndOf4DvarWindow;

View File

@ -1,3 +1,3 @@
label "model errors";
label "_model errors";
#alias mars.number=perturbationNumber;

View File

@ -7,4 +7,4 @@
#alias mars.step = startStep;
#}
label "x";
label "_x";

View File

@ -28,9 +28,9 @@ for i1 in range(len(TEST_KEYS)):
TEST_INDEX_OUTPUT = TESTGRIB
TEST_STEPRANGE = ('0', '12', '18', '24', '6')
# These keys should be available even if new keys are defined
KNOWN_GRIB_KEYS = ['7777', 'EPS information', 'GRIBEditionNumber', 'N', 'NV',
KNOWN_GRIB_KEYS = ['7777', 'GRIBEditionNumber', 'N', 'NV',
'Ni', 'Nj', 'PLPresent', 'PVPresent',
'Parameter information', 'addEmptySection2',
'addEmptySection2',
'addExtraLocalSection', 'alternativeRowScanning',
'angleDivisor', 'angleMultiplier', 'angularPrecision',
'average', 'backgroundProcess',
@ -49,8 +49,6 @@ KNOWN_GRIB_KEYS = ['7777', 'EPS information', 'GRIBEditionNumber', 'N', 'NV',
'forecastTime', 'g2grid', 'gaussianGridName',
'genVertHeightCoords', 'generatingProcessIdentifier',
'getNumberOfValues', 'global', 'globalDomain',
'grib 2 Section 5 DATA REPRESENTATION SECTION',
'grib 2 Section 6 BIT-MAP SECTION', 'grib 2 Section 7 data',
'grib2LocalSectionNumber', 'grib2LocalSectionPresent',
'grib2divider', 'gridDefinitionDescription',
'gridDefinitionTemplateNumber',
@ -131,7 +129,7 @@ KNOWN_GRIB_KEYS = ['7777', 'EPS information', 'GRIBEditionNumber', 'N', 'NV',
'unitsECMF', 'unitsOfFirstFixedSurface',
'unitsOfSecondFixedSurface', 'unpackedError',
'uvRelativeToGrid', 'validityDate', 'validityTime',
'values', 'x', 'year']
'values', 'year']
KNOWN_BUFR_KEYS = ['edition', 'masterTableNumber', 'bufrHeaderSubCentre', 'bufrHeaderCentre',
'updateSequenceNumber', 'dataCategory', 'dataSubCategory', 'masterTablesVersionNumber',
'localTablesVersionNumber', 'typicalYearOfCentury', 'typicalMonth', 'typicalDay',
@ -229,7 +227,7 @@ class TestGribMessage(unittest.TestCase):
msg = GribMessage(grib_file)
msg_keys = msg.keys()
for key in KNOWN_GRIB_KEYS:
assert key in msg_keys
assert key in msg_keys, "key '%s' not found" % key
# Size of message in bytes
self.assertEqual(msg.size(), 160219)
self.assertEqual(len(msg.keys()), len(msg))