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.
Alexander, >Date: Fri, 14 Feb 2003 10:37:16 -0700 >From: Unidata Support <address@hidden> >Organization: ? >To: address@hidden >Subject: 20030214:read netCDF file - Fortran The above message contained the following: > I am beginner and ask to help me to read contents of a netcdf file only. > > Tell me please, to take advantage of the program ncdump.exe ( or others = > ?) whether it is necessary previously to write the fortran subroutine to = > address to it? The program "ncdump.exe" can be used to print the contents of a netCDF file without the need to write any other program. If you want to read the netCDF file into a Fortran program, then you will have to write the program. The program "ncdump -h" can be used to create a CDL version of the netCDF file (a formatted version). This file can then be used by the program "ncgen -f" to create a Fortran program that will create the original netCDF file (but without any data values). You could modify this Fortran program to read the netCDF file rather than write it. Information on the "ncdump" and "ncgen" programs can be found at http://www.unidata.ucar.edu/packages/netcdf/docs.html look for "ncdump" and "ncgen". General information on the netCDF pacakge can be found at http://my.unidata.ucar.edu/content/software/netcdf/index.html Good luck. Regards, Steve Emmerson <http://www.unidata.ucar.edu>