NOTE: The decoders
mailing list is no longer active. The list archives are made available for historical reasons.
I'm looking for some examples of extracting data from grib files using the Java decoders. The Grib1Dump utility shows the output at the bottom of this message. However, when I load the file using the code below, I get zero records. I'm new to grib files, and my understanding is that there should be a record for each parameter. ucar.unidata.io.RandomAccessFile raf = new ucar.unidata.io.RandomAccessFile("data/seaTemp1","r"); Grib1Input gribInput = new Grib1Input(raf); System.out.println("GRIB version is " + gribInput.getEdition()); List records = gribInput.getRecords(); System.out.println("Number of records is " + records.size()); Dump of the GRIB file: Header : GRIB1 Discipline : 0 Meteorological Products GRIB Edition : 1 GRIB length : 390002Originating Center : 58 U.S. Navy Fleet Numerical Meteorology and Oceanography Center
Originating Sub-Center : 0 WMO SecretariatProduct Definition : 0 Forecast/Uninitialized Analysis/ Image Product
Parameter Category : -1 Meteorological Parameters Parameter Name : 80 var80 temperature of sea water Parameter Units : deg_K Reference Time : 2008-07-30T12:00:00Z Time Units : hour Time Range Indicator : product valid at RT + P1 Time 1 (P1) : 0 Time 2 (P2) : 0Generating Process Type : 78 126 wave triangular, 28 layer Spectral model from Medium Range Forecast run
Level Type : 1 surface Level Value 1 : 0.0 Level Value 2 : 0.0 GDS Exists : true BMS Exists : false Number of data points : 259920 Grid Name : Latitude/Longitude Grid Grid Shape: 0 spherical Spherical earth radius: 6367.47 Nx : 720 Ny : 361 La1 : -90.0 Lo1 : 0.0 Resolution & Component flags : 128 Winds : Relative La2 : 90.0 Lo2 : -0.5 Dx : 0.5 Dy : 0.5 Scanning mode : 64
decoders
archives: