NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Unable to put open dataset into define mode

Hello,

I am trying to put a dataset into define mode but I
get an error status of -39.  I can't find where the
error codes are defined in the documentation so I'm
pretty clueless as to why this is happening.  I am
using the NetCDF v3.0 C interface in a C++ program. 
The relevant code is included below.  Thanks for any
suggestions as to how to get around this.


-James


--------------------------------------


/*****************************************
* Write a grid to an NetCDF file.
*
*@param path the path to the NetCDF file
*******************************************/
int GeoGrid::writeGridToNetCDF (char *path)
{
        // IDs used throughout the method
        int status;
        int ncid;


        // open the NetCDF
        status = nc_create(path, NC_NOCLOBBER, &ncid);
        if (status != NC_NOERR)
        {
                return 1;
        }


        // put into define mode
        status = nc_redef(ncid);
        if (status != NC_NOERR)
        {
                // it is here that I get status = -39
                return 2;
        }



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: