NCEP Grib Definitions

Folks,

I'm trying to find documentation online that provides guidance on what
all the variables are that are in the NCEP model output grib files.
There are many NCEP models, so to be clear, I'm referring to the GFS
0.5x0.5 degree product. I was looking at this nice blog:

http://joewheatley.net/ncep-global-forecast-system/

and the files that are available here:
ftp://ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prod

And I see this link:
http://www.nco.ncep.noaa.gov/pmb/products/gfs/

But looking at a file and the variables:
In [112]: ncep.variables.keys()
Out[112]:
['PRES_P8_L223_GLL0_avg',
'TOZNE_P0_L200_GLL0',
'PRES_P0_L242_GLL0',
'HGT_P0_L100_GLL0',
'VVEL_P0_L100_GLL0',
'UGRD_P0_L6_GLL0',
'HGT_P0_L7_GLL0',
'CIN_P0_2L108_GLL0',
'ULWRF_P8_L8_GLL0_avg',
'PRES_P0_L109_GLL0',
(snip)

is somewhat clear in most cases, but is there a table which directly
maps these online?. Also, you can of course look at the 'long_name',
'level', and 'level_type' attributes of each variable, but I'm looking
more or less for an online table showing all this. Maybe I need to
script it quickly :wink:

Thanks,
john

Maybe I should also follow up on this and indicate that one variable I
really want is the Veg Type defiinitions from the files. It exists in
the file from joewheatley's example, (VGTYP_P0_L1_GGA0) but it is on a
Gaussian lat/lon grid. I've downloaded some of the gfs files from the
0.5 x 0.5 degree output, but I don't find the variable.

Thanks again!

···

On Tue, Nov 2, 2010 at 10:33 AM, John <washakie@...287...> wrote:

Folks,

I'm trying to find documentation online that provides guidance on what
all the variables are that are in the NCEP model output grib files.
There are many NCEP models, so to be clear, I'm referring to the GFS
0.5x0.5 degree product. I was looking at this nice blog:

http://joewheatley.net/ncep-global-forecast-system/

and the files that are available here:
ftp://ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prod

And I see this link:
http://www.nco.ncep.noaa.gov/pmb/products/gfs/

But looking at a file and the variables:
In [112]: ncep.variables.keys()
Out[112]:
['PRES_P8_L223_GLL0_avg',
'TOZNE_P0_L200_GLL0',
'PRES_P0_L242_GLL0',
'HGT_P0_L100_GLL0',
'VVEL_P0_L100_GLL0',
'UGRD_P0_L6_GLL0',
'HGT_P0_L7_GLL0',
'CIN_P0_2L108_GLL0',
'ULWRF_P8_L8_GLL0_avg',
'PRES_P0_L109_GLL0',
(snip)

is somewhat clear in most cases, but is there a table which directly
maps these online?. Also, you can of course look at the 'long_name',
'level', and 'level_type' attributes of each variable, but I'm looking
more or less for an online table showing all this. Maybe I need to
script it quickly :wink:

Thanks,
john

--
Configuration
``````````````````````````
Plone 2.5.3-final,
CMF-1.6.4,
Zope (Zope 2.9.7-final, python 2.4.4, linux2),
Python 2.6
PIL 1.1.6
Mailman 2.1.9
Postfix 2.4.5
Procmail v3.22 2001/09/10
Basemap: 1.0
Matplotlib: 1.0.0

John,

GRIB files are an interesting beast. It has been awhile since I have dealt with them, but I will try to help you with what I can recall. First, the data records in the files are indicated by:

1. Record number
   2. Position in bytes
   3. Date (YYMMDDHH).
   4. Parameter name (LAND=land/sea mask)
   5. Indicator of parameter and units (grib PDS octet 9)
   6. Type of level/layer (grib PDS octet 10)

   7. Height, pressure, etc (grib PDS octets 11-12)
   8. Time Range (grib PDS octet 21)
   9. Period of time 1, (grib PDS octet 19)
  10. Period of time 2, (grib PDS octet 20)
  11. Forecast time unit (grib PDS octet 18)

  12. level
  13. anl=analysis, fcst=forecast
  14. NAve (number of grids used to make average)

The “type of level/layer” I believe is the grid projection type. Anyway, these things can be mixed and matched, so all we need to do is find your parameter in the grid projection that you want (or you will have to re-project the data).

The operational models appear to have VGTYP, but the reanalysis products do not appear to have this. Maybe this is causing your confusion?

This page might be more useful to you: http://www.cpc.noaa.gov/products/wesley/wgrib.html

I hope this is useful,
Ben Root

···

On Tue, Nov 2, 2010 at 5:19 AM, John <washakie@…287…> wrote:

Maybe I should also follow up on this and indicate that one variable I

really want is the Veg Type defiinitions from the files. It exists in

the file from joewheatley’s example, (VGTYP_P0_L1_GGA0) but it is on a

Gaussian lat/lon grid. I’ve downloaded some of the gfs files from the

0.5 x 0.5 degree output, but I don’t find the variable.

Thanks again!

On Tue, Nov 2, 2010 at 10:33 AM, John <washakie@…287…> wrote:

Folks,

I’m trying to find documentation online that provides guidance on what

all the variables are that are in the NCEP model output grib files.

There are many NCEP models, so to be clear, I’m referring to the GFS

0.5x0.5 degree product. I was looking at this nice blog:

http://joewheatley.net/ncep-global-forecast-system/

and the files that are available here:

ftp://ftp.ncep.noaa.gov/pub/data/nccf/com/gfs/prod

And I see this link:

http://www.nco.ncep.noaa.gov/pmb/products/gfs/

But looking at a file and the variables:

In [112]: ncep.variables.keys()

Out[112]:

[‘PRES_P8_L223_GLL0_avg’,

‘TOZNE_P0_L200_GLL0’,

‘PRES_P0_L242_GLL0’,

‘HGT_P0_L100_GLL0’,

‘VVEL_P0_L100_GLL0’,

‘UGRD_P0_L6_GLL0’,

‘HGT_P0_L7_GLL0’,

‘CIN_P0_2L108_GLL0’,

‘ULWRF_P8_L8_GLL0_avg’,

‘PRES_P0_L109_GLL0’,

(snip)

is somewhat clear in most cases, but is there a table which directly

maps these online?. Also, you can of course look at the ‘long_name’,

‘level’, and ‘level_type’ attributes of each variable, but I’m looking

more or less for an online table showing all this. Maybe I need to

script it quickly :wink:

Thanks,

john

Thanks Ben!

I guess where I am with this now is that I have found, as you say, the
VGTYP in the
operational products (the *sflux* grib files), but I don't find it on
any of the 0.5 x 0.5 degree files. Which means, that as you say, I'll
have to figure out how to reproject the data from the Gaussian grid to
a regular grid with 0.5x0.5 lat lon coordinates.

Any thoughts on that process?? :smiley:

Thanks again,
john

···

John,

GRIB files are an interesting beast. It has been awhile since I have dealt
with them, but I will try to help you with what I can recall. First, the
data records in the files are indicated by:

   1. Record number
   2. Position in bytes
   3. Date (YYMMDDHH).
   4. Parameter name (LAND=land/sea mask)
   5. Indicator of parameter and units (grib PDS octet 9)
   6. Type of level/layer (grib PDS octet 10)

   7. Height, pressure, etc (grib PDS octets 11-12)
   8. Time Range (grib PDS octet 21)
   9. Period of time 1, (grib PDS octet 19)
  10. Period of time 2, (grib PDS octet 20)
  11. Forecast time unit (grib PDS octet 18)

  12. level
  13. anl=analysis, fcst=forecast
  14. NAve (number of grids used to make average)

The "type of level/layer" I believe is the grid projection type. Anyway,
these things can be mixed and matched, so all we need to do is find your
parameter in the grid projection that you want (or you will have to
re-project the data).

The operational models appear to have VGTYP, but the reanalysis products do
not appear to have this. Maybe this is causing your confusion?

This page might be more useful to you:
http://www.cpc.noaa.gov/products/wesley/wgrib.html

I hope this is useful,
Ben Root

--
Configuration
``````````````````````````
Plone 2.5.3-final,
CMF-1.6.4,
Zope (Zope 2.9.7-final, python 2.4.4, linux2),
Python 2.6
PIL 1.1.6
Mailman 2.1.9
Postfix 2.4.5
Procmail v3.22 2001/09/10
Basemap: 1.0
Matplotlib: 1.0.0

I haven’t tried doing conversions between two different projections, but maybe the Basemap package might be useful?

http://matplotlib.sourceforge.net/basemap/doc/html/

Basically, you could get the arrays of x and y positions of your data, and then determine what would be the x and y positions of the projection that you want, and then use scipy’s griddata to produce the results on the grid you want:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html#scipy.interpolate.griddata

This is a bit brute-force, and I am sure there are more elegant solutions, but that should work in a pinch.

Ben Root

···

On Tue, Nov 2, 2010 at 9:00 AM, John <washakie@…287…> wrote:

Thanks Ben!

I guess where I am with this now is that I have found, as you say, the

VGTYP in the

operational products (the sflux grib files), but I don’t find it on

any of the 0.5 x 0.5 degree files. Which means, that as you say, I’ll

have to figure out how to reproject the data from the Gaussian grid to

a regular grid with 0.5x0.5 lat lon coordinates.

Any thoughts on that process?? :smiley:

Thanks again,

john