Skip to content

Community Multiscale Air Quality Modeling System (CMAQ) is a suite of Fortran 90 programs that work in concert to estimate ozone, PM, toxic compounds, and acid deposition throughout the troposphere.[1]

Picotte

WIP

General

Prerequisites

  • compiler
  • Open MPI
  • ~~hdf5~~ not needed
  • netcdf-c
  • netcdf-f
  • ioapi

Build Notes

ioapi

NB CMAQ build instructions actually specify the non-MPI build of ioapi.

BUT later on, trying to build CMAQ/CCTM, will need an MPI build of ioapi: https://forum.cmascenter.org/t/compiling-cmaq-on-cheyenne-at-ncar/1995

Non-MPI

  • Copy toplevel Makefile.template and edit:
cp Makefile.template Makefile
BIN        = Linux2_x86_64ifort
BASEDIR    = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-20200828
INSTALL    = /ifs/opt/cmaq/5.3.2
LIBINST    = $(INSTALL)/$(BIN)
BININST    = $(INSTALL)/$(BIN)
CPLMODE    = nocpl
IOAPIDEFS  =
PVMINCL    =
NCFLIBS    = -lnetcdff -lnetcdf
  • Don't build with MPI
export BIN=Linux2_x86_64ifort
mkdir $BIN
  • Soft-link libnetcdff.a and libnetcdf.a
$ cd $BIN
$ ln -s /ifs/opt/cmaq/5.3.2/lib/libnetcdff.a .
$ ln -s /ifs/opt/cmaq/5.3.2/lib/libnetcdf.a .
  • Edit ioapi/Makefile.nocpl.sed - make sure only one DEFINEFLAGS macro is defined:
DEFINEFLAGS = -DIOAPI_NCF4=1 $(ARCHFLAGS) $(PARFLAGS)
  • Copy ioapi/Makefile.nocpl to ioapi/Makefile and edit:
BASEDIR = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-202008
BIN = Linux2_x86_64ifort
  • Copy m3tools/Makefile.nocpl to m3tools/Makefile and edit:
BASEDIR = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-202008
BIN = Linux2_x86_64ifort
  • Edit ioapi/Makeinclude.Linux2_x86_64ifort to fix the openmp flags:
OMPFLAGS = -qopenmp
OMPLIBS = -qopenmp
  • Make:
make -j 32 > Make.out 2>&1 &

With MPI

  • DON'T USE THIS - CMAQ instructions are for a non-MPI IOAPI build
    • MPI-enabled ioapi seems to require MPI-enabled NetCDF-Fortran.
    • MPI-enabled NetCDF-Fortran requires NetCDF-4 interface
  • BROKEN have not figured out how to work around the fact that building with MPI means linking with a bunch of dynamic libraries
  • Copy toplevel Makefile from template
cp Makefile.template Makefile
  • Edit top-level Makefile
BIN        = Linux2_x86_64ifortmpi
BASEDIR    = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-202008
INSTALL    = /ifs/opt/cmaq/5.3.2
LIBINST    = $(INSTALL)/$(BIN)
BININST    = $(INSTALL)/$(BIN)
CPLMODE    = nocpl
IOAPIDEFS  =
PVMINCL    =
NCFLIBS    = -lnetcdff -lnetcdf
  • Set BIN
export BIN=Linux2_x86_64ifortmpi
  • Soft-link libnetcdff.a and libnetcdf.a
cd $BIN
$ ln -s /ifs/opt/cmaq/5.3.2/lib/libnetcdff.a .
$ ln -s /ifs/opt/cmaq/5.3.2/lib/libnetcdf.a .
  • Edit ioapi/Makefile.nocpl.sed - make sure only one DEFINEFLAGS macro is defined:
DEFINEFLAGS = -DIOAPI_NCF4=1 $(ARCHFLAGS) $(PARFLAGS)
  • Copy ioapi/Makefile.nocpl to ioapi/Makefile and edit:
BASEDIR = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-202008
BIN = Linux2_x86_64ifortmpi
  • Copy m3tools/Makefile.nocpl to m3tools/Makefile and edit:
BASEDIR = /ifs/opt/cmaq/5.3.2/src/ioapi-3.2-202008
BIN = Linux2_x86_64ifortmpi
  • Edit ioapi/Makeinclude.Linux2_x86_64ifort to fix the openmp flags:

