Compile/Install AERMOD on Linux


AERMOD Modeling System

The AERMOD Modeling System is a plume model designed for steady-state conditions, utilizing air dispersion principles derived from the turbulence structure and scaling concepts of the planetary boundary layer. This versatile model is capable of accommodating various source (point, area, line, etc) types, including surface and elevated sources, and applies to both simple and intricate terrains. The model was developed by the U.S. Environmental Protection Agency (USEPA).

If you're diving into the realm of air quality dispersion modeling, particularly with the widely-used AERMOD modeling system, you've come to the right place. In this tutorial, we'll walk you through the process of installing AERMOD on your Linux operating system. So, grab your terminal and let's get started!

AERMOD Version : AERMOD 23132

Prerequisites

Before diving into the installation process, ensure that you have gfortran installed on your Linux system. You can quickly check this by opening your terminal (Ctrl + Alt + t) and typing:

which gfortran

If gfortran isn't installed, fear not! You can easily install it using your package manager. For instance, on Ubuntu, you can use:

sudo apt-get update
sudo apt-get install gfortran

Getting Started

Creating a Directory:

Begin by creating a new directory for AERMOD and navigate into it:

mkdir AERMOD
cd AERMOD

Downloading the Source Code:

Download the AERMOD source code from the U.S. Environmental Protection Agency website. You can either manually download it or use the following command:

wget https://gaftp.epa.gov/Air/aqmg/SCRAM/models/preferred/aermod/aermod_source.zip

Unzipping the Source Code:

Unzip the downloaded source code:

unzip aermod_source.zip

Move into the unzipped directory:

cd aermod_source_code_23132

Preparing Batch File for Linux:

Since batch files are incompatible with Linux, we need to make some modifications. First, let's grant execute permissions and create a new shell script:

chmod 755 gfortran-aermod.bat
cp gfortran-aermod.bat gfortran-aermod.sh

Editing the Shell Script:

Use your preferred text editor (e.g., Vi or Nano) to edit gfortran-aermod.sh. Make sure to convert all upper-case letters to lower-case and fix the capitalization of certain flags. Here's how you can do it with Vi or Nano:

vi gfortran-aermod.sh
# OR
nano gfortran-aermod.sh

After making the necessary changes, your file should reflect something like this:

editing (convert) %COMPILE_FLAGS% to $COMPILE_FLAGS Convert all upper-case letters to lower-case Fix the capitalization of the flags “-Wuninitialized” and “-O2” Also change %link_flags% to $link_flags

EditedFileAERMOD

Once it’s finished running, you should see

aermod.exe

For more information you can contact Dikra(dikrapb@gmail.com)