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.
Hi, > i am a user of ubuntu 9.10 karmic koala. i am studying a > field which requires me to run Princeton Ocean Model (POM). Hence i > would have to use the netcdf that is provided. i downloaded a 4.0.1 > version from Unidata site and manage to have it installed into a > desired directory using ./configure --prefix=/usr/netcdf-4.0.1_c1 > (After make install, i saw the "Congratulations, you have successfully > installed netcdf..." notification in my command line interface). > > Now all i have to do is run my fortran program which has "include > 'netcdf.inc'" in few of it's subroutines. i know i have to link it to > some library or include in order to make it work. So i had searched for > various ways to link it. i had tried ifort -o example example.f > I/usr/netcdf-4.0.1/include(or lib) and other similar forms but it was > to no avail. i am searching for ways to link it but this is taking too > long. > > Can i get help on how to link this? Check if the program "nc-config" was installed in the bin directory where the other netCDF utlity programs ncdump and ncgen were installed. If you run "nc-config --fflags", it should tell you the flags needed for finding the netcdf.inc include file, typically something like "-M/usr/local/include" or "-I/usr/local/include". Running "nc-config --flibs" will also show the library flags needed to link your program. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: DAM-293811 Department: Support netCDF Priority: Normal Status: Closed