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.
>To: address@hidden >From: address@hidden >Subject: ncgen >Organization: UCAR/Unidata >Keywords: 200106271911.f5RJBJ123848 Hi Anand, > I am a student in University of Stony Brook New York using netcdf data > formats for x ray microtomograpy experiments. Recently i had to go to other > facility for my measurements who use hdf format of data. I have all my > analysis softwares and programs written for netcdf formats so was > attempting to convert the hdf into netcdf format. I used ncdump to write a > cdl and while using ncgen to write cdl into netcdf format, i get the > following error > > ncgen: *.cdl line 8:signal not declared as a variable, fatal error > > the line 8 in cdl file says > > data:signal = 1 ; > > Please let me know if you encountered such an error and recommend any fix. The word "data" is a reserved word in CDL (as are "dimensions" and "variables"), so the CDL parser interprets the statement data:signal = 1 ; as specifying values for the undeclared variable "signal", rather than as specifying the value of the attribute "signal" of the variable named "data". Getting around this requires either rewriting the grammar for CDL so it permits a variable named "data" (I don't know whether this is practical) or renaming the variable from "data" to something else ... --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu