cdf2fortran inputFilePath (optional)outpuFilePathinputFilePath
The full path to the netCDF file for which you wish to create a fortran routine to read the data. The netcdf filename should end with the .cdf extension.
outpuFilePath
The full path to the file to which you wish to write the resultant fortran code. If you do not provide an outputFilePath the result will be written to the file readnet.f.
This program will ask the user for the name of a netcdf file to read. It will open that file and using the proper netCDF calls, get info on the variables and their dimensions. It then generates a FORTRAN program that can be used to actually read the netCDF file and fill the variables with data. This program can be used to read ANY netCDF file. The user only has to write fortran statements to print the data or pass to another program. Once you have generated a program, you may use it to read any file of that data type; i.e., the program is general until the powers to be change variable attributes.
The program also requires the inclusion of the file netcdf.inc provided with the netcdf library release. This file contains required constants, etc... The path to the directory containing this file must be set in the Makefile provided with this release. Modify the COM_INCS line to reflect the include file location on your system.
your_machine 1 > make your_machine 2 > cdf2fortran /path_to_data_file/data_file.cdfThe resulting fortran code will be placed in the file readnet.f You may add code to manipulate the data to readnet.f.