6.14.3. Files and Environment Variables

6.14.3.1. Input Files
6.14.3.2. Input Environment Variables
6.14.3.3. Output Files

Figure 6.17. Smkmerge input and output files for area sources

Smkmerge input and output files for area sources

Figure 6.17, “Smkmerge input and output files for area sources” shows the input and output files for the Smkmerge program for area sources. The inputs include the optional multiplicative control matrix from Cntlmat (ACMAT), the gridding matrix from Grdmat (AGMAT), the inventory file output from Smkinven (AREA), the optional reactivity matrix from Cntlmat (ARMAT), and the optional speciation matrix from Spcmat (ASMAT). Smkmerge can also use hourly emissions from Temporal, either a single file (PTMP) or hourly emissions for each day of the week (ATMP_{day}). The last three input files are the country, state, and county codes file (COSTCY), the inventory data table (INVTABLE), and the grid description file (GRIDDESC).

Smkmerge outputs a data file that is determined by the inputs and can be a model-ready emissions file (AG[T][S][C]_L or AG[T][S][C]_S), a log file (LOGFILE), and an optional report file (REPAG[T][S][C]_L or REPAG[T][S][C]_S).

When using source apportionment (see Section 4.4.23, “Generating CMAQ-ready Source Apportionment Input Data Files”), Smkmerge will also read the source grouping file (SOURCE_GROUPS) and output the source group information SRCGROUPS_OUT, the emissions for each source group SGINLNTS_L or SGINLNTS_S, and a source group report file SRCGRP_REPORT.

Figure 6.18. Smkmerge input and output files for biogenic sources

Smkmerge input and output files for biogenic sources

Figure 6.18, “Smkmerge input and output files for biogenic sources” shows the input and output files for the Smkmerge program for biogenic sources. The inputs are the optional surrogates file (BGPRO), the model-ready emissions file (BGTS), the country, state, and county file (COSTCY), the grid description file (GRIDDESC), and the inventory data table (INVTABLE).

Smkmerge outputs either a mole-based emissions file (BGTS_L_O) or a mass-based emissions file (BGTS_S_O). Note that _O is appended to the output file name to distinguish it from the input file. The program also writes a log file (LOGFILE) and an optional report file (REPBGTS_L or REPBGTS_S).

When using source apportionment (see Section 4.4.23, “Generating CMAQ-ready Source Apportionment Input Data Files”), Smkmerge will also read the source grouping file (SOURCE_GROUPS) and output the source group information SRCGROUPS_OUT, the emissions for each source group SGINLNTS_L or SGINLNTS_S, and a source group report file SRCGRP_REPORT.

Figure 6.19. Smkmerge input and output files for mobile sources

Smkmerge input and output files for mobile sources

Figure 6.19, “Smkmerge input and output files for mobile sources” shows the input and output files for the Smkmerge program for mobile sources. The inputs include the country, state and county codes file (COSTCY), the inventory data table (INVTABLE), and the grid description file (GRIDDESC). Smkmerge also reads the optional multiplicative control matrix from Cntlmat (MCMAT), the gridding matrix from Grdmat (MGMAT), the inventory file output from Smkinven (MOBL), the optional reactivity matrix from Cntlmat (MRMAT), and the optional speciation matrix from Spcmat (MSMAT_L or MSMAT_S). Hourly emissions can be input either as a single file (MTMP) or as hourly emissions for each day of the week (MTMP_{day}).

Smkmerge outputs a log file (LOGFILE), a data file that is determined by the inputs and can be a model-ready emissions file (MG[T][S][C]_L or MG[T][S][C]_S), and an optional report file (REPMG[T][S][C]_L or REPMG[T][S][C]_S).

When using source apportionment (see Section 4.4.23, “Generating CMAQ-ready Source Apportionment Input Data Files”), Smkmerge will also read the source grouping file (SOURCE_GROUPS) and output the source group information SRCGROUPS_OUT, the emissions for each source group SGINLNTS_L or SGINLNTS_S, and a source group report file SRCGRP_REPORT.

Figure 6.20. Smkmerge input and output files for point sources

Smkmerge input and output files for point sources

