This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Organization: NASA / JPL > Keywords: 199502271841.AA24330 Hi Lisa, > I have question about netcdf: > > I would like to get the netcdf.inc file, so I use the find to get this file. > > rgps1% find . -name "netcdf.inc" -print > ./fortran/msoft/netcdf.inc =====> I BELIEVE USE FOR PC > ./fortran/vms/netcdf.inc =====> I BELIEVE USE FOR VAX > ./ncgen/netcdf.inc =====> I BELIEVE USE FOR UNIX > > When I went to ncgen directory, the netcdf.in was missing. > I was ftp and zcat the netcdf last 2 weeks. Can you tell me where I can > get this file or use the PC or VAX. The `netcdf.inc' file is supposed to be generated as part of the process of compiling and installing the netCDF software. Since its contents depend on the platform (hardware and operating system) on which you install it, there is no "UNIX version" of `netcdf.inc', but instead a different version for each platform, and the platform-specific version is constructed when the netCDF Fortran interface is built. Whoever was responsible for building and installing netCDF on your machine may have specified that no Fortran interface should be built. In that case, the `netcdf.inc' file would never have been constructed and you would need to build it again, starting with the `configure' step where you specify which Fortran compiler to use to indicate that you want the Fortran interface. After the `configure' step, which builds the Makefiles, the `make all' step compiles the library and also constructs the `netcdf.inc' file in the netcdf/fortran/ subdirectory. The `make test' step actually tests the Fortran interface, including the `netcdf.inc' file. It also copies the `netcdf.inc' file into the ncgen directory to test whether `ncgen -f' generates a correct Fortran program. The subsequent `make install' step should install the generated `netcdf.inc' file into the same directory as the C include file `netcdf.h' is installed. The other `netcdf.inc' files you found for PCs and VMS should not be used on Unix and are included in the distribution only because MSDOS and VMS lack the necessary tools to generate the `netcdf.inc' file when the netCDF software is built and installed. If your source directories in which the netCDF software was built are still available and if `make clean' wasn't invoked to delete all the object files and temporary files, you might be able to save some steps by just changing to the netcdf/fortran/ subdirectory and invoking make netcdf.inc If that doesn't work, you'll need to start from the `configure' step, as described in the `netcdf/INSTALL' document. ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden P.O. Box 3000 http://www.unidata.ucar.edu/ Boulder, CO 80307-3000 ______________________________________________________________________________