OMPFLAGS = -qopenmp
OMPLIBS = -qopenmp

OMPFLAGS =
OMPLIBS =

CMAQ Build

Proteus

Prerequisites

Uses the Intel Composer XE compiler with Open MPI. Use the following modulefiles:

intel/composerxe/2015.1.133 proteus-openmpi/intel/2015/1.8.1-mlnx-ofed hdf5/intel/2015/1.10.1-serial proteus-netcdf/intel/2015/4.5.0

DO NOT load the hdf5 and proteus-netcdf modulefiles: the CMAQ configure script requires you to edit it and write in the paths to the library and include directories for NetCDF.

Other Software

Documentation

The build documentation is in the file:

DOCS/User_Manual/CMAQ_OGD_ch05_sys_req.md

or on the web.[2]

Download Source Code

Two ways:

git clone -b 5.2https://github.com/USEPA/CMAQ.gitCMAQ_REPO

(Replace "5.2" in the above command line with the desired version number.)

BLABLA

  • Modify CMAQ_HOME/config_cmaq.csh. Replace line 91 -- setting the "myFC" environment variable in the case of the "intel" compiler:

setenv myFC mpifort

(as opposed to "mpiifort" in the original).

Prerequisite Libraries

The install documentation[3] require these three libraries to be installed under the CMAQ installation tree:

  • NetCDF -- $CMAQ_LIB/netcdf/lib
  • I/O API -- $CMAQ_LIB/ioapi
  • MPI -- $CMAQ_LIB/mpi

While this is doable for netCDF and I/O API, it is inadvisable for MPI since MPI should be considered system software similar to compilers or base networking directories.

Or maybe what they mean is that the CMAQ build scripts will copy existing files etc into the appropriate locations.

TODO -- need to figure out how to work around this bad practice of requiring MPI in the installation destination

netCDF

See the article on NetCDF

The cmaq config script expects a static NetCDF library, i.e. libnetcdf.a, while we have a dynamic library libnetcdf.so

So, edit config_cmaq.csh to fix this, and also specify the linker options.

Also, CMAQ expects libnetcdf and libnetcdff (the Fortran interface) to be in the same place where by default the NetCDF installation may put them in different places. So, manually copy the files to CMAQ's installation tree.

\cp -fR /mnt/HA/opt/netcdf/intel/2015/4.5.0/lib/* lib
\cp -fR /mnt/HA/opt/netcdf/intel/2015/4.5.0/lib64/* lib

Also, need to hack CMAQ's build scripts to deal with the fact that our shard libraries depend on other things: netcdf depends on hdf5 depends on szip and zlib.

IOAPI

CMAQ wants to do this to IOAPI (and also all its other dependencies, NetCDF etc):

Abstract from cmaq setup script - notice the inconsistency in require $IOAPI_DIR/modules/m3utilio.mod vs $IOAPI_DIR/include/m3utilio.mod

 setenv IOAPI_DIR   $CMAQ_LIB/ioapi

 if ( ! -d $IOAPI_DIR ) then
    mkdir $IOAPI_DIR
    ln -s $IOAPI_MOD_DIR  $IOAPI_DIR/modules
    ln -s $IOAPI_INCL_DIR $IOAPI_DIR/include_files
    ln -s $IOAPI_LIB_DIR  $IOAPI_DIR/lib
 endif

 if ( ! -e $IOAPI_DIR/lib/libioapi.a ) then
    echo "ERROR: $IOAPI_DIR/lib/libioapi.a does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build."
    exit
 endif
 if ( ! -e $IOAPI_DIR/modules/m3utilio.mod ) then
    echo "ERROR: $IOAPI_DIR/include/m3utilio.mod does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build."
    exit
 endif

Download

  • IOAPI 3.2[4]
  • ioapi-3.2.tar.gz tar ball does NOT have a top level directory, so:
    • mkdir ioapi-3.2 ; mv ioapi-3.2.tar.gz ioapi-3.2 ; cd ioapi-3.2 ; tar xf ioapi-3.2.tar.gz

General Notes

  • Doing "make install" installs all executables and the library libioapi.a into one directory
  • "make install" does not install the Fortran module files or the include files -- they are just left in their original locations in the source tree
  • CMAQ needs to know the locations of the executables, the library, the mod files, and the include files
    • CMAQ's makefile template makes links to these locations to more "normal-looking" directories: bin, lib, include

Compilation Notes

  • Compilation with Intel Fortran ifort wants static linking only
    • If fail due to not finding "-ljpeg" that's because system did not have static jpeg libraries installed; static libraries will be installed, soon
    • Options
      • Download and compile libjpeg as static library
      • Modify makefiles for dynamic linking to existing libraries
      • However libioapi.a is still built as static
  • Build type: Linux2_x86_64ifort_medium
  • Edit file ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64ifort_medium (look for the matching lines)
FC   = ifort -auto -warn notruncated_source
ARCHLIB   =
  • Edit ioapi-3.2/Makefile (based on Makefile.template)
BIN        = Linux2_x86_64ifort_medium
...
INSTALL    = $(CMAQ_HOME)/ioapi
...
NCFLIBS    = -Wl,-rpath,$(NETCDFLIBDIR) -Wl,-rpath,$(NETCDFFORTRANLIBDIR) \
    -L$(NETCDFLIBDIR) -L$(NETCDFFORTRANLIBDIR) -lnetcdff -lnetcdf \
    -Wl,-rpath,$(HDF5LIBDIR) -L$(HDF5LIBDIR) -lhdf5_hl_fortran-shared \
    -lhdf5_fortran-shared -lhdf5_hl-shared -lhdf5-shared -ljpeg \
    -Wl,-rpath,$(SZIPLIBDIR) -L$(SZIPLIBDIR) -lsz -lz \
    -Wl,-rpath,$(CURLLIBDIR) -L$(CURLLIBDIR) -lcurl -lm

When you do a "make install", the executables and the library libioapi.a are installed into the same place, which is ${CMAQ_HOME}/ioapi/Linux2_x86_64ifort_medium That directory should be set as IOAPI_LIB_DIR.

The include files and the .mod (Fortran module) files, have to be manually installed. Assuming you are in the top level of the ioapi-3.2 source library

mkdir ${CMAQ_HOME}/ioapi/Linux2_x86_64ifort_medium/include
cp Linux2_x86_64ifort_medium/*.mod ${CMAQ_HOME}/ioapi/Linux2_x86_64ifort_medium/include
cp ioapi/*.h ${CMAQ_HOME}/ioapi/Linux2_x86_64ifort_medium/include

Benchmark Data

Download from: https://www.cmascenter.org/login/login.cfm?PATH=download/forms/step_1.cfm (Registration required)

Compile ICON

cd $CMAQ_HOME/PREP/icon/scripts
./bldit_icon.csh

Summary

setenv CMAQ_HOME /mnt/HA/opt/cmaq/intel/2015/5.2
setenv CMAQ_REPO /mnt/HA/opt/src/CMAQ_5-2
cd $CMAQ_HOME
./bldit_project.csh intel
# modify config_cmaq.csh appropriately:
    setenv myFRFLAGS "-free -O3 -xHost -qopenmp"
    setenv myCFLAGS "-O3 -xHost -qopenmp"
    setenv extra_lib "-Wl,-rpath,/mnt/HA/opt/netcdf/intel/2015/4.5.0/lib -Wl,-rpath,/mnt/HA/opt/hdf5/intel/2015/1.10.1-serial/lib -L/mnt/HA/opt/hdf5/intel/2015/1.10.1-serial/lib -lhdf5_hl -lhdf5 -Wl,-rpath,/mnt/HA/opt/szip/intel/2015/2.1/lib -L/mnt/HA/opt/szip/intel/2015/2.1/lib -lsz -Wl,-rpath,/mnt/HA/opt/zlib-cloudflare/intel/2015/1.2.8/lib -L/mnt/HA/opt/zlib-cloudflare/intel/2015/1.2.8/lib -lz -lcurl"
cd $CMAQ_HOME/data
cp .../.../CMAQv5.2_Benchmark_SingleDay_Input_09_12_2017.tar.gz .
cp .../.../CMAQv5.2_Benchmark_SingleDay_Output_09_05_2017.tar.gz .
tar xf CMAQv5.2_Benchmark_SingleDay_Input_09_05_2017.tar.gz
tar xf CMAQv5.2_Benchmark_SingleDay_Output_09_05_2017.tar.gz
cd $CMAQ_HOME/PREP/icon/scripts
./bldit_icon.csh intel
cp -R $CMAQ_REPO/PREP/mcip/src $CMAQ_HOME/PREP/mcip
cp -R $CMAQ_REPO/PREP/mcip/docs $CMAQ_HOME/PREP/mcip
cd $CMAQ_HOME/PREP/mcip/src
source ../../../config_cmaq.csh
make
cd $CMAQ_HOME/CCTM/scripts
./bldit_cctm.csh intel
#
# test
#
cd $CMAQ_HOME/data/SE52bench
ln -s single_day/cctm_input/* .
cd $CMAQ_HOME/PREP/icon/scripts
./run_icon.csh

The full config_cmaq.csh is here:

#!/bin/csh -f

# ================== CMAQ5.2 Configuration Script =================== #
# Requirements: I/O API & netCDF libraries                            #
#               PGI, Intel, or Gnu Fortran compiler                   #
#               MPICH for multiprocessor computing                    #
# Optional:     Git for GitHub source code repository                 #
#                                                                     #
# Note that this script was configured/tested on Red Hat Linux O/S    #
#                                                                     #
# To report problems or request help with this script/program:        #
#             http://www.cmascenter.org/help-desk.cfm                 #
# =================================================================== #

#> Critical Folder Locations
 # CMAQ_HOME - this is where the config_cmaq.csh script is located. It
 # is also the root directory for all the executables. It may include
 # the repository if the user is building CMAQ inside the repository. It
 # may, on the other hand, be outside the repository if the user has
 # created a separate project directory where they wish to put build-
 # and run-scripts as well as executables.
 #setenv CMAQ_HOME $cwd
 setenv CMAQ_HOME /mnt/HA/opt/cmaq/intel/2015/5.2

 # CMAQ_REPO - this is always the location of the CMAQ repository that
 # the user will pull from to create exectuables. If the user is building
 # CMAQ inside the repository then it will be equal to CMAQ_HOME. If not,
 # the user must supply an alternative folder locaiton.
 setenv CMAQ_REPO /mnt/HA/opt/src/CMAQ/CMAQ_REPO
 setenv CMAQ_REPO /mnt/HA/opt/src/CMAQ/CMAQ_REPO

 # CMAQ_DATA - this may be where the input data are located. It may be a
 # symbolic link to another location on the system, but it should be
 # provided here
 setenv CMAQ_DATA $CMAQ_HOME/data
 if ( ! -d $CMAQ_DATA ) mkdir -p $CMAQ_DATA

 cd $CMAQ_HOME

#===============================================================================
#> architecture & compiler specific settings
#===============================================================================

#> Set the compiler option
 if ( $#argv == 1 ) then
    #> Use the user's input to set the compiler parameter
    setenv compiler $1
    setenv compilerVrsn Empty
 else if ( $#argv == 2 ) then
    #> Compiler Name and Version have been provided
    setenv compiler $1
    setenv compilerVrsn $2
 else if ( $#argv == 0 ) then
    #> If config.cmaq is called from Bldit.cctm or run.cctm, then this
    #> variable is already defined
    if ( ! $?compiler ) then
      echo "Error: 'compiler' should be set either in the"
      echo "       environment or as input to config.cmaq"
      echo "       Example:> ./config.cmaq [compiler]"
      echo "       Options: intel | gcc | pgi"
      exit
    else if ( ! $?compilerVrsn ) then
      setenv compilerVrsn Empty
    endif
 else
    #> More than two inputs were given. Exit this script just to
    #> be on the safe side.
    echo "Error: Too many inputs to config.cmaq. This script"
    echo "       is expecting one input (the name of the"
    echo "       desired compiler. In some installations, you "
    echo "       may also be able to specify the compiler version "
    echo "       as the second input, but this is not by default."
    exit
 endif
 echo "Compiler is set to $compiler"

#> Compiler flags and settings
 switch ( $compiler )

#>  Intel fortran compiler......................................................
    case intel:

        #> I/O API, netCDF, and MPI library locations
        setenv IOAPI_MOD_DIR   /mnt/HA/opt/ioapi/intel/2015/3.2/include  #> I/O API precompiled modules
        setenv IOAPI_INCL_DIR  /mnt/HA/opt/ioapi/intel/2015/3.2/include  #> I/O API include header files
        setenv IOAPI_LIB_DIR   /mnt/HA/opt/ioapi/intel/2015/3.2/lib  #> I/O API libraries
        setenv NETCDF_LIB_DIR  /mnt/HA/opt/netcdf/intel/2015/4.5.0/lib64 #> netCDF directory path
        setenv NETCDF_INCL_DIR /mnt/HA/opt/netcdf/intel/2015/4.5.0/include #> netCDF directory path
        setenv MPI_LIB_DIR     /mnt/HA/opt/openmpi/intel/2015/1.8.1-mlnx-ofed/lib    #> MPI directory path

        #> Compiler Aliases and Flags
        setenv myFC mpifort
        setenv myCC icc
        setenv myFSTD "-O3 -xHost -fno-alias -mp1 -fp-model source"
        setenv myDBG  "-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback"
        setenv myLINK_FLAG "-openmp"
        setenv myFFLAGS "-fixed -132"
        setenv myFRFLAGS "-free -O3 -xHost -qopenmp"
        setenv myCFLAGS "-O3 -xHost -qopenmp"
        setenv extra_lib "-Wl,-rpath,/mnt/HA/opt/netcdf/intel/2015/4.5.0/lib  -Wl,-rpath,/mnt/HA/opt/hdf5/intel/2015/1.10.1-serial/lib -L/mnt/HA/opt/hdf5/intel/2015/1.10.1-serial/lib -lhdf5_hl -lhdf5 -Wl,-rpath,/mnt/HA/opt/szip/intel/2015/2.1/lib -L/mnt/HA/opt/szip/intel/2015/2.1/lib -lsz -Wl,-rpath,/mnt/HA/opt/zlib-cloudflare/intel/2015/1.2.8/lib -L/mnt/HA/opt/zlib-cloudflare/intel/2015/1.2.8/lib -lz -lcurl"
        #setenv extra_lib ""
        setenv mpi_lib ""    #> No Library specification needed for mpiifort
                             #> -lmpich for mvapich
                             #> -lmpi for openmpi

        breaksw

#>  Portland Group fortran compiler.............................................
    case pgi:

        #> I/O API, netCDF, and MPI library locations
        setenv IOAPI_MOD_DIR   ioapi_mod_pgi  #> I/O API precompiled modules
        setenv IOAPI_INCL_DIR  iopai_inc_pgi  #> I/O API include header files
        setenv IOAPI_LIB_DIR   ioapi_lib_pgi  #> I/O API libraries
        setenv NETCDF_LIB_DIR  netcdf_lib_pgi #> netCDF directory path
        setenv NETCDF_INCL_DIR netcdf_inc_pgi #> netCDF directory path
        setenv MPI_LIB_DIR     mpi_lib_pgi    #> MPI directory path

        #> Compiler Aliases and Flags
        setenv myFC mpif90
        #setenv myFC mpifort
        setenv myCC pgcc
        setenv myLINK_FLAG "-openmp"
        setenv myFSTD "-O3"
        setenv myDBG  "-O0 -g -Mbounds -Mchkptr -traceback -Ktrap=fp"
        setenv myFFLAGS "-Mfixed -Mextend -mcmodel=medium -tp px"
        setenv myFRFLAGS "-Mfree -Mextend -mcmodel=medium -tp px"
        setenv myCFLAGS "-O2"
        #setenv extra_lib "-lextra"
        #setenv mpi_lib "-lmpi"   #> -lmpich for mvapich or -lmpi for openmpi
        setenv extra_lib ""
        setenv mpi_lib ""   #> -lmpich for mvapich or -lmpi for openmpi

        breaksw

#>  gfortran compiler............................................................
    case gcc:

        #> I/O API, netCDF, and MPI library locations
        setenv IOAPI_MOD_DIR   ioapi_mod_gcc  #> I/O API precompiled modules
        setenv IOAPI_INCL_DIR  iopai_inc_gcc  #> I/O API include header files
        setenv IOAPI_LIB_DIR   ioapi_lib_gcc  #> I/O API libraries
        setenv NETCDF_LIB_DIR  netcdf_lib_gcc #> netCDF directory path
        setenv NETCDF_INCL_DIR netcdf_inc_gcc #> netCDF directory path
        setenv MPI_LIB_DIR     mpi_lib_gcc    #> MPI directory path

        #> Compiler Aliases and Flags
        setenv myFC mpif90
        #setenv myFC mpifort
        setenv myCC gcc
        setenv myFSTD "-O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising"
        setenv myDBG  "-Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace"
        #setenv myDBG  "$myDBG -fimplicit-none"
        setenv myFFLAGS "-ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32"
        setenv myFRFLAGS "-ffree-form -ffree-line-length-none -funroll-loops -finit-character=32"
        setenv myCFLAGS "-O2"
        setenv myLINK_FLAG "-openmp"
        setenv extra_lib ""
        #setenv mpi_lib "-lmpi_mpifh"   #> -lmpich for mvapich or -lmpi for openmpi
        setenv mpi_lib ""   #> -lmpich for mvapich or -lmpi for openmpi

        breaksw

    default:
        echo "*** Compiler $compiler not found"
        exit(2)
        breaksw

 endsw

#> Apply Specific Module and Library Location Settings for those working inside EPA
 #source /work/MOD3DEV/cmaq_common/cmaq_env.csh  #>>> Comment out if not at EPA

#> Add The Complier Version Number to the Compiler String if it's not empty
 setenv compilerString ${compiler}
 if ( $compilerVrsn != "Empty" ) then
    setenv compilerString ${compiler}${compilerVrsn}
 endif

#===============================================================================

#> I/O API, netCDF, and MPI libraries
 setenv netcdf_lib "-lnetcdf -lnetcdff"  #> -lnetcdff -lnetcdf for netCDF v4.2.0 and later
 setenv ioapi_lib "-lioapi"
 setenv pnetcdf_lib "-lpnetcdf"

#> Query System Info and Current Working Directory
 setenv system "`uname -m`"
 setenv bld_os "`uname -s``uname -r | cut -d. -f1`"
 setenv lib_basedir $CMAQ_HOME/lib

#> Generate Library Locations
 setenv CMAQ_LIB    ${lib_basedir}/${system}/${compilerString}
 setenv MPI_DIR     $CMAQ_LIB/mpi
 setenv NETCDF_DIR  $CMAQ_LIB/netcdf
 setenv PNETCDF_DIR $CMAQ_LIB/pnetcdf
 setenv IOAPI_DIR   $CMAQ_LIB/ioapi

#> Create Symbolic Links to Libraries
 if ( ! -d $CMAQ_LIB ) mkdir -p $CMAQ_LIB
 if (   -e $MPI_DIR  ) rm -rf $MPI_DIR
     ln -s $MPI_LIB_DIR $MPI_DIR
 if ( ! -d $NETCDF_DIR )  mkdir $NETCDF_DIR
 if ( ! -e $NETCDF_DIR/lib ) ln -s $NETCDF_LIB_DIR $NETCDF_DIR/lib
 if ( ! -e $NETCDF_DIR/include ) ln -s $NETCDF_INCL_DIR $NETCDF_DIR/include
 if ( ! -d $IOAPI_DIR ) then
    mkdir $IOAPI_DIR
    ln -s $IOAPI_MOD_DIR  $IOAPI_DIR/modules
    ln -s $IOAPI_INCL_DIR $IOAPI_DIR/include
    ln -s $IOAPI_LIB_DIR  $IOAPI_DIR/lib
 endif

#> Check for netcdf and I/O API libs/includes, error if they don't exist
 if ( ! -e $NETCDF_DIR/lib/libnetcdf.so ) then
    echo "ERROR: $NETCDF_DIR/lib/libnetcdf.so does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build."
    exit
 endif
 if ( ! -e $IOAPI_DIR/lib/libioapi.a ) then
    echo "ERROR: $IOAPI_DIR/lib/libioapi.a does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build."
    exit
 endif
 if ( ! -e $IOAPI_DIR/include/m3utilio.mod ) then
    echo "ERROR: $IOAPI_DIR/include/m3utilio.mod does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build."
    exit
 endif

#> Set executable id
 setenv EXEC_ID ${bld_os}_${system}${compilerString}

Test Output

The output from the test run_icon.csh is here: CMAQIconRunLog.txt

References

[1] CMAQ Download Site

[2] CMAQ Installation and System Requirements

[3] I/O API website