Figure 6.20, “Smkmerge input and output files for point sources” shows the input and output files for the Smkmerge program for point sources. The inputs include the country, state, and county codes file (COSTCY), the inventory data table (INVTABLE), the grid description file (GRIDDESC), and the optional multiplicative control matrix from Cntlmat (PCMAT). If using PinG or elevated sources, the PELV file is used. Smkmerge reads the gridding matrix output from Grdmat (PGMAT). The PLAY file is used to merge layer fractions, while the PLAY_EX file is used for explicit plumes. Other Smkmerge input files include the inventory file output from Smkinven (PNTS), the optional reactivity matrix from Cntlmat (PRMAT), and the optional speciation matrix from Spcmat (PSMAT). The hourly emissions from Temporal are provided either as the PTMP file or as hourly emissions for each day of the week (PTMP_{day}). Finally, Smkmerge can read the optional elevated stack groups file (STACK_GROUPS).

Smkmerge can output an elevated sources file (ELEV[T]S[_S|_L]) if requested. Like all other SMOKE programs, Smkmerge outputs a log file (LOGFILE) detailing the program’s execution. The main data file is determined by the inputs and can be include a model-ready emissions file (PG[T][S][C][3D]_L or PG[T][S][C][3D]_S). Other output files can be a PinG file (PING[T][S][C][_S][_L] and a report file (REPPG[T][S][C]_L or REPPG[T][S][C]_S).

When using source apportionment (see Section 4.4.23, “Generating CMAQ-ready Source Apportionment Input Data Files”), Smkmerge will also read the source grouping file (SOURCE_GROUPS) and the stack groups file (STACK_GROUPS), and output the source group information SRCGROUPS_OUT, the emissions for each source group SGINLNTS_L or SGINLNTS_S, and a source group report file SRCGRP_REPORT.

Figure 6.21. Smkmerge input and output files for all source categories

Smkmerge input and output files for all source categories

Figure 6.21, “Smkmerge input and output files for all source categories” shows the input and output files for the Smkmerge program for all sources. The input and output files are a combination of those found in the previous four figures.

6.14.3.1. Input Files

The input files needed depend upon the input environment variables that are set for this program. For example, if only area sources are being merged, then only area-source-related inputs are required. Similarly, if Smkmerge is being executed to produce speciated, gridded, temporally allocated area and point sources, then all area- and point-related inputs for area and point sources, speciation matrices, gridding matrices, and temporal matrices are required.

File Name Format Source Type Description
[A|M|P]CMAT (optional) I/O API NetCDF A, M, P Multiplicative control matrix, output by Cntlmat (used when MRG_CTLMAT_MULT is set)
[A|M|P]GMAT I/O API NetCDF A, M, P Gridding matrix from Grdmat
[A|M|P]RMAT (optional) I/O API NetCDF A, M, P Mass- or mole-based reactivity matrix, output by Cntlmat (used when MRG_CTLMAT_REAC is set)
[A|M|P]SMAT (optional) I/O API NetCDF A, M, P Mass- or mole-based speciation matrix from Spcmat (used when MRG_SPCMAT_YN = Y)
[A|M|P]TMP (optional) I/O API NetCDF A, M, P Hourly emissions from Temporal (used when MRG_TEMPORAL_YN = Y and MRG_BYDAY is not set)
[A|M|P]TMP_{day} (optional) I/O API NetCDF A, M, P Hourly emissions from Temporal by day, where {day} = MON, TUE, WED, THU, FRI, SAT, SUN (used when MRG_TEMPORAL_YN = Y and MRG_BYDAY is set)
[AREA|MOBL|PNTS] SMOKE map A, M, P Intermediate area-, mobile-, or point-source inventory created by Smkinven
BGPRO (optional) ASCII B Gridding surrogates for computing biogenic state and county totals from gridded biogenic inputs
BGTS I/O API NetCDF B Biogenic model-ready emissions, to be input only when merging with other source categories, or when computing biogenic state and county totals, produced by Tmpbio or Tmpbeis3
COSTCY ASCII A, B, M, P Country, state, and county file with time zones
GEOCODE_LEVEL[1-4] ASCII A, B, M, P Geographical level codes and descriptions for gridded inventories, only when USE_EXP_GEO_CODES is set to Y, (COSTCY is ignored when GEOCODE_LEVEL[1-4] files are used)
INVTABLE ASCII A, B, M, P Inventory data table containing activity and pollutant names
GRIDDESC ASCII A, B, M, P Description of the modeling grid
PELV (optional) ASCII P Elevated point sources identification file, output by Elevpoint
PLAY (optional) I/O API NetCDF P Hourly plume rise layer fractions, output by Laypoint (used when MRG_LAYERS_YN = Y and EXPLICIT_PLUMES_YN = N)
PLAY_EX (optional) I/O API NetCDF P Hourly plume rise layer fractions for explicit sources, output by Laypoint (used when MRG_LAYERS_YN = Y and EXPLICIT_PLUMES_YN = Y)
STACK_GROUPS (optional) I/O API NetCDF P Elevated sources stack parameters file, output by Elevpoint
SOURCE_GROUPS (optional) ASCII A, B, M, P Source apportionment groups

6.14.3.2. Input Environment Variables

NOTE: At least one of the MRG_GRDOUT_YN, MRG_REPSTA_YN, or MRG_REPCNY_YN environment variables must be set to Y.

  • AREA_SURROGATE_NUM: [default: 60]

    Surrogate code of the area surrogate in the BGPRO file, to use for totals of biogenic emissions by state and county.

  • EXPLICIT_PLUMES_YN: [default: N]

    Indicates whether only explicit plume rise sources should be merged.

    • Y: Merge only explicit plume rise sources; uses PLAY_EX file

    • N: Merge all plume rise sources; uses PLAY file

  • USE_EXP_GEO_CODES: [default: N]

    If set to Y, then use GEOCODE_LEVEL[1-4] files instead of the COSTCY file to define expanded geographical detail such as country-level(GEOCODE_LEVEL1), country/state-level (GEOCODE_LEVEL2), country/state/county-level (GEOCODE_LEVEL3) or country/state/county/tribal-level (GEOCODE_LEVEL4).

  • MRG_BYDAY: [default: blank]

    String code that specifies which source categories (if any) are to use a by-day approach for the hourly input files (see “Description” section above for more information on this approach). Valid settings include A, M, P, or any combination. For example, set this environment variable to “AMP” to have Smkmerge read the area-, mobile-, and point-source hourly emissions files individually for each day.

  • MRG_CTLMAT_MULT: [default: blank]

    String code that specifies which source categories (if any) are to be processed using a multiplicative control matrix. Valid settings include A, M, P, or any combination. For example, set this environment variable to “M” to have Smkmerge read the mobile-source multiplicative control matrix.

  • MRG_CTLMAT_REAC: [default: blank]

    String code that specifies which source categories (if any) are to be processed using a reactivity control matrix. Valid settings include A, M, P, or any combination. For example, set this environment variable to “MP” to have Smkmerge read the mobile- and point-source reactivity control matrices.

  • MRG_GRDOUT_UNIT: [default: input file units]

    String code that permits the user to change the units of the gridded output file. For example, “kg/hr” would convert the output emissions to kilograms per hour, before outputting the emissions data file. Not all conversions are known to SMOKE. Valid numerators are: “tons”, “kg”, “moles”, and “g”; note that molar emissions cannot be output without the mole-based speciation matrices. Valid denominators are “yr”, “dy”, “hr”, and “s”. Note that if annual output is requested but not available in the input file, leap year adjustments are not made.

    Units required by CMAQ are moles/s and most other air quality models are moles/hr.

  • MRG_GRDOUT_YN: [default: N]

    Defines whether the program produces a gridded output file.

    • Y: Produce the file

    • N: Do not produce the file

  • MRG_LAYERS_YN: [default: N]

    Defines whether the program uses the layer fractions file.

    • Y: Use the layer fractions file

    • N: Do not use the layer fractions file

  • MRG_MARKETPEN_YN: [default: Y]

    Defines whether the program uses market penetration from reactivity matrices.

    • Y: Use market penetration

    • N: Do not use market penetration

  • MRG_METCHK_YN: [default: Y]

    Defines whether the program checks consistency of headers in the meteorology file.

    • Y: Check contents of meteorology file headers

    • N: Do not check headers

  • MRG_REPCNY_YN: [default: N]

    Defines whether the program produces a report of emission totals by county.

    • Y: Produce county-total emissions report

    • N: Do not produce the report

  • MRG_REPCTL_YN: [default: N]

    Defines whether the program reports controlled emissions or not.

    • Y: Report controlled emissions

    • N: Do not report controlled emissions

  • MRG_REPSTA_YN: [default: N] Defines whether the program produces a report of emission totals by state.

    • Y: Produce state-total emissions report

    • N: Do not produce the report

  • MRG_SOURCE: [default: blank (processing halts)]

    Series of character codes representing the type(s) of sources to be merged.

    • A: Area sources

    • B: Biogenic sources

    • M: Mobile sources

    • P: Point sources

    • AP: Area and point sources

    • AM: Area and mobile sources

    • etc.

  • MRG_SPCMAT_YN: [default: N]

    Defines whether the program produces speciated output.

    • Y: Read the speciation matrix produced by the Spcmat program

    • N: Do not read the speciation matrix

  • MRG_TEMPORAL_YN: [default: N]

    Defines whether the program produces temporally allocated output.

    • Y: Read the temporal matrix produced by the Temporal program

    • N: Do not read the temporal matrix

  • MRG_TOTOUT_UNIT: [default: input file units, or per day if hourly input is used]

    This variable is like the MRG_GRDOUT_UNIT variable, except that it controls the state and county totals reports separately from the gridded outputs. The only difference is the temporal resolution of MRG_TOTOUT_UNIT, which always outputs the emission values as daily totals, no matter what units are used.

  • SMK_ASCIIELEV_YN: [default: N]

    Defines whether the program produces an ASCII elevated point sources file, suitable for postprocessing with the Ptsrce program in EPS2.0/EPS2.5.

    • Y: Create the ASCII elevated point sources file

    • N: Do not create the ASCII elevated point sources file

  • SMK_AVEDAY_YN: See description in Section 6.2.3.2, “Input Environment Variables”

    NOTE: This setting affects the Smkmerge results only when hourly emissions are not merged. To use hourly average-day emissions in Smkmerge, this variable must be set to Y for the Temporal program, so that average-day emissions will be used in creating the hourly emissions.

  • SMK_EMLAYS: See description in Section 6.6.3.2, “Input Environment Variables”

    Used to set the default value for UAM_LAYERS when the Smkmerge output is to be used in UAM-V elevated-point-source output processing.

  • SMK_PING_METHOD: See description in Section 6.3.3.2, “Input Environment Variables”

    Creates CMAQ PinG file or flags PinG sources in UAM-style elevated ASCII file (when the SMK_ASCIIELEV_YN environment variable is set to Y).

  • SMK_REPORT_TIME: [default: 230000]

    Time for writing daily reports from program (HHMMSS).

  • SMK_SRCGROUP_OUTPUT_YN: [default: N]

    Indicates if source apportionment emissions should be output

    • Y: Group sources and output source apportionment files

    • N: Do not perform any source apportionment processing

  • SMKMERGE_CUSTOM_OUTPUT: [default: N]

    Defines his/her own output file names from Smkmerge. Manually define environment variables for those output file names below:

    • [E|A|M|P]OUT : Processing source output file

    • ELEV : Elevated-point-sources file, produced if SMK_ASCIIELEV_YN is set to Y; if PinG sources have also been selected, then the stack diameters listed in this file will be set to the negative value of their actual value.

    • PING : CMAQ PinG file, produced if SMK_PING_METHOD is set to 1

    • INLN : CMAQ 2-D surface layer emissions file, produced if SMK_ELEV_METHOD is set to 2. For in-line processing plume rise processing, MRG_LAYERS_YN must set to N to create hourly speciated 2-D surface layer emissions file for CMAQ version 4.7 or later.

    • REP[E|A|M|P]G : Emission total report file, produced if either MRG_REPSTA_YN or MRG_REPCNY_YN is set to Y

The rest of the variables in this list are relevant only when the SMK_ASCIIELEV_YN environment variable is set to Y. The UAM-style elevated-point-source file referenced in the following descriptions is produced by Smkmerge and used as input to the UAM preprocessor Ptsrce.

  • UAM_LAYERS: [default: set by value of SMK_EMLAYS]

    Number of layers to output to the elevated-point-source file.

  • UAM_NOTE: [default: “UAM elev pt emis from Smkmerge”]

    Message to appear as a note in the elevated-point-source file.

  • UAM_NPARAM: [default: 20]

    Number of parameters for control packet to appear in the elevated-point-source file.

  • UAM_PRINT_LOCATIONS: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the locations table. 0=No; 1=Yes.

  • UAM_PRINT_METHODS: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the methods table. 0=No; 1=Yes.

  • UAM_PRINT_OUTGRD: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the output grid. 0=No; 1=Yes.

  • UAM_PRINT_UNITS: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the units table. 0=No; 1=Yes.

  • UAM_PRINT_VALUES: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the values table. 0=No; 1=Yes.

  • UAM_PRINT_VERTMETH: [default: 0]

    Flag printed in the elevated-point-source file to control whether Ptsrce will print the vertical methods table. 0=No; 1=Yes.

  • UAM_PTSRCE_OUTUNIT: [default: 20]

    Ptsrce output file unit number in the elevated-point-source file.

  • UAM_VERTICAL_METHOD: [default: STACKHGT]

    Vertical method in the elevated-point-source file. Appropriate values are STACKHGT and PLUMERISE.

  • UAM4_DIFFBREAK_UNIT: [default: 0]

    DIFFBREAK file unit number in the elevated-point-source file.

  • UAM4_HTLOWR: [default: 20]

    Minimum height (in meters) of cells between the surface and the “diffbreak” in the elevated-point-source file.

  • UAM4_HTSFC: [default: 0]

    Height of the surface layer (in meters) in the elevated-point-source file.

  • UAM4_HTUPPR: [default: 100]

    Minimum height (in meters) of cells between the “diffbreak” and the top of the model in the elevated-point-source file.

  • UAM4_LAYABOVE: [default: UAM_LAYERS - UAM4_LAYBELOW]

    Number of layers above the “diffbreak” in the elevated-point-source file.

  • UAM4_LAYBELOW: [default: 3]

    Number of layers below the “diffbreak” in the elevated-point-source file.

  • UAM4_METSCALARS_UNIT: [default: 15]

    METSCALARS file unit number in the elevated-point-source file. Used only for UAM_VERTICAL_METHOD set to “PLUMERISE”.

  • UAM4_REGIONTOP_UNIT: [default: 0]

    REGIONTOP file unit number in the elevated-point-source file.

  • UAM4_TEMPERATUR_UNIT: [default: 14]

    TEMPERATUR file unit number in the elevated-point-source file. Used only for UAM_VERTICAL_METHOD set to “PLUMERISE”.

  • UAM4_WIND_UNIT: [default: 16]

    WIND file unit number in the elevated-point-source file. Used only for UAM_VERTICAL_METHOD set to “PLUMERISE”.

6.14.3.3. Output Files

The output files produced by Smkmerge are determined by the values of the input environment variables.

File Name Format Description
[A|B|M|P|E]G[T][S][C][3D][_S|_L][_O] I/O API NetCDF

Merged emission file, produced when MRG_GRDOUT_YN is set to Y; actual file name is determined by the environment variables used to configure Smkmerge, as follows:

  • [area|biogenic|mobile|point|every] (MRG_SOURCE)
  • T = temporally allocated (MRG_TEMPORAL_YN)
  • S = speciated (MRG_SPCMAT_YN)
  • C = controlled (MRG_CTLMAT_MULT or MRG_CTLMAT_REAC)
  • 3D = layered (MRG_LAYERS_YN)
  • _S = mass-based speciation (SPC_INPUT)
  • _L = mole-based speciation (SPC_INPUT)
  • _O = used when only merging biogenic sources (MRG_SOURCE = B)
ELEV[T]S[C][_S|_L] ASCII Elevated-point-sources file, produced if SMK_ASCIIELEV_YN is set to Y; if PinG sources have also been selected, then the stack diameters listed in this file will be set to the negative value of their actual value
LOGFILE ASCII Log generated from executing Smkmerge
PING[T][S][C][_S|_L] I/O API NetCDF CMAQ PinG file, produced if SMK_PING_METHOD is set to 1
REP[A|B|M|P|E]G[T][S][C][_S|_L] ASCII Emission totals report file, produced if either MRG_REPSTA_YN or MRG_REPCNY_YN is set to Y
SGINLNTS[_S|_L] I/O API NetCDF Emissions by source group, formatted as CMAQ in-line emissions data, produced if SMK_SRCGROUP_OUTPUT_YN is set to Y
SRCGROUPS_OUT I/O API NetCDF Source group information, produced if SMK_SRCGROUP_OUTPUT_YN is set to Y
SRCGRP_REPORT ASCII Source group report file, produced if SMK_SRCGROUP_OUTPUT_YN is set to Y