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.
> Keywords: 199404262359.AA04705 Hi, > I wonder if you are the right person to direct this query > regarding NetCDF. Yes, all such questions should be sent to address@hidden. > I came across a maximum of 32 when trying to define dimensions. > I would like to find out if there are ways around it. > ( I am investigating NetCDF to use as format of archive files > of a numerical model. ) The limit of 32 dimensions per netCDF file is arbitrary, and was specified to make application programs that read general netCDF files easier to write, since it is difficult for many Fortran and C programmers to deal with variables that might have an arbitrary number of dimensions. You can change the limit in the source code to something larger, and just recompile all the netCDF library, programs, and tests. You should see no problems from this change, except that if you produce netCDF files with more than 32 dimensions, you may find that some other people's programs that assumed the lower limit won't work on your files. For example, ncdump on someone else's system may not work on your files without recompiling it with a higher limit. To define a larger limit, just change the definition of the constant MAX_NC_DIMS in netcdf/libsrc/netcdf.h and re-build everything. __________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden P.O. Box 3000 (303)497-8645 Boulder, Colorado 80307-3000