netCDF
4.2.1.1
Main Page
Related Pages
Functions
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Groups
Pages
libdispatch
derror.c
Go to the documentation of this file.
1
10
#include "ncdispatch.h"
11
12
/* Tell the user the version of netCDF. */
13
static
const
char
nc_libvers[] = PACKAGE_VERSION
" of "
__DATE__
" "
__TIME__
" $"
;
14
26
const
char
*
27
nc_inq_libvers
(
void
)
28
{
29
return
nc_libvers;
30
}
31
86
const
char
*
87
nc_strerror
(
int
ncerr1)
88
{
89
/* System error? */
90
if
(
NC_ISSYSERR
(ncerr1))
91
{
92
const
char
*cp = (
const
char
*) strerror(ncerr1);
93
if
(cp == NULL)
94
return
"Unknown Error"
;
95
return
cp;
96
}
97
98
/* If we're here, this is a netcdf error code. */
99
switch
(ncerr1)
100
{
101
case
NC_NOERR
:
102
return
"No error"
;
103
case
NC_EBADID
:
104
return
"NetCDF: Not a valid ID"
;
105
case
NC_ENFILE
:
106
return
"NetCDF: Too many files open"
;
107
case
NC_EEXIST
:
108
return
"NetCDF: File exists && NC_NOCLOBBER"
;
109
case
NC_EINVAL
:
110
return
"NetCDF: Invalid argument"
;
111
case
NC_EPERM
:
112
return
"NetCDF: Write to read only"
;
113
case
NC_ENOTINDEFINE
:
114
return
"NetCDF: Operation not allowed in data mode"
;
115
case
NC_EINDEFINE
:
116
return
"NetCDF: Operation not allowed in define mode"
;
117
case
NC_EINVALCOORDS
:
118
return
"NetCDF: Index exceeds dimension bound"
;
119
case
NC_EMAXDIMS
:
120
return
"NetCDF: NC_MAX_DIMS exceeded"
;
121
case
NC_ENAMEINUSE
:
122
return
"NetCDF: String match to name in use"
;
123
case
NC_ENOTATT
:
124
return
"NetCDF: Attribute not found"
;
125
case
NC_EMAXATTS
:
126
return
"NetCDF: NC_MAX_ATTRS exceeded"
;
127
case
NC_EBADTYPE
:
128
return
"NetCDF: Not a valid data type or _FillValue type mismatch"
;
129
case
NC_EBADDIM
:
130
return
"NetCDF: Invalid dimension ID or name"
;
131
case
NC_EUNLIMPOS
:
132
return
"NetCDF: NC_UNLIMITED in the wrong index"
;
133
case
NC_EMAXVARS
:
134
return
"NetCDF: NC_MAX_VARS exceeded"
;
135
case
NC_ENOTVAR
:
136
return
"NetCDF: Variable not found"
;
137
case
NC_EGLOBAL
:
138
return
"NetCDF: Action prohibited on NC_GLOBAL varid"
;
139
case
NC_ENOTNC
:
140
return
"NetCDF: Unknown file format"
;
141
case
NC_ESTS
:
142
return
"NetCDF: In Fortran, string too short"
;
143
case
NC_EMAXNAME
:
144
return
"NetCDF: NC_MAX_NAME exceeded"
;
145
case
NC_EUNLIMIT
:
146
return
"NetCDF: NC_UNLIMITED size already in use"
;
147
case
NC_ENORECVARS
:
148
return
"NetCDF: nc_rec op when there are no record vars"
;
149
case
NC_ECHAR
:
150
return
"NetCDF: Attempt to convert between text & numbers"
;
151
case
NC_EEDGE
:
152
return
"NetCDF: Start+count exceeds dimension bound"
;
153
case
NC_ESTRIDE
:
154
return
"NetCDF: Illegal stride"
;
155
case
NC_EBADNAME
:
156
return
"NetCDF: Name contains illegal characters"
;
157
case
NC_ERANGE
:
158
return
"NetCDF: Numeric conversion not representable"
;
159
case
NC_ENOMEM
:
160
return
"NetCDF: Memory allocation (malloc) failure"
;
161
case
NC_EVARSIZE
:
162
return
"NetCDF: One or more variable sizes violate format constraints"
;
163
case
NC_EDIMSIZE
:
164
return
"NetCDF: Invalid dimension size"
;
165
case
NC_ETRUNC
:
166
return
"NetCDF: File likely truncated or possibly corrupted"
;
167
case
NC_EAXISTYPE
:
168
return
"NetCDF: Illegal axis type"
;
169
case
NC_EDAP
:
170
return
"NetCDF: DAP failure"
;
171
case
NC_ECURL
:
172
return
"NetCDF: libcurl failure"
;
173
case
NC_EIO
:
174
return
"NetCDF: I/O failure"
;
175
case
NC_ENODATA
:
176
return
"NetCDF: Variable has no data in DAP request"
;
177
case
NC_EDAPSVC
:
178
return
"NetCDF: DAP server error"
;
179
case
NC_EDAS
:
180
return
"NetCDF: Malformed or inaccessible DAP DAS"
;
181
case
NC_EDDS
:
182
return
"NetCDF: Malformed or inaccessible DAP DDS"
;
183
case
NC_EDATADDS
:
184
return
"NetCDF: Malformed or inaccessible DAP DATADDS"
;
185
case
NC_EDAPURL
:
186
return
"NetCDF: Malformed URL"
;
187
case
NC_EDAPCONSTRAINT
:
188
return
"NetCDF: Malformed Constraint"
;
189
case
NC_ETRANSLATION
:
190
return
"NetCDF: Untranslatable construct"
;
191
case
NC_EHDFERR
:
192
return
"NetCDF: HDF error"
;
193
case
NC_ECANTREAD
:
194
return
"NetCDF: Can't read file"
;
195
case
NC_ECANTWRITE
:
196
return
"NetCDF: Can't write file"
;
197
case
NC_ECANTCREATE
:
198
return
"NetCDF: Can't create file"
;
199
case
NC_EFILEMETA
:
200
return
"NetCDF: Can't add HDF5 file metadata"
;
201
case
NC_EDIMMETA
:
202
return
"NetCDF: Can't define dimensional metadata"
;
203
case
NC_EATTMETA
:
204
return
"NetCDF: Can't open HDF5 attribute"
;
205
case
NC_EVARMETA
:
206
return
"NetCDF: Problem with variable metadata."
;
207
case
NC_ENOCOMPOUND
:
208
return
"NetCDF: Can't create HDF5 compound type"
;
209
case
NC_EATTEXISTS
:
210
return
"NetCDF: Attempt to create attribute that alread exists"
;
211
case
NC_ENOTNC4
:
212
return
"NetCDF: Attempting netcdf-4 operation on netcdf-3 file"
;
213
case
NC_ESTRICTNC3
:
214
return
"NetCDF: Attempting netcdf-4 operation on strict nc3 netcdf-4 file"
;
215
case
NC_ENOTNC3
:
216
return
"NetCDF: Attempting netcdf-3 operation on netcdf-4 file"
;
217
case
NC_ENOPAR
:
218
return
"NetCDF: Parallel operation on file opened for non-parallel access"
;
219
case
NC_EPARINIT
:
220
return
"NetCDF: Error initializing for parallel access"
;
221
case
NC_EBADGRPID
:
222
return
"NetCDF: Bad group ID"
;
223
case
NC_EBADTYPID
:
224
return
"NetCDF: Bad type ID"
;
225
case
NC_ETYPDEFINED
:
226
return
"NetCDF: Type has already been defined and may not be edited"
;
227
case
NC_EBADFIELD
:
228
return
"NetCDF: Bad field ID"
;
229
case
NC_EBADCLASS
:
230
return
"NetCDF: Bad class"
;
231
case
NC_EMAPTYPE
:
232
return
"NetCDF: Mapped access for atomic types only"
;
233
case
NC_ELATEFILL
:
234
return
"NetCDF: Attempt to define fill value when data already exists."
;
235
case
NC_ELATEDEF
:
236
return
"NetCDF: Attempt to define var properties, like deflate, after enddef."
;
237
case
NC_EDIMSCALE
:
238
return
"NetCDF: Probem with HDF5 dimscales."
;
239
case
NC_ENOGRP
:
240
return
"NetCDF: No group found."
;
241
case
NC_ESTORAGE
:
242
return
"NetCDF: Cannot specify both contiguous and chunking."
;
243
case
NC_EBADCHUNK
:
244
return
"NetCDF: Bad chunk sizes."
;
245
case
NC_ENOTBUILT
:
246
return
"NetCDF: Attempt to use feature that was not turned on "
247
"when netCDF was built."
;
248
case
NC_EDISKLESS
:
249
return
"NetCDF: Error in using diskless access"
;
250
default
:
251
return
"Unknown Error"
;
252
}
253
}
254
255
Generated on Wed Aug 22 2012 14:39:40 for netCDF. NetCDF is a
Unidata
library.