netcdf packages

I’m trying to compile code that uses netcdf and am running into problems. Here’s the error.

mpif90 -fopenmp -I/usr/lib64 -ffree-line-length-none -DNETCDF -c ezcdf_opncls.f90
ezcdf_opncls.f90:37: Error: Can't open included file 'netcdf.inc'
makefile:15: recipe for target 'ezcdf_opncls.o' failed
make[1]: *** [ezcdf_opncls.o] Error 1

In case you’re wondering compiling with gcc or gfortran gives the same error.

Looking for the libraries gives:

>locate libnetcdf
/usr/lib64/libnetcdf.settings
/usr/lib64/libnetcdf.so.7
/usr/lib64/libnetcdf.so.7.2.0

It is missing libnetcdf.a, and libnetcdff.la Furthermore, there is no netcdf.inc in /usr/include

I tried installing both the netcdf-devel and netcdf-devel-static libraries from the science repository using zypper, but those didn’t seem to fix the problem.

I’m pretty much a novice when it comes to these things, so any help would be appreciated.

So I made some progress.

I needed to manually download the rpm files from rpm.pbone.net and install them. The ones from the “science” repository did not have the needed files. In particular I needed to install netcdf-fortran, netcdf-fortran-devel and libnetcdff5 (which was needed by netcdf-fortran-devel). This seems to have provided both libnetcdf.a and netcdf.inc.