http://www.unidata.ucar.edu/mailing_lis ... 00324.html
...with no response to far.
I am, for the first time, running ROMS on my Windows desktop machine via Linux in a virtual machine, rather than via Cygwin. I have CentOS 7.1 and I am trying as far as possible to use the standard binary packages rather than building from source. (I plan to use this virtual machine for other purposes, including setting up pyroms.)
I use the usual method of building ROMS with USE_NETCDF4=on and NC_CONFIG=/usr/bin/nf-config, but it can't find the module files. Here are the netCDF details according to nf-config:
Code: Select all
$ /usr/bin/nf-config --all This netCDF-Fortran 4.2 has been built with the following features: --cc -> gcc --cflags -> -I/usr/include --libs -> -lnetcdff --fc -> gfortran --fflags -> -I/usr/include --flibs -> -lnetcdff --has-f90 -> yes --has-nc2 -> yes --has-nc4 -> yes --prefix -> /usr --includedir-> /usr/include --version -> netCDF-Fortran 4.2
Now, I can see that there may be valid reasons for moving the netCDF .mod files to a new location. For one thing, files of this type are generally compiler-dependent, so arguably they do no belong in the system include directory. But by failing to tell anyone of this changed location via nf-config, the package maintainers have made things difficult for the users.
So, what to do?
I can't put a link to the .mod files in /usr/include, as I don't have administrator rights on the virtual machine (except that I can install packages via yum).
I tried setting environment variables as follows before running make
Code: Select all
export USE_NETCDF= export NETCDF_INCDIR=/usr/lib64/gfortran/modules export NETCDF_LIBDIR=/usr/lib64
So I think what I shall do is make my own, modifed nf-config script to spit out the values I want.
Finally, I've just noticed that the system netCDF package (installed last week) is at version 4.2, which is several years old. So perhaps I should just bite the bullet and build my own copy from source.
Anyway, there are various ways to work around this, but I'm curious whether anyone else has run into this problem (I couldn't find anything on the forum) and whether people think there is a case for raising this as an issue with the package maintainers.