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 David, The syntax for declaration of a global attribute is wrong. Where you have // global attributes: grid_type = "REGULAR" ; it should instead be // global attributes: :grid_type = "REGULAR" ; (that is, you need a ":" before the name of the global attribute). With that fix, I think everything will work fine. I just tried it with the current netcdf-3.6.2 version, and ncgen -f NetCDF_2d.cdl > ng.f generated a Fortran-77 program, ng.f, that compiled and ran just fine, creating the file NetCDF_2d.nc, which when run through ncdump showed the file was created that matched the CDL you specified. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: CWQ-443437 Department: Support netCDF Priority: Normal Status: Closed