NMIM User Guide
EPA-420-B-09-015 

April 2009

Assessment and Standards Division 

Office of Transportation and Air Quality 

U.S. Environmental Protection Agency

NMIM User Guide
Table of Contents 

Introduction..............................................................................................................................1 

General Introduction ............................................................................................................ 1 

Graphical User Interface ...................................................................................................... 3 

Launching the NMIM model ............................................................................................... 3 

Description of the NMIM Model Inputs and Creation of a RunSpec.................................. 4 

NMIM Navigation List ........................................................................................................ 5 

Menu Bar Options................................................................................................................ 7 

Settings Menu / Configure NMIM....................................................................................... 8 

NMIM Inputs .........................................................................................................................10 

Description Panel ............................................................................................................... 10 

Geography Panel................................................................................................................ 10 

Time Panel ......................................................................................................................... 13 

Vehicles / Equipment Panel ............................................................................................... 15 

Onroad Vehicle Panel ........................................................................................................ 15 

Nonroad Equipment Panel ................................................................................................. 17 

Pollutants Panel.................................................................................................................. 18 

Advanced Features Panel................................................................................................... 21 

Output Panel....................................................................................................................... 26 

NMIM Output ........................................................................................................................29 

Introduction........................................................................................................................ 29 

Output Database Description ............................................................................................. 29 

Post-Processing Options .................................................................................................... 32 

How to Simulate Diesel Retrofit Modeling in NMIM...........................................................37 

R1. NMIM Navigation Window........................................................................................ 38 

R2. Retrofit / Onroad Panel................................................................................................ 39 

R3. Vehicles/Equipment / Onroad Panel ........................................................................... 40 

R4. Pollutants Panel........................................................................................................... 41 

R5. Onroad Retrofit Parameters File.................................................................................. 41 

R6. Retrofit / Nonroad Panel.............................................................................................. 46 

R7. Vehicles/Equipment / Nonroad Panel ......................................................................... 47 

R8. Nonroad Retrofit Parameters File................................................................................ 48 

How to Simulate Fleet Modeling in NMIM...........................................................................54 

F1. NMIM Navigation Window......................................................................................... 54 

F2. Geography Panel.......................................................................................................... 55 

F3. Fleet / Onroad Panel .................................................................................................... 56 

F4. Onroad Vehicles Panel................................................................................................. 58 

F5. Onroad Fleet Information Parameters File .................................................................. 58 

F6. Nonroad Fleet Information Parameters File ................................................................ 60 

F7. Nonroad Equipment Panel........................................................................................... 61 

F8. Nonroad Fleet Information Parameters File ................................................................ 62 

Command Line and API Usage..............................................................................................66 

Distributed Processing Algorithm Overview.........................................................................72 

NMIM User Guide i
Introduction 

General Introduction 

The National Mobile Inventory Model (NMIM) is a consolidated emissions modeling 

system for EPA's MOBILE6 and NONROAD models. It was developed to produce, in a 

consistent and automated way, national, county-level mobile source emissions inventories 

for the National Emissions Inventory (NEI) and for EPA rule making. 

NMIM comprises a Java framework, graphical and command line user interfaces, the 

MOBILE6 and NONROAD models, the NMIM county database (NCD), and postprocessing and aggregation capabilities. 

NMIM's primary improvements over MOBILE6 and NONROAD are: 

• The inclusion of all the required county data for the nation in a single database 

• A Graphical User Interface (GUI) 

• Shortcuts for generating national inventories 

• Tools for the aggregation and post-processing, including NIF3 output 

• Estimation of 33 hazardous air pollutants (HAPs) and 17 dioxin/furan congeners by 

ratio to various MOBILE6 and NONROAD output parameters 

• Distributed processing capability to enhance performance 

NMIM extends MOBILE6's capabilities by producing inventories rather than just emission 

factors. NMIM provides consistency across both models and all pollutants by using a single 

input database for MOBILE6 and NONROAD and for criteria pollutants and HAPs. 

However, NMIM is not a complete GUI front end for MOBILE6 and NONROAD, nor can it 

replace these models for all applications, as it was designed primarily to generate national 

inventories. NMIM has features intended to speed its operation and minimize its output 

database size that also limit its capability. For example, it will not produce hourly or bymodel-year output from MOBILE6. NMIM, like NONROAD, does not produce emissions 

inventories for aircraft, locomotives, and commercial marine vessels. 

Based on the user's run specification (RunSpec) and information in the NMIM county 

database (NCD), NMIM writes one input file for MOBILE6 and one input file for 

NONROAD for every county and month selected. NMIM then runs these models, reads 

their output files, performs additional processing if necessary, and puts the the inventories 

into an output database. Additional processing includes multiplying MOBILE6 emission 

factors by VMT and estimating emissions of some other pollutants as ratios to pollutant 

inventories generated by MOBILE6 and NONROAD. 

NMIM has post-processing capability that can be applied after the inventory is generated. 

This includes aggregation over months, roadway types, vehicle types, and equipment types. 

Output can go into a database table or into a tab-delimited ASCII file. The format can be 

normalized (a pollutant on each line) or wide (a pollutant in each column.) NMIM can also 

process the output database into annual or monthly inventories and convert them into NIF3 

NMIM User Guide 1
format, which is required for NEI submissions. The user's post-processing selections can be 

made from the GUI and saved as an ASCII "aggregation specification" or AgSpec, which 

can be reloaded into the GUI, edited from the GUI or in a text editor, and run from the GUI 

or from the command line 

Because of the large amount of computing necessary to calculate a national inventory, 

NMIM was designed to utilize multiple computers over a computer network. In such a 

configuration, an NMIM Master computer runs the NMIM graphical user interface (GUI) 

and performs the high level calculations while one or more NMIM Worker computers run 

MOBILE6 and NONROAD and perform most of the calculations . Two or more instances of 

NMIM (i.e., two or more copies of the NMIM Master ) may be run simultaneously on a 

given network. This allows multiple concurrent users of the model. NMIM may also be run 

on a single desktop computer running both the master and the worker program. 

Model Components 

The NMIM model consists of eight principal components: 

• A Graphical User Interface (GUI) written in Java. It allows both the casual user and 

the expert user to easily access the model. With simple Windows-type screens and 

pull-down menus, the user can quickly set up, execute and aggregate the results of an 

NMIM run (though the run itself may require considerable time to execute). 

• A Command Line Interface and an Application Program Interface (API). More 

advanced users can create or edit NMIM run specifications in an XML format and 

run NMIM directly from the DOS command line, or from a Java program. This 

facilitates the creation of a large number of runs and their execution in a more fully 

automatic and repeatable fashion. 

• A core Java NMIM Master Program that generates MOBILE and NONROAD input 

files and performs final calculations. 

• The Java NMIM Worker Program that controls execution of MOBILE and 

NONROAD and performs other calculations. 

• The MOBILE6.2 emission factor model. This model is written in FORTRAN and 

performs emission factor calculations for on-road vehicles. 

• The NONROAD emission inventory model (exclusive of its graphical user interface 

and reporting utility components). This model is written in FORTRAN and performs 

emission inventory calculations for all NONROAD sources except aircraft, 

commercial marine vessels, and locomotives. 

• MySQL, an open-source relational database management system. All NMIM 

databases are in MySQL. 

• The NMIM County Database (NCD), which holds extensive information for each 

county in the United States (and Puerto Rico and the Virgin Islands). This 

information includes temperatures, fuel parameters, onroad mobile source control 

programs, average speeds, and vehicle miles traveled. 

NMIM User Guide 2
During execution several pieces of NMIM may be running simultaneously on separate 

computers. These pieces are the main NMIM GUI and program, the NMIM Worker(s), the 

MYSQL Database Server, and the MOBILE6 / NONROAD models. During execution, the 

master computer controls the NMIM GUI and the main NMIM program. The main NMIM 

program in turn passes information to the individual NMIM Worker programs. The NMIM 

Worker(s) control the execution of the MOBILE6 and NONROAD models, and send results 

back to the Master computer. The MYSQL database runs in both the Master and Worker 

computers, and provides information from the county database to other program components 

upon request, as well as being used to produce the output database. 

Several reporting methods are available in NMIM as post-processing tools that can be used 

to report the results in various formats and levels of detail. All of them are based on a results 

database which the NMIM program creates during execution. One specialized format is the 

NIF3 reporting format for the NEI. 

Other Documentation 

The NMIM model is an extension of the existing MOBILE6.2 and NONROAD models. As 

a result, this user guide assumes that the reader has access to the their user guides and 

technical documentation. See the EPA OTAQ website www.epa.gov/otaq/models.htm for 

information on these models. 

Future Model Updates 

The EPA vehicle emission modeling group is interested in receiving comments on NMIM 

and any suggestions for future model revisions and updates. E-mail your comments and 

suggestions to the team at mobile@epa.gov. 

Graphical User Interface 

The Graphical User Interface (GUI) provides the user with an easy method for specifying 

and running NMIM emissions simulations. In addition, the GUI provides the user with an 

easy means for accessing the reporting utility to further process the results of the modeling 

run. Simple Windows-type menus, menu button bars and pull-down screen, allow the user to 

quickly set up, execute, and view a modeling scenario without any computer programming 

experience or previous experience with EPA's MOBILE6 or NONROAD models. 

This section discusses the following topics : 

• launching the NMIM model from the Windows Desktop 

• a description of model inputs (Run Specification) requested by the user interface 

• creating and executing a Run Specification (RunSpec) file example 

Launching the NMIM model 

NMIM User Guide 3
After proper installation, the NMIM program is launched in the standard way that all 

Windows programs are launched. To begin, use the left button on the mouse to double click 

on the NMIM desktop icon (Figure 3-1). Alternately, NMIM can be launched from the 

Windows Start button and Programs list button choice. When launched, the main menu 

screen of the interface appears (Figure 3-2). From this screen the user can access five menu 

bars and navigate the main screen containing the list button menu. These menu bars and the 

main list button menu comprise the entire GUI for NMIM. 

The NMIM icon is a map of the United States with a mathematical integral symbol through 

it. The integral symbol represents the integration of MOBILE6, NONROAD, criteria 

pollutants, and HAPS within a single framework based on a single database. 

 

Figure 3-1: Graphical User Interface icon. 

Double Click on the NMIM Desktop Icon to Launch NMIM. The NMIM GUI application 

may also be launched by double clicking on the application file named NMIMGUI.exe 

located in the NMIM directory. 

Description of the NMIM Model Inputs and Creation of a RunSpec 

This section describes the principal portions of the NMIM GUI. These are all visible on 

Figure 3-2. They are the NMIM Pull-Down Menu at the top of the Figure, the blue 

scrollable NMIM Navigation List on the left hand side, and the Detail Panel on the right (the 

main section where the NMIM logo is initially shown). The Detail Panel is blank in Figure 

3-2 because none of the input options on the Navigation List have been chosen. Once one of 

these is chosen, the Detail Panel changes to accept one of several sets of particular user 

input. This is fully explained in the Graphical User Input Section of this user guide. 

These three portions of the NMIM GUI are used to create and/or execute an NMIM 

RunSpec. A RunSpec is an XML text file that contains all the user inputs needed to execute 

NMIM. The Graphical User Input Section of this user guide will illustrate in detail how to 

create and execute a working RunSpec through the use of a simple example. 

 

NMIM User Guide 4
Figure 3-2: Initial appearance of NMIM graphical user interface 

 

NMIM Navigation List 

 

The NMIM Navigation List is shown with a light blue background on the left side of the 

Main NMIM window. It categorizes the input options available to the user. The list includes 

seven principal sections as shown in Figure 3-2 and listed below. 

• Description 

• Geography 

• Time 

• Vehicles/Equipment 

• Fleet 

• Pollutants 

• Advanced Features 

• Diesel Retrofit 

• Output 

"Vehicles/Equipment", “Fleet”, Diesel Retrofit”, and "Output" can be expanded into more 

detailed categories. 

NMIM User Guide 5
When the user selects a detailed category, or top-level category which has no subcategories, 

from the Navigation List, the appropriate Detail Panel opens on the right side of the Main 

NMIM GUI window. At this point, the user can enter the appropriate information in the 

Detail Panel, or navigate to a different item in the Navigation List. The user may also open a 

new Detail Panel, or if finished, save the information entered into the GUI and execute the 

NMIM program from the Main Menu. Note that the set of detail panels function together as 

a single set of input values; there is no "close" button on the individual panels, and panels 

can be visited and revisited in any order. 

The information entered by the user into the set of Detail Panels can be saved, through the 

use of the File Menu item, as an NMIM "run specification" or RunSpec. This RunSpec can 

then be re-loaded into the NMIM GUI whenever desired and reused or modified. 

The NMIM GUI has been designed such that the user is encouraged (but not required) to 

enter the RunSpec inputs in the order from top to bottom of the Navigation List starting with 

the Description input and ending with the Output section. The user should also note that four 

of the nine principal sections, "Vehicles/Equipment", “Fleet”, Diesel Retrofit”, and "Output, 

of the Navigation List contain sub-sections. 

The Navigation List is a tree structure with some input categories that lead to additional 

input requirements depicted as sub-sections in the Navigation List. Sections that contain 

sub-sections are shown with an expand-or-collapse icon (square with a plus or minus sign). 

Selection of this icon allows the list of sub-sections to be expanded or collapsed. 

Each section also displays readiness icons based on the state of completeness or readiness of 

the particular section input. 

A red exclamation mark means "not ready:" sufficient information has not been entered for 

that section. For top-level categories, a red exclamation mark will prevent NMIM from 

executing. For subcategories, a red exclamation mark will not prevent NMIM from 

executing. 

A green check mark means that sufficient information has been entered into the section and 

its sub-sections. 

A yellow double tilde means that default information sufficient to run the program is 

present for the section. The user may still elect to change the default settings if desirable. 

This action would transform the yellow double tilde into a green check mark. Figure 3-4 

illustrates the navigation list icons. 

 

Figure 3-4 Navigation List Icons 

Icon Meaning

Needs additional user supplied data.

Filled in sufficiently to run.

NMIM User Guide 6
Default data present, but otherwise filled in sufficiently to run.

Tree close/expand

Other general features of the NMIM GUI are drop-down menus, radio buttons, and check 

boxes, which work in a fairly standard way. Choices which are not allowed are disabled, as 

indicated by a light gray font (they are "grayed out"). 

Menu Bar Options 

