Tow command-line options for ncdump related to netCDF-4 files are:
[-g grp1,...] output data only for sepecified groups [-s] output special virtual attributes that provide performance-related information for netCDF-4 data
Example: from foo.cdl, output data only for group "FooGrp" and all special attributes:
$ ncdump -g FooGrp -s 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.