December 6, 2005

Using the NONROAD Multi-year Post-Processing Tools (NR05.mdb & BMY05.mdb)

NOTE:  Use of these two utilities presumes that the output filenames
from a given scenario all have the same first four characters as a
scenario identifier.  Typically, the other four characters would be
the calendar year (evaluation year) for that scenario. 

These are MS-Access utilities that read in one or more NONROAD output
files from a single directory, allow you to select specific horsepower
ranges and equipment types, and calculate emissions for the equipment
of interest.  

There are two similar tools that each process (aggregate) the output
data in the .OUT or the by-model-year .BMX & .BMV files from NONROAD
model runs.  These require Microsoft Access 2000 or later. 

 - NR05.mdb processes the .OUT files from NONROAD2005. 

 - BMY05.mdb processes the .BMX (by-model-year exhaust) and .BMV
   (by-model-year evaporative) output files from NONROAD2005.

CAUTION #1: Before running either tool, PLEASE copy the original MDB
file to some name of your choice, so you always leave a clean original
MDB file for yourself or others to work from. E.g., copy NR05.mdb
to MI05base.MDB or whatever name makes sense for your current use. 

CAUTION #2: These tools import ALL .OUT (or BMX/BMV) files in whatever
folder you choose that match the four character file spec (step 2 below)
that you enter. So if you only want to import one or a few of those
files, you need to either (a) move/copy the desired output files to
some other folder or (b) temporarily rename the unwanted output files
to some other extension, such as .OUx. 


Instructions: 

1) Open the desired Access .MDB file, and type a brief scenario
description into the "Study" field. You should ignore the "Scenario"
fields. Then hit Tab to get to the next step. 

2) When you hit the Tab key, you are first asked if you want to add
the study. Click Yes. In the "Location of output files" box, type in
or use the Browse button to locate the folder where your desired .OUT
or BMX/BMV file(s) are. Then fill in the Scenario ID box with the
first four characters of the desired output filenames. The "?" wildcard
is acceptable. So if you want to import all .OUT files in the chosen
folder, you would type "????" (without the quotes) into the Scenario
ID box. Or you can specify some or all of the four characters, such as
"WI??" or "TX02". If you're curious, the reason only four characters
are specified here is that these tools are modified versions of a tool
that was originally designed to find the 4-digit year in the second
half of the filename (last four characters before the dot, such as
"MISI2002.OPT."

NOTE: If you get an error message when attempting to specify/locate
the directory from which to import the output files, please refer to
the section below on Troubleshooting.

3) Click the [Import] button. You should see a counter start going,
counting up all the records that are being imported. These go into
database tables such as T_emissions, T_bmxEmissions, or T_bmvEmissions. 

4) When the importing is done, you can get some simple totals using
the [Emissions by Year] or [Emissions by Year and Model Year] buttons.
To get more detailed results see Step 5. If you wish to put your query
results into a spreadsheet, you can simply Select All (Ctl-A), then
Copy (Ctl-C), and then go to Excel and Paste the results into a
spreadsheet. 

5) Getting more detailed results, such as emissions by County and SCC,
can be done as follows: 

 a) Close Access.

 b) Open Access, and Choose File: Open..., find the mdb file you
 created above, but HOLD DOWN the SHIFT KEY while you double-click the
 filename or while you click on [OK]. This gives you access to all the
 tables and queries in the database, and allows you to create new
 queries. 

 c) To get emissions by County & SCC, go to the Queries tab and Open
 the pre-made query called "qYrCtySCC". 

 d) If you wish to create additional queries for other purposes if you
 are familiar with MS-Access. If not familiar with Access queries, you
 still might be able to create them simply by looking at the Design of
 the qYrCtySCC query and modifying it. But first you should make a copy
 of that query -- while looking at the list of queries in the Queries
 tab, select qCtySCC, copy it (Ctl-C), and then paste it (Ctl-V) giving
 it a different name when prompted to do so. 


Troubleshooting

It is possible that a necessary file is missing from the System
registry. After exiting from all failed programs, ensure that a file
named MSCOMCTL.OCX exists in the C:\Windows\System directory. If not,
this file is available from EPA. To get it into the system registry:
From the start menu, choose Run and in the dialog box type (without
the quotes) "regsvr32 c:\windows\system\mscomctl.ocx"  

---------------------------------------------------------------------

Questions/Problems: nonroad@epa.gov

U.S. Environmental Protection Agency
Assessment and Standards Division
Air Quality and Modeling Center
2000 Traverwood Drive
Ann Arbor, MI 48105

