## Concentration / Utilities / Convert to ASCII

The Convert to ASCII menu option uses the con2asc program to convert the binary concentration file to a simple ASCII file composed of one record per grid point for all grid points where concentrations at any level are non-zero. Concentrations for multiple levels and pollutant species are all listed on the same record for each grid point. The primary purpose of the conversion is to create a file that can be imported into other applications. An illustration of the GUI menu is shown below for the sample concentration simulation.

The Concentration Setup menu determines the file name selection option on the GUI. There are some additional checkboxes that correspond to various command line conversion options: con2asc -[options (default)]

-c[Convert entire file flag]

This option converts the entire binary input file, including all index records, to an ASCII output file with the name {input file}.txt. This option is not available through the GUI (use -s below). Another program, called conread, also not available through the GUI, can also be used to dump out the contents of the concentration file. This program can only be run from the command line. For the -c option, the output file format follows the binary file format record-by-record using the following conventions.

Meteorological model and starting time - A4, 6I4
Starting time and locations - 4I4, 2F8.3, F10.1
Concentration grid and spacing - 2I4, 2F8.4, 2F8.2
Vertical grid index record - I4, 20I8
Pollutant identification record - I4, 20A4
Sample start time - 6I4
Sample end time - 6I4
Concentration record - A4, I6, 255(255E10.2)

-d[Delimit output by comma flag (rather than space delimited)]

Set the Comma Delimited checkbox.

-i[Input file name (cdump)]

-m[Minimum text output format flag]

Setting this flag turns off the writing of the first output record, which is the column label field: DAY HOUR LAT LON SPECIES-LEVEL. This option corresponds to the Minimum Text checkbox of the GUI menu.

-o[Output file name base (Input File Name)]

The default base name for the output file is the input file name. A new output file is created for each sampling period, where the name of the file is composed of the {base name}_{Julian day}_{hour} of the sample ending time. If the Include Minutes box is checked, then the minutes field of the sample ending time is added to the end of file name. This field is not available through the GUI. The name of each output file is always written to the file named CON2ASC.OUT regardless of any other options selected.

-s[Single output file flag]

This option corresponds to the Single File checkbox of the GUI menu. The multi-time period ASCII output file is named {input file}.txt.

-t[Time expanded (minutes) file name flag]

-u[Units conversion multiplier for concentration (1.0)]
-U[Units conversion multiplier for deposition (1.0)]

Values other than one in either of these fields will result in the concentration or deposition results to be multiplied by these factors prior to output. Deposition fields are identified by a zero in the level height field.

-x[Extended precision flag]

The format of each record in the output file is given by:
2I3 - End of Sample: Julian Day and Hour
F7.2, F8.2 - Latitude and Longitude of grid cell
45E9.2 - Concentration data (by level and pollutant)

If the Extended Digits checkbox of the precision options is set, then the latitude and longitudes will be given by four digits after the decimal place.

-z[Zero points output flag]

Setting the zero flag causes the program to output the concentration values all all grid points, including the ones that are zero. This corresponds to the Include Zero checkbox of the GUI menu.

Each output record is identified by the day (Julian: 1 to 365) and hour (UTC) of the ending time of each sample. The ASCII conversion of the first file generated by the sample calculation is shown below in the illustration.

Table of Contents