Basics - UNGRIB

The purpose of UNGRIB is to unpack GRIB (GRIB1 and GRIB2) meteorological data and pack it into an intermediate file format.

Unpacking the data are controlled via the "share" and "ungrib" sections of the WPS namelist.

UNGRIB
   - is NOT dependant on any WRF model domain.
   - is NOT dependant on GEOGRID.
   - does NOT cut down the data according to your model domain specification, it simply unpacks the required fields and writes them out into a format that the METGRID program can read.
   - makes use of Vtables (see sample Vtables in the WPS/ungrib/Variable_Tables/ directory) to specify which fields to unpack from the GRIB files. The Vtables list the fields and their GRIB codes that much be unpacked from the GRIB files.

Although Vtables are provided for many common data sets, it would be impossible for ungrib to anticipate every possible source of meteorological data in GRIB format. When a new source of data is to be processed by UNGRIB, the user may create a new Vtable either from scratch, or by using an existing Vtable as an example. In either case, a basic knowledge of the meaning and use of the various fields of the Vtable will be helpful.

Required Fields
When creating your own Vtables, note that a number of input fields are required.

 

STEPS to Run UNGRID

1. Download data and place in a unique directory
2. Familiarize yourself with the data
3. Link (with the UNIX command ln) the correct Vtable
4. Link (with supplied script link_grib.csh) the input GRIB data
5. Edit namelist.wps. You only need to pay attention to the following parameters:
    start_date ; end_date ; interval_seconds ; prefix
    Note: Normally one will leave the "prefix" set to "FILE", except in cases where this may overwrite data.
6. Run ungrib.exe (output will be intemediate files - one file for each time)
7. Familiarize yourself with the intermediate files

WRF will need boundary conditions for the ENTIRE time you plan on running the model. So make sure to UNGRIB enough input data.

   

Input data NOT in GRIB format?
Write a stand alone program to read your data and output it in the intermediate file format. (The above link has detailed file format information and sample programs. Extra information is also available in Chapter 3 of the User's Guide.)

Creating your intermediate files manually, eliminates the need for the UNGRIB step. If you create your intermediate files manually, do check the correctness of your intermediate files with the utilities programs rd_intermediate.exe and plotfmt.exe (available in the WPS/util directory).

Input data in netCDF format.
Learn how to write FORTRAN programs that will read and write netCDF files.

   

Frequently Asked Questions

Do I have to re-run ungrib is I use the same data, but change my domain location?
No. UNGRIB is to tied to any domain, but if you are using a regional model as input data make sure that your new domain will still fit inside the input data domain.

Do I have to re-run ungrib if I add a nest to my model run?
No. UNGRIB has no WRF model domain information.

For which length of time do I need to run ungrib?
As WRF is a regional model, you need input data for the entire time you plan on running the WRF model.

 
Basics - METGRID