[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #WJF-305473]: ncgen fails to handle output of ncdump



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


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.