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?
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.
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 Edition | 1 |
GRIB SECTION 1: | Length of PDS | 28 | Parameter Table Version | 2 | Center ID | 7 | Process ID | 89 | Grid ID | 104 | Is there a BITMAP? | 11000000 | Parameter | 130 | Level type | 102 | Height, pressure, etc. | 0 | Year | 100 | Month | 1 | Day | 21 | Hour | 12 | Minute | 0 | Forecast time unit | 1 | P1 | 0 | P2 | 0 | Time Range Indicator | 0 | Number in Ave? | 0 | Number missing from ave? | 0 | Century | 20 | Sub-center | 0 | Decimal scale factor | 0 |
GRIB SECTION 2: | Length of GRID Desc. Section | 32 | Number of V. Coordinate Parms | 0 | List Starting point | 255 | Data Representation type | 5 | Polar Stereographic Grid |
NI 147 NJ 110 Lat 1 -268 Lon 1 -139475 Resolution and Component 00001000 Lov -105000 Dx 90755 Dy 90755 Projection center 0 Scanning mode 0 I-Scanning increment 1 J-Scanning increment 1
GRIB SECTION 3: | Length of bit map section | 2028 | Number of unused bits | 6 | Numeric | 0 |
GRIB SECTION 4:
Length of BDS | 24572 | 0/1: grid-point or sph. harm. data | 0 | 0/1: simple or complex packing | 0 | 0/1: floating or integer | 0 | 0/1: No addl flags or addl flags | 0 | Unused bits | 12 | Binary Scale Factor | 0 | Reference Value | 96077.06250000 | Number of bits for packing | 14 |
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.
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
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.
Last modified: Fri Oct 27 11:52:21 MDT 2000