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.
>Organization: BMRC >Keywords: 199506020618.AA12340 netCDF ncapt Hi Asri, > We will really appreciate some help on this one. > After several dozens calls to ncapt in our program such as the following: > > ... > iattl = jmt * lseg > print*,' calling ncapt no. 66' > call ncapt(ncid,NCGLOBAL,'ist',NCFLOAT,iattl,ist,iret) > ... > > We got the following message: > > ncattput: NC_new_array: Not enough space > > We do not understand what that is suppose to mean. Please help. It means that a call to malloc(3) to allocate memory failed. The ncattput() function called the NC_new_array() function in several places to allocate memory. The failure of malloc might occur either because you don't have enough swap space configured on your system, some previous call to malloc has (perhaps inadvertently) allocated all remaining memory, the size you are specifying for the attribute size is very large and there is not enough memory to hold a copy of it, or your program is operating in an environment without much memory (perhaps because of memory used by other processes on the system). I would advise first checking the value of iattl above, to make sure it isn't huge because of something else having been inadvertently overwritten by an errant pointer. --Russ ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu