Bcon compilation



I am trying to compile CMAQv5.2.1 benchmark, while building bcon, I get the following error, any clue to fix this highly appreciated.

terp.o -L/home/cmaq/T1/CMAQ_REPO/lib/x86_64/pgi/ioapi/lib -lioapi -L/home/cmaq/T1/CMAQ_REPO/lib/x86_64/pgi/netcdf/lib -lnetcdf -lnetcdff -o BCON_v52_profile.exe
/usr/bin/ld: cannot find -lnetcdff
Makefile:83: recipe for target ‘BCON_v52_profile.exe’ failed
make: *** [BCON_v52_profile.exe] Error 2
ERROR while running make command



Please take a look at Issue CMAQv5.2.1-i2 on the Known Issues page for v5.2.1 and let us know if the fix that is provided is able to resolve the error.


The issue I think you’re having does not seem to be properly reflected on the CMAQ “known issues” page;
instead, see the I/O API Installation Notes (https://cjcoats.github.io/ioapi/AVAIL.html#ncf4 or https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4):

…NetCDF Version 4.1 and later also split the Fortran interfaces into a separate library libnetcdff.a As a result, much compatiblity with the infrastructure (Makefiles, etc.) is broken: you must modify all Makefiles, replacing -lnetcdf with lnetcdff -lnetcdf

Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer