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.
> Subject: 1995124 netCDF-2.4-beta4 comments > Organization: CSIRO Division of Oceanography > Keywords: 199512032150.AA10339 Hi Stephen, Earlier this week, you wrote about a limitation of ncgen: > Well, you almost did. The trouble is that the ncgen code sets its own idea > of the maximum number of attributes, in the following line from > ncgen/ncgen.h: > > #define MAX_NC_ATTS 500 /* max number of attributes in a netCDF */ > > I don't understand why it doesn't use the library-wide definition, > as stated in the following line from libsrc/netcdf.h: > > #define MAX_NC_ATTRS 2000 /* max global or per variable attributes > */ I've gotten a chance to revise ncgen so it now has no limitations on the maximum number of attributes, variables, or dimensions. In doing so, the run-time size of ncgen decreased significantly, since it now allocates space dynamically for these as needed instead of reserving arrays with maximum sizes. If you have a chance, please try the new version of ncgen, available as part of the current beta5 release of netCDF 2.4 in ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-2.4-beta.tar.Z and let me know if there are any problems. Thanks. ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu