Next: , Previous: NetCDF 2 C Transition Guide, Up: Top


Appendix C Error Codes

     #define NC_NOERR        0       /* No Error */
     
     #define NC_EBADID       (-33)   /* Not a netcdf id */
     #define NC_ENFILE       (-34)   /* Too many netcdfs open */
     #define NC_EEXIST       (-35)   /* netcdf file exists && NC_NOCLOBBER */
     #define NC_EINVAL       (-36)   /* Invalid Argument */
     #define NC_EPERM        (-37)   /* Write to read only */
     #define NC_ENOTINDEFINE (-38)   /* Operation not allowed in data mode */
     #define NC_EINDEFINE    (-39)   /* Operation not allowed in define mode */
     #define NC_EINVALCOORDS (-40)   /* Index exceeds dimension bound */
     #define NC_EMAXDIMS     (-41)   /* NC_MAX_DIMS exceeded */
     #define NC_ENAMEINUSE   (-42)   /* String match to name in use */
     #define NC_ENOTATT      (-43)   /* Attribute not found */
     #define NC_EMAXATTS     (-44)   /* NC_MAX_ATTRS exceeded */
     #define NC_EBADTYPE     (-45)   /* Not a netcdf data type */
     #define NC_EBADDIM      (-46)   /* Invalid dimension id or name */
     #define NC_EUNLIMPOS    (-47)   /* NC_UNLIMITED in the wrong index */
     #define NC_EMAXVARS     (-48)   /* NC_MAX_VARS exceeded */
     #define NC_ENOTVAR      (-49)   /* Variable not found */
     #define NC_EGLOBAL      (-50)   /* Action prohibited on NC_GLOBAL varid */
     #define NC_ENOTNC       (-51)   /* Not a netcdf file */
     #define NC_ESTS         (-52)   /* In Fortran, string too short */
     #define NC_EMAXNAME     (-53)   /* NC_MAX_NAME exceeded */
     #define NC_EUNLIMIT     (-54)   /* NC_UNLIMITED size already in use */
     #define NC_ENORECVARS   (-55)   /* nc_rec op when there are no record vars */
     #define NC_ECHAR        (-56)   /* Attempt to convert between text & numbers */
     #define NC_EEDGE        (-57)   /* Edge+start exceeds dimension bound */
     #define NC_ESTRIDE      (-58)   /* Illegal stride */
     #define NC_EBADNAME     (-59)   /* Attribute or variable name
                                              contains illegal characters */
     /* N.B. following must match value in ncx.h */
     #define NC_ERANGE       (-60)   /* Math result not representable */
     #define NC_ENOMEM       (-61)   /* Memory allocation (malloc) failure */
     
     #define NC_EVARSIZE     (-62)   /* One or more variable sizes violate
                                        format constraints */
     #define NC_EDIMSIZE     (-63)   /* Invalid dimension size */
     #define NC_ETRUNC       (-64)   /* File likely truncated or possibly corrupted */