When the NMIM GUI is launched, the menu bar appears near the top of the window (Figure 

3-2). From this menu bar, the user can access six menus. These menus are used to create, 

open, edit and/or save a RunSpec, execute the NMIM program (execute a RunSpec), access 

post processing options and obtain on-line help (the help function is self contained in the 

program and is not Web based). 

The items on the menu bar are File, Edit, Action, Post Processing, Settings, and Help. In 

standard Windows fashion, these items can be selected by using the mouse to left-click on 

the menu choice or by typing the underlined letter in the menu choice while holding down 

the Alt key. To "deselect" any menu item, highlight another menu selection, or press 

<ESC>. To back up one level in the menu tree, press <ESC>. To back up from some menu 

sub-items may require clicking the "cancel" button. 

File - This menu is used to create and modify RunSpecs, and its options are typical of those 

used when manipulating documents in Windows: New, Open, Close, Save, Save As, and 

Print. These allow the RunSpec to be created, loaded from computer's hard disk and saved 

to the computer's hard disk. The numbered entries at the bottom of the menu quickly reload 

recently used RunSpecs. 

Edit - This is a standard Windows menu that is used for manipulating text. The individual 

sub-items are Cut, Copy, Paste and Clear. This menu can only be used on individual text 

items; it cannot be used to copy or manipulate data from entire sections such as the 

geography section. 

Action - The Action menu gives the user five possible choices: Execute, Stop, Pause, 

Resume, and NMIM Run Error Log. Some of these choices will be unavailable, grayed out, 

depending on the current state of the program. Execute, Stop, Pause, and Resume control the 

execution of the currently loaded RunSpec. This menu also provides access to the NMIM 

error log, which contains error messages generated during a run. 

Post Processing - This menu is used to activate additional programs that will process the 

NMIM output database after a run is complete. See the NMIM Output Section of this User 

Guide for more information regarding this menu. 

Settings - This menu is used to access the Configure NMIM menu item. See the Settings 

and Configuration Section of this User Guide for more information regarding this menu 

item. 

NMIM User Guide 7
Help - The Help menu has two choices: NMIM User's Guide and About. The NMIM 

User's Guide is the document you are currently viewing. About displays the release date of 

the version of NMIM that is running. 

Settings Menu / Configure NMIM 

The Settings Menu is a pull-down menu from the menu bar at the top of the main window. If 

selected, an additional Configure NMIM tab becomes visible. If this tab is selected, the 

Configure NMIM window opens as shown in Figure 3-19. The Configure NMIM window is 

essentially a way to edit NMIMConfiguration.txt, which is located in the NMIM root 

directory and may also be edited with a text editor. 

The top section of the configure NMIM window is the Default County Database selection 

box. The Default County Database is the NMIM County Database (NCD) that is used when 

NMIM is first started and provides the list of counties, vehicle types, etc. that populate the 

NMIM GUI. If the NCD is on the same computer as the NMIM Master (the usual case), 

locally on a PC, the server must be specified as "localhost". Individual RunSpecs may 

designate a different NCD, which overrides the default. The GUI is not functional without a 

default NCD. 

The middle section allows the user to specify the MySQL server that hosts the NMIM output 

database. The usual choice is "localhost", which puts the output database on the same 

computer as the NMIM Master. 

The bottom section is the Shared Distributed Folder Path box. This folder is where the 

NMIM Master and Workers share their common input, temporary, and output files. If a 

single PC is used to run NMIM, the Shared Distributed Folder Path is typically set to 

C:\NMIM\SharedWork, but could be set to any existing folder on the PC. However, if the 

multiple NMIM Workers are utilized over a network, a network drive and folder accessible 

to the Master and all the Workers should be specified. 

Figure 3-19 Configure NMIM 

NMIM User Guide 8
Users should be aware that the settings menu does not display or allow them to set the 

mySQLFolderPath variable in NMIMConfiguration.txt. If necessary, users must set this 

variable using a text editor. This variable is important to enable NMIM to find the 

externalfiles folder of the NCD. 

NMIM User Guide 9
NMIM Inputs 

Description Panel 

The first item in the Navigation List is Description. When this item is selected, the 

Description Panel opens in the Detail Panel Section (The large gray panel on the right side 

in Figure 3-5). The Description Panel is a scrollable text window that allows the user to give 

the RunSpec a particular textual description. Up to 5000 characters of text may be entered to 

describe the RunSpec. The text entered in the Description Panel is for documentation 

purposes only. It has absolutely no effect on the results from the NMIM program. The 

default Description is blank and the NMIM model can be run without a Description. 

Because RunSpecs are XML documents, do not use "&" or angle brackets in your 

description, since these characters have special meanings to XML. 

 

Figure 3-5 Description Panel Figure 

 

Geography Panel 

NMIM User Guide 10
The second item in the Navigation List is the Geography Section. When this item is selected, 

the Geography Panel opens in the Detail Panel Section. The initial Geography Panel as 

shown in Figure 3-6 contains a list of four buttons. These buttons are "All", "State," and 

"County," and "Fleet." The user must choose one of these buttons in order to get a successful 

NMIM RunSpec. If the "All" button is chosen, the NMIM model will run scenarios and 

compute emission inventory results for all counties/parishes in the United States and 

Territories. If the "All" button is selected, this completes the geography input requirement 

and the second Geography Panel Window will not open. The "All" button is generally 

chosen if the user wishes to create a national U.S. emission inventory. If such a choice is 

made, the user should be cautioned that this choice may take considerable computation time. 

The fleet button is grayed out unless the user is performing fleet modeling (see Retrofit and 

Fleet Modeling below). 

Figure 3-6 Initial Geography Panel 

 

If the user selects "State" from the Initial Geography Panel (Figure 3-6), the Geography 

Panel for State Selection (Figure 3-7) will open in the Detail window. 

 

 

NMIM User Guide 11
Figure 3-7 Geography Panel for State Selection 

The Geography Panel shown in Figure 3-7 contains the Region box in which the "State" 

button is currently selected, the States box which contains a list of all the states and 

territories, and the Selections box. The States box contains a list of all of the US states and 

territories. The Selections box contains a list of the states which the user has chosen to 

model. A particular state is selected by scrolling the States box and selecting the particular 

state to be modeled. Once the state is selected the user clicks the Add button and the 

particular state moves to the Selections box. The All button allows the user to select all of 

the states and territories for modeling using one mouse action. The remove button allows the 

user to remove a selection. This is done by selecting the appropriate state with the mouse 

and clicking the remove button. The remove button is inactive if no states are in the 

Selection box. 

If the user selects "County" from the Initial Geography Panel (Figure 3-6), the Geography 

Panel for County Selection (Figure 3-8) will open in the Detail window. 

NMIM User Guide 12
Figure 3-8 Geography Panel for County Selection 

The Geography Panel shown in Figure 3-8 contains the Region box in which the "County" 

button is currently selected, the State box which contains a list of all the states and 

territories, the Counties box, and the Selections box. The States box contains a list of all of 

the US states and territories. The Selections box contains a list of the states which the user 

has chosen to model. The Counties box contains a list of counties in the selected state. A 

particular county is selected by scrolling the Counties box and selecting the particular 

county to be modeled. Once the county is selected, the user clicks the Add button and the 

particular state and county combination moves to the Selections box. The All button allows 

the user to select all of the counties in a particular state for modeling using one mouse 

action. The remove button allows the user to remove selection(s) which have been made by 

selecting the appropriate county with the mouse and clicking the remove button. The remove 

button is inactive if no state - county combinations are in the Selection box or if none are 

selected. 

Time Panel 

The third item in the Navigation List is the Time Section. When this item is selected, the 

Time Panel opens in the Detail Panel Section. The Time Panel contains two sub-panels. The 

leftmost sub-panel is the selection area for calendar year(s) to model. The calendar years are 

listed in the Year list box and can range from 1999 through 2050. Left-clicking the black 

triangle in the Year box with the mouse provides the list of calendar years. Click the Add 

button to move the selected year into the Year Selections box. A combination of individual 

years can be selected with the mouse. The right-most sub-panel is the selection area for 

months to model. The user can select one or more individual months to model by clicking 

the appropriate boxes. The user must check at least one month box. The same set of months 

NMIM User Guide 13
will be used for all years. Selecting the "Use Yearly Weather Data" check box causes NMIM 

to use historical data, if it is available, from the CountyYearMonthHour table for the year 

selected, If historical data is not present, NMIM will use 20-year average data from the 

CountyMonthHour table. 

Figure 3-9 Time Panel 

For NMIM to produce highway inventories for the years selected, VMT estimates for those 

years must be present in the BaseYearVMT table of the NCD or be bracketed by two years 

with VMT estimates, in which case NMIM will linearly interpolate between the two years. 

When running NMIM, users are advised to provide as much locally validated data as 

possible, including VMT estimates. The EPA does not endorse as appropriate for any 

particular purpose the VMT estimates contained in the NCD supplied with the NMIM 

download. 

Nonroad equipment does not require VMT estimates and can be calculated for any of the 

calendar years listed. 

NMIM creates a single RunSpec with a list of month-years. This list is the full combination 

(cross product) of the selected calendar years and the selected months. Thus, the same 

months apply for all years selected. For example, if the user decides to model calendar years 

NMIM User Guide 14
2010, 2015, and 2020, and selects January and August, modeling will be done for the 

January and August of all three years. 

In the Time Panel, the user selects calendar years from the drop-down menu and then uses 

the "Add" button. Selecting a calendar year in the "Year Selections" list enables the 

"Remove" button but does not otherwise affect other controls. The "Add" button will give an 

error message if an attempt is made to add a year that was already selected. 

There is no default selection for the Time Panel, and the NMIM model will not run without 

both a calendar year selection and a month selection on this panel. 

Vehicles / Equipment Panel 

The fourth item in the Navigation List is the Vehicles / Equipment Section. This section 

does not have its own panel. Instead, when selected on the Navigation List it reveals two 

sub-choices. These are the Onroad Section, and the Nonroad Section. If selected, both the 

Onroad and Nonroad sections open separate Detail panels. See the Onroad and Nonroad 

chapters of this user guide for further details. 

There is no default selection for the Onroad or Nonroad Detail panel inputs. The NMIM 

model requires either a valid Onroad input or a valid Nonroad input (or both). If some 

vehicles or equipment are omitted, the NMIM will not execute those particular calculations 

and save program execution time. 

Onroad Vehicle Panel 

The Onroad section is a sub-section of the Vehicles / Equipment Section. When selected 

from the Navigation List, it opens the Onroad Detail Panel. This panel allows the user to 

select the on-road vehicle(s) types to be modeled. Figure 3-10 shows the Onroad Detail 

Panel. 

NMIM User Guide 15
Figure 3-10 Onroad Detail Panel 

The Onroad Vehicle panel allows the user to select which on-road vehicles are to be 

modeled. The user may select between zero and all twelve vehicle types. Selection of a 

particular vehicle type is made by clicking its button on the panel with the mouse. In the 

example below, NMIM will compute emission inventories for light-duty gasoline vehicles, 

heavy-duty gasoline vehicles, motorcycles, light duty diesel vehicles, and light-duty diesel 

trucks. If no vehicle types are selected, the NMIM model will NOT run the underlying 

MOBILE6.2 emission factor model. If at least one vehicle type is selected, MOBILE6.2 will 

be run. However, even if MOBILE6.2 is run, there will be no NMIM output unless there is 

VMT in the BaseYearVMT table for the selected time period. NMIM will not warn you if 

you try to run an onroad inventory for a year with no VMT. Nor will it give you any error 

messages; there will simply be no output. 

The twelve vehicle types and their weight definitions are as follows: 

1. LDGV: Light-Duty Gasoline Vehicles (Passenger Cars) 

2. LDGT1,2: Light-Duty Gasoline Trucks 1 and 2 (less than 6000 lbs GVW) 

3. LDGT3,4: Light-Duty Gasoline Trucks 3 and 4 (6001 - 8500 lbs GVW) 

4. HDGV: All Heavy-Duty Gasoline Vehicles (Trucks greater than 8500 lbs GVW) 

5. MC: All Motorcycles 

NMIM User Guide 16
6. LDDV: Light-Duty Diesel Vehicles (Passenger Cars) 

7. LDDT: Light-Duty Diesel Trucks (less than 8500 lbs GVW) 

8. 2BHDDV: Class 2B Heavy-Duty Diesel Vehicles (8501 through 10,000 lbs GVW) 

9. LHDDV: Light Heavy-Duty Diesel Vehicles (10,001 through 19,500 lbs GVW) 

10. MHDDV: Medium Heavy-Duty Diesel Vehicles (19,501 through 33,000 lbs GVW) 

11. HHDDV: Heavy Heavy-Duty Diesel Vehicles (33,001 + lbs GVW) 

12. Buses: All Diesel Transit and School Buses 

Nonroad Equipment Panel 

The Nonroad section is a sub-section of the Vehicles / Equipment Section. When selected 

from the Navigation List, it opens the Nonroad Detail Panel. This panel allows the user to 

select the particular nonroad equipment types (called Segments) and fuel types to be 

modeled. Each selection is a combination of equipment type (Segment) and fuel type. Figure 

3-11 shows the Nonroad Detail Panel. 

Figure 3-11 Nonroad Detail Panel 

NMIM User Guide 17
The NMIM model allows the user to choose one or more of the twelve vehicle / equipment 

types or Segments. These are: 

• Recreational 

• Construction 

• Industrial 

• Lawn and Garden 

• Agriculture 

• Commercial 

• Logging 

• Airport Support 

• Underground Mining 

• Oilfield 

• Pleasure Craft (marine) 

• Railroad 

The NMIM model also allows the user to specify a particular fuel type for each of these 

vehicle / equipment choices. The fuel types are: 

• CNG 

• Diesel 

• Gasoline 

• LPG 

In the Nonroad Sub-Panel the user may select between zero and the full combination of the 

twelve equipment types (Segments) and four fuel types. Selection of a particular equipment 

type (Segment) and fuel combination is made by clicking and highlighting the selection on 

either the Segments or Fuels boxes with the mouse. Once the selection of both a Segment 

item and the Fuel item is highlighted, a click of the "Add Fuel / Segment Combinations" 

button moves the selected choices to the Selections box. The Remove button clears the 

highlighted selections. 

If zero equipment types (Segments) and fuel combinations are selected, the NMIM model 

will NOT run the NONROAD model. If at least one Segment / fuel combination is selected, 

