Re: GRIB 1 or 2

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 17 Oct 2007 17:31:25 -0600

Hi Juerg,

It is on the to-do list to add a "file type" line to the output of
printing an NioFile object.
For now, you can distinguish between GRIB 1 and GRIB 2 by the
presence or absence
of several of the data variable attributes.

GRIB 2 data variables (as opposed to coordinate variables) always
have the following
attributes that GRIB 1 data variables do not have:

production_status
parameter_discipline_and_category
parameter_template_discipline_category_number

I think this would be the most obvious difference that could be
relied on programmatically.

It is certainly possible that a script using Nio could be coded to
recognize certain GRIB 1 variable
names for instance, but fail to recognize GRIB 2 variable names for
equivalent data files.
  -dave

On Oct 17, 2007, at 4:04 PM, Juerg Schmidli wrote:

> Hi
>
> I'm using Nio to read GRIB files. How can I determine wether the files
> are in GRIB 1 or GRIB 2 format? How different are the two GRIB
> formats?
> Is it possible that a program expecting GRIB 1 can read GRIB 2, but
> interprets it not correctly?
>
> Thanks,
> Juerg
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Oct 17 2007 - 17:31:25 MDT

This archive was generated by hypermail 2.2.0 : Thu Nov 01 2007 - 07:23:55 MDT