NetCDF library conflicts

Probably shot myself in the foot when I tried the apt-install method to install NetCDF that didn’t work as I wasn’t sure what I was doing.

I then followed the recommended method by sequentially installing zlib, hdf5, netcdf-c then netcdf-fortran. Then did the same for mpich and openmpi.

Now I’m trying to build CAMx using GFortran with MPI and NCF options and have run into an error which says ‘libnetcdf.so.19 needed by libnetcdff.so may conflict with libnetcdf.so.13’. I’m almost sure libnetcdf.so.19 is from the unsuccessful apt-install netcdf but my temporary renaming was disallowed. I’ve wondering if there is an apt-uninstall netcdf and if that removes only the files it installed, or will it also remove the other netcdf files I manually installed later?

For your netCDF and I/O API installation, you need to read the proper, author/maintainer-written documents instead of that stuff on the SMOKE wiki.

See the I/O API home page, at https://cjcoats.github.io/ioapi/AA.html or
ororhttps://www.cmascenter.org/ioapi/documentation/all_versions/html/AA.html; the installation manual is at https://cjcoats.github.io/ioapi/AVAIL.html or https://cjcoats.github.io/ioapi/AVAIL.html.

In particular,

In general, you are best off if you can build your whole modeling system (libnetcdf.a, libpvm3.a, libioapi.a, and your model(s) CMAQ, SMOKE, etc. with a common compiler set and common set of compile-flags.

and

  1. Acquire and build the netCDF library, libnetcdf.a (and libnetcdff.a for netCDF-4.1 or later), for each configuration. The netCDF home page is Unidata | NetCDF For each configuration,copy or link the resulting libnetcdf.a (and libnetcdff.a, if you’re building netCDF version 4.1 or later) to the appropriate object directory BASEDIR/{BIN}.
    Vendor supplied netCDF libraries frequently cause problems…