NONROAD will be run. In the example below, NMIM will compute emission inventories 

for diesel construction equipment and commercial gasoline powered vehicles and 

equipment. 

Pollutants Panel 

The fifth item in the Navigation List is the Pollutants Section. When this item is selected, the 

Pollutant Panel opens in the Detail Panel Section. The Pollutants Panel contains three subpanels. They are an Aerosols sub-panel, a Gases sub-panel and a Toxics sub-panel. Figure 3-

12 shows an example Pollutants Panel. 

NMIM User Guide 18
Figure 3-12 Pollutants Panel 

The Pollutants Panel allows the user to select pollutants to be modeled. This is done by 

selecting the appropriate pollutant check box on the Pollutant Panel. Selection of a pollutant 

automatically instructs the NMIM model to perform all calculations necessary for that 

pollutant. When an aerosol is selected, the user can select either 2.5 microns or 10 microns 

or both. 

When HC is selected, a drop-down menu is enabled which allows the user to select the form 

in which to express the hydrocarbon inventory. Hydrocarbons may be expressed as NMHC, 

NMOG, VOC, THC, or TOG. The user may select only one of the hydrocarbon types from 

the list. Selecting HC as VOC will also allow the user to choose SOA results, if desired. 

Choosing Additional HAPS forces the choice of two pollutants, Exhaust PM10 and HC as 

VOC, because Additional HAPS are calculated by ratio to one of these two pollutants. 

The pollutant abbreviations shown in the GUI have the following definitions. 

Aerosols 

• Exhaust PM - Sum of all exhaust (elemental carbon, organic carbon and sulfate) 

particulate matter emissions. 

• Tire PM - Particulate matter emissions from tire wear. 

• Brake PM - Particulate matter emissions from vehicle brake wear. 

• SOA - Secondary organic aerosols. 

NMIM User Guide 19
Gases 

• CO - Carbon monoxide 

• CO2 - Carbon dioxide 

• HC - Hydrocarbon 

• NH3 - Gaseous ammonia 

• NOX - NO + NO2 

• SO2 - Sulfur dioxide 

Toxics 

• Acetaldehyde 

• Acrolein 

• Benzene 

• Butadiene - 1,3-Butadiene 

• Formaldehyde 

• MTBE - Methyl Tertiary Butyl Ether 

• Additional HAPS - 27 additional hazardous air pollutants 

• Dioxin/Furan - 17 dioxin/furan congeners. 

As a user convenience, the Pollutants Panel also contains a Select All and a Clear button. 

Clicking these buttons selects or removes all pollutants. 

NMIM User Guide 20
Advanced Features Panel 

The seventh item in the Navigation List is the Advanced Features Section. This panel is 

shown in Figure 3-15. 

Figure 3-15 Advanced Features Panel

The Advanced Features detail panel can be used to specify a version of the NMIM County 

Database (NCD) to use during the model run. If nothing is entered, the default NCD 

specified in the NMIMConfiguration.txt file (in the NMIM root directory) will be used. To 

specify another NCD, enter the Server and Database names. If the database is physically 

located on the same machine as the NMIM master (the usual case), enter "localhost" in the 

Server box. If the database is on another machine, enter the appropriate server name. Enter 

the name of the NCD you wish to use in the Database box. 

The Advanced Features detail panel also allows the user to provide additional text files 

containing MOBILE6 and NONROAD commands. Separate input files must be specified 

for the MOBILE6 Run Level and Scenario Level commands and NONROAD commands. 

We do not expect this capability to be frequently used, because of NMIM's newer capability 

to reference these files and commands at the county level in the NMIM County Database. 

NMIM User Guide 21
If an alternate file containing MOBILE6 or NONROAD commands is specified in this 

Advanced Features panel, NMIM will look for the file relative to the NMIMRoot directory. 

A file name without a path is expected to be in the NMIMRoot directory. NMIM will read 

the text file and write the contents to MOBILE6 or NONROAD input files, overriding other 

file or command specifications that would otherwise be written by NMIM. 

Files specified in this panel must contain allowable MOBILE6 commands and/or 

NONROAD input file sections. The user is cautioned to use care when creating such files 

since NMIM model will perform only minimal testing of these files prior to attempting to 

execute them in a MOBILE6 or NONROAD model run. If errors are found during 

execution, the program will likely stop and the diagnostics will be minimal. 

A text file containing MOBILE6 Run commands may contain the following MOBILE6 

commands. 

Allowable MOBILE6 - Run Level Commands 

NO REFUELING 

ABSOLUTE HUMIDITY 

CLOUD COVER 

PEAK SUN 

SUNRISE/SUNSET 

DIESEL FRACTIONS 

MILE ACCUM RATE 

NGV FRACTION 

NGV EF 

STARTS PER DAY 

START DIST 

WE DA TRI LEN DI 

WE EN TRI LEN DI 

STAGE II REFUELING 

NO CLEAN AIR ACT 

NO DEFEAT DEVICE 

NO NOx PULL AHEAD 

NO REBUILD 

REBUILD EFFECTS 

REG DIST 

NO TIER2 

NO 2007 HDDV RULE 

NMIM User Guide 22
A text file containing the MOBILE6 Scenario commands may contain the following 

MOBILE6 commands. 

Allowable MOBILE6 - Scenario Level Commands

ABSOLUTE HUMIDITY 

CLOUD COVER 

PEAK SUN 

SUNRISE/SUNSET 

DIESEL FRACTIONS 

WE DA TRI LEN DI 

WE EN TRI LEN DI 

WE VEH US 

SOAK DISTRIBUTION 

HOT SOAK ACTIVITY 

DIURN SOAK ACTIVITY 

 Files specified in mobile commands must be located in the ExternalFiles subdirectory of the 

NCD and will not be shipped to the worker if they have any of the following names, which 

are the default MOBILE6 run files: 

 

 dbase.d 

asmdata.d stperday.d 

cutpoint.d t2cert.d 

t2evap.d 

dsact.d t2exh.d 

hsact.d tech12.d 

hsactday.d wedatrip.d 

hsactend.d weentrip.d 

imtest.d pmddr1.csv 

miledat.d pmddr2.csv 

ngvef2.d pmdzml.csv 

ngvfr.d pmgdr1.csv 

nlevne.d pmgdr2.csv 

p94imp.d pmgzml.csv 

pmnh3ber.d airnasty.txt

pmnh3sdr.d fvmt.def 

regdata.d hvmt.def 

sdist.d mardata.def 

soakdst.d svmt.def 

NMIM User Guide 23
If a NONROAD packet file is specified it must contain all of the following NONROAD 

input file sections: 

/RUNFILES/, except for the first line (/RUNFILES/) and the MESSAGE and OUTPUT 

DATA lines. These three lines will be supplied by NMIM. Note that this packet begins in 

the middle. The remaining packets listed below must be supplied in their entirety. 

/POP FILES/ 

/GROWTH FILES/ 

/ALLOCATION FILES/ 

/EMFAC FILES/ 

/DETERIORATE FILES/ 

/PM BASE SULFUR/ 

NMIM will check to see if the supplied file names are the standard ones. It checks the text 

both to the left and to the right of the colon. Below is what the file must look like in order 

for NMIM to conclude that all file names are standard. Case does not matter. The colon 

must occur in column 20. There may be, but does not have to be, a space after the colon. 

ALLOC XREF : data/allocate/allocate.xrf 

ACTIVITY : data/activity/activity.dat 

EXH TECHNOLOGY : data/tech/tech-exh.dat 

EVP TECHNOLOGY : data/tech/tech-evp.dat 

SEASONALITY : data/season/season.dat 

REGIONS : data/season/season.dat 

EPS2 AMS : 

/END/ 

/Pop Files/ 

Popula

/END/ 

tion File : data/pop/co.pop 

/Growth Files/ 

National defaults :data/growth/nation.grw 

/END/ 

/ALLOC FILES/ 

Allocation File :data/allocate/co_sbr.alo 

Allocation File :data/allocate/co_sbc.alo 

Allocation File :data/allocate/co_snowm.alo 

Allocation File :data/allocate/co_farms.alo 

Allocation File :data/allocate/co_const.alo 

Allocation File :data/allocate/co_wob.alo 

Allocation File :data/allocate/co_wib.alo 

Allocation File :data/allocate/co_golf.alo 

Allocation File :data/allocate/co_airtr.alo 

Allocation File :data/allocate/co_coal.alo 

Allocation File :data/allocate/co_holsl.alo 

Allocation File :data/allocate/co_loggn.alo 

Allocation File :data/allocate/co_lscap.alo 

Allocation File :data/allocate/co_mnfg.alo 

Allocation File :data/allocate/co_oil.alo 

Allocation File :data/allocate/co_rvprk.alo 

Allocation File :data/allocate/co_pop.alo 

Allocation File :data/allocate/co_house.alo 

NMIM User Guide 24
Allocation File :data/allocate/co_rail.alo 

/END/ 

/EMFAC FILES/ 

THC exhaust : data/emsfac/exhthc.emf 

CO exhaust : data/emsfac/exhco.emf 

NOX exhaust : data/emsfac/exhnox.emf 

PM exhaust : data/emsfac/exhpm.emf 

BSFC : data/emsfac/bsfc.emf 

Crankcase : data/emsfac/crank.emf 

Spillage : data/emsfac/spillage.emf 

Diurnal : data/emsfac/diurnal.emf 

TANK PERM : data/emsfac/evtank.emf 

NON-RM HOSE PERM : data/emsfac/evhose.emf 

RM FILL NECK PERM : data/emsfac/evneck.emf 

RM SUPPLY/RETURN : data/emsfac/evsupret.emf 

RM VENT PERM : data/emsfac/evvent.emf 

RM SUPPLY/RETURN : data/emsfac/evsupret.emf 

HOT SOAKS : data/emsfac/evhotsk.emf 

RUNING

/END/ 

LOSS : data/emsfac/evrunls.emf 

/Deteriorate Files/ 

THC exhaust : data/detfac/exhthc.det 

CO exhaust : data/detfac/exhco.det 

NOX exhaust : data/detfac/exhnox.det 

PM exhaust : data/detfac/exhpm.det 

Diurnal : data/detfac/evdiu.det 

TANK PERM : data/detfac/evtank.det 

NON-RM HOSE PERM : data/detfac/evhose.det 

RM FILL NECK PERM : data/detfac/evneck.det 

RM SUPPLY/RETURN : data/detfac/evsupret.det 

RM VENT PERM : data/detfac/evvent.det 

HOT SOAKS : data/detfac/evhotsk.det 

RUNINGLOSS : data/detfac/evrunls.det 

/END/ 

/PM Base Sulfur/ 

T2 0.2000 0.02247 

T3 0.2000 0.02247 

T3B 0.0500 0.02247 

T4A 0.0500 0.02247 

T4B 0.0015 0.02247 

T4 0.0015 0.30 

T4N 0.0015 0.30 

T2M 0.0350 0.02247 

T3M 1.0 0.02247 

T4M 

/END/ 

 1.0 0.02247 

If the commands or paths in any of these packets differ, NMIM will conclude that a 

nonstandard file is being specified. Please specify the packets and commands in the order 

shown. If you specify a nonstandard file, NMIM will look for it in the path specified, 

relative to the NMIMRoot directory. For example, if NMIMRoot is C:\NMIM, if you 

specify nation1.grw, it will look for that file in C:\NMIM. If you specify 

data\growth\nation1.grw, it will look in C:\NMIM\data\growth\nation1.grw. In either case, it 

NMIM User Guide 25
will ship the file to the worker, where it will be placed in the NONROAD root directory, 

without the added path. This behavior means that you can use the same filename without 

risk of overwriting the default file that NONROAD is using. 

If any of these last three advanced features are used, the user-supplied information will be 

applied to all specified counties and all calendar years and will override similar commands 

and file references in the county database. 

Before attempting to use this feature, the user should be quite familiar with the MOBILE6 

User Guide and the NONROAD model User Guide. 

Output Panel 

The final item in the Navigation List is the Output Section. When selected, this section 

expands to reveal two additional sub-sections. These are the Geographic Representation and 

the General Output sub-sections. When either of these are chosen, the detail panel contains 

either the Geographic Representation panel (See Figure 3-16) or the General Output panel 

(See Figure 3-17). The first sub-panel allows the user to determine the basic processing of 

the NMIM program. The second sub-panel is where the server name and database name for 

the NMIM output are entered. The user may enter either a new name, and thereby create a 

new NMIM output database, or browse the server and specify an existing NMIM output 

database. If an existing database is specified, all new NMIM output records will be 

appended to the existing database, but with an new runid. 

WARNING: Do not specify an NMIM County Database for the NMIM 

output. Doing so will cause the SCC and SCCToxics tables to be 

DELETED. 

If you do find yourself in the position of having deleted the above tables you will need to 

reload the MySQL database

Geographic Representation Sub-panel 

If the user selects the Geographic Representation button from the Navigation List, the 

Geographic Representation sub-panel opens in the detail panel. This detail panel is shown in 

Figure 3-16. 

NMIM User Guide 26
Figure 3-16

The Geographic Representation sub-panel offers the user two choices: (1) County and (2) 

County Group. If "County" is chosen, MOBILE6 and/or NONROAD is run once for each 

county and each time period selected. If "County Group" is chosen, NMIM does a single 

MOBILE6 or NONROAD run for the entire group, using the data (fuels, temperature, I/M, 

etc.) for one county in the group, called the "representing county." Since grouping results in 

fewer MOBILE6 and/or NONROAD runs, the total NMIM run is faster. County groups are 

defined in the CountyMap table of the NMIM County Database (NCD). Whether counties 

are grouped or not, the NMIM output contains inventories for all the individual counties in 

the selected geographic region. MOBILE6 emission factors are still multiplied by the 

county-specific VMT in the BaseYearVMT table. In the CountyMap table distributed with 

the NCD, all counties are mapped to themselves, meaning that there is no difference 

between selecting County and County Group. Users must develop county groups and 

specify the representing county for each one to take advantage of this feature. If time is 

available, running individual counties produces superior inventories, since it uses the most 

individualized data for each county. 

General Output 

This sub-panel is designed to be the final panel which is completed prior to running the 

NMIM model. The user must make appropriate selections on this panel since the NMIM 

model cannot run without this information. It is shown in Figure 3-17. 

The user must specify the server and database into which the NMIM model results should be 

placed. The default server is "localhost". There is no default database. A warning to the user 

