I/O API Installation (v3.2) Issues


#1

Some of the tools of I/O API like wrftom3 are available beginning version 3.2, so I wanted to install v3.2, but had the following 3 errors types when trying to compile using Intel 17.2 compiler and netCDF4.1.3 library:

  1. /home/ioapi/modatts3.F90(47): error #7013: This module file was not generated by any release of this compiler. [MODNCFIO]
    USE MODNCFIO

  2. /home/ioapi/modatts3.F90(2054): error #6404: This name does not have
    a type, and must have an explicit type. [NF_GLOBAL]
    IERR = NF_INQ_ATTID( CDFID3( FNUM ), NF_GLOBAL, ‘CMAQVERS’, ATTNUM )

  3. compilation aborted for /home/ioapi/modatts3.F90 (code 1)
    make: *** [modatts3.mod] Error 1

What could be the cause of these errors? v3.1 installed fine with the same Intel compiler and netCDF library.


netCDF to IO/API conversion
#2

This seems to be a botched-installation problem. There exists a “foreign” modncfio.mod which the compiler can’t deal with.

First, make sure that there are no object nor module files in the source directory:

cd ioapi/; rm *.mod *.o

Then clean up the previous installation (from the “ioapi” source-directory):

make clean

And finally re-build (from the “ioapi” source-directory):

make

#3

Thanks! I removed all .mod and .o files under ioapi/ directory, and ‘make’ happened smoothly in ioapi/

Now, I am giving ‘make’ command under ioapi/m3tools/ and got this error:

/home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4file.o): In function nc4_create_file': /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4file.c:233: undefined reference toH5P_CLS_FILE_ACCESS_ID_g’
/home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4file.c:276: undefined reference to H5P_CLS_FILE_CREATE_ID_g' /home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4file.o): In functionnc4_open_file’:
/home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4file.c:1978: undefined reference to H5P_CLS_FILE_ACCESS_ID_g' /home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In functionwrite_dim’:
/home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:2157: undefined reference to H5P_CLS_DATASET_CREATE_ID_g' /home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In functionvar_create_dataset’:
/home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:1262: undefined reference to H5P_CLS_DATASET_CREATE_ID_g' /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:1267: undefined reference toH5P_CLS_DATASET_ACCESS_ID_g’
/home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function create_group': /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:1850: undefined reference toH5P_CLS_GROUP_CREATE_ID_g’
/home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function nc4_put_vara': /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:683: undefined reference toH5P_CLS_DATASET_XFER_ID_g’
/home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function nc4_get_vara': /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4hdf.c:1013: undefined reference toH5P_CLS_DATASET_XFER_ID_g’
/home/ioapi/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4var.o): In function nc4_reopen_dataset': /home/mcip_cmaq_intel_libs/netcdf-4.1.3/libsrc4/nc4var.c:52: undefined reference toH5P_CLS_DATASET_ACCESS_ID_g’
make: *** [airs2m3] Error 1


#4

See https://cjcoats.github.io/ioapi/AVAIL.html#ncf4

NetCDF Version 4.x have lots of additional build options, that will require a complex set of additional libraries in 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


#5

Using –disable-netcdf-4 did the trick. It turned out I only had the --disable-dap option used during netCDF configure. Thanks!


#6

Your have to link the lib when you build ioapi. Many functions are in the link file, like .o .so etc…
You can try to add netcdf lib path in m3tools Makefile at line LIBS after you’ve install the zlib hdf5 curl lib.Like:
LIBS = -L/usr/local/netcdf4.6.2/lib
Hope this will help you.