setenv M3HOME /afs/isis/user/CMAQ44
setenv M3DATA $M3HOME/data
setenv M3LIB $M3HOME/lib
setenv M3MODEL $M3HOME/models
mkdir $M3LIB
tar xvzf SCRIPTS.tar.gz
tar xvzf MODELS.tar.gz
tar xvzf M3DATA.tar.gz
tar xvzf M3DATA_REF.tar.gz
mkdir -p $M3LIB/netCDF/Linux
cp /home/user/netcdf-3.6.1/lib/libnetcdf.a $M3LIB/netCDF/Linux
or to create a symbolic link:
mkdir -p $M3LIB/netCDF/Linux
cd $M3LIB/netCDF/Linux
ln -s /home/user/netcdf-3.6.1/lib/libnetcdf.a libnetcdf.a
Similarly for the IOAPI, either copy a precompiled version of the library to the $M3LIB/ioapi/Linux2_x86pg directory or create a symbolic link to the library *.a file.
Compiler flag consistency between the netCDF and IOAPI are critical for building library files compatible with CMAQ. For Linux systems with the Portland Group Fortran compilers use the PGI Fortran and Gnu C compilers for building both the IOAPI and netCDF.
Before compiling the netCDF set the following environment variables:
CC = gcc
CPPFLAGS = '-DNDEBUG -DpgiFortran`
CFLAGS = -O
FC = pgf90
FFLAGS = `-O -w`
CXX = g++
To compile the IO API, set the BIN environment variable to Linux2_x86pg_gcc_mp before running the Unix “make” command:
BIN = Linux2_x86pg_gcc_mp
After unpacking all of the CMAQ tar files in the M3HOME directory, setting the appropriate environment variables, and installing the IOAPI and netCDF libraries in the CMAQ $M3LIB directory your system is ready to build the CMAQ executables. Before proceeding check that CVS is available on your system by typing the following command:
which cvs
If the message “cvs: Command not found.” is returned you must install CVS on your system before you can continue with the CMAQ installation.