Meteorology / Help

Sample Meteorological Programs

The source code for many different meteorological data applications can be found in the /metdata and /data2arl directories. A summary of these programs and some others where only the executable is provided are given below. Some of these are available for execution through the GUI, others must be run from the command line. For a few programs, only the PC executable is available for distribution.

GRIB records

The various programs and library routines that are required to convert GRIB formatted meteorological data files to ARL HYSPLIT compatible format can be found in the /data2arl directory. These are summarized below:

ncr2arl - decodes NCEP/NCAR re-analysis GRIB fields on pressure surfaces. A newer program, grib2arl, may be used instead.

rsm2arl and prsm2arl - decodes the Regional Spectral Model (RSM) GRIB output fields on sigma and pressure surfaces to ARL packed format.

ecm2arl - decodes ECMWF global model GRIB fields on a latitude-longitude grid. Requires the ECMWF supplied GRIBEX subroutines. A newer program, grib2arl, may be used instead.

content - decodes individual GRIB sections in a record for diagnostic purposes. This program does not unpack the data but only lists the contents of the GRIB file.

inventory - decodes all the records within a GRIB file (without unpacking) providing file content information.

unpacker - decodes GRIB records in a data file to a real data array.

sample - creates a packed meteorological file using dummy fields hardwired into the program. The input meteorological data subroutines should be replaced by routines reading user supplied meteorological data files.

grib2arl - a generic program to convert global data from ECMWF or NOAA on a global latitude longitude grid using the ARL provided GRIB decoder. ECMWF data may be on the native hybrid sigma or pressure surfaces. The program options are similar to avn2arl, but with some significant differences. The grib2arl version is capable of decoding both NOAA and ECMWF GRIB files. For computational purposes, HYSPLIT requires either surface pressure or terrain height as a surface field in the meteorological data file. The default is that surface pressure is assumed to be available in the input GRIB file, otherwise the terrain height is required. This option is set using the "-p" flag. ECMWF GRIB files may contain upper-level variables in one file, surface variables in another file, and invariant data in a third file. In this situation, the upper-level data are considered the primary file "-i" and the surface data are the supplemental file "-s", and the invariant data are the constant file "-c".

Usage: grib2arl [-options]

avn2arl - a more customized program to convert global data only from NOAA's GFS on a global latitude longitude grid. Selecting extract (-g0) interpolates the global latitude-longitude GRIB data to a conformal map projection of 100x100 grid points (-n100) at 100 km resolution at the center of the latitude (-y) and longitude (-x) selection of the slider bar. Checking the North (-g1) or South (-g2) hemisphere option, automatically creates the appropriate hemispheric polar stereo-graphic projection centered about the pole. The global check-button (-g3) does no conformal re-interpolation, but just converts the original one-degree latitude-longitude grid data to the ARL packed format. The GRIB converter can also be run from the command line with the following options:

Usage: avn2arl [-options]

afwa2arl - decodes ETA model fields on pressure surfaces and on the AWIPS-212 grid. The ETA GRIB converter can also be run from the command line with the following options:

Usage: afwa2arl [file_1] [file_2] [...],

mm5toarl - program to convert MM5 V3 format files.

ffsubs - library routines required for direct access to variable length records

ll2grid - library routines to convert from latitude-longitude to a conformal map projection

packing - library routines to read and write ARL packed data records.

w3arl - library routines of the ARL version of the NCEP w3lib GRIB record decoder.

ARL Packed Format

The various programs and library routines that are required to manipulate or display meteorological data already in the ARL packed format can be found in the /metdata directory. Note that when these programs are run from the command line there will be a typical two line prompt, the first for the directory and second for the file name. A directory name should always have the proper terminator (/ or \). The following programs can be found:

chk_rec - program to dump the first 50 bytes of each meteorological data record. Those bytes contain ASCII data describing the packing.

chk_file - program to examine header and data records of an ARL packed meteorological data file. The program uses the same I/O subroutines common to HYSPLIT code. If this program does not work with a data file, neither will HYSPLIT.

chk_data - a simple program that shows how to read and unpack the ARL format packed meteorological data.

contour - creates postscript file of meteorological data contoured and color filled for a single variable at a specified time. The output written to contour.ps

display - creates postscript file of meteorological data contoured and color filled for a single variable at a specified time. The output written to display.ps. This program is prompted interactive version of the command line program contour.

edit_miss - a simple missing data interpolation program to fill in gaps.

profile - creates text file of the profile of meteorological variables at a specified location and time. The output is written to the screen and to the file profile.txt.

showgrid - shows the extent of the meteorological grid domain with a "+" symbol at the intersection of each node. The output is written to showgrid.ps

xtrct_grid - extracts a subgrid from the full grid meteorological data file. It permits selection by lat-lon corners and number of levels from the ground. Creates output file called "extract.bin"

xtrct_time - extracts data between two selected time periods from the designated meteorological file. Creates an output file called "extract.bin"

/source - contains remaining library routines not found in the /data2arl directories.



Table of Contents