RAFREAD

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
BUGS

NAME

rafread −− convert data from NCAR’s RAF to common data format

SYNOPSIS

rafread header_file [data_file | −]

DESCRIPTION

This program converts data produced by the aircraft of the National Center for Atmospheric Research into common data format. The data must be in the format produced by the Research Aviation Facility’s GENPRO II software, and read from tape onto disk by the utility rtape. Rtape maintains the physical record structure of the tape by inserting 8 byte headers indicating the number of bytes in the following record. The headers are in the form of ascii decimal integers.

GENPRO II produces two files for each flight, an ascii header file, and a data file. The header file contains the information necessary to decode the data file, and is interpreted by rafread with the help of a lex−generated subroutine. The common data format file appears on the standard output. If the data file is omitted from the command line, rafread simply decodes the header and sends a table of information on the variables defined in the record to the standard output. This is useful for deciding which variables to extract, as numerous variables are of no use to the average user, and simply take up disk space. If the data file is specified as a dash ("−"), rafread expects the data file on the standard input.

GENPRO II creates a series of logical records, each record consisting of one second of data. Rafread makes one variable slice for each logical record. Variables sampled at a rate of 1 Hz are stored as zero dimensional fields in the common data format file. Higher sampling rates result in one dimensional fields with a dimension name related to the sampling rate. For instance, 10 Hz data has a dimension name "time10". Index fields are constructed for all sampling rates in excess of 1 Hz.

EXAMPLES

kestrel%rafread flt1.h flt1.d > flt1

In this example, the header file flt1.h and the data file flt1.d are used to generate the common data format file flt1. All variables and all data for each variable are included.

kestrel%rafread flt1.h > flt1.doc

Only a header file is included on the command line here. A table of information about the flight is created in flt1.doc.

kestrel%rafread flt1.h flt1.d | cdfextr tptime alat alon ui vi theta > flt1

Same as the first example, except that cdfextr is used to extract only the variables tptime, alat, alon, ui, vi, and theta.

BUGS

Reading input with binary integers (as created by GENPRO II) created by another computer is inherently machine−dependent. Setting the flag VAX equal to zero in cdfhdr.h before compiling rafread makes things work for Motorola 68000 machines such as Suns, Apollos, and Masscomps. Setting VAX equal to one makes things work for VAXes. (This option is not well tested.) There are no guarantees for other types of computers.

A maximum of 250 variables can be accomodated. Some aircraft projects approach this limit. (This limitation could be lifted by increasing the size of common data format headers. However, it is desireable to keep default headers from getting too big.)

GENPRO II headers are a bit of a moving target, so there is no guarantee that this program will keep working.