This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Peter, > When the attached nc4 file is dump using ncdump -h, and a new file is > created using ncgen, the variable attributes that contain a string data > type prefix are not instantiated in the file created by ncgen. This is also related to the fact that the string type is not part of the netCDF classic model, and the default output foor ncgen is classic model netCDF files, although I'm surprised that it just omitted the string attributes, rather than an emitting an error. It works fine for me when I use the "-k netCDF-4" option to ncgen to explicitly specify output of a netCDF-4 format file: ncgen -k netCDF-4 -o tmp.nc tmp.cdl where tmp.cdl is the output of ncdump on your netCDF-4 file, and tmp.nc is the resulting netCDF-4 file. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: UAK-176631 Department: Support netCDF Priority: High Status: Closed