11 #include "ncdispatch.h"
18 static const char nc_libvers[] = PACKAGE_VERSION
" of "__DATE__
" "__TIME__
" $";
92 const char *cp = (
const char *) strerror(ncerr1);
94 return "Unknown Error";
104 return "NetCDF: Not a valid ID";
106 return "NetCDF: Too many files open";
108 return "NetCDF: File exists && NC_NOCLOBBER";
110 return "NetCDF: Invalid argument";
112 return "NetCDF: Write to read only";
114 return "NetCDF: Operation not allowed in data mode";
116 return "NetCDF: Operation not allowed in define mode";
118 return "NetCDF: Index exceeds dimension bound";
120 return "NetCDF: NC_MAX_DIMS exceeded";
122 return "NetCDF: String match to name in use";
124 return "NetCDF: Attribute not found";
126 return "NetCDF: NC_MAX_ATTRS exceeded";
128 return "NetCDF: Not a valid data type or _FillValue type mismatch";
130 return "NetCDF: Invalid dimension ID or name";
132 return "NetCDF: NC_UNLIMITED in the wrong index";
133 case NC_EMAXVARS:
return "NetCDF: NC_MAX_VARS exceeded";
135 return "NetCDF: Variable not found";
137 return "NetCDF: Action prohibited on NC_GLOBAL varid";
139 return "NetCDF: Unknown file format";
141 return "NetCDF: In Fortran, string too short";
143 return "NetCDF: NC_MAX_NAME exceeded";
145 return "NetCDF: NC_UNLIMITED size already in use";
147 return "NetCDF: nc_rec op when there are no record vars";
149 return "NetCDF: Attempt to convert between text & numbers";
151 return "NetCDF: Start+count exceeds dimension bound";
153 return "NetCDF: Illegal stride";
155 return "NetCDF: Name contains illegal characters";
157 return "NetCDF: Numeric conversion not representable";
159 return "NetCDF: Memory allocation (malloc) failure";
161 return "NetCDF: One or more variable sizes violate format constraints";
163 return "NetCDF: Invalid dimension size";
165 return "NetCDF: File likely truncated or possibly corrupted";
167 return "NetCDF: Illegal axis type";
169 return "NetCDF: DAP failure";
171 return "NetCDF: libcurl failure";
173 return "NetCDF: I/O failure";
175 return "NetCDF: Variable has no data";
177 return "NetCDF: DAP server error";
179 return "NetCDF: Malformed or inaccessible DAP DAS";
181 return "NetCDF: Malformed or inaccessible DAP2 DDS or DAP4 DMR response";
183 return "NetCDF: Malformed or inaccessible DAP2 DATADDS or DAP4 DAP response";
185 return "NetCDF: Malformed URL";
187 return "NetCDF: Malformed or unexpected Constraint";
189 return "NetCDF: Untranslatable construct";
191 return "NetCDF: Access failure";
193 return "NetCDF: Authorization failure";
195 return "NetCDF: file not found";
197 return "NetCDF: cannot delete file";
199 return "NetCDF: internal library error; Please contact Unidata support";
201 return "NetCDF: PnetCDF error";
203 return "NetCDF: HDF error";
205 return "NetCDF: Can't read file";
207 return "NetCDF: Can't write file";
209 return "NetCDF: Can't create file";
211 return "NetCDF: Can't add HDF5 file metadata";
213 return "NetCDF: Can't define dimensional metadata";
215 return "NetCDF: Can't open HDF5 attribute";
217 return "NetCDF: Problem with variable metadata.";
219 return "NetCDF: Can't create HDF5 compound type";
221 return "NetCDF: Attempt to create attribute that already exists";
223 return "NetCDF: Attempting netcdf-4 operation on netcdf-3 file";
225 return "NetCDF: Attempting netcdf-4 operation on strict nc3 netcdf-4 file";
227 return "NetCDF: Attempting netcdf-3 operation on netcdf-4 file";
229 return "NetCDF: Parallel operation on file opened for non-parallel access";
231 return "NetCDF: Error initializing for parallel access";
233 return "NetCDF: Bad group ID";
235 return "NetCDF: Bad type ID";
237 return "NetCDF: Type has already been defined and may not be edited";
239 return "NetCDF: Bad field ID";
241 return "NetCDF: Bad class";
243 return "NetCDF: Mapped access for atomic types only";
245 return "NetCDF: Attempt to define fill value when data already exists.";
247 return "NetCDF: Attempt to define var properties, like deflate, after enddef.";
249 return "NetCDF: Problem with HDF5 dimscales.";
251 return "NetCDF: No group found.";
253 return "NetCDF: Cannot specify both contiguous and chunking.";
255 return "NetCDF: Bad chunk sizes.";
257 return "NetCDF: Attempt to use feature that was not turned on "
258 "when netCDF was built.";
260 return "NetCDF: Error in using diskless access";
262 return "NetCDF: Filter error: bad id or parameters or duplicate filter";
264 return "NetCDF: Filter error: undefined filter encountered";
266 return "NetCDF: Attempt to extend dataset during NC_INDEPENDENT I/O operation. Use nc_var_par_access to set mode NC_COLLECTIVE before extending variable.";
267 case NC_EMPI:
return "NetCDF: MPI operation failed.";
269 return "NetCDF: RC File Failure.";
271 return "NetCDF: File fails strict Null-Byte Header check.";
273 return "NetCDF: In-memory File operation failed.";
275 return "NetCDF: NCZarr error";
277 return "NetCDF: AWS S3 error";
279 return "NetCDF: Attempt to read empty NCZarr map key";
281 return "NetCDF: Some object exists when it should not";
283 return "NetCDF: Some object not found";
285 return "NetCDF: Unclassified failure in accessing a dynamically loaded plugin";
291 return (ncmpi_strerror(ncerr1) ?
292 ncmpi_strerror(ncerr1) :
295 return "Unknown Error";
const char * nc_inq_libvers(void)
Return the library version.
const char * nc_strerror(int ncerr1)
Given an error number, return an error message.
#define NC_EDAPURL
Malformed DAP URL.
#define NC_ENOTINDEFINE
Operation not allowed in data mode.
#define NC_ELATEDEF
Attempt to define var properties, like deflate, after enddef.
#define NC_EVARSIZE
One or more variable sizes violate format constraints.
#define NC_ECHAR
Attempt to convert between text & numbers.
#define NC_EDISKLESS
Error in using diskless access.
#define NC_ERCFILE
RC file failure.
#define NC_ENULLPAD
Header Bytes not Null-Byte padded.
#define NC_EBADTYPE
Not a netcdf data type.
#define NC_EDDS
Malformed or inaccessible DDS.
#define NC_EBADFIELD
Bad field ID.
#define NC_ETYPDEFINED
Type has already been defined and may not be edited.
#define NC_EUNLIMPOS
NC_UNLIMITED in the wrong index.
#define NC_EDAS
Malformed or inaccessible DAS.
#define NC_EFILTER
Filter operation failed.
#define NC_EBADGRPID
Bad group ID.
#define NC_ENOCOMPOUND
Not a compound type.
#define NC_EATTEXISTS
Attribute already exists.
#define NC_ENOTNC3
Attempting netcdf-3 operation on netcdf-4 file.
#define NC_ENOOBJECT
Some object not found.
#define NC_EPERM
Write to read only.
#define NC_EDIMSCALE
Problem with HDF5 dimscales.
#define NC_ENOTNC
Not a netcdf file.
#define NC_EPLUGIN
Unclassified failure in accessing a dynamically loaded plugin>
#define NC_ENOGRP
No group found.
#define NC_ENODATA
Attempt to access variable with no data.
#define NC_EDAPCONSTRAINT
Malformed DAP Constraint.
#define NC_ENAMEINUSE
String match to name in use.
#define NC_EEDGE
Start+count exceeds dimension bound.
#define NC_ENOTNC4
Attempting netcdf-4 operation on netcdf-3 file.
#define NC_EEMPTY
Attempt to read empty NCZarr map key.
#define NC_ENOMEM
Memory allocation (malloc) failure.
#define NC_EINMEMORY
In-memory file error.
#define NC_EDIMSIZE
Invalid dimension size.
#define NC_ES3
Generic S3 error.
#define NC_EDAP
Generic DAP error.
#define NC_EINTERNAL
NetCDF Library Internal Error.
#define NC_EAXISTYPE
Unknown axis type.
#define NC_EINDEFINE
Operation not allowed in define mode.
#define NC_EPNETCDF
Error at PnetCDF layer.
#define NC_ENORECVARS
nc_rec op when there are no record vars
#define NC_ENFILE
Too many netcdfs open.
#define NC_EOBJECT
Some object exists when it should not.
#define NC_EINVALCOORDS
Index exceeds dimension bound.
#define NC_ECANTREAD
Can't read.
#define NC_ESTRICTNC3
Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
#define NC_ESTS
In Fortran, string too short.
#define NC_ESTORAGE
Can't specify both contiguous and chunking.
#define NC_EPARINIT
Error initializing for parallel access.
#define NC_EATTMETA
Problem with attribute metadata.
#define NC_EHDFERR
Error at HDF5 layer.
#define NC_ETRANSLATION
Untranslatable construct.
#define NC_EMAXNAME
NC_MAX_NAME exceeded.
#define NC_ENOTATT
Attribute not found.
#define NC_ISSYSERR(err)
The netcdf version 3 functions all return integer error status.
#define NC_EMAXDIMS
NC_MAX_DIMS exceeded.
#define NC_EFILEMETA
Problem with file metadata.
#define NC_ENOTFOUND
No such file.
#define NC_ENCZARR
Error at NCZarr layer.
#define NC_ENOTVAR
Variable not found.
#define NC_EINVAL
Invalid Argument.
#define NC_NOERR
No Error.
#define NC_EMPI
MPI operation failed.
#define NC_EDATADDS
Malformed or inaccessible DATADDS.
#define NC_EBADCLASS
Bad class.
#define NC_ETRUNC
File likely truncated or possibly corrupted.
#define NC_EDIMMETA
Problem with dimension metadata.
#define NC_ECURL
Generic libcurl error.
#define NC_EMAXVARS
NC_MAX_VARS exceeded.
#define NC_EMAXATTS
NC_MAX_ATTRS exceeded - not enforced after 4.5.0.
#define NC_ECANTEXTEND
Attempt to extend dataset during ind.
#define NC_ECANTREMOVE
Can't remove file.
#define NC_ENOPAR
Parallel operation on file opened for non-parallel access.
#define NC_EIO
Generic IO error.
#define NC_ENOTBUILT
Attempt to use feature that was not turned on when netCDF was built.
#define NC_EBADNAME
Attribute or variable name contains illegal characters.
#define NC_EBADCHUNK
Bad chunksize.
#define NC_EEXIST
netcdf file exists && NC_NOCLOBBER
#define NC_EAUTH
Authorization Failure.
#define NC_EMAPTYPE
Mapped access for atomic types only.
#define NC_EBADID
Not a netcdf id.
#define NC_EGLOBAL
Action prohibited on NC_GLOBAL varid.
#define NC_ENOFILTER
Filter not defined on variable.
#define NC_EUNLIMIT
NC_UNLIMITED size already in use.
#define NC_ECANTCREATE
Can't create.
#define NC_ESTRIDE
Illegal stride.
#define NC_EACCESS
Access Failure.
#define NC_EBADTYPID
Bad type ID.
#define NC_EDAPSVC
DAP server error.
#define NC_EVARMETA
Problem with variable metadata.
#define NC_ERANGE
Math result not representable.
#define NC_EBADDIM
Invalid dimension id or name.
#define NC_ECANTWRITE
Can't write.
#define NC_ELATEFILL
Attempt to define fill value when data already exists.