Program AIRS2M3


    setenv  <airs-data-file>  <path name>
    setenv  <timezone-file>   <path name>
    setenv  <station-xref>    <path name>
    setenv  <station-data>    <path name>
    AIRS2M3 <and respond to the prompts>
where the names airs-data-file, etc. are the logical names of the input and output files.


The AIRS2M3 program read pollutant monitor values from an AIRS AMP350 file, convert to PPM, and output the result to an I/O API "observational-data" file that can be manipulated with I/O API tool programs and that can be visualized (overlaying gridded data) with the PAVE visualization program.

The AIRS data are in an ASCII format with station headers for each reporting air quality monitor station, and then one month's hourly time stepped data for a particular air pollutant. The values are hourly averaged (and specified in terms of local time), and a 00 time flag represents the hour 00-01. A user may wish to represent that data segment by the starting hour, the ending hour, or the hour-center for the observational time (this latter having much better properties for time-interpolation, or for comparison with same-time model output data). In these cases, a shift of 0, 10000, or 3000 should be entered here for the "time shift", respectively. Starting dates, etc. will be specified in terms of (4-digit) calendar year, month, and day.

Since the input data is given with respect to local time at each monitoring site, and the output data is time stamped with respect to Greenwich Mean Time, there is an additional input "time zone cross reference" file. This file has multiple list formatted lines (i.e. with fields on each line delimited by commas or whitespace (blanks or tabs)), where the first field is the FIPS state ID, the second field is the FIPS county ID or zero, and the third field is the time zone number (the effective offset from GMT, measured in hours; for example, Eastern Standard Time is zone 5). A line with a county field of zero means that all otherwise-unmatched counties in the indicated state have the corresponding time zone; both state and county fields of zero means that all otherwise unmatched state-county pairs have the corresponding time zone. This file must be sorted into increasing order by state ID and county ID. A sample time zone cross reference file is available here.

The program constructs two output files:

"station cross reference/index"file that may be used to map numeric (FIPS-based) site ID's to the name, address, etc., for the respective monitoring stations. This file is list formatted (comma delimited, with string-fields enclosed in single quotes) with the following fields:
  1. Site ID (((IST*1000+ICTY)*10000)+ISITE, where IST is the FIPS state ID, ICTY is the FIPS county ID, and ISITE is the monitor ID)
  2. city name
  3. county name
  4. state/province/territory name
  5. latitude (decimal degrees)
  6. longitude (decimal degrees)

I/O API AIRS data file, which is time stepped with a one-hour time step, and is appropriate for displaying observational data in PAVE Version 2.1 or later. It is a file of type CUSTOM3 with the following variables:
  1. INTEGER STNID (none): Station ID, ((IST*1000+ICTY)*10000)+ISITE, as in the AIRS_INDEX file
  2. REAL LAT (degrees): Latitude for station (positive for the Northern Hemisphere)
  3. REAL LON (degrees): Longitude for station (negative for the Western Hemisphere)
  4. REAL <pollutant name> (ppmv): Observed value, or MISSING < -9.0E36

Before you run the program, you need to assign logical names to the physical file names of all four files according to Models-3 conventions, using the csh/tcsh operation (or its sh/bash/ksh equivalent):

        "setenv <lname> <pname>"
The program will prompt you for the logical names you have chosen for the input files, for the time step sequence to process, for the starting year, month, day, and hour, the duration (in hours), the time zone shift, and the name for the output variable. The prompts have default responses indicated in square brackets [LIKE THIS], which can be accepted by hitting <RETURN>.

If you want to run this program in batch mode (from a script), the recommended way to develop the script is to run the program once interactively noting the pattern of responses to prompts which generate the particular analysis you want. The pattern of responses then becomes either a command-input file which you may redirect into the program in the script, or may become a "here-document" fed into the execution by the script.

Requires Fortran-90 for compilation. Source code for program airs2m3 is available under the GNU GPL License, Version 2, and can be downloaded as part of the I/O API tar-ball from this page.

See Also:

Previous: MCPL(), an I/O API output module for MM5


Up: Related Programs

To: Models-3/EDSS I/O API: The Help Pages