NMIM User Guide 27
is given if the database already contains rows within the output tables. However, the results 

from any new NMIM runs will be appended to any databases which already exist. The 

"Create Database" button is used for creating new MYSQL databases containing the 

required output tables. 

The checkbox "Pre-aggregate non-road horsepower classes" causes NONROAD output to be 

aggregated over power class, which save significant space in the NMIMPollutantOutput 

table. This checkbox has no effect on onroad output. 

Figure 3-17 General Output Panel 

WARNING: Do not specify an NMIM County Database for the NMIM 

output. Doing so will cause the SCC and SCCToxics tables to be 

DELETED. 

If you do find yourself in the position of having deleted the above tables you will need to 

reload the MySQL database

NMIM User Guide 28
NMIM Output 

Introduction 

The NMIM model reports all of its output to the Output Database specified by the user in the 

NMIM GUI section Output / General Output. The NMIM Output Database is a MySQL 

database that can be accessed by running MySQL and issuing the appropriate SQL 

commands. Complete MySQL documentation can be found in the Docs subdirectory of the 

MySQL installation directory (C:\MySQL\Docs). Another good source of information is the 

MySQL website. Its address is: www.mysql.com 

Output Database Description 

The MySQL Output Database reports the NMIM results in a MySQL relational database that 

can be queried for report generation and/or exported to other formats for subsequent use. 

The MySQL Output Database contains four data tables. These tables are: 

• NMIMPollutantOutput 

• NMIMRun 

• NMIMError 

• NMIMVMTOutput 

The NMIMPollutantOutput Table contains the emission results. The NMIMRun Table 

contains one row per run. The fields are RunID, RunSpecName, DateTime, and 

HCExpressAs. The NMIMError Table contains all error messages that were produced in a 

given run. The NMIMVMTOutput Table contains the vehicle miles traveled (VMT) for the 

onroad pollutant results. 

NMIMPollutantOutput Table 

This table contains the emission results for all selected pollutants in units of United States 

Short Tons (2000 pounds). The fields are: 

RunID: A sequential run identifier. Adding runs to an existing database automatically 

increments this number. 

State Identification Number (FIPSStateID): The Federal Information Processing System 

(FIPS) code for the state. 

County Identification Number (FIPSCountyID): The Federal Information Processing System 

(FIPS) code for the county. The combination of FIPSStateID and FIPSCountyID uniquely 

identifies the county. 

CalendarYear (Year): This can range from 1999 through 2050. 

Month (Month): Each of the twelve months of the year. 

NMIM User Guide 29
EmissionType (EmissionTypeID): An integer identifying the emission type: 1=exhaust, 

2=evaporative, 3=tire, 4=brake, 5=refueling. If emissiontype has been aggregated it will 

have a value of 124. 

Source Classification Code ID (SCCID): SCCID is an integer associated with an SCC 

(Source Classification Code). The SCC associated with each SCCID may be found in the 

SCC table. For NONROAD equipment, SCCs represent particular equipment types (e.g., 

snowmobiles). For Onroad vehicles it represents one (out of 144) vehicle class and road type 

combinations. 

Power Class (PowerClass): This is the top range of engine power in units of horsepower. It 

applies to NONROAD equipment. Onroad vehicles will show a value of zero. If powerclass 

has been pre-aggregated, it will have a value of 9999. 

Pollutant Code ID (PollutantCodeID): This integer number specifies the particular pollutant 

represented in the record. There is a separate record for each pollutant requested by the run 

specification. PollutantCodeID is associated with PollutantCode in the PollutantCode table. 

Pollutant: This field contains the emission results for the run specification in units of short 

tons. 

NMIMRun Table 

The NMIMRUN table contains information which is specific to the NMIM run. It includes: 

RunId: Key field. It provides a unique sequential identifier for each NMIM run in the 

database 

RunSpecName: The file name of the NMIM RunSpec that generated the results. 

DateTime: The date and time associated with the NMIM Run. 

HCExpressAs: The type of hydrocarbon emission reported in the NMIM Run. 

NMIMError Table 

The NMIMError table contains all error and other diagnostic information reported by the 

NMIM model. If the particular run contains no errors then there will not be a record for that 

run. 

The fields are: 

NMIMErrorID: Key field. It provides a unique identifier for each reported error message in 

a run. 

RunId: This integer number specifies the particular NMIM run. 

NMIM User Guide 30
FIPSCountyId (see above for definition) 

FIPSStateId (see above for definition) 

Year (see above for definition) 

Month (see above for definition) 

ModelType: An integer code (1=MOBILE, 2=NONROAD) that identifies whether the error 

message was produced by the MOBILE6.2 model or the NONROAD model. 

ErrorMessage: Text field containing the error message. 

NMIMVMTOutput Table 

The NMIMVMTOutput table contains the vehicle miles traveled for each onroad result. It 

includes: 

County Identification Number (FIPSCountyID): (see above for definition) 

State Identification Number (FIPSStateID): (see above for definition) 

CalendarYear (Year): (see above for definition) 

Month (Month): (see above for definition) 

Source Classification Code ID (SCCID): (see above for definition) 

Power Class (PowerClass): (see above for definition) This field is always zero, since onroad 

sources are not classified by power class. 

Run Number (RunID): This integer number specifies the particular NMIM run. 

Monthly VMT (MonthVMT): The monthly VMT (Vehicle Miles Traveled) is reported in 

units of millions of miles. 

NMIM User Guide 31
Post-Processing Options 

The Post Processing/Aggregate and Export Menu is a user convenience feature that allows 

the user to aggregate the NMIM model results in various ways and produce alternative 

output formats. The alternative to using the Aggregate and Export function is to work with 

the NMIM output directly using MySQL. The Aggregate and Export function can operate on 

any NMIM output database. It may be used at any time after the completion of the NMIM 

run. 

The Post Processing Menu is a pull-down menu at the top of the main window. If it is 

selected by the user with the mouse, an additional Aggregate And Export tab becomes 

visible. If this tab is selected, the Aggregate And Export window opens as shown in Figure 

3-18. The Aggregate And Export window contains four principal sections. The top section 

specifies the server, the NMIM output database, and the NMIM run. There may be multiple 

NMIM runs in an output database, but only one at a time may be chosen for post-processing. 

The second section is "Output Format," where one of three output formats must be chosen: 

NMIM native normalized, Wide Tables, or NIF3). This section contains an additional data 

button to provide additional information needed for NIF3 output. The third section lists and 

describes the aggregation options, which are selected using check boxes. The final section is 

"Output," where file formats and locations are chosen. It may be necessary to use the scroll 

bar on the right side of the panel to access all of the options contained in this panel. 

Figure 3-18 Aggregate And Export Window 

NMIM User Guide 32
Top Section (Input Data for Post Processing) 

Three inputs are required to identify the data to be processed. These are the "Source Output 

Server" selection, the "Database" selection and the "Run" selection. The Source Output 

Server selection is where the server information may be provided. If the NMIM output 

database is on the user's desktop computer, specify "localhost.". In the Database selection, 

the select the name of the NMIM output database that is to be post processed from the list of 

available NMIM output databases. Such a database is generated by first successfully running 

the NMIM model. An NMIM output database may contain several runs. The Run selection 

is used to specify a particular NMIM run that is to be post processed. Only one run may be 

post processed at a time. 

The OK and Cancel buttons found in the top right corner execute or cancel a particular Post 

Processing panel selection. The OK button remains dark while the Aggregate and Export 

function is executing. It returns to gray when Aggregate and Export has completed. 

It is possible to save and load a Post Processing specification, called an "aggregation 

specification" or AgSpec, using the Save and Load buttons in this section. As with 

RunSpecs, AgSpecs are xml files that may be edited with a text editor and run from the 

command line. 

Output Format 

The user may select a particular output format by selecting the appropriate radio button. The 

available output parameters are: 

• NMIM Native—a separate row for each pollutant. 

• Wide Tables—a column for each pollutant. 

• NIF3—NIF3 ASCII output generated for onroad and nonroad separately. The "Get 

Additional Data" button will invoke a form for inputting additional information 

needed for NIF3 output, shown in Figure 3-19 and listed below. This information is 

required to produce NIF3 output. 

NMIM User Guide 33
Figure 3-19 NIF3 Additional Data 

NIF3 Additional Parameters 

• Monthly, Annual radio buttons - one must be chosen (Typical ozone 

season day is not functional) 

• Organization Name 

• Contact Person 

• Contact Phone 

• Telephone Type 

• Electronic Address 

• Electronic Address Type 

• Affiliation Type 

• Submittal Flag - (Optional) Default is Blank 

• Transaction Type - (Optional) Default is 00 

• Incremental Submission Number - (Optional) Default is 1 

• Reliability Indicator - (Optional) 

• Transaction Comments - (Optional) 

Aggregation Parameters 

The user may select particular aggregation parameters by checking the appropriate 

boxes. The available aggregation options are: 

• FIPSCounty – If this check box is chosen, the emissions for all counties 

within each state are summed. 

NMIM User Guide 34
• Month - If this check box is chosen, the emission results for all twelve 

months of the year are summed. This option also allows individual 

weighting factors for each month. The default weighting factor for any 

month is 1.0. 

• Emission Type - If this check box is chosen, all emission types (exhaust, 

evaporative, refueling, brake, and tire) will be summed together. 

• Power Class - If this check box is chosen, the model will combine all of 

the power classes within a given NONROAD SCC. This option produces 

results by SCC code for NONROAD equipment. Results for onroad 

vehicles are unaffected by this option. 

• Nonroad - If this check box is chosen, the model will combine the 

emission results from NONROAD SCC codes into NONROAD segments 

(Recreation, Construction, Industrial, etc.) and fuel types (Diesel, 

Gasoline 2-stroke, Gasoline 4-stroke, LPG, CNG). The resulting sums 

will be re-labeled in terms of summary level pseudo-SCC codes that 

represent each segment-fuel type combination. This aggregation has no 

effect on onroad emissions. 

• HPMS Roadway Type - If this check box is chosen, the model will 

combine onroad emissions so as to eliminate the twelve roadway types. 

• All NONROAD- If this check box is chosen, the model will combine all 

of the NONROAD emission results into a total NONROAD emission 

sum. 

• All Onroad - If this check box is chosen, the model will combine all of 

the onroad emissions into a total onroad emission sum. 

All combinations of these parameters can be chosen. The user should exercise care 

when aggregating across more than one parameter at a time. Also, the user should 

understand that this utility is a post processing tool, and that it does NOT re-run the 

entire NMIM simulation to obtain additional information that might be missing for 

the desired aggregation. For example, if the user desires to aggregate by FIPSCounty 

(combine emissions from all counties within a state), and is missing emission 

information from one or more individual counties, the Post Processing tool will 

generate a state sum that does not include the missing county. 

NMIM User Guide 35
Output File Type Choices 

MySQL Data Table

The bottom section of the Aggregate And Export window allows the user to choose between 

three output file types. If the MySQL Data Table button is selected, a MySQL table is 

produced in the NMIM output database. The user must supply a name for the output table in 

the Table Name box. This will create a new MySQL table in the NMIM output database that 

contains the aggregated emission results. MySQL must then be used to access the results. 

Tab-Delimited ASCII Text File

If the Tab-Delimited ASCII Text File button is selected, the user must supply a file name for 

the text output table in the File Name box. The Browse button can be used to select the name 

and path of the output file. This option will create a tab-delimited text file of the emission 

results that can be read by a spreadsheet such as Excel. 

If the NIF3 button is selected, the user must supply a directory pathname for the NIF3 text 

output files. The Browse button can be used to select the path of the output directory. This 

option will create standard ASCII NIF3 files in the specified directory. For the specification 

of the NIF3 format, see http://www.epa.gov/ttn/chief/nif/nif3.html#ver3. 

The NIF3 files created for nonroad emissions are listed below. The file names are decoded 

as follows: 

ss (characters 1-2): If the user selects "Each state in separate NIF3 output files," then the 

initial "ss" is the two-character postal code for the state (e.g., az for Arizona, vt for 

Vermont). If the user selects "All states grouped together in NIF3 output files," then the 

initial "ss" is replaced by "us". 

character 3-4: nr=nonroad, or=onroad, rf=onroad refueling 

characters 5-6: em=NIF3 "emissions" file, ep=NIF3 "emission process" file, pe=NIF3 

"period" file, tr=NIF3 "transmittal" file 

yy (characters 7-8): the two-digit year (e.g., 02 for 2002, 99 for 1999). 

per (characters 9-11): period, ann=annual, mon=monthly. One of these periods is selected in 

the NIF3 Additional Data Panel (see Figure 3-19 above). 

Four files are produced for nonroad NIF3: ssnremyyper.txt, ssnrepyyper.txt, 

ssnrpeyyper.txt, and ssnrtryyper.txt 

Three files are produced for onroad NIF3: ssoremyyper.txt, ssorpeyyper.txt, ssortryyper.txt 

Four files are produced for onroad refueling NIF3: ssrfemyyper.txt, ssrfepyyper.txt, 

ssrfpeyyper.txt, ssrftryyper.txt 

NMIM User Guide 36
How to Simulate Diesel Retrofit Modeling in NMIM 

This section describes the diesel vehicle and equipment retrofit modeling module 

that is part of NMIM. It discusses the required NMIM inputs used to model retrofit 

emission effects for diesel onroad vehicles and nonroad equipment. For guidance on actual 

program input development, the user should consult the EPA document "Guidance for 

Quantifying and Using Emission Reductions from Mobile Source Retrofit Projects in State 

Implementation Plans and Transportation and General Conformity". While the module will 

allow you to specify gasoline vehicles and equipment, the results will be incorrect because it 

does not handle evaporative and refueling emissions correctly. 

 

In this chapter the following topics are discussed: 

 

1. Inputs to the Onroad and Nonroad Retrofit GUI Panels

 

 These inputs include GUI inputs for a few panels depending on whether onroad, 

nonroad or both types are being modeled. Only a few special GUI inputs are required in 

each panel to model retrofits in NMIM. If retrofit is not being modeled then these inputs 

should remain inactive. 

 

2. Inputs Entered in Text Files

 

 The comma delimited text files contain most of the retrofit model parameters. The 

files are created outside of the NMIM program in a text editor and read into the NMIM 

program. Once the files are read into the NMIM program, they will be checked for 

consistency and completeness by NMIM. Error messages will appear if problems are 

