cd /path/to/CMAQ
tar -xvf ioapi-3.2-2020111.tar.gz mv ioapi-3.2-2020111 ioapi-3.2
cd ioapi-3.2 cp ioapi/Makeinclude.Linux2_ia64gfort ioapi/Makeinclude.Linux4_aarch64
vim ioapi/Makeinclude.Linux4_aarch64
#FSFLAGS = -save
cp ioapi/Makefile.nocpl ioapi/Makefile export HOME=/path/to/CMAQ
cp m3tools/Makefile.nocpl m3tools/Makefile
vim m3tools/Makefile
LIBS = -L${OBJDIR} -lioapi -L/path/to/NETCDF/lib -lnetcdff –lnetcdf -L/path/to /HDF5/lib -lhdf5_hl -lhdf5 -lz $(OMPLIBS) $(ARCHLIB) $(ARCHLIBS)
cp Makefile.template Makefile
vim Makefile
BIN = Linux4_aarch64 BASEDIR = ${PWD} INSTALL = ${HOME} LIBINST = $(INSTALL)/$(BIN) BININST = $(INSTALL)/$(BIN) CPLMODE = nocpl IOAPIDEFS = "-DIOAPI_NCF4"
NCFLIBS = -L/path/to/NETCDF/lib -lnetcdff -lnetcdf -L/path/to/HDF5/lib -lhdf5_hl -lhdf5 -lz
make BIN=Linux4_aarch64
tar -xvf CMAQ-CMAQv5.3.1_19Dec2019.tar.gz cd CMAQ-CMAQv5.3.1_19Dec2019
vim bldit_project.csh
set CMAQ_HOME = /path/to/CMAQ/CMAQ_Project
./bldit_project.csh
cd ../CMAQ_Project/
vim config_cmaq.csh
setenv IOAPI_MOD_DIR /path/to/CMAQ/ioapi-3.2/Linux4_aarch64/ setenv IOAPI_INCL_DIR /path/to/CMAQ/ioapi-3.2/ioapi/ setenv IOAPI_LIB_DIR /path/to/CMAQ/ioapi-3.2/Linux4_aarch64/ setenv NETCDF_LIB_DIR /path/to/NETCDF/lib/ setenv NETCDF_INCL_DIR /path/to/NETCDF/include/ setenv MPI_LIB_DIR /path/to/OPENMPI/
setenv myCC mpicc setenv myLINK_FLAG "-fopenmp" setenv mpi_lib "-lmpi"
setenv netcdf_lib "-lnetcdf -lnetcdff -lgomp" #> -lnetcdff -lnetcdf for netCDF v4.2.0 and later
./config_cmaq.csh gcc 9.3.0
cd CCTM/scripts/ ./bldit_cctm.csh gcc 9.3.0
编译完成后,会在“BLD_CCTM_v531_gcc9.3.0”目录下生成CMAQ的可执行程序“CCTM_v531.exe”。