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 is controlled via the "share" and "ungrib" sections of the WPS namelist. For complete descriptions of these namelist variables (as well as others) in addition to recommendations for best practices, see our Best Practices WPS Namelist page.

UNGRIB
   - is NOT dependent on any WRF model domain.
   - is NOT dependent 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 must 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 in the Vtable will be helpful.

Required Fields

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

 

STEPS to Run UNGRIB

**Note: This is just a brief description of the basic steps - meant to help you understand the process. If you currently have no data, or simulation you would like to run, you can wait until you get to the 'case studies' section, later, to try to follow along.

1. Download data and place in a unique directory (it is not essential to place the data in a unique directory, but is recommended to maintain organization).
     Obtaining input data is generally the user's responsibility, however, some details concerning data types and availability can be found by clicking the 'Data' tab on the top navigational bar.

2. Familiarize yourself with the data

3. Link (with the UNIX command ln) the correct Vtable
   -For example, if you are using GFS data, type:
    ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable

4. Link (with supplied script link_grib.csh) the input GRIB data
    ./link_grib.csh path_to_data

5. Edit the &share and &ungrib sections of the namelist.wps file. 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 in the format of FILE:YYYY-MM-DD_hh - one file for each time)
     ./ungrib.exe

7. Familiarize yourself with the intermediate files




WRF will need boundary conditions for the ENTIRE time you plan on running the model. 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. (This "intermediate" link has detailed file format information and sample programs. Extra information is also available in Chapter 3 of the WRF User's Guide).

Creating your intermediate files manually eliminates the need for the UNGRIB step. If you create your intermediate files manually, it is recommended to check the correctness of your intermediate files with the utility program rd_intermediate.exe(available in the WPS/util directory).





Frequently Asked Questions

Do I have to re-run ungrib if I use the same data, but change my domain location?
No. UNGRIB is not 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