Previous: CDL for Enumeration (enum) Types Next: Using ncdump on netCDF-4 files Table of contents Frames 2012 Unidata NetCDF Workshop > Utilities for NetCDF-4

15.5 Options for ncgen
The ncgen utility has options for creating netCDF-4 files or program source from extended CDL.

The primary command-line options for ncgen are:

[-k  file_format]   Format of the file to be created
		    1 => classic
		    2 => classic 64-bit offset
		    3 => netCDF-4
		    4 => netCDF-4 classic model

[-l  language]	    Format of the file to be created
		    c => C (full netCDF-4 support)
		    j => Java (netCDF-3 only)
		    f => F77 (netcdf-3 only)

[-b]		    binary output (full netCDF-4 support)

filename	    input CDL file

Example: from foo.cdl, generate a binary netCDF-4 file foo.nc:

$ ncgen -b -k3 foo.cdl

Note: the "-k" option is not needed if the type of outputt file can be deduced from the input. For example, i the input CDL has groups, the output must be a netCDF-4 file, so that's what ncgen will generate.

 


Previous: CDL for Enumeration (enum) Types Next: Using ncdump on netCDF-4 files Table of contents Frames 2012 Unidata NetCDF Workshop > Utilities for NetCDF-4