NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
On Wed May 15, 2013, at 3:26 PM, Russ Rew <russ@xxxxxxxxxxxxxxxx> wrote: > Hi Gary, > > It's an unfortunate carryover from "long" originally being a netCDF type > synonymous with "int". When unsigned primitive types were added to > netCDF-4, "ulong" was interpreted as a synonym for "uint", although > neither "long" nor "ulong" are ever emitted from ncdump. Finally, in > analogy with CDL allowing either "unlimited" or "UNLIMITED" to specify > the length of an unlimited dimension, type names are accepted in upper > case, hence the CDL syntax error in specifying "double ULONG". > > Assuming no one uses upper case primitive type names in CDL, we've fixed > this in the current snapshot, so ncgen will permit variables with names > like "INT64" or "ULONG" in the next release. In the meantime, the only > workaround is to rebuild ncgen with the current netCDF snapshot. Thanks, Russ, for finding the solution! I did run the netCDF-3 version of 'ncgen' over the same file, with no problems. I've decided I can temporarily change "ULONG" to some other string, run 'ncgen', then use 'ncrename' to change the temporary string back to "ULONG". Good enough for what I need. > > --Russ > >> I have a relatively straightforward manually-edited CDL file that I'm turning >> back into a netCDF file, and I'm getting a 'syntax error' from what looks to >> me to be completely acceptable CDL: >> >> prompt> ncgen -n example.cdl >> ncgen: example.cdl line 84: syntax error >> >> Here's the offending portion: >> >> 79 float dzw(z_w) ; >> 80 dzw:long_name = "midpoint of k to midpoint of k+1" ; >> 81 dzw:units = "centimeters" ; >> 82 dzw:_FillValue = 9.96921e+36f ; >> 83 dzw:missing_value = 9.96921e+36f ; >> 84 double ULONG(nlat, nlon) ; >> 85 ULONG:long_name = "array of u-grid longitudes" ; >> 86 ULONG:units = "degrees_east" ; >> 87 ULONG:_FillValue = 9.96920996838687e+36 ; >> 88 ULONG:missing_value = 9.96920996838687e+36 ; >> >> I'm stumped. >> >> File is at >> >> ftp://ftp.cgd.ucar.edu/pub/strandwg/netCDF/example.cdl.gz >> >> Ideas/comments/help! >> >> Gary Strand >> strandwg@xxxxxxxx Gary Strand strandwg@xxxxxxxx
netcdfgroup
archives: