Meteorology / Help / Sample Programs

The source code for many different meteorological data applications can be found in the data2arl directory. 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. All executables can be found in the exec directory.

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. Some of these are summarized below:

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 ECMWF or NOAA global data from ECMWF or NOAA in GRIB1 format on a global latitude longitude grid to the ARL format. ECMWF data may be on the native hybrid sigma or pressure surfaces. 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".

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

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

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 exec 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 data 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



Table of Contents