The ncgen has options to specify what kind of output to generate.
ncgen [-b] [-o netcdf_filename] [-k file_format] [-l output_language] [-x] cdl_file [-b] binary output as a netCDF file, uses .nc extension on input [-o filename] like -b except output netCDF to specified filename [-k] kind of netCDF file [-l c|f77|java] language of program generated to standard output [-x] don't write fill values for missing data in output cdl_file name of input CDL file