encountered. 

 

3. Inputs to other NMIM Panels when Performing a Retrofit Simulation

 

 The retrofit model inside NMIM is not completely independent of other aspects of 

the NMIM code. To complete a successful retrofit model run, the user is required to enter 

proper choices for other NMIM inputs. Error messages will appear if inconsistencies are 

encountered between retrofit and other NMIM inputs. However, this section does not 

attempt to duplicate material covered in other sections of the NMIM User Guide. The 

reader should refer to these sections if additional detail is required. 

 

NMIM User Guide 37
R1. NMIM Navigation Window

 

Figure R-1 shows the overall NMIM Window, and the tabs to each of the individual NMIM 

input panels starting with the Description Panel and ending with the Output Panel. The 

NMIM input (RunSpec) is ready to be executed if all of the tabs are checked “green” or 

appear with yellow tildes. If a ‘red’ exclamation point appears, it means that one or more 

input requirements are not satisfied in that particular NMIM panel. 

 

Most of the specific information required for a retrofit simulation is entered in two panels 

accessed from the Retrofit navigation tab. One panel is used to enter information for onroad 

retrofit simulations and the other panel is used to enter information for nonroad retrofit 

simulations. Figure R-1 shows the sub-navigation tabs for accessing these two 

panels. 

Figure R-1 Overall NMIM Window

 

NMIM User Guide 38
R2. Retrofit / Onroad Panel

The Retrofit / Onroad Panel is shown in Figure R-2. This panel contains the Perform Onroad 

Retrofit Modeling check box, the Retrofit Parameter File Box and the retrofit parameter file 

Diagnostics Results Box. To perform an onroad retrofit simulation in NMIM, the user must 

first select the Perform Onroad Retrofit Modeling button (check mark the small box). This 

selection will activate the onroad retrofit portion of NMIM. Otherwise, the Retrofit / Onroad 

Panel inputs will be ‘grayed out’ and are inactive. The second required action is to select 

the path and file for the Retrofit Parameters File. This text file contains the required retrofit 

parameters (See the Retrofit Parameters File section for more details). A browse button is 

available that allows the user to browse through the system to find the required files. 

Figure R-2 Retrofit Onroad Panel

The Diagnostics Results Box contains the Check Retrofit Parameter File Now button and the 

Results box. The Check Retrofit Parameter File Now button should be selected after all 

NMIM GUI inputs have been made and the Retrofit Parameters File has been completely 

developed and properly selected. Selection of this button tests the NMIM GUI inputs for 

consistency with the Retrofit Parameters File inputs. If the word “Done” appears in the 

Results box, then the retrofit inputs are consistent and the Retrofit / Onroad navigation icon 

should be a ‘green check mark’. If errors, warnings or inconsistencies are present, messages 

will appear in the Results box. In most cases the message will indicate that an input change 

NMIM User Guide 39
needs to be made in the Retrofit Parameters File. An error message will prevent execution 

of the program. If retrofit modeling is being performed in conjunction with fleet modeling, 

the messages may also show inconsistencies between information in the Retrofit Parameters 

and Fleet Information files. Diagnostic messages in the Results box will often provide the 

exact line number(s) where invalid input can be found. Warning messages may also be 

displayed in the Results box. A “warning” condition will not block the execution of the 

simulation. They inform the user that NMIM has detected a possible inconsistency between 

the NMIM GUI inputs, the Retrofit Parameters File, and Fleet Information File. To prevent 

misleading or possibly erroneous emission results, the user should pay close attention to 

warning messages and review suspected inputs. 

R3. Vehicles/Equipment / Onroad Panel 

Figure R-3 Vehicles/Equipment / Onroad Panel

 

 In order to simulate vehicle retrofit, the user must select one or more vehicle classes in the 

Vehicles/Equipment Panel (for more information on this selection, see Section Vehicles / 

Equipment Panel in the NMIM User Guide). NMIM will check vehicle selections made in 

this panel against vehicle class parameters entered in the Retrofit Parameters File. For 

retrofit effects to be calculated, a vehicle class must be selected in Vehicles/Equipment 

Panel and included in the Retrofit Parameters File. 

 

NMIM User Guide 40
If Fleet modeling is also being performed, the vehicles from the Fleet Information File are 

used for the simulation and the inputs on the Onroad Vehicles/Equipment Panel are grayed 

out. The message “This panel is inactive because a fleet is being modeled” will be displayed 

at the top of the panel in this case. NMIM will check for consistency, and issue a warning 

message if the Retrofit Parameters File does not contain the same vehicle classes as the Fleet 

Information File. This consistency check is done because the Fleet calculations require fleet 

size and vehicle VMT information for each vehicle class. 

R4. Pollutants Panel 

Figure R-4 Pollutants Panel

 

In order to simulate vehicle retrofit, the user must select in the Pollutants Panel the particular 

pollutants to be modeled. NMIM will check pollutant selections made in this panel (see the 

NMIM User Guide section Pollutants for an illustration and inputs of this panel) against 

pollutant parameters entered in the Retrofit Parameters File. For retrofit effects to be 

calculated for a given pollutant, that pollutant must be selected in both locations. 

R5. Onroad Retrofit Parameters File 

NMIM User Guide 41
Figure R-5 Onroad Retrofit Parameters File 

 

The Onroad Retrofit Parameters File is a required input to the NMIM model if the user 

wants to model vehicle retrofit effects. It is the comma delimited text file whose path and 

name are specified by the user in the Retrofit / Onroad detail panel in the Retrofit 

Parameters File input box (See the Retrofit / Onroad Section for complete details). It 

contains the bulk of the vehicle retrofit information. The user will need to create his or her 

own Retrofit Parameters File using a text editor such as Wordpad or Notepad or using a 

spreadsheet (i.e., Excel). If a spreadsheet is used, the user should save the file as a comma 

separated variable (CSV) format. 

 

The first row of the Retrofit Parameter File contains the retrofit input parameter names 

separated by commas (tab delimited input files do not work). The first row of the Retrofit 

Parameter File must be a ‘header’ row and not a data row. The remaining rows of the file 

contain the retrofit parameters. There must be no blank rows. Comment or descriptive rows 

are allowed if the first character in the row is the ‘#’ character. There can be no blank rows 

at the end of the file. (Note: the user should be aware that some spreadsheets tend to create 

extra blank records at the end of a delimited file. If not deleted, these may produce error 

messages.) The Retrofit Parameter File contains the following required parameters with the 

corresponding definitions.

 

R5.1 Retrofit Program Index - An arbitrary numbering system used to keep track of the 

retrofit parameters.

 

NMIM User Guide 42
R5.2 Pollutant Abbreviation - This column contains the name of the pollutant that is 

affected by retrofit. The proper spelling and case of the name of the pollutant 

must be strictly observed in the Retrofit Parameters File. Note that these are 

MOBILE6 pollutant names. The valid names are: 

HC SO2 

CO NH3 

NOx BENZ 

CO2 MTBE 

SO4 BUTA 

OCARBON FORM

ECARBON ACET 

GASPM ACRO 

Lead 

 The HC input will affect all exhaust hydrocarbon emission sub-types. CAUTION: In 

NMIM2005, onroad evaporative hydrocarbons receive the same retrofit benefit specified for 

exhaust HC. Thus, it is recommended that retrofit modeling only be used for diesel 

vehicles, which are modeled as having no evaporative emissions. The PM inputs are SO4, 

OCARBON, ECARBON, GASPM, and Lead. These are the PM species which MOBILE6 

models. NMIM output, however, is only total PM10 or PM2.5. Air toxic and Dioxin/Furan 

emissions will not be directly impacted by retrofit, but could be affected if the underlying 

HC or PM emission factor is changed as a result of retrofit. Only gasoline fueled vehicles 

will produce the pollutants GASPM and Lead. Only diesel fueled vehicles will produce 

OCARBON and ECARBON pollutants. 

R5.3 Vehicle Class Name - The Vehicle Class column contains the names of the vehicle 

class types which can be retrofit. The list corresponds to the MOBILE6.2 

vehicle classifications. To prevent errors, the user must enter a vehicle class 

name exactly as specified below (case sensitive). These names are: 

LDGV LDDT12 

LDGT1 LDDT34 

LDGT2 HDDV2b

LDGT3 HDDV3 

LDGT4 HDDV4 

HDGV2b HDDV5 

HDGV3 HDDV6 

HDGV4 HDDV7 

HDGV5 HDDV8a 

HDGV6 HDDV8b

HDGV7 MC 

HDGV8a HDGB 

HDGV8b HDDBT 

LDDV HDDBS 

 

 Where LDGV means light-duty gas vehicle, LDGT means light-duty gas truck, HDGV 

means heavy-duty gas vehicle, LDDV means light-duty diesel vehicle, LDDT means lightNMIM User Guide 43
duty diesel truck, HDDV means heavy-duty diesel vehicle, MC means motorcycle, HDGB 

means heavy-duty gas bus, HDDBT means heavy-duty diesel transit bus, and HDDBS 

means heavy-duty diesel school bus. 

 

 In general, these types are more detailed than the vehicle types which are present in the 

NMIM Vehicles/Equipment / Onroad panel. For example, the Vehicles/Equipment panel 

allows the user to specify HHDDV (heavy heavy-duty diesel vehicles), while the Retrofit 

Parameters File allows the user to separately specify retrofit parameters for both sub-types 

of HHDDV - the heavy-duty diesel 8a class, and the heavy-duty diesel 8b class. Similarly, 

the MHDDV group contains HDDV6 an HDDV7 as members, and the LHDDV group 

contains HDDV3, HDDV4 and HDDV5 as members. Also, the LDGT2,3 category 

contains both LDGT1 and LDGT2, and the LDGT3,4 contains both LDGT3 and LDGT4. 

Finally, the NMIM Diesel Bus category includes both diesel transit buses (HDDBT) and 

diesel school buses (HDDBS). 

 

Because NMIM output has broader vehicle class categories than retrofit inputs, the final 

inventory emission results cannot be specified for the individual retrofit vehicle classes. 

However, retrofit parameters can be entered for the specific classes. For example, emission 

inventory results cannot be generated for only the school bus class (HDDBS). The emission 

results will always contain both the school bus and the transit bus vehicles. However, the 

retrofit effects on ‘school buses only’ can be estimated by performing two separate NMIM 

runs – a baseline no retrofit run and a retrofit school bus / no retrofit transit bus – and take 

the difference. 

R5.4 Initial Calendar Year of Retrofit Implementation - The Initial Calendar Year of 

the Retrofit Implementation is the first calendar year that a retrofit program is 

administered. A valid Initial Calendar Year input must be equal to or less 

than the Final Calendar Year of Retrofit Implementation. Initial Retrofit 

Calendar Year entries that are greater than the NMIM evaluation calendar 

year are ignored, but will generate a warning. All months within a calendar 

year are affected equally by the retrofit.

 

R5.5 Final Calendar Year of Retrofit Implementation - The Final Calendar Year of 

the Retrofit Implementation is the last calendar year that a retrofit program is 

administered. A valid Final Calendar Year input must be equal to or greater 

than Initial Calendar Year of Retrofit Implementation. 

R5.6 Initial Model Year that will be Retrofit - The Initial Model Year that will be 

retrofit is the first model year of coverage for a particular vehicle class / 

pollutant combination. Valid entries for initial model year must meet the 

following mathematical requirement:

 

 Initial Model Year >= Initial Calendar Year - 24 

 

 Also, the Initial Model Year cannot be greater than the Final Model Year that will be 

Retrofit.

NMIM User Guide 44
R5.7 Final Model Year that will be Retrofit - The Final Model Year that will be retrofit 

is the last model year of coverage for a particular vehicle class / pollutant 

combination. The Final Model Year input cannot be less than the Initial 

Model Year that will be Retrofit. Retrofit entries with a Final Model Year 

input greater than the NMIM evaluation calendar year will generate a 

warning; any of the requested model years greater than the evaluation 

calendar year are ignored in NMIM's emission calculations.

 

R5.8 Percentage of the Fleet Retrofit per Year - The Percentage of the Fleet Retrofit 

per Year represents the percentage of VMT of a particular fleet of a particular 

vehicle class, retrofit calendar year group, model year group and pollutant 

combination that is to be retrofit or rebuilt in a given calendar year. For a 

successful retrofit simulation, a value greater than zero and less than or equal 

to 100.0% must be entered. The program also checks to insure that the 

product of the number of calendar years of retrofit coverage (Final Calendar 

Year of Retrofit Implementation minus Initial Calendar Year of Retrofit 

Implementation plus one) times the Percentage of the Fleet Retrofit per Year 

does not exceed 100%. For example, a retrofit simulation would be flagged 

as invalid if it had a retrofit program start in calendar year 2005, a program 

end in calendar year 2008, and a yearly Fleet Retrofit Percentage of 50 

percent (4 times 50% > 100%).

R5.9 Percentage Effectiveness of the Retrofit - The Percentage Effectiveness of the 

Retrofit is the percent emission reduction achieved by a retrofit. It is 

computed from a non retrofit emission baseline. The file input structure 

allows the user to enter a retrofit effectiveness value for a particular vehicle 

class, retrofit calendar year group, model year group and pollutant 

combination. All values between 0% and 100% are valid.

 

In NMIM, a retrofit calculation is performed for each specified combination of: 

 

 Vehicle Class 

Retrofit Calendar Year Group (i.e., the years that a retrofit program was 

implemented) 

 Model Year Group (defined by the beginning and ending model years) 

 Pollutant 

 

 

 Retrofit Emis = [ (%Retrofit*(1-Retrofit Effectiveness)) + (1-%Retrofit) ] * Base Emis 

 Eqn 1a 

 

Where 

 Retrofit Emis is the fleet emission inventory after the retrofit has applied 

 Base Emis is the fleet emission inventory before a retrofit 

 %Retrofit is the Percentage of the Fleet Retrofit per Year 

 Retrofit Effectiveness is the Percentage Effectiveness of the Retrofit 

 

NMIM User Guide 45
A more general form of the Retrofit Equation (shown as Eqn 1b) is used in the program if 

more than one retrofit program is specified for a given pollutant, vehicle class and model 

year group. 

 

 

Retrofit Emis = [ (%Retrofit1*(1-Retrofit Effectiveness1)) + 

 (%Retrofit2*(1-Retrofit Effectiveness2)) ... + ... (%Retrofit (i) *(1-Retrofit 

Effectiveness(i) )) + (1- %Retrofit1 -%Retrofit2 ... - ... %Retrofit (i) ) ] * Base 

