cd /path/to/CMAQ
tar -xvf CMAQ-CMAQv5.3.1_19Dec2019.tar.gz cd CMAQ-CMAQv5.3.1_19Dec2019 vim bldit_project.csh
按“i”进入编辑模式,修改如下内容:
set CMAQ_HOME = /path/to/CMAQ/CMAQ_Project
./bldit_project.csh
cd ../CMAQ_Project/ vim config_cmaq.csh
在“case gcc”段落区域修改相关信息,并将“case gcc”修改为“case bisheng”。
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/HMPI/ setenv NETCDFF_LIB_DIR /path/to/netcdf/lib/ setenv NETCDFF_INCL_DIR /path/to/netcdf/include/
修改编译器相关参数,如:
注释如下内容。
#if ( ! -e $NETCDFF_DIR/lib/libnetcdff.a ) then # echo "ERROR: $NETCDFF_DIR/lib/libnetcdff.a does not exist in your CMAQ_LIB directory!!! Check your installation before proceeding with CMAQ build." # exit # endif
./config_cmaq.csh bisheng 2.1.0
cd CCTM/scripts/ mkdir BLD_CCTM_v531_bisheng2.1.0 cp /path/to/HMPI/include/mpif.h /path/to/CMAQ/CMAQ_Project/CCTM/scripts/BLD_CCTM_v531_bisheng2.1.0 ./bldit_cctm.csh bisheng 2.1.0
编译完成后,会在BLD_CCTM_v531_bisheng2.1.0目录下生成CMAQ的可执行程序CCTM_v531.exe