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.
>To: address@hidden >From: Vinay Kumar <address@hidden> >Subject: instlation of netCDF >Organization: UCAR/Unidata >Keywords: 200308060516.h765GvLd010127 Hi Vinay, > I downloaded the compresserd filr form Ferret Home > page of NOAA in /netcd in root directory os SUN > Solaris Machine. > #uname -a > SunOS pawan 5.7 Generic_106541-08 sun4u sparc > SUNW,Ultra-5_10 > > I install the netCDF from root at my Machine as > instructed at the site quoted below. > http://www.unidata.ucar.edu/packages/netcdf/INSTALL.html#sunos4 > > The installtion processed correctly with no error. > Query - I wanted to know what path I should write in > my .profile file to run netCDF? According to the installation instructions, when you run the configure script you need to Decide where you want to install this package. Use this for the "--prefix=" argument to the configure script below. The default installation prefix is "..", which will install the package's files in ../bin, ../lib, and ../man relative to the netCDF src/ directory. Execute the configure script: ./configure --prefix=whatever_you_decided The "--prefix=..." specification is optional; if omitted, ".." designating the parent directory will be used as a default. After building with "make all" and testing with "make test", you run "make install" to put the executables in the $PREFIX/bin/ directory, the libraries in a $PREFIX/lib/ directory, and the include files in a $PREFIX/include/ directory, where "$PREFIX" is either what you specified as the argument to "--prefix" or is the default "..". If you want to use the netCDF utilities ncdump and ncgen, which were installed in the $PREFIX/bin/ directory, you need to add that directory to your PATH for finding executables in your .profile. If you want to compile source files that use the netCDF library, just specify the $PREFIX/lib/ location on your compile line for where to look for the libraries. For more information on how to do this in C, see "Compiling and Linking with the NetCDF Library" in the C User's Guide: http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-9.html#HEADING9-89 There is a similar section in the Fortran User's Guide: http://www.unidata.ucar.edu/packages/netcdf/guidef/guidef-9.html#HEADING9-89 --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://my.unidata.ucar.edu