I'm trying to have the NETCFD4 library working in serial and I get some kind of problem. That's what I did:
- I installed the NETCFD4/HDF5 libraries for the ifort compiler with no problems, all tests worked and I used h5dump to double check if I have a netcdf4 file.
- I added netcdf4 and hdf5 paths in the my compiler file (Linux-ifort.mk).
- Added #define NETCDF4 and #define DEFLATE in my .h file
- Added NetCDF-4/HDF5 compression parameters in my .in file.
- Added export USE_NETCDF4=on in my makefile and build files.
Then, I tried the upwelling test and I got the following error :
/opt/intel/fce/10.1.015/bin/ifort -c -g -check bounds -traceback -free mod_netcdf.f90
fortcom: Error: mod_netcdf.f90, line 106: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_NETCDF4]
integer :: CMODE = nf90_netcdf4 ! NetCDF-4/HDF5 format file
-------------------------^
fortcom: Error: mod_netcdf.f90, line 106: This is not a valid initialization expression. [NF90_NETCDF4]
integer :: CMODE = nf90_netcdf4 ! NetCDF-4/HDF5 format file
-------------------------^
fortcom: Error: mod_netcdf.f90, line 106: This name does not have a type, and must have an explicit type. [NF90_NETCDF4]
integer :: CMODE = nf90_netcdf4 ! NetCDF-4/HDF5 format file
-------------------------^
compilation aborted for mod_netcdf.f90 (code 1)
make: *** [Build/mod_netcdf.o] Error 1
I'm using ifort version 10.1 with the ROMS version 319.
Is there anything wrong with my recipe above? Any idea how to solve that?
Now, if I want to run the model in serial using MPICH2 do I need to have a second version of the NETCDF4/HDF5 library?