Emis Eqn 1b 

 

Where 

 %Retrofit1 + %Retrofit2 ... + %Retrofit(i) <= 100% 

 i < 24 in %Retrofit(i) 

the term ‘i’ is the retrofit program number. Up to 24 retrofit programs may be 

simulated on the same vehicle class, model year range and pollutant combination. 

 

R6. Retrofit / Nonroad Panel

The Retrofit / Nonroad Panel is shown in Figure R-2. This panel is virtually the same as the 

Retrofit / Onroad Panel. It contains the Perform Nonroad Retrofit Modeling check box 

button, the Retrofit Parameter File Box and the retrofit parameter file Diagnostics Results 

Box. To perform a nonroad retrofit simulation in NMIM, the user must first select the 

Perform Nonroad Retrofit Modeling button (check mark the small box). This selection will 

activate the nonroad retrofit portion of NMIM. Otherwise, the Retrofit / Nonroad Panel 

inputs will be ‘grayed out’ and inactive. The second required action is to select the path and 

file for the Retrofit Parameters File. This text file contains the required retrofit parameters 

(See the Retrofit Parameters File section for more details). A browse button is available that 

allows the user to browse through the system to find the required files. 

 

NMIM User Guide 46
Figure R-6 Retrofit Nonroad Panel

 

The Diagnostics Results Box contains the Check Retrofit Parameter File Now button and the 

Results box. The Check Retrofit Parameter File Now button should be selected after all 

NMIM GUI inputs have been made and the Retrofit Parameters File has been completely 

developed and properly selected. Selection of this button tests the NMIM GUI inputs for 

consistency with the Retrofit Parameters File inputs. If the word “Done” appears in the 

Results box, then the retrofit inputs are consistent and the Retrofit / Nonroad navigation icon 

should be a ‘green check mark’. If errors or inconsistencies are present, error messages will 

appear in the Results box. In most cases the message will indicate that an input change 

needs to be made in the Retrofit Parameters File. If retrofit modeling is being performed in 

conjunction with fleet modeling, the messages may also show inconsistencies between 

information in the Retrofit Parameters and Fleet Information files. Diagnostic messages in 

the Results box will often provide the exact line number(s) where invalid input can be 

found. Warning messages may also be displayed in the Results box. A “warning” condition 

will not block the execution of the simulation. They inform the user that NMIM has detected 

a possible inconsistency between the NMIM GUI inputs and the Retrofit and Fleet 

Parameters Files. To prevent misleading or possibly erroneous emission results, the user 

should pay close attention to warning messages. 

 

R7. Vehicles/Equipment / Nonroad Panel 

Figure R-7 Vehicles/Equipment Nonroad Panel

NMIM User Guide 47
 

In order to simulate equipment retrofit, the user must select one or more equipment classes 

in the Vehicles/Equipment Panel (for more information on this selection, see Section 

Vehicles / Equipment Panel in the NMIM User Guide). NMIM will check equipment 

selections made in this panel against equipment parameters entered in the Retrofit 

Parameters File. For retrofit effects to be calculated, the equipment must be selected in 

Vehicles/Equipment Panel and included in the Retrofit Parameters File. 

 

If Fleet modeling is also being performed, the equipment from the Fleet Information File is 

used for the simulation and the inputs on the Nonroad Equipment Panel are “grayed out”. 

The message “This panel is inactive because a fleet is being modeled” will be displayed at 

the top of the panel in this case. NMIM will check for consistency, and issue a warning 

message if the Retrofit Parameters File contains equipment classes that are not in the Fleet 

Information File. Any such retrofit inputs are ignored, since there is no matching equipment 

in the specified fleet. 

R8. Nonroad Retrofit Parameters File 

NMIM User Guide 48
Figure R-8 Nonroad Retrofit Parameters File

 

The Nonroad Retrofit Parameters File is a required input to the NMIM model if the user 

wants to model equipment retrofit effects. It is a comma delimited text file whose path and 

name are specified by the user in the Retrofit / Nonroad detail panel in the Retrofit 

Parameters File input box (See the Retrofit / Nonroad Section for complete details). It 

contains the bulk of the equipment retrofit information. The user will need to create his or 

her own Retrofit Parameters File using a text editor such as Wordpad or Notepad or using a 

spreadsheet (i.e., Excel). If a spreadsheet is used, the user should save the file in a comma 

separated variable (CSV) format. 

 

The first row of the Retrofit Parameter File contains the retrofit input parameter names 

separated by commas (tab or other delimited input files do not work). The first noncomment row of the Retrofit Parameter File must be a ‘header’ row and not a data row. The 

remaining rows of the file contain the retrofit parameters. These rows must be continuous 

and contain no blank rows or non data ‘descriptive’ information. There can be no blank 

rows at the end of the file. (Note: the user should be aware that some spreadsheets tend to 

create extra blank records at the end of a delimited file. If not deleted, these may produce 

error messages.) The Retrofit Parameter File contains the following required parameters 

with the corresponding definitions.

R8.1 Retrofit Program Index - An arbitrary numbering system used to keep track of the 

retrofit parameters. The chosen value has no effect on the results, but may 

affect warnings about different inputs being used in the same retrofit 

program.

R8.2 Pollutant Abbreviation - This column contains the name of the pollutants that are 

affected by retrofit. The proper spelling of the name of the pollutant must be 

strictly observed in the Retrofit Parameters File. The valid names are:

HC 

CO 

NOx 

PM

 

R8.3 SCC - This column contains the Nonroad SCCs of the equipment that are affected 

by retrofit. NMIM2005 is designed to estimate retrofit effects on diesel 

equipment only, so SCCs should be limited accordingly. NMIM2005 will 

allow non-diesel SCCs without warning, but evaporative and refueling 

NMIM User Guide 49
emissions may be incorrect. The SCC can be a full 10-digit SCC, or the more 

global 7 and 4 digit versions. For the definition of a specific SCC, the user 

should consult the NONROAD model user guide or other SCC information 

sources.

 

R8.4 Beginning of HP Range - This column contains the beginning number of the HP 

range for equipment that is affected by retrofit. It cannot be greater in value 

than the End of HP Range entry. This value must match a value that is 

defined in the NONROAD model. The list of possible values are:

 0, 1, 3, 6, 11, 16, 25, 40, 50, 75, 100, 175, 

300, 600, 750, 1000, 1200, 2000, 3000, 9999

In NONROAD, the HPs modeled will be HPbeg < x <= HPend. E.g., if the 

Beginning of HP Range is 100, and the End of HP Range is 600, then only 

equipment with rated horsepower greater than 100 and less than or equal to 

600 will be modeled. Equipment rated at 100 hp will not be modeled. 

 

R8.5 End of HP Range - This column contains the ending number of the HP range for 

equipment that is affected by retrofit. It must be greater than the Beginning 

of the HP Range entry, due to the way HP ranges are interpreted (as 

described above in R8.4). This value must match a value that is defined in 

the NONROAD model. The list of possible values is provided above in 

Section R8.4 (Beginning of HP Range). 

R8.6 Technology Type - This column contains the Technology Type for the equipment 

that is affected by retrofit. This entry, if used, must match one of the 

allowed Technology Types in the NONROAD model. The list of possible 

diesel entries includes the following:

Base (pre-1988 uncontrolled)

T0 (1988 and later uncontrolled, but with some benefits from truck controls)

T1 (Tier 1, applies only to engines <= 750 hp)

T2 (Tier 2, all hp land-based diesels and <= 50 hp recreational marine)

T3 (Tier 3, 100-750 hp only)

T3B (Tier 3, 75-100 hp only)

T4A (Transitional Tier 4 for engines <= 75 hp)

T4B (Final Tier 4 for engines <= 25 hp)

T4 (Final Tier 4 PM controls 25-750 hp; transitional Tier 4 PM for >750hp)

T4N (Full Tier 4 PM and NOx controls for engines > 75 hp)

BaseM (pre-1988 uncontrolled recreational marine) 

T0M (1988 and later uncontrolled rec marine <= 50 hp) 

T1M (Tier 1 recreational marine, applies only to engines <= 50 hp) 

T2M (Tier 2 controls for recreational marine > 50 hp only) 

T3M (Tier 3 controls for recreational marine, interim Tier 3 for 25-100 hp) 

T4M (Tier 3 final controls for recreational marine 25-100 hp)

NMIM User Guide 50
If “ALL” is used (or if this field is left blank), the retrofit applies to all 

Technology Types that exist in the chosen model year range. 

R8.7 Initial Calendar Year of Retrofit Implementation - The Initial Calendar Year of 

the Retrofit Implementation is the first calendar year that a retrofit program is 

administered. A valid Initial Calendar Year input must be equal to or less 

than the Final Calendar Year of Retrofit Implementation. Retrofit entries with 

an Initial Retrofit Calendar Year greater than the NMIM evaluation calendar 

year will generate a warning, but are ignored in NMIM's emission 

calculations. All months within a calendar year are affected equally by the 

retrofit.

 

R8.8 Final Calendar Year of Retrofit Implementation - The Final Calendar Year of 

the Retrofit Implementation is the last calendar year that a retrofit program is 

administered. A valid Final Calendar Year input must be equal to or greater 

than Initial Calendar Year of Retrofit Implementation. If any requested 

Retrofit Calendar Years are greater than the evaluation calendar year a 

warning will be generated; those years are simply ignored in NMIM's 

calculation of retrofit effects.

R8.9 Initial Model Year that will be Retrofit - The Initial Model Year that will be 

retrofit is the first model year of coverage for a particular equipment class / 

pollutant combination. Valid entries vary widely across equipment types. 

Some equipment types have very short useful lives (e.g., chain saws) and 

correspondingly tight model year ranges. On the other hand, other equipment 

types (e.g., large infrequently used diesel equipment) may have very long 

lives (e.g., 50 years) and correspondingly large model year ranges. For 

additional details on this input the user is referred to the NONROAD Model 

User Guide. Any requested model years that are outside of the existing range 

for a given equipment type will generate a warning, but they are simply 

ignored in NMIM's calculation of retrofit effects. 

 

The Initial Model Year of Retrofit cannot be greater than the Final Model 

Year of Retrofit.

R8.10 Final Model Year that will be Retrofit - The Final Model Year that will be 

retrofit is the last model year of coverage for a particular set of engines and 

affected pollutant. The Final Model Year input cannot be less than the Initial 

Model Year that will be Retrofit. Retrofit entries with a Final Model Year 

input greater than the NMIM evaluation calendar year will generate a 

warning; any of the requested model years greater than the evaluation 

calendar year are ignored in NMIM's emission calculations. 

 

NMIM User Guide 51
R8.11 Percentage of the Fleet Retrofit per Year - The Percentage of the Fleet Retrofit 

per Year represents the percentage of hours per year of a particular fleet of a 

particular equipment, retrofit calendar year group, model year group and 

pollutant combination that is to be retrofit or rebuilt in a given calendar year. 

For a successful retrofit simulation, a value greater than zero and less than or 

equal to 100% must be entered. The program also checks each retrofit entry 

individually to ensure that the product of the number of calendar years of 

retrofit coverage (Final Calendar Year of Retrofit Implementation minus 

Initial Calendar Year of Retrofit Implementation plus 1) times the Percentage 

of the Fleet Retrofit per Year does not exceed 100%. For example, a retrofit 

simulation would be flagged as invalid if it had a retrofit program start in 

calendar year 2005, a program end in calendar year 2007, and a yearly Fleet 

Retrofit Percentage of 50 percent (3 times 50% > 100%).

R8.12 Percentage Effectiveness of the Retrofit - The Percentage Effectiveness of the 

Retrofit is the percent emission reduction achieved by a retrofit. The file 

input structure allows the user to enter a retrofit effectiveness value for a 

specific combination of equipment, retrofit calendar year group, model year 

group and pollutant. All values between 0% and 100% are valid.

 

 A value of 0% (or removal of that entire retrofit entry) will compute a non 

retrofit baseline emission quantity.

Nonroad Retrofit Modeling uses the same formulas as Onroad Retrofit Modeling except that 

the calculations are performed for the SCC, Tech Type, and HP range instead of the Vehicle 

Class. See the Onroad Retrofit Parameters File section for information on the calculations 

being performed. 

NMIM User Guide 52
NMIM User Guide 53
How to Simulate Fleet Modeling in NMIM 

This section describes the vehicle and equipment fleet modeling module that is part of 

NMIM. It discusses the required NMIM inputs that allow the user to specify fleet 

populations and annual miles traveled or hours of operation. The general structure of this 

chapter is: 

 1. Inputs to the Onroad and Nonroad Fleet GUI Panels 

 These inputs include GUI inputs that depend on whether the Fleet modeling option is 

selected for onroad, nonroad or both types. Only a few special GUI inputs are required in 

each panel to perform Fleet modeling in NMIM. If the Fleet option is not selected these 

inputs should remain inactive. 

 2. Inputs Entered in Text Files 

The comma delimited text files contain most of the required Fleet parameters. The files are 

created outside of the NMIM program in a text editor and read into the NMIM program. 

Once the files are read into the NMIM program, they will be checked for consistency and 

completeness by NMIM. Error or warning messages will appear if problems are 

encountered. 

3. Inputs to other NMIM Panels when Performing a Fleet Simulation 

The Fleet model inside NMIM is not completely independent of other aspects of the NMIM 

code. To complete a successful Fleet model run, proper choices for other inputs need to be 

entered by the user. Note that retrofits may be applied to fleets. Error or warning messages 

will appear if inconsistencies are encountered. However, this section does not attempt to 

duplicate material previously covered in the other NMIM User Guide sections. The reader 

should refer to these sections if additional detail is required. 

F1. NMIM Navigation Window 

Figure F-1 shows the overall NMIM Window, and the tabs to each of the individual NMIM 

input panels starting with the Description Panel and ending with the Output Panel. The 

NMIM input (RunSpec) is ready to be executed if all of the tabs are checked “green” or 

appear with yellow tildes. If ‘red’ exclamation points appear, it means that one or more 

input requirements are not satisfied in that particular NMIM panel. 

 Most of the information required specifically for a fleet simulation is entered in two panels 

accessed from the Fleet navigation tab. One panel is used to enter information for onroad 

fleet simulations and the other panel is used to enter information for nonroad fleet 

simulations. Figure F-1 shows the sub-navigation tabs for accessing these two panels. 

NMIM User Guide 54
Figure F-1 Overall NMIM Window

F2. Geography Panel 

Figure F-2 shows the Geography Panel. In this panel, the user can choose the geographical 

region or fleet level that they wish to simulate. The user may simulate an individual county 

or group of counties, a particular state or group of states or the entire USA nation. See the 

‘Geography Panel” section of this user guide a complete description of the panel and its 

parameters. 

NMIM User Guide 55
Figure F-2 Geography Panel 

For fleet modeling, the user should select the "Fleet" button and then choose a single 

county. (Multiple counties or states can be modeled with the same fleet in each county by 

selecting the "State" or "County" button and then checking the "Perform Fleet Modeling" 

checkbox in the Fleet / Onroad panel or the Fleet / Nonroad panel.) 

The Fleet option also requires that a valid Fleet Information File (Onroad or Nonroad) be 

selected and used in the simulation (see Section F-5 or F-8, Fleet Information Parameters 

File for more details). If the Fleet option is chosen, NMIM will simulate the specified fleet 

of vehicles and (if requested) apply various amounts of retrofit control to the fleet. The 

program is designed so that the user may simulate a fleet that contains one vehicle of one 

particular vehicle class, or simulate millions of vehicles of every type of vehicle class. Just 

as in a normal NMIM run, the chosen county will supply important modeling parameters to 

the simulation, such as fuel parameters, temperature and humidity, control programs, speed 

distributions, and monthly VMT distributions, etc. In essence, the user-defined fleet will be 

simulated to reside in the chosen county and behave similarly to other vehicles of the same 

type in that county. 

F3. Fleet / Onroad Panel 

The Fleet / Onroad Panel is shown in Figure F-3. This panel contains the Perform Onroad 

Fleet Modeling check box button, the Fleet Information File Box and the fleet information 

NMIM User Guide 56
file Diagnostics Results Box. To perform an onroad fleet simulation in NMIM, the user 

must first select the Perform Onroad Fleet Modeling button (check mark the small box). 

This selection will activate the onroad fleet portion of NMIM. Otherwise, the Fleet / Onroad 

Panel inputs will be ‘grayed out’ and all onroad NMIM fleet options will be inactive. The 

second required action is to select the path and file for the Fleet Information File. This text 

file contains the required fleet information (See the Fleet Information File section for more 

details). A browse button is available that allows the user to browse through their system to 

find the required files. 

Figure F-3 Fleet Onroad Panel 

 The Diagnostics Results Box contains the Check Fleet Information File Now button and 

the Results box. The Check Fleet Information File Now button should be selected after all 

NMIM GUI inputs have been made and the Fleet Information File has been completely 

developed and properly selected. Selection of this button tests the NMIM GUI inputs for 

consistency with the Fleet Information File inputs. If the word “Done” appears in the 

Results box, then the fleet inputs are consistent and the Fleet / Onroad navigation icon 

should be a ‘green check mark’. If errors or inconsistencies are present, error or warning 

messages will appear in the Results box. In most cases the message will indicate that an 

input change needs to be made in the Fleet Information File. Diagnostic messages in the 

Results box will often provide the exact line number(s) where invalid input can be found. 

Warning messages may also be displayed in the Results box. A “warning” condition will 

not block the execution of the simulation. They inform the user that NMIM has detected a 

possible inconsistency between the NMIM GUI inputs and the Fleet Information File. To 

NMIM User Guide 57
prevent misleading or possibly erroneous emission results, the user should pay close 

attention to warning messages. 

F4. Onroad Vehicles Panel 

 Figure F-4 Onroad Vehicles Panel 

Figure F-4 shows the Onroad Vehicles/Equipment Panel when onroad fleet modeling is 

being performed. All the inputs on this panel are disabled and a message is displayed saying 

“This panel is inactive because a fleet is being modeled.” When a fleet is being modeled, the 

vehicle classes are taken from the Fleet Information File instead of from this panel. The 

presence or absence of selections on this grayed out panel do not affect the results. 

F5. Onroad Fleet Information Parameters File 

 The Fleet Information Parameters File is a required input to the NMIM model if the user 

wants to model a specified fleet. It is a comma delimited text file whose path and name are 

specified by the user in the Fleet / Onroad detail panel in the Fleet Information Parameters 

File input box (See the Fleet / Onroad Section for complete details). It contains the vehicle 

fleet size information and the average vehicle miles traveled per year per vehicle. The user 

will need to create his or her own Fleet Information Parameters File using a text editor such 

as Wordpad or Notepad or using a spreadsheet (i.e., Excel). Figure F-5 shows an example in 

Notepad. If a spreadsheet is used, the user should save the file as a comma separated 

variable (CSV) format. 

NMIM User Guide 58
Figure F-5 Onroad Fleet Information Parameters File 

 The first row of the Fleet Information File contains the fleet information input field names 

separated by commas. The first row of the Fleet Information File must be a ‘header’ row 

and not a data row. The remaining rows of the file contain the fleet information input. 

These rows must be continuous and contain no blank rows. Descriptive or comment rows 

can be added to the file but they must include the ‘#’ character in the first column. However, 

do not put # in from of the header row. A comment row cannot be the first row of the file. 

 Also, there can be no blank rows at the end of the file. (Note: the user should be aware that 

some spreadsheets tend to create extra blank records at the end of a delimited file. If not 

deleted, these may produce error messages.) The Fleet Information Parameter File 

contains the following required parameters with the corresponding definitions. 

F5.1 Vehicle Class Name - The Vehicle Class column contains the names of the vehicle 

class types that can be included in a fleet. The list corresponds to the MOBILE6.2 vehicle 

classifications. To prevent errors, the user must enter a vehicle class name exactly as 

specified below (case sensitive). These names are: 

LDGV LDDT12 

LDGT1 LDDT34 

LDGT2 HDDV2b

LDGT3 HDDV3 

LDGT4 HDDV4 

HDGV2b HDDV5 

HDGV3 HDDV6 

HDGV4 HDDV7 

HDGV5 HDDV8a 

HDGV6 HDDV8b

HDGV7 MC 

HDGV8a HDGB 

HDGV8b HDDBT 

LDDV HDDBS 

F5.2 Vehicle Model Year - This is the model year of the particular vehicle class in the 

Fleet. Grouping of model years is not allowed in this input. All four digits of 

the model year must be entered. The range of allowable model years is from 

1951 through 2050. 

F5.3. Fleet Size by Vehicle Class and Model Year (Number of Vehicles) - The Fleet 

Size input is the total number of vehicles of a particular vehicle class and 

model year in a simulated Fleet created by the user. Any integer value 

NMIM User Guide 59
greater than zero may be entered as input. The Fleet Size parameter is 

multiplied by the per vehicle emission rate internally in the Fleet 

calculations. The final emission result is directly proportional to the number 

of vehicles specified in the Fleet Size parameter. 

F5.4. Annual Vehicle Miles Traveled (VMT) per Vehicle - The Annual VMT per 

Vehicle input is the number of miles per vehicle that a particular vehicle 

class, and model year is expected to travel in the year specified in the Time 

panel. Any non negative value may be specified for a given Vehicle class 

and model year group. The product of Total Fleet Size and VMT per 

Vehicle will become the total VMT for the particular “Fleet”. 

F6. Nonroad Fleet Information Parameters File 

Figure F-6 Fleet Nonroad Panel 

The Fleet / Nonroad Panel is shown in Figure F-6. This panel contains the Perform Nonroad 

Fleet Modeling check box button, the Fleet Information File Box and the fleet information 

file Diagnostics Results Box. 

To perform a nonroad fleet simulation in NMIM, the user must first select the Perform 

Nonroad Fleet Modeling button (check mark the small box). This selection will activate the 

nonroad fleet portion of NMIM. Otherwise, the Fleet / Nonroad Panel inputs will be ‘grayed 

out’ and inactive. 

NMIM User Guide 60
The second required action is to select the path and file for the Fleet Information File. This 

text file contains the required fleet information (See the Fleet Information File section for 

more details). A browse button is available that allows the user to browse through their 

system to find the required files. 

The Diagnostics Results Box contains the Check Fleet Information File Now button and the 

Results box. The Check Fleet Information File Now button should be selected after all 

NMIM GUI inputs have been made and the Fleet Information File has been completely 

developed and properly selected. 

Selection of this button tests the NMIM GUI inputs for consistency with the Fleet 

Information File inputs. If the word “Done” appears in the Results box, then the fleet inputs 

are consistent and the Fleet / Nonroad navigation icon should be a ‘green check mark’. If 

errors or inconsistencies are present, error or warning messages will appear in the Results 

box. In most cases the message will indicate that an input change needs to be made in the 

Fleet Information File. 

Diagnostic messages in the Results box will often provide the exact line number(s) where 

invalid input can be found. Warning messages may also be displayed in the Results box. A 

“warning” condition will not block the execution of the simulation. They inform the user 

that NMIM has detected a possible inconsistency between the NMIM GUI inputs and the 

Fleet Information File. To prevent misleading or possibly erroneous emission results, the 

user should pay close attention to warning messages. 

F7. Nonroad Equipment Panel 

Figure F-7 shows the Nonroad Equipment Panel when nonroad fleet modeling is being 

performed. All the inputs on this panel are disabled and a message is displayed saying “This 

panel is inactive because a fleet is being modeled.” When a fleet is being modeled, the 

equipment classes are taken from the Fleet Information File instead of from this panel. 

NMIM User Guide 61
Figure F-7 Nonroad Equipment Panel 

F8. Nonroad Fleet Information Parameters File 

The Nonroad Fleet Information Parameters File is a required input to the NMIM model if 

the user wants to model “Fleet” equipment population and usage effects. It is a comma 

delimited text file whose path and name are specified by the user in the Fleet / Nonroad 

detail panel in the Fleet Information Parameters File input box (See the Fleet / Nonroad 

Section for complete details). It contains the equipment fleet size information and the 

average equipment hours operated per year per piece of equipment. The user will need to 

create his or her own Fleet Information Parameters File using a text editor such as Wordpad 

or Notepad or using a spreadsheet (e.g., Excel). If a spreadsheet is used, the user should 

save the file as a comma separated variable (CSV) format. 

NMIM User Guide 62
Figure F-8 Nonroad Fleet Information Parameters File 

The first non-comment row of the Fleet Information File contains the fleet information input 

field names separated by commas. 

The second row contains the field names for the monthly distributions of the hours/year. The 

remaining rows of the file contain the fleet information input. These rows must be 

continuous and contain no blank rows or non data ‘descriptive’ information. 

Descriptive or comment rows can be added to the file but they must include the ‘#’ character 

in the first column. 

There can be no blank rows at the end of the file. (Note: the user should be aware that some 

spreadsheets tend to create extra blank records at the end of a delimited file. If not deleted, 

these may produce error messages.) 

The Fleet Information Parameter File contains the following required parameters with the 

corresponding definitions. 

Each complete Fleet Information record takes two lines in the file. Fields are comma 

separated. White space (blanks or tabs) is permitted between fields and shall be ignored. The 

lines contain the following information: 

Line 1 Field List 

 F8.1 SCC - This column contains the Nonroad SCCs of the equipment to be modeled. 

The SCC must be a full 10-digit SCC, NOT the more global 7 and 4 digit 

versions. The valid SCCs are any Nonroad SCC in the NMIM county 

database. The total number of valid SCCs is quite large and cannot be 

reproduced in this guide. For the definition of a specific SCC, the user 

should consult the NONROAD model user guide or other SCC information 

sources. 

F8.2 HPmax – The upper end of a single specific NONROAD HPmax to which the 

equipment belongs, the list of valid values are: 

 0, 1, 3, 6, 11, 16, 25, 40, 50, 75, 100, 175, 300, 600, 750, 1000, 1200, 2000, 3000, 9999 

NMIM User Guide 63
F8.3 Model Year – The model year of the equipment being modeled. 

 

F8.4 Technology Type – This column contains the Technology Type for the equipment 

that is included in the fleet. This entry, if used, must match one of the 

allowed Technology Types in the NONROAD model. The list of possible 

diesel entries includes the following: 

 

Base (pre-1988 uncontrolled)

T0 (1988 and later uncontrolled, but with some benefits from truck controls) 

T1 (Tier 1, applies only to engines <= 750 hp) 

T2 (Tier 2, all hp land-based diesels and <= 50 hp recreational marine) 

T3 (Tier 3, 100-750 hp only) 

T3B (Tier 3, 75-100 hp only) 

T4A (Transitional Tier 4 for engines <= 75 hp) 

T4B (Final Tier 4 for engines <= 25 hp) 

T4 (Final Tier 4 PM controls 25-75 hp; transitional Tier 4 PM for >750hp) 

T4N (Full Tier 4 PM and NOx controls for engines > 75 hp) 

BaseM (pre-1988 uncontrolled recreational marine) 

T0M (1988 and later uncontrolled rec marine <= 50 hp) 

T1M (Tier 1 recreational marine, applies only to engines <= 50 hp) 

T2M (Tier 2 controls for recreational marine > 50 hp only) 

T3M (Tier 3 controls for recreational marine, interim Tier 3 for 25-100 hp) 

T4M (Tier 3 final controls for recreational marine 25-100 hp) 

If “ALL” is used (or if this field is left blank) the fleet emissions will be a weighted average 

of the Technology Types that exist for the chosen SCC and model year. This could be used 

if the model year is known, but the technology type is not known. 

F8.5 Population – The number of pieces of equipment / vehicles in the simulated fleet 

 

F8.5 Activity – The hours per year this equipment is operated. If this is "DEFAULT" the 

simulation uses the default NONROAD hrs/year) 

 

Line 2 Field List

F8.6 Monthly Activity Allocation – Either just the word “DEFAULT” (without quotes) 

or twelve monthly activity fractions, comma separated, which add up to 1.000 ± 0.001. If the 

NMIM User Guide 64
monthly activity allocation input for a given record is DEFAULT, then NMIM would use 

the monthly allocations for the closest matching SCC in the NONROAD seasonality file as 

specified in the OPT file generated by NMIM for the given model run (typically 

SEASON.DAT). 

 

Same file as shown above with commenting

NMIM User Guide 65
Command Line and API Usage 

Introduction 

This document describes the command line and API usage for the NMIM Java application. 

The NMIMCommandLine class is used to run NMIM without any GUI. Like the 

