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.
>From: Suzanne M. Fortin <address@hidden> >Organization: NOAA/Arkansas-Red Basin River Forecast Center >Keywords: 199408051853.AA05922 netCDF two-dimensional dynamic arrays Suzanne, >I am attempting to create a NETCDF file of gridded precipitation data. >My problem arises from the way in which I am allocating memory for >the 2-d array. I am using dynamic allocation as opposed to specifically >setting the dimensions. The contents of the NETCDF file created by the >'ncvarput' function call routine contains garbage when I use the >dynamically allocated array. The data looks fine when I do not >dynamically allocate. However, I wish to stay away for hard-wiring >dimensions so, dynamic allocation is more desirable. > >I attempted to create a NETCDF 2-d array with no success. Any >suggestions? Our primary netCDF person here at Unidata will be out of the office until August 13, so he will now be able to comment immediately. I can tell you that I am certain this sort of thing is done all of the time by other users of the package. If you need to get moving on this problem immediately, I suggest that you send a note to the netCDF email group (address@hidden) and ask for suggestions. The other thing that would be handy to include is the code that you are trying to use so the folks can see if there is a something amiss. >Suzanne Fortin >e-mail: smf@192.133.17.71 >phone: 918-832-4109 Tom Yoksas