ncgen has options to specify what kind of output to generate.
ncgen [-b] [-o file.nc] [-k kind] [-l c|f77|java] [-x] file.cdl [-b] binary output as a netCDF file (with ".nc" extension) [-o file.nc] like -b except output netCDF to specified filename [-k kind] kind of output netCDF file omitted => simplest format that works 1 or 'classic' => classic file format 2 or '64-bit-offset' => 64-bit-offset format 3 or 'netCDF-4' => netcdf-4 format 4 or 'netCDF-4 classic model' => netCDF-4 classic model [-l c|f77|java] language of program generated to standard output file.cdl name of input CDL file