GRIB Encoding
Posted: 13 Oct 2013 12:10
Hi Jacques,
I have noticed that the encoding of the jDirectionIncrementInDegrees within the GRIB record doesn't seem to be correct. As you can see below (decoded by the ECMWF GRIB API) it is showing as 33.268 degrees when I'm expecting 0.5 degrees. This is causing some issues when trying to use zyGrib GRIBs on other GRIB readers such as tablet and phones. Of course it's possible using the redundant information in the GRIB to avoid using this field but I was wondering for the sake of interoperability if you might consider correcting this?
Cheers,
Nicko
***** FILE: /Users/nicko/Documents/Weather/gribs/20131013_090605_.grb
#============== MESSAGE 1 ( length=3561 ) ==============
GRIB {
editionNumber = 1;
table2Version = 2;
# US National Weather Service - NCEP (WMC) (grib1/0.table)
centre = 7;
generatingProcessIdentifier = 81;
# MSL Mean sea level pressure Pa (grib1/2.0.2.table)
indicatorOfParameter = 2;
# Mean sea level 0 0 (grib1/3.table)
indicatorOfTypeOfLevel = 102;
level = 0;
# P1 occupies octets 19 and 20; product valid at reference time + P1 (grib1/5.table)
timeRangeIndicator = 10;
# Unknown code table entry ()
subCentre = 0;
paramId = 151;
#-READ ONLY- units = Pa;
#-READ ONLY- nameECMF = Mean sea level pressure;
#-READ ONLY- name = Mean sea level pressure;
decimalScaleFactor = 1;
dataDate = 20131013;
dataTime = 0;
# Hour (stepUnits.table)
stepUnits = 1;
stepRange = 0;
startStep = 0;
endStep = 0;
#-READ ONLY- marsParam = 2.2;
shortName = msl;
GDSPresent = 1;
bitmapPresent = 0;
numberOfVerticalCoordinateValues = 0;
Ni = 47;
Nj = 37;
latitudeOfFirstGridPointInDegrees = -26;
longitudeOfFirstGridPointInDegrees = 138;
earthIsOblate = 0;
uvRelativeToGrid = 0;
latitudeOfLastGridPointInDegrees = -44;
longitudeOfLastGridPointInDegrees = 161;
iScansNegatively = 0;
jScansPositively = 0;
jPointsAreConsecutive = 0;
#-READ ONLY- alternativeRowScanning = 0;
jDirectionIncrementInDegrees = 33.268;
iDirectionIncrementInDegrees = 0.5;
#-READ ONLY- numberOfDataPoints = 1739;
#-READ ONLY- numberOfValues = 1739;
missingValue = 9999;
#-READ ONLY- binaryScaleFactor = 1;
#-READ ONLY- referenceValue = 940665;
sphericalHarmonics = 0;
complexPacking = 0;
integerPointValues = 0;
additionalFlagPresent = 0;
packingType = grid_simple;
bitsPerValue = 16;
I have noticed that the encoding of the jDirectionIncrementInDegrees within the GRIB record doesn't seem to be correct. As you can see below (decoded by the ECMWF GRIB API) it is showing as 33.268 degrees when I'm expecting 0.5 degrees. This is causing some issues when trying to use zyGrib GRIBs on other GRIB readers such as tablet and phones. Of course it's possible using the redundant information in the GRIB to avoid using this field but I was wondering for the sake of interoperability if you might consider correcting this?
Cheers,
Nicko
***** FILE: /Users/nicko/Documents/Weather/gribs/20131013_090605_.grb
#============== MESSAGE 1 ( length=3561 ) ==============
GRIB {
editionNumber = 1;
table2Version = 2;
# US National Weather Service - NCEP (WMC) (grib1/0.table)
centre = 7;
generatingProcessIdentifier = 81;
# MSL Mean sea level pressure Pa (grib1/2.0.2.table)
indicatorOfParameter = 2;
# Mean sea level 0 0 (grib1/3.table)
indicatorOfTypeOfLevel = 102;
level = 0;
# P1 occupies octets 19 and 20; product valid at reference time + P1 (grib1/5.table)
timeRangeIndicator = 10;
# Unknown code table entry ()
subCentre = 0;
paramId = 151;
#-READ ONLY- units = Pa;
#-READ ONLY- nameECMF = Mean sea level pressure;
#-READ ONLY- name = Mean sea level pressure;
decimalScaleFactor = 1;
dataDate = 20131013;
dataTime = 0;
# Hour (stepUnits.table)
stepUnits = 1;
stepRange = 0;
startStep = 0;
endStep = 0;
#-READ ONLY- marsParam = 2.2;
shortName = msl;
GDSPresent = 1;
bitmapPresent = 0;
numberOfVerticalCoordinateValues = 0;
Ni = 47;
Nj = 37;
latitudeOfFirstGridPointInDegrees = -26;
longitudeOfFirstGridPointInDegrees = 138;
earthIsOblate = 0;
uvRelativeToGrid = 0;
latitudeOfLastGridPointInDegrees = -44;
longitudeOfLastGridPointInDegrees = 161;
iScansNegatively = 0;
jScansPositively = 0;
jPointsAreConsecutive = 0;
#-READ ONLY- alternativeRowScanning = 0;
jDirectionIncrementInDegrees = 33.268;
iDirectionIncrementInDegrees = 0.5;
#-READ ONLY- numberOfDataPoints = 1739;
#-READ ONLY- numberOfValues = 1739;
missingValue = 9999;
#-READ ONLY- binaryScaleFactor = 1;
#-READ ONLY- referenceValue = 940665;
sphericalHarmonics = 0;
complexPacking = 0;
integerPointValues = 0;
additionalFlagPresent = 0;
packingType = grid_simple;
bitsPerValue = 16;