I/O API Installation (v3.2) Issues

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.

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

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

1 Like

See Availability/Download of the BAMS/Models-3 I/O API

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

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

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.