Try Me First Sample Run
Try Me First Sample Run
Try Me First Sample Run
The "Try Me First" Sample Run is simply a “plug and crunch” example to familiarize the user with
how to set up and run AERMOD in a generic sense. People who "learn by doing" can gain a
familiarity with what AERMOD is like when it is running, and that will be of use when reading the
documentation.
You will work in a Windows Explorer window and a Windows command prompt window. There will
be AERMOD files there: the executable, the input files, and the output files. You will run AERMOD
and watch it process a short run. Afterwards, you can examine the output files, and you can run
AERMOD again.
One important note: Here, the words “directory” and “folder” are interchangeable, because they mean
the same thing.
Page 2 of 11
Another important note: This document presumes that the user is working on a Windows computer
platform. The instructions for other platforms would be a little different.
Step-by-Step Instructions
1. Open Windows Explorer and move to the Desktop.
Press the “Windows” key, which is usually between the left-hand Control key and the left-hand Alt
key. While holding that Windows key down, tap the key for the letter “e”.
The result should be that a Windows Explorer window opens up. In that window, double click on the
item named “Desktop”.
The result should be that the window displays the files and folders that are on the user’s desktop.
For Windows 10, opening the Command Prompt window is just a matter of clicking the Start Button
in the lower left corner of the screen, and then typing the letter "c". You should see a popup menu
appear, and "Command Prompt - Desktop App" is an item there.
(If you are not in a recent version of Windows, then opening the Command Prompt usually is just a
matter of clicking the File menu in the Explorer window. "Cmd Prompt" is an item there.)
If the Command Prompt item is disabled (that is, shown in a grey color, or is there but does nothing
when invoked), you may be in a part of the computer where you aren't supposed to change anything.
Go to your desktop or your home directory.
In the Command Prompt window, you may need to give the commands to go to the Desktop folder.
Let's say that the Command Prompt window starts up in the folder C:\Users\ALincoln. The Command
Prompt window opens and displays the text:
C:\Users\ALincoln>
There is a line that starts with the text “C:\Users\ALincoln”, which states that the current folder is on
the drive “C:” and is the folder “\Users\ALincoln”. The “greater than” symbol, “>”, is there to be like
an arrow, an indicator that the computer is waiting for the user to type in something.
Let’s say that we do not want to be in this folder. Instead, we need to go to the user’s desktop and
make a subfolder named SampleRun, and then use that subfolder.
Page 3 of 11
In the following, this text will give you the commands to perform tasks, as well as giving you some
file names. Please do not worry about capital letters and lowercase letters. In Windows, the case of the
letters will not matter in this document.
cd C:\Users\ALincoln\Desktop
C:\Users\ALincoln> cd C:\Users\ALincoln\Desktop
C:\Users\ALincoln\Desktop>
We need to make a subfolder. It would be good to name it SampleRun. To make that subdirectory and
go down into it, one would type (pressing the Enter key at the end of each line):
mkdir SampleRun
cd SampleRun
C:\Users\ALincoln> cd C:\Users\ALincoln\Desktop
C:\Users\ALincoln\Desktop> mkdir SampleRun
C:\Users\ALincoln\Desktop> cd SampleRun
C:\Users\ALincoln\Desktop\SampleRun>
Returning to the Windows Explorer window, we should find the subfolder “SampleRun”. This may
require scrolling up or down in the window. (Very possibly, all the way down to the very bottom of
the scrollbar, where newly created folders may be inserted.) Once found, double click on the
subfolder’s item, and the Explorer window should show the subfolder. At this point, Explorer may
state “This folder is empty.”
At this point, where you are reading the "Try Me First" Sample Run itself, then you may already have
gotten the ZIP file that it came in. If you have gotten the ZIP file from the SCRAM site, you can skip
to the next section.
Otherwise, use a browser to go to the EPA's SCRAM web site at http:/www.epa.gov/scram . There,
under "Air Quality Models", find the "Dispersion Modeling" link and click it.
There, find the link for "Preferred/Recommended Models" and click that.
Page 4 of 11
Then, you can find the link for the "AERMOD Modeling System", so click that.
In that section, you will find a subsection named "Installation Guide (Sample Run)". Be sure to click
for, and read, the "Read Me (TXT)" file.
Then, these instructions, that you are reading, are reached with the "Sample Run Instructions (PDF)"
link.
Finally, the "Sample Run (ZIP)" link is the link for the "Try Me First" Sample Run. Clicking that
should start a download of the ZIP file to your computer.
If you are asked whether to open or save the ZIP file, click the little arrow next to the Save button,
select the “Save As” option (or the "Save Target As" option), and save it to the SampleRun folder you
have just made.
At this point, the user is done with the web browser and can close it.
If you have unzipped the ZIP file that you got from the SCRAM site, you can skip to the next section.
Find the ZIP file in the Explorer window. (Not the Internet Explorer window; the Explorer window
can be called "This PC" or "My Computer" or "Computer".)
Unzipping on Windows usually is just a matter of double clicking the file in the Explorer window.
That opens the zipped file.
In the zipped file’s “unzipped window”, there is a list item with a folder icon with the name
“SampleRun”. Click that folder icon.
The resulting list is the contents of the “unzipped SampleRun subfolder”. Pressing control-A selects
all the items in the “unzipped SampleRun subfolder” folder. Then drag all the items from the zipped
folder onto your Windows Explorer window of the SampleRun folder.
At this point, the user is done with the “unzipped SampleRun subfolder” window and can close it.
At this point, you can use your text editor to examine the AERMOD.INP input file.
(Alternatively, you can simply use the command “type aermod.inp” followed by a vertical bar,
followed by the command “more”: – type aermod.inp | more – and page through the file with the
Space bar. You can stop it any time with control-C.)
ME STARTING
SURFFILE aermet2.sfc
PROFFILE aermet2.pfl
SURFDATA 14735 1988 ALBANY,NY
Page 5 of 11
OU STARTING
RECTABLE ALLAVE FIRST-THIRD
MAXTABLE ALLAVE 50
The AERMOD.INP file is divided by lines like these, into six sections called “pathways”. You don’t
need to understand them at this time, but it is interesting to notice things in the file. (This step-by-step
tutorial will refer back to what is mentioned here.)
6. Executing AERMOD
AERMOD was designed to run from a Command Prompt window. One reason one could want to run
AERMOD from the Windows Command Prompt is to receive any error or success messages during
the run.
Type
aermod
and press Enter. You can pay attention as it runs. You should find that it outputs these six lines:
At this point, you can use your text editor to examine the output file AERMOD.OUT .
The first thing you can notice is that the very beginning of the AERMOD.OUT file is an exact copy of
the AERMOD.INP file that you examined earlier. Then, after that comes a lot of pages with the
numbers that AERMOD has produced.
Another output file that may have been created is ERRORS.OUT . Warnings and errors will wind up
here, so one should pay attention to this file.
Again, it is all right if this isn’t clear just yet, as long as you are getting some familiarity with what an
AERMOD run is like.
Page 6 of 11
When users are executing lots of different AERMOD runs, they have found it helpful to organize the
AERMOD.INP files with different names.
As an example: Instead of always using the name AERMOD.INP, a run to be called "My Run" could
be defined by using the name MYRUN.INP . Then it could be run with the following three
commands, which produces the AERMOD.OUT file and copies it to MYRUN.OUT :
Actually, this would make a very good, and short, Windows Batch file. We could give it the name
RUN-MYRUN.BAT, and run it in the Command Prompt window with the command:
run-myrun
(But note that every time it runs, it overwrites any file name AERMOD.OUT or MYRUN.OUT .)
At this point you have run the "Try_ Me First" Sample Run. You can run it again multiple times, if you
wish, before moving on to reading the AERMOD documentation. FF
Another way to run the RUN-MYRUN.BAT file is to locate it in the Windows Explorer window, and
then double click it. A new Command Prompt window opens and closes quickly, evidence that the
AERMOD program ran.
Experienced users might go into Windows Explorer, and double click on AERMOD.EXE . If there is
no AERMOD.INP ready, that would result in a window that would blink open and shut with no
indication of anything happening. That did run AERMOD but gives no idea of whether it was a
successful run or not. But if there was an AERMOD.INP available, the run could be successful.
That is, how this applies to the TestCase folder's RUNTESTS.BAT file
The AERMOD section on SCRAM has a set of testcases in a ZIP file. AERMOD's distribution comes
with sets of tests in a folder. Each has a Windows Batch file named RUNTESTS.BAT . Here is an
excerpt from it; If you read through the example in the “How Batch Files Work” section, you will
recognize the structure:
Each three-line chunk runs a different case and puts the results in a separate file. The user can give the
"runtests" command, and dozens and dozens of tests run by themselves.
(If you wish to retrieve the testcases, go to the Appendix "Retrieving the TestCases" for that.)
Appendices
Appendix: Important Note on AERMOD Use
The use of AERMOD requires a user to read the manuals and in particular, to understand what they
are trying to convey. The "Try Me First" Sample Run is simply a "plug and crunch" example to
familiarize the user with how to set up and run AERMOD in a generic sense. Any understanding
needs to come from reading the guides.
PLEASE READ AND UNDERSTAND WHAT IS IN THE USER'S GUIDES AND MANUALS!!!!!
We cannot emphasize this enough. AERMOD and its supporting systems are complex and do not lend
themselves to "plug and crunch", except in this example.
If you have older versions of AERMOD, please delete the AERMOD.EXE so that if it is an older
version, it does not make its way into being used in a production run.
Each part of the AERMOD modeling system (e.g. AERMAP, AERSURFACE, AERMET, etc.)
should be stored in its own subdirectory. The output from each segment of the system, such as the
meteorological data or land characteristics, will need to be copied to the subdirectory where the user's
AERMOD run will be executed. Path names can sometimes be used to point back to where the data is
located and therefore, the data does not have to be copied to the executable's subdirectory. Input to
each executable has to be renamed or copied to the basic file name of the executable. For instance,
when executing an AERMOD run, "myinputfile.inp" has to be renamed to "AERMOD.INP". The
output file will be AERMOD.OUT and will have to be renamed to "myoutputfile.out" or it will be
over written next time AERMOD is run. It is important to read each User's Guide for any variations
that do not follow this generic procedure. This helps us to make AERMOD compatible with other
Operating System environments.
It is advisable to create a general overall subdirectory for each project with subdirectories for each
part of the AERMOD modeling system. This way it will be easier to back up your project by copying
the main project subdirectory and all its underlying subdirectories.
Here are some sample DOS commands to enter at the Command Prompt (>).
This table is a list of all the Windows DOS commands used in the document's text, plus some more.
The first column is the command. The second column contains descriptive information about the
command.:
Command Explanation
cd \ takes you to the top directory in whatever drive you are on
cd \document* takes you to the "documents" subdirectory
(earlier Windows, the "documents and settings" subdirectory)
copy file1 file2 copies the file contents of file1 to file2
(e.g. copy aermod.out aertest1.out )
mkdir foo creates the subdirectory foo
del file deletes the file
rmdir foo deletes the subdirectory foo (may have trouble if not empty)
| more Adding the vertical bar and “more” will page the output of the existing
command
Page 9 of 11
This table is a list of the file types used by AERMOD. The table is a quick reference to be used in
identifying the files that can be found in the AERMOD program's folder before and after the
AERMOD run. The first column is the extension. The second column contains descriptive
information about the extension.
Extension Meaning
*.pfl Upper level wind profile
*.sfc Surface meteorological data
*.exe executable file
*.inp input file
*.out output file
*.sum summary file
Errors.* File containing error messages generated
during run attempt
The *.pfl and *.sfc files are prepared using AERMET. Land characteristics are part of the surface
meteorological data file and the land characteristics are prepared using AERSURFACE. The output
from AERSURFACE is incorporated with the meteorological data in AERMET.
Programs to use
One can use the DOS FC command to compare file output. For example, at the Command Prompt,
type:
FC aertest.sum aertest_org.sum
FC aermod.out aertest_org.out
Alternatively, commercial and non-commercial text editors, such as Ultra Edit and Vim or Emacs,
have their own File Compare functions that can be used instead of the FC command.
When AERMOD output files that are supposed to be the same are compared, the file of differences
should only have lines containing date or time stamps. (Because the timestamps will be the only
difference.) Some files should have no differences.
In numerical data, there might be cases where "0.00" is represented as " .00". These are the same
number.
If the difference is the last digit, such as "1.45678" instead of "1.45677", the difference could possibly
be not significant..
The executables and source codes do not of themselves require much space. However, the models use
something called "Allocatable Arrays" which adjust the variable array sizes to meet the needs for
large receptor grids and other such variables which can also form additional large array sizes. Very
large variable arrays can affect RAM memory to the point where the RAM memory cannot hold all
the variable data. At that point, a run can be adversely affected by either stopping, crashing or by
using the hard drive as a storage location (e.g. virtual memory). If the latter, performance will be
drastically slowed as data is read onto and from the user's hard drive. Most AERMOD runs will not
encounter this unless a large run is being performed on an older PC with minimum RAM memory. At
this point, the run should be broken into separate runs.
Additional hard disk drive space is needed for the various input data sets. For instance, detailed terrain
data input for an AERMAP run can approach 1 Gigabyte when used in preparation of 50 km radius
AERMOD run. It is advisable to create a general overall subdirectory for each project with
subdirectories for each part of the AERMOD modeling system. This way it will be easier to back up
your project by copying the main project subdirectory and all its underlying subdirectories.
Use a browser to go to the EPA SCRAM web site, http://www.epa.gov/scram . There, under "Air
Quality Models", find the "Dispersion Modeling" link and click it.
There, find the link for "Preferred/Recommended Models" and click that.
Then, you will find the link for the "AERMOD Modeling System", so click that.
In that section, you will find a subsection named "Test Cases", just before the "Installation Guide
(Sample Run)" subsection.
Be sure to click for, and read, the "Test Cases ReadMe (TXT)" file.
Finally, the ZIP file links are for downloading testcases. Clicking them should start downloads of the
ZIP files to your computer. If you are asked to pick a place, try saving to your Desktop.
To unzip them, refer to step 4 in the main section of this document "4. Unzipping the ZIP file".
Page 11 of 11