NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Amanda, Netcdf-C and netcdf-fortran are two different packages. They must both be installed to get fortran access to netcdf. This looks like netcdf-fortran was not installed on your machine, or else it was installed somewhere other than /usr/local/netcdf. The "use netcdf" reference is looking for a file named "netcdf.mod" which is the fortran module file associated with netcdf-fortran. So either locate this file and point your -I path there, or else get netcdf-fortran installed. Also please note, separate builds of netcdf-fortran in separate locations are required if you are supporting more than one fortran compiler on the same machine. In particular, the netcdf.mod files are probably not compatible between cray and intel fortran. So ensure that your include reference points to the matching compiler install location. For more information, see the user guide chapter on building and linking netcdf-fortran, particularly the section "Linking your programs". https://www.unidata.ucar.edu/software/netcdf/docs/building_ netcdf_fortran.html --Dave On Thu, Aug 23, 2018 at 1:05 PM, Amanda Tritinger <atritinger@xxxxxxxxx> wrote: > Hello NetCDF Group, > > > > I am trying to compile a code that has the 'use netcdf' in it using the > ifort compiler, but get the following error: > > > > *myprogram.for(2): error #7002: Error in opening the compiled module > file. Check INCLUDE paths. [NETCDF]* > > * use netcdf* > > *----------^* > > *compilation aborted for * *myprogram.for (code 1)* > > > > Loaded on my machine is the cray-netcdf/4.6.1.0 module (I got a similar > error with an intel 4.4.1.1 version as well). My command looked like this: > > > > *ifort myprogram.for -I/usr/local/netcdf/include * > > > > What am I missing? Thank you for your time, > > Amanda Tritinger > > > -- > *Amanda Tritinger* > Doctoral Student in Coastal Engineering > University of Florida (UF) > Masters in Civil Engineering > University of North Florida (UNF) > Bachelors in Environmental Engineering > University of Central Florida (UCF) >
netcdfgroup
archives: