[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grib info



On Mon, 13 Dec 2004, David Ian Brown wrote:

> Thanks Rob.
> One quick question. How do you come up with the GDSkey? Is it a
> randomly generated
> value? Or does it have some other significance?

dave,

actually the GDSkey is the MD5 checksum of the GDS data block, if some
value changes in the GDS block then GDS key changes. i used this method
because not all GDS have the same set of parameters and i didn't want to
do different comparisons per model.

robb...


>   -dave
> On Dec 13, 2004, at 1:25 PM, Robb Kambic wrote:
>
> > david,
> >
> > attached are example grib 1 & 2 indexes. currently, i'm working on an
> > utility
> >  that keeps the indexes up to date as the data arrivies. here's the
> > description of the fields:
> >
> > 1. Definitions
> >
> > A "grib file" is a collection of grib records.
> > A "grib file index" is an index for the grib file, used by the
> > netcdf-java-2.2
> > library (nj22).
> >
> > If the grib file has a filename or URL "gribURL", its index file has
> > the name
> > "gribURL.gbx" . The nj22 library looks for it in the same location as
> > the grib
> > file, and when possible, creates it in the same location if it doesnt
> > exist.
> > It may create it in other locations if it cant create it in the same
> > location
> > as the grib file.
> >
> > The grib file index has enough information so that nj22 can create the
> > netcdf
> > objects that represent the grib file, without having to scan the
> > entire grib
> > file.
> >
> >
> > 2. Grib2 file index format
> >
> > Section 1 Global attributes
> > name = value of the attribute
> > name must be netcdf name (no blanks etc)
> > value is any string, do not quote
> > first attribute must be "location", with value a URL or local filename
> > second attribute must be "created", with value the date string the
> > index file
> > was created
> > ------------------------------------------------------------
> > Section 2 Grib records
> > one line for each record in the file
> > blank separated
> > ProductType Discipline Category Parameter LevelType1 LevelValue1
> > LevelType2
> > LevelValue2 ReferenceTime ForecastTime Gdskey GdsOffset PdsOffset
> > ------------------------------------------------------------
> > Section 3+ unique GDS records
> > one section for each unique GDS in the file, sections seperated by
> > --------- line
> > name = value of the attribute
> > must have an attribute
> >   Gdskey = token
> > which matches the Gdskey token in the Grib record line
> >
> >
> > 3. Grib1 file index
> >
> > Section 1 same as Grib2
> >
> > Section 2 Grib Records
> > one line for each record in the file
> > blank separated
> > ProductType Discipline Category Parameter LevelType1 LevelValue1
> > LevelType2
> > LevelValue2 ReferenceTime ForecastTime Gdskey BmsOrGdsOffset SizeOfData
> > DecimalScale BmsExists
> >
> >
> > Section 3+ unique GDS records, same as Grib2
> >
> > robb...
> > =======================================================================
> > ========
> > Robb Kambic                            Unidata Program Center
> > Software Engineer III                          Univ. Corp for Atmospheric 
> > Research
> > address@hidden                 WWW: http://www.unidata.ucar.edu/
> > =======================================================================
> > ========<eta2.wmo.gbx><RucIndex.gbx>
>

===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================