FAQ

We're still working on it.  Eventually, we'll put in more answers, and more questions.


1. I want to get different fields from my GRIB file. How can I find the appropriate code numbers for my own pregrid Vtable?
2. How can I find out what fields are in my GRIB file?
3. pregrid didn't work.  What went wrong?
4. regridder didn't work.  What went wrong?
5. Does REGRID support NetCDF input?
6. Where can I find data sets?
7. Does REGRID support _ _ data (fill in the blank)?
8. Does REGRID support _ _ map projection (fill in the blank)?
9. I want to run the OSU Land-Surface Model in MM5.  How do I get pregrid to read all of the necessary fields from the NCEP/NCAR Reanalysis dataset?
10. How do I handle data sets that split up the globe into several tiles and distribute the tiles as separate data files?



I want to get different fields from my GRIB file. How can I find the appropriate code numbers for my own pregrid Vtable?

The first step is to find out what fields are in the GRIB file. For that, see the related question. As always, the place from which you received the GRIB data should have the best information on the content of the GRIB files. Once you know what fields are in your GRIB file, decide which fields you want to extract using the pregrid program. Running the gribprint program (supplied with the REGRID code) on a GRIB file prints out a list of code numbers describing the various fields in the file. Use those code numbers to fill out the Vtable.



How can I find out what fields are in my GRIB file?
As always, the first place to go for information about your GRIB files is the place you got the GRIB files themselves. Whatever center, or organization, or modeling group supplied you with the GRIB files should also have some documentation about what those files contain.

In trying to find out the contents of various GRIB files, one document I have found invaluable is NCEP Office Note 388, a description of the GRIB format. This document can be found in a variety of places in the internet, including ftp.ncep.noaa.gov/pub/nws/nmc/docs/gribed1

A handy utility program, called "gribprint" is provided in the REGRID package to help the user determine what fields are in a  GRIB file.   Program gribprint is created automatically when the REGRID package is compiled.

   Usage:  gribprint [-v | -V] file

        -v   : Print more information about the GRIB records
        -V  : Print way too much information about the GRIB records
        file  : GRIB file to read

The printout from gribprint can be a little strange to interpret.  Just executing "gribprint file" gives you something like this:

1 130 102 0 0 2000-01-21_12:00 +00
2 2 102 0 0 2000-01-21_12:00 +00
3 7 109 1 0 2000-01-21_12:00 +00
4 11 109 1 0 2000-01-21_12:00 +00
5 52 109 1 0 2000-01-21_12:00 +00
6 51 109 1 0 2000-01-21_12:00 +00
7 33 109 1 0 2000-01-21_12:00 +00
8 34 109 1 0 2000-01-21_12:00 +00
9 158 109 1 0 2000-01-21_12:00 +00
10 153 109 1 0 2000-01-21_12:00 +00
11 58 109 1 0 2000-01-21_12:00 +00
12 20 1 0 0 2000-01-21_12:00 +00
13 39 100 50 0 2000-01-21_12:00 +00
14 39 100 75 0 2000-01-21_12:00 +00

The first column is simply a sequential numbering of the GRIB record within the file.  The second column is the parameter code number.  Unfortunately, these code numbers are not standard in GRIB files, so the user will need to consult some documentation regarding the particular GRIB dataset in question to determine what these code numbers correspond to.  The third column is the level type.  The fourth column is the level value.  The fifth column is a second level value, used only for those fields that define levels by two values (such as an average over a layer).  The sixth column is the date, and the seventh column is the forecast hour.

With the -v option, "gribprint -v file" will give you something like this:

GRIB SECTION 0:
     Grib Length 26672
     Grib Edition1

GRIB SECTION 1:
     Length of PDS28
     Parameter Table Version2
     Center ID7
     Process ID89
     Grid ID104
     Is there a BITMAP?11000000
     Parameter130
     Level type102
     Height, pressure, etc.0
     Year100
     Month1
     Day21
     Hour12
     Minute0
     Forecast time unit1
     P10
     P20
     Time Range Indicator0
     Number in Ave?0
     Number missing from ave?0
     Century20
     Sub-center0
     Decimal scale factor0

GRIB SECTION 2:
     Length of GRID Desc. Section32
     Number of V. Coordinate Parms0
     List Starting point255
     Data Representation type5
     Polar Stereographic Grid

NI147
NJ110
Lat 1-268
Lon 1-139475
Resolution and Component  00001000
Lov-105000
Dx90755
Dy90755
Projection center0
Scanning mode0
I-Scanning increment1
J-Scanning increment1
GRIB SECTION 3:
     Length of bit map section2028
     Number of unused bits6
     Numeric0

GRIB SECTION 4:
     Length of BDS24572
     0/1: grid-point or sph. harm. data0
     0/1: simple or complex packing0
     0/1: floating or integer0
     0/1: No addl flags or addl flags0
     Unused bits12
     Binary Scale Factor0
     Reference Value96077.06250000
     Number of bits for packing14



Does REGRID support NetCDF data?

Short answer: No.

However, if you can read the NetCDF data and put all the necessary fields into our REGRID Intermediate Format, the regridder program should happily regrid it for you.


I want to run the OSU Land-Surface Model in MM5.  How do I get pregrid to read all of the necessary fields from the NCEP/NCAR Reanalysis dataset?

If you have access to NCAR Crays, set up the get_nnrp.deck and submit from your local machine.  Or set up and submit the get_nnrp.csh deck from the NCAR Cray machine.  This should return to you a number of files of the form pgb.* and a number of files of the form SFCNNRP_*.  The pgb.* files contain the atmospheric fields (and some surface fields).  The SFCNNRP* files contain the surface fields and the fields necessary for input to the Land Surface Model (LSM) in MM5.  Then set up your pregrid.csh shell script something like this:

set SRC3D = GRIB   # Because it's a pretty generic GRIB dataset you're accessing.

set InFiles = ( ${DataDir}/pgb* ${DataDir}/SFCNNRP* )

set SRCSST = $SRC3D   # You're getting SST from the same data set as the other fields

set InSST = ( )     # Since SST is from the same files, you do not specify any new files here.

set SRCSNOW = $SRC3D # Same for snow as for SST
set InSnow = ( )

set SRCSOIL = $SRC3D  # Same for soil as for snow and SST
set InSoil = ( )

Set up your namelist as for your case.

The bottom section, just before the "END USER MODIFICATION" banner, needs to be modified.  Tell the program to use the tables that have been set up for the NCEP/NCAR Reanalysis Project, for the atmospheric, SST, Snow, and Soil variables.  These are the NNRP* Vtables.  This section should look something like this:

  set VT3D  =  grib.misc/Vtable.NNRP3D
  set VTSST  =  grib.misc/Vtable.NNRPSST
  set VTSNOW  =  grib.misc/Vtable.NNRPSNOW
  set VTSOIL  =  grib.misc/Vtable.NNRPSOIL


How do I handle data sets that split up the globe into several tiles and distribute the tiles as separate data files?

Some data sets may split the globe into several tiles. One example of this is the WAFS/ICAO/International Exchange/FOS Grids. It's not exactly straightforward to handle this situation, but there's nothing really complicated. The determined user (that's you) should have no difficulties following the procedure.

In this situation, the pregrid program must be run once for each tile. Each individual pregrid job must refer only to the input data files for one particular tile. After each individual pregrid job, rename the output files so that the next run does not overwrite the files just created. For example, you might run pregrid for four different tiles, changing file names from "FILE:YYYY-MM-DD_HH" to "TILE1:YYYY-MM-DD_HH", "TILE2:YYYY-MM-DD_HH", "TILE3:YYYY-MM-DD_HH", "TILE4:YYYY-MM-DD_HH" (where, as usual, YYYY-MM-DD_HH is replaced by the particular time or times you've processed.

After you've run pregrid several times and have created Regrid intermediate files for the individual tiles, you may combine all four tiles into one grid with the program "build_mosaic". The source-code for this program is found in the pregrid/util directory. To make the executable, enter "make build_mosaic". This creates an executable called "build_mosaic". To combine the tiles into one grid, execute "build_mosaic TILE*:YYYY-MM-DD_HH". This will create a file called "MOSAIC:YYYY-MM-DD_HH" Note that this program must be run once for each particular time. When you're done, the MOSAIC:YYYY-MM-DD_HH files should go right into the regridder program with no problems.



Documentation HOME

Last modified: Fri Oct 27 11:52:21 MDT 2000