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 Michael, > I have a NetCDF v4 file, which can be converted to text form by using > the ncdump tool. However, when I try to reconstruct the file using ncgen, > it fails saying: > > -bash-4.1$ ncdump efitOut.nc >efitOut.cdl > -bash-4.1$ ncgen efitOut.cdl -o new.nc > ncgen: efitOut.cdl line 8: syntax error, unexpected IDENT, expecting '=' > > what is wrong? I have difficulties reading this file in quite any sotfware > except for IDL 8 The first thing that's wrong is that one of your enumeration labels contains a blank-space in its name, which ncdump doesn't properly escape: byte enum equilibriumStatusType {Converged = 1, Vacuum = 2, NotConverged = 3, Fatal error = 4} ; The ncdump utility should output this as byte enum equilibriumStatusType {Converged = 1, Vacuum = 2, NotConverged = 3, Fatal\ error = 4} ; instead, so that's a bug in ncdump. If you manually edit the CDL file to the second form, ncgen gets further, but ultimately exits with a memory fault. I'll fix the bug in ncdump before the next release and pass the ncgen bug to the developer for further investigation. Thanks for reporting the bug! --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: WJF-305473 Department: Support netCDF Priority: Normal Status: Closed