Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690