sourav@metdatahub.com +91-9654742266

Compile and Run AERMOD on Linux Platform

Research and Development Team, MeDH     30 Nov -0001

AERMOD on Linux

To compile the source code on Linux, you need -

  • FORTRAN compiler “gfortran
  • Latest version of AERMOD – Version 16216r.

FORTRAN Compiler

To check if you have a FORTRAN compiler already installed, open terminal and type:

gfortran – version

If it says, “command not found”, gfortran is likely not installed. To install gfortran, open terminal window and type the command -

sudo apt-get install gfortran -y

After installation of gortran make a new folder aermod under “Home” directory and navigate to the aermod directory.


Download AERMOD Source Code

Now, Download the Fortran source code of AERMOD from US-EAP website.


Compile AERMOD Source Code

Extract the source code from download zip file in to a folder “aermod_source”:

unzip aermod_source.zip

Now to compile run the following command from folder aermod_source:

gfortran -static -o aermod.exe -fbounds-check -fcheck=all -Wextra -Wall -pedantic -frecursive -O3 modules.f aermod.f setup.f coset.f soset.f reset.f meset.f ouset.f inpsum.f metext.f iblval.f siggrid.f tempgrid.f windgrid.f calc1.f calc2.f prise.f prime.f sigmas.f pitarea.f output.f evset.f evcalc.f evoutput.f

On successful compilation, the aermod.exe file will be generated. To check where the file is generated or not – type the following command:

ls -las *.exe


Run AERMOD

Download the sample file from here and then extract SampleRun.zip in to a new folder called “SampleRun”. For convenience, copy the “aermod.exe” in to the same folder and navigate into it. Now run AERMOD by type the following command:

./aermod.exe

You can check the output files like aermod.out, errors.out generated after the after successful run of AERMOD.

 

Note that the necessary input files and aermod.exe file must be in the same folder and the input file name must be “aermod.inp”.

 

Precompiled binaries for Linux system

If you don’t want to go through the compilation steps, download the precompiled binaries for Linux, extract the “aermod.exe” and copy in to “SampleRun” directory and follow the steps as mentioned under section “Run AERMOD” You may get error when you run precompiled binaries download from our website.

This error can be rectified this by running the following permission command:

chmod 755 aermod.exe

Now you can run aermod.exe