| NetCDF Documentation |
|
NetCDF 3.6.2 is installed in /opt/netcdf and compiled with gnu, intel, and pgi: /opt/netcdf/gnu /opt/netcdf/intel /opt/netcdf/pgi ** Please Note for Fortran Builds ** Starting with version 3.6.2, another method of building the netCDF fortran libraries specifies that the C library should not contain the fortran functions anymore. Building separate fortran libraries is required for shared library builds. In previous releases, the C and Fortran functions were in the same static library. In the new release, an additional library, libnetcdff.a (not the extra “f”) contains the fortran functions.
Linking To link against a fortran program with the separate fortran library (gnu build), you must link to both the fortran and the C libraries: gfortran -o myprogram myprogram.o -L/opt/netcdf/gnu/lib -lnetcdff -lnetcdf To link against the c library (intel build): icc -o myprogram myprogram.o -L/opt/netcdf/intel/lib -lnetcdf To link against the c++ library (gnu build): g++ -o myprogram myprogram.o -L/opt/netcdf/gnu/lib -lnetcdf_c++
Execution To run your program that used the netcdf libraries, you must set your library path: BASH shell: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/netcdf/{compiler}/lib TCSH shell: setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/opt/netcdf/{compiler}/lib
Compiled Options
Directory Structure
To access the full documentation, tutorial, users guides, and FAQs, please follow the link to unidata at ucar: |
![[FSU Seal Image]](http://www.fsu.edu/.element/img/2.1/headerFSUSeal.gif)