NMIMGUI class, NMIMCommandLine runs the master portion of NMIM and thus requires 

at least one NMIM worker application to run on the local file system. It should be noted that 

running the command line version of NMIM does not automatically start a worker; the user 

is still required to manually start a worker to provide results for NMIM. 

Terminology 

batch mode: NMIM is invoked with command line arguments by executing: 

 >java gov.epa.otaq.nmim.core.NMIMCommandLine 

NMIMCommandLine will not display any GUI and NMIMEngine is invoked for the 

specified RunSpec file(s). This mode can run more than one RunSpec and automatically 

saves NMIMError and NMIMOutput rows for each RunSpec. Other intermediate files 

are saved as specified from the command line arguments. 

GUI mode: NMIM is invoked by executing: 

>java gov.epa.otaq.nmim.runspecgui.NMIMGUI 

 The main window is displayed and the user can edit and/or execute a single RunSpec file. 

API

A new class, NMIMAPI, provides an API for NMIM in both batch and GUI modes. NMIM 

in batch mode can be entirely controlled by command line arguments, which are described 

in greater detail later in this document. Alternatively, an external Java program can invoke 

the various member functions of NMIMAPI to achieve the same purpose. As done within 

NMIMCommandLine, the basic method can be followed by programmatically invoking 

NMIMCommandLine with command line arguments or by following this high-level 

process: 

1) Call NMIMAPI's openLogFileWriter() 

2) Fill in the runSpecFileList 

3) Fill in the desired file switches (e.g. m6in, etc...) 

4) Set the desired output directory 

5) Set the error level 

6) Call runBatch() 

 7) Call closeLogFileWriter() 

NMIM User Guide 66
Command Line Arguments 

To run NMIM in batch mode, specify one or more command line arguments to the 

NMIMCommandLine class's main function. The arguments are separated by whitespace 

and individual switches begin with a dash char, "-". Some arguments expect a parameter 

such as path and name of a file. These parameters are separated from their switches by a 

space and can be enclosed by double quotes if the specified names contain any spaces. 

Argument Parameters Purpose or function 

-m6in None Indicates whether to save mobilex.in files. 

-m6svmt None Indicates whether to save SVMT files. 

-m6tb1 None Indicates whether to save aggregated mobilex.tb1 file from the worker. 

-m6err None Indicates whether to save mobilex.err files. 

-m6errtxt None Indicates whether to save M6error.txt files. 

-m6process None Indicates whether to save ProcessOutput.txt files produced by MOBILE. 

-nropt None Indicates whether to save NONROAD .opt files. 

-nrmsg None Indicates whether to save NONROAD .msg files. 

-nrout None Indicates whether to save NONROAD .out files. 

-nrprocess None Indicates whether to save ProcessOutput.txt files produced by 

NONROAD. 

-r RunSpec file 

name and path 

Specifies the location and name of a RunSpec file. If not using the "-rl" 

argument, then there should be at least one occurrence of "-r". 

-o Output folder 

name and path. 

Specifies the location of the output files saved during batch mode. If not 

specified, then the current directory will be used. 

NOTE: This is a name of a directory, not the name of a file. 

Also, if using double quotes to specify the directory path, you cannot 

use a trailing backslash. 

-e 1 - 5 Specifies the level of errors that should be logged into the log file. 

1 = only RUN_ERROR types should be logged. 

2 = ERROR and RUN_ERROR types should be logged. 

3 = WARNING, ERROR, RUN_ERROR types should be logged. 

4 = INFO, WARNING, ERROR, RUN_ERROR types should be logged. 

5 = all error types should be logged. 

-rl RunSpec list 

file name and 

path 

Specifies the location and name of a file that contains a list of RunSpec 

files to run. See "RunSpec List File Format" below. 

-ol Options list file 

name and path 

Specifies the location and name of a file that contains a list of options. 

See "Options List File Format" below. 

RunSpec List File Format 

A RunSpec list file can have any valid name and extension but must specify the location and 

name of a single RunSpec per line. One example: 

nrtest01.runspec 

nrmobile1.xml 

c:\temp\nrmobile2.xml 

This list file specifies three files, the first two (having implicit relative paths) are expected to 

be in the current directory. The third file is identified by an absolute path. 

NMIM User Guide 67
NMIM User Guide 68
Options List File Format 

An options list file can also have any valid name and extension, each option is specified on a 

single line. The presence of an option indicates that the option is "selected"; likewise the 

absence of an option indicates a "non-selection". Only the first ten command line arguments 

as displayed in the above table can be used in an options list file (i.e. the "switch" 

arguments). One example: 

-m6in 

-m6svmt 

-m6tb1 

-m6err 

-m6errtxt 

-m6process 

-nropt 

-nrmsg 

-nrout 

-nrprocess 

This file indicates that all ten types of optional intermediate files should be saved. Note that 

each option is also preceded by the dash char, "-". 

Parsing Errors / Validation 

To ensure that an NMIM batch can run to completion (barring any RunSpec-specific errors), 

all command line arguments validation is done at the beginning. If a RunSpec file, whether 

specified by the "-r" argument or in a list file, doesn't exist, NMIM will stop and complain 

about the invalid RunSpec file. The same applies to the RunSpec list file itself and the 

options list file. Also, if the error level is not between 1 and 5 (inclusive), then NMIM will 

complain and exit. Finally, if the specified output directory (from the "-o" switch" doesn't 

exist NMIM will exit. 

If NMIM stops immediately due to parsing errors, the command line usage is written to the 

stdout stream (i.e. console window). 

Examples: 

This example specifies both an options list file and a RunSpec list file, along with an error 

level of "5" (report all error types) and an output directory "c:\temp\batchtest06": 

C:\EPA\NMIM\NMIMSource>java gov.epa.otaq.nmim.core.NMIMCommandLine -ol 

optionslist.txt -rl runspeclist.txt -e 5 -o "c:\temp\batchtest06" 

This example specifies that only mobilex.tb1 files should be saved to "c:\temp\batchtest07" 

and two RunSpecs (in the current directory) should be executed: 

C:\EPA\NMIM\NMIMSource>java gov.epa.otaq.nmim.core.NMIMCommandLine -m6in -r 

mobile01.xml -r mobile02.xml -e 5 -o "c:\temp\batchtest07" 

NOTE: if using double quotes to specify the directory path, you cannot use a trailing 

backslash. Also, the use of double quotes is not necessary, unless of course, the pathname 

contains space chars.

NMIM User Guide 69
Output Directories and Files 

NMIM in batch mode will not create the output directory from the "-o" switch; it will only 

ensure that this directory exists before starting the RunSpec batch runs. Likewise, NMIM 

will not delete any existing files in the output directory, but might overwrite any existing 

files should they happen to have the same filenames. 

The proposed naming scheme supplied by EPA was implemented. Saved output files are 

named as follows: 

 MmmyyyyCsscccRbasefilename.extension, 

where: 

First char = "M" or "N" corresponding to MOBILE or NONROAD, respectively. 

mm = The two-digit month of the output. 

yyyy = The four-digit year of the output. 

ss = The two-digit FIPSStateId of the output. 

ccc = The three-digit FIPSCountyId of the output. 

basefilename = The "base" name of the RunSpec file (without path or extension). 

extension = The extension of the corresponding output file that was captured, such as ".in" 

or ".opt". 

NMIMOutput, NMIMError, and the Log File

Every RunSpec executed during batch mode will produce a table dump from NMIMOutput 

and NMIMError in the output directory: 

nmimerror23Rnrtest01.txt is an example of an NMIMError table dump for RunSpec 

"nrtest01" for RunID = 23. 

nmimerror43Rnrmobile1.txt is an example of an NMIMOutput table dump for RunSpec 

"nrmobile1" for RunID = 43. 

With the .txt extension, the table dump files can easily be imported in MS Excel. 

Each invocation of NMIM in batch mode will create a corresponding log file that contains 

high-level NMIM output and any errors that are in the specified error level range. The log 

file, called "nmimbatch.log", is saved to the current directory. One example: 

12/2/02 12:02 PM **** Started NMIM 

12/2/02 12:02 PM Running C:\EPA\NMIM\NMIMSource\nrtest01.runspec 

12/2/02 12:03 PM Running C:\EPA\NMIM\NMIMSource\nrmobile1.xml 

12/2/02 12:05 PM Unable to copy the file: 

C:\TEMP\RetrieveProcessingTemp62930\mobilex.err 

12/2/02 12:05 PM Unable to copy the file: 

C:\TEMP\RetrieveProcessingTemp62930\M6ERROR.TXT 

12/2/02 12:05 PM Running C:\EPA\NMIM\NMIMSource\nrmobile2.xml 

12/2/02 12:07 PM Unable to copy the file: 

C:\TEMP\RetrieveProcessingTemp62934\mobilex.err 

12/2/02 12:07 PM Unable to copy the file: 

C:\TEMP\RetrieveProcessingTemp62934\M6ERROR.TXT 

12/2/02 12:08 PM **** Ended NMIM 

This example output shows the start and stop times of NMIM in batch mode along with a 

timestamp line for each RunSpec that it executed. The "unable to copy file" lines were 

NMIM User Guide 70
created since the "-m6err" and "-m6errtxt" switches were used, but MOBILE did not 

produce these files during either iteration, and as such, these files could not be saved to the 

output directory. 

Output File List 

Assuming a RunSpec with name "nrmobile1", for Autauga Alabama and Jan. 1999, MOBILE output files: 

File Name File Type 

M011999C01001Rnrmobile1.txt ProcessOutput.txt captured from MOBILE. 

M011999C01001Rnrmobile1.0 SPEED VMT for scenario 0 

M011999C01001Rnrmobile1.1 SPEED VMT for scenario 1 

M011999C01001Rnrmobile1.2 SPEED VMT for scenario 2 

M011999C01001Rnrmobile1.3 SPEED VMT for scenario 3 

M011999C01001Rnrmobile1.4 SPEED VMT for scenario 4 

M011999C01001Rnrmobile1.5 SPEED VMT for scenario 5 

M011999C01001Rnrmobile1.6 SPEED VMT for scenario 6 

M011999C01001Rnrmobile1.7 SPEED VMT for scenario 7 

M011999C01001Rnrmobile1.8 SPEED VMT for scenario 8 

M011999C01001Rnrmobile1.in mobilex.in 

M011999C01001Rnrmobile1.tb1 mobilex.tb1 (aggregated from the worker) 

M011999C01001Rnrmobile1.m6error.txt M6error.txt 

M011999C01001Rnrmobile1.err mobilex.err 

Assuming a RunSpec with name "nrmobile1", for Autauga Alabama and Jan. 1999, NONROAD output files: 

File Name File Type 

N011999C01001Rnrmobile1.txt ProcessOutput.txt captured from NONROAD. 

N011999C01001Rnrmobile1.msg NONROAD .msg file 

N011999C01001Rnrmobile1.opt NONROAD .opt file 

N011999C01001Rnrmobile1.out NONROAD .out file 

NMIM User Guide 71
Distributed Processing Algorithm Overview 

Introduction 

This document describes the concepts and algorithms involved with the NMIM distributed 

processing architecture. 

Overall Architecture 

The NMIM distributed computing architecture allows a dynamic set of worker computers to 

perform calculations for one or more master computers without requiring anything more 

than standard file-server services for communications. Other highlights include: 

• All work files stored temporarily on the file server are compressed before being 

stored so as to minimize network bandwidth. 

• Worker programs perform directory scans of the file server’s shared directory 

approximately every 15 seconds when idle and not at all when busy processing a work 

file (which can last from 30 to 250 seconds) 

• Worker computers may be disconnected and the system will automatically detect this 

and safely reroute data to the remaining workers, including data that was already being 

processed by a disconnected worker. 

IDs 

Each system has an ID. There are two classes of ID’s: Masters and Workers. To own a 

specific ID, a system must create a temporary file in the shared folder. The file is typically 

empty and must be named as follows: 

 “MSTR” + ID + “.ID” (for Master ID’s) 

 “WRKR” + ID + “.ID” (for Worker ID’s) 

NMIM User Guide 72
Work Files 

All work is broken up into digestible pieces and bundled into single Java JAR files called 

“work” files. The name of these files encodes pieces of information. The name has the 

following format: 

MID_QID_TYPE_STATE

There are four elements of data delimited by three underscore characters. This fixed format 

allows simple wildcard file searches to find files with a specific field. 

Glossary 

 MID – Master ID. This uniquely identifies a single master application instance. 

 QID – Queue ID. This uniquely identifies a specific queued job within a master 

application context. 

 WID – Worker ID. This uniquely identifies a specific worker application 

instance. 

 TYPE – Work File Type. Currently this is either “M6” for a MOBILE6 data 

queue file or “NR” for a NONROAD data queue file. 

 STATE – The state of the file in the distributed processing pipeline. This can be 

one of the following: 

o “TEMP”: Used when a system is building a file but the file isn’t 100% 

ready for another system to process. Typically a file is built in this state and 

immediately renamed to another state. 

o “TODO”: A work file that is completely built and ready for a worker 

system to claim and process. 

o “InProgress” + WID: Used when a work file is claimed by a specific 

worker system and is being actively processed. 

o “DONE”: Used when a work file is completely processed and ready for 

the Master system to retrieve it. 

Algorithm Outline 

The following sections give the high-level steps involved in the distributed processing. 

Master Computer Builds Input Files 

1. Builds or copies work file into shared folder with a file name STATE of “TEMP”. 

2. Renames completed file with STATE of “TODO” 

3.

Worker Computer Processes Files 

3. Detect files with a STATE of “TODO”: *_*_*_TODO 

4. Set the state to InProgressWID where WID is the worker’s ID. 

5. Verify atomic rename success. On failure return to idle state. 

6. Copy/unjar file to private folder 

7. Process distributed work data. Build single result file in shared folder. STATE is 

“TEMP” 

NMIM User Guide 73
NMIM User Guide 74

8. Check if the “InProgress” + WID file is still there. If it is, continue. If not, the master 

has likely aborted this worker. In this case, the worker should delete the “TEMP” 

JAR file. 

9. Rename the “TEMP” file to a STATE of “DONE” 

10. Delete file with STATE of “InProgress” + WID 

11.

Master Computer Handles Results 

11. Detect files belonging to this master that have a STATE of “DONE”: 

MID_*_*_DONE 

12. Copy/Unjar to private folder 

13. Delete “DONE” file 

14. Process 

15. Delete Temp Folder