Makefile:17: em_wrf Error 1 (ignored). Error to compile WRF-CMAQ with wrf.exe

Hello CMAS Forum,
I was trying to compile WRF-CMAQ (CMAQv5.4 with WRFv4.4) with the script ./bldit_cctm.csh intel |& tee bldit_cctm_twoway.log. I followed suggestions in the WRF-CMAQ tutorial with the intel compiler. The script created bldmake_intel.exe, tc.exe, ndown.exe, and real.exe. Unfortunately, the script couldn’t create the wrf.exe. The log file shows:

make[1]: [Makefile:17: em_wrf] Error 1 (ignored)
make[1]: Leaving directory ‘/home/alejandro/CMAQv54_WRF/CCTM/scripts/BLD_WRFv4.4_CCTM_v54_intel/main’

Do you have any best suggestions to fix it? After that error, I tested to compile WRFv4.4 inside the BLD_WRFv4.4_CCTM_v54_intel directory using ./configure, and it worked. However, I don’t know if with this additional step I can use the WRF-CMAQ correctly.

I appreciate your help and suggestions,

Alejandro D. Peralta
aperalta@usp.br

Hi Alejandro,

Do you have the “bldit_cctm_twoway.log” saved during compilation? If so could you please post it here. Looking within that log file will tell you exactly where the model is failing to compile.

Thanks!

Hi fsidi,
I successfully solved that error when I reinstalled the I/O API 3.2 version 20200828. After that, I ran my script available in (WRFCMAQ/install_WRFCMAQ.sh at main · adelgadop/WRFCMAQ · GitHub) to install WRF-CMAQ.

The problem now is when I tried to install again I/O API 3.2 using the script available in my GitHub (WRFCMAQ/install_IOAPI_libs_WRF_CMAQ.sh at main · adelgadop/WRFCMAQ · GitHub) for another user. So, we had errors during the m3tools installation (please see make.log.txt attached). It is a headache for me. I don’t know if there is a problem with the netCDF installation.

Best regards!
Alejandro
make.log.txt (226.2 KB)

Most of what you’re seeing is warnings which do not affect the functionality.
For the undefined-reference errors: this netCDF library was not built according to the recommendations; you will need additional libraries in the link=flags for anything built with it.
See https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4:

NetCDF Version 4.x have lots of additional build options, that will require a complex set of additional libraries in your Makefiles and all other model-building systems. It is recommended that you disable these options by adding the command-line flags below to your netCDF configure command:

--disable-netcdf4 --disable-dap
or (depending upon netCDF version; don’t you love consistency and compatibility !?? )
--disable-netcdf-4 --disable-dap

Thanks so much, Carlie. Yes, It was the netCDF !!! I used another netCDF that I installed with the two flags that you suggested. The version of this netCDF is 4.1.3; with that, the I/O API 3.2 could be installed. After that, I successfully installed the WRF-CMAQ (the last version).

Best regards,
Alejandro

1 Like