Go to the previous, next section.
The ncgen tool generates a netCDF file or the C or FORTRAN
programs required to create the netCDF file. If no options are
specified in invoking ncgen, the program merely checks the
syntax of the CDL input, producing error messages for any violations
of CDL syntax. Other options can be used to create a netCDF file
or to generate a program in C or FORTRAN that calls the routines
required to create the netCDF file.
UNIX syntax for invoking ncgen:
ncgen [-b] [-o output-file] [-c] [-f] [-n] [input-file]where:
netcdf keyword in the input) by appending the
`.nc' extension. If a file already exists with the specified name
it will be overwritten.
Check the syntax of the CDL file `foo.cdl':
ncgen foo.cdl
From the CDL file `foo.cdl', generate an equivalent binary netCDF file named `flu.nc':
ncgen -o flu.nc foo.cdl
From the CDL file `foo.cdl', generate a C program containing the netCDF function invocations necessary to create an equivalent binary netCDF file named `flu.nc':
ncgen -c -o flu.nc foo.cdl
Go to the previous, next section.