* master:
bump version
add netcdf static lib; potential incompatibility
From: Laurent <lg390@cam.ac.uk>
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR@121358 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -2,7 +2,7 @@ Package: mzR |
2 | 2 |
Type: Package |
3 | 3 |
Title: parser for netCDF, mzXML, mzData and mzML and mzIdentML files |
4 | 4 |
(mass spectrometry data) |
5 |
-Version: 2.7.6 |
|
5 |
+Version: 2.7.7 |
|
6 | 6 |
Author: Bernd Fischer, Steffen Neumann, Laurent Gatto, Qiang Kou |
7 | 7 |
Maintainer: Bernd Fischer <b.fischer@dkfz.de>, |
8 | 8 |
Steffen Neumann <sneumann@ipb-halle.de>, |
6 | 10 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,1099 @@ |
1 |
+/* |
|
2 |
+ * Copyright 1993-2005 University Corporation for Atmospheric Research/Unidata |
|
3 |
+ * |
|
4 |
+ * Portions of this software were developed by the Unidata Program at the |
|
5 |
+ * University Corporation for Atmospheric Research. |
|
6 |
+ * |
|
7 |
+ * Access and use of this software shall impose the following obligations |
|
8 |
+ * and understandings on the user. The user is granted the right, without |
|
9 |
+ * any fee or cost, to use, copy, modify, alter, enhance and distribute |
|
10 |
+ * this software, and any derivative works thereof, and its supporting |
|
11 |
+ * documentation for any purpose whatsoever, provided that this entire |
|
12 |
+ * notice appears in all copies of the software, derivative works and |
|
13 |
+ * supporting documentation. Further, UCAR requests that the user credit |
|
14 |
+ * UCAR/Unidata in any publications that result from the use of this |
|
15 |
+ * software or in any product that includes this software. The names UCAR |
|
16 |
+ * and/or Unidata, however, may not be used in any advertising or publicity |
|
17 |
+ * to endorse or promote any products or commercial entity unless specific |
|
18 |
+ * written permission is obtained from UCAR/Unidata. The user also |
|
19 |
+ * understands that UCAR/Unidata is not obligated to provide the user with |
|
20 |
+ * any support, consulting, training or assistance of any kind with regard |
|
21 |
+ * to the use, operation and performance of this software nor to provide |
|
22 |
+ * the user with any updates, revisions, new versions or "bug fixes." |
|
23 |
+ * |
|
24 |
+ * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR |
|
25 |
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
26 |
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
27 |
+ * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, |
|
28 |
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING |
|
29 |
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
|
30 |
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
|
31 |
+ * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. |
|
32 |
+ */ |
|
33 |
+/* "$Id: netcdf.h,v 2.116 2007/01/17 22:51:41 ed Exp $" */ |
|
34 |
+ |
|
35 |
+#ifndef _NETCDF_ |
|
36 |
+#define _NETCDF_ |
|
37 |
+ |
|
38 |
+#include <stddef.h> /* size_t, ptrdiff_t */ |
|
39 |
+#include <errno.h> /* netcdf functions sometimes return system errors */ |
|
40 |
+ |
|
41 |
+#if defined(__cplusplus) |
|
42 |
+extern "C" { |
|
43 |
+#endif |
|
44 |
+ |
|
45 |
+/* |
|
46 |
+ * The netcdf external data types |
|
47 |
+ */ |
|
48 |
+typedef enum { |
|
49 |
+ NC_NAT = 0, /* NAT = 'Not A Type' (c.f. NaN) */ |
|
50 |
+ NC_BYTE = 1, /* signed 1 byte integer */ |
|
51 |
+ NC_CHAR = 2, /* ISO/ASCII character */ |
|
52 |
+ NC_SHORT = 3, /* signed 2 byte integer */ |
|
53 |
+ NC_INT = 4, /* signed 4 byte integer */ |
|
54 |
+ NC_FLOAT = 5, /* single precision floating point number */ |
|
55 |
+ NC_DOUBLE = 6 /* double precision floating point number */ |
|
56 |
+} nc_type; |
|
57 |
+ |
|
58 |
+ |
|
59 |
+/* |
|
60 |
+ * Default fill values, used unless _FillValue attribute is set. |
|
61 |
+ * These values are stuffed into newly allocated space as appropriate. |
|
62 |
+ * The hope is that one might use these to notice that a particular datum |
|
63 |
+ * has not been set. |
|
64 |
+ */ |
|
65 |
+#define NC_FILL_BYTE ((signed char)-127) |
|
66 |
+#define NC_FILL_CHAR ((char)0) |
|
67 |
+#define NC_FILL_SHORT ((short)-32767) |
|
68 |
+#define NC_FILL_INT (-2147483647L) |
|
69 |
+#define NC_FILL_FLOAT (9.9692099683868690e+36f) /* near 15 * 2^119 */ |
|
70 |
+#define NC_FILL_DOUBLE (9.9692099683868690e+36) |
|
71 |
+ |
|
72 |
+ |
|
73 |
+/* |
|
74 |
+ * The above values are defaults. |
|
75 |
+ * If you wish a variable to use a different value than the above |
|
76 |
+ * defaults, create an attribute with the same type as the variable |
|
77 |
+ * and the following reserved name. The value you give the attribute |
|
78 |
+ * will be used as the fill value for that variable. |
|
79 |
+ */ |
|
80 |
+#define _FillValue "_FillValue" |
|
81 |
+#define NC_FILL 0 /* argument to ncsetfill to clear NC_NOFILL */ |
|
82 |
+#define NC_NOFILL 0x100 /* Don't fill data section an records */ |
|
83 |
+ |
|
84 |
+/* |
|
85 |
+ * 'mode' flags for ncopen |
|
86 |
+ */ |
|
87 |
+#define NC_NOWRITE 0 /* default is read only */ |
|
88 |
+#define NC_WRITE 0x1 /* read & write */ |
|
89 |
+ |
|
90 |
+/* |
|
91 |
+ * 'mode' flags for nccreate |
|
92 |
+ */ |
|
93 |
+#define NC_CLOBBER 0 |
|
94 |
+#define NC_NOCLOBBER 0x4 /* Don't destroy existing file on create */ |
|
95 |
+#define NC_64BIT_OFFSET 0x0200 /* Use large (64-bit) file offsets */ |
|
96 |
+ |
|
97 |
+/* |
|
98 |
+ * 'mode' flags for nccreate and ncopen |
|
99 |
+ */ |
|
100 |
+#define NC_SHARE 0x0800 /* Share updates, limit cacheing */ |
|
101 |
+#define NC_STRICT_NC3 (0x8) |
|
102 |
+ |
|
103 |
+/* The following flag currently is ignored, but use in |
|
104 |
+ * nc_open() or nc_create() may someday support use of advisory |
|
105 |
+ * locking to prevent multiple writers from clobbering a file |
|
106 |
+ */ |
|
107 |
+#define NC_LOCK 0x0400 /* Use locking if available */ |
|
108 |
+ |
|
109 |
+/* |
|
110 |
+ * Starting with version 3.6, there were two different format netCDF |
|
111 |
+ * files. netCDF-4 introduces the third one. |
|
112 |
+ */ |
|
113 |
+#define NC_FORMAT_CLASSIC (1) |
|
114 |
+#define NC_FORMAT_64BIT (2) |
|
115 |
+#define NC_FORMAT_NETCDF4 (3) |
|
116 |
+#define NC_FORMAT_NETCDF4_CLASSIC (4) /* create netcdf-4 files, with NC_STRICT_NC3. */ |
|
117 |
+ |
|
118 |
+/* |
|
119 |
+ * Let nc__create() or nc__open() figure out |
|
120 |
+ * as suitable chunk size. |
|
121 |
+ */ |
|
122 |
+#define NC_SIZEHINT_DEFAULT 0 |
|
123 |
+ |
|
124 |
+/* |
|
125 |
+ * In nc__enddef(), align to the chunk size. |
|
126 |
+ */ |
|
127 |
+#define NC_ALIGN_CHUNK ((size_t)(-1)) |
|
128 |
+ |
|
129 |
+/* |
|
130 |
+ * 'size' argument to ncdimdef for an unlimited dimension |
|
131 |
+ */ |
|
132 |
+#define NC_UNLIMITED 0L |
|
133 |
+ |
|
134 |
+/* |
|
135 |
+ * attribute id to put/get a global attribute |
|
136 |
+ */ |
|
137 |
+#define NC_GLOBAL -1 |
|
138 |
+ |
|
139 |
+/* These are in support of the coordinate axis stuff. */ |
|
140 |
+#define NC_NOAXISTYPE 0 |
|
141 |
+#define NC_LATITUDE 1 |
|
142 |
+#define NC_LONGITUDE 2 |
|
143 |
+#define NC_GEOX 3 |
|
144 |
+#define NC_GEOY 4 |
|
145 |
+#define NC_GEOZ 5 |
|
146 |
+#define NC_HEIGHT_UP 6 |
|
147 |
+#define NC_HEIGHT_DOWN 7 |
|
148 |
+#define NC_PRESSURE 8 |
|
149 |
+#define NC_TIME 9 |
|
150 |
+#define NC_RADAZ 10 |
|
151 |
+#define NC_RADEL 11 |
|
152 |
+#define NC_RADDIST 12 |
|
153 |
+ |
|
154 |
+/* |
|
155 |
+ * These maximums are enforced by the interface, to facilitate writing |
|
156 |
+ * applications and utilities. However, nothing is statically allocated to |
|
157 |
+ * these sizes internally. |
|
158 |
+ */ |
|
159 |
+#define NC_MAX_DIMS 1024 /* max dimensions per file */ |
|
160 |
+#define NC_MAX_ATTRS 8192 /* max global or per variable attributes */ |
|
161 |
+#define NC_MAX_VARS 8192 /* max variables per file */ |
|
162 |
+#define NC_MAX_NAME 256 /* max length of a name */ |
|
163 |
+#define NC_MAX_VAR_DIMS NC_MAX_DIMS /* max per variable dimensions */ |
|
164 |
+ |
|
165 |
+/* |
|
166 |
+ * The netcdf version 3 functions all return integer error status. |
|
167 |
+ * These are the possible values, in addition to certain |
|
168 |
+ * values from the system errno.h. |
|
169 |
+ */ |
|
170 |
+ |
|
171 |
+#define NC_ISSYSERR(err) ((err) > 0) |
|
172 |
+ |
|
173 |
+#define NC_NOERR 0 /* No Error */ |
|
174 |
+ |
|
175 |
+#define NC2_ERR (-1) /* Returned for all errors in the v2 API. */ |
|
176 |
+#define NC_EBADID (-33) /* Not a netcdf id */ |
|
177 |
+#define NC_ENFILE (-34) /* Too many netcdfs open */ |
|
178 |
+#define NC_EEXIST (-35) /* netcdf file exists && NC_NOCLOBBER */ |
|
179 |
+#define NC_EINVAL (-36) /* Invalid Argument */ |
|
180 |
+#define NC_EPERM (-37) /* Write to read only */ |
|
181 |
+#define NC_ENOTINDEFINE (-38) /* Operation not allowed in data mode */ |
|
182 |
+#define NC_EINDEFINE (-39) /* Operation not allowed in define mode */ |
|
183 |
+#define NC_EINVALCOORDS (-40) /* Index exceeds dimension bound */ |
|
184 |
+#define NC_EMAXDIMS (-41) /* NC_MAX_DIMS exceeded */ |
|
185 |
+#define NC_ENAMEINUSE (-42) /* String match to name in use */ |
|
186 |
+#define NC_ENOTATT (-43) /* Attribute not found */ |
|
187 |
+#define NC_EMAXATTS (-44) /* NC_MAX_ATTRS exceeded */ |
|
188 |
+#define NC_EBADTYPE (-45) /* Not a netcdf data type */ |
|
189 |
+#define NC_EBADDIM (-46) /* Invalid dimension id or name */ |
|
190 |
+#define NC_EUNLIMPOS (-47) /* NC_UNLIMITED in the wrong index */ |
|
191 |
+#define NC_EMAXVARS (-48) /* NC_MAX_VARS exceeded */ |
|
192 |
+#define NC_ENOTVAR (-49) /* Variable not found */ |
|
193 |
+#define NC_EGLOBAL (-50) /* Action prohibited on NC_GLOBAL varid */ |
|
194 |
+#define NC_ENOTNC (-51) /* Not a netcdf file */ |
|
195 |
+#define NC_ESTS (-52) /* In Fortran, string too short */ |
|
196 |
+#define NC_EMAXNAME (-53) /* NC_MAX_NAME exceeded */ |
|
197 |
+#define NC_EUNLIMIT (-54) /* NC_UNLIMITED size already in use */ |
|
198 |
+#define NC_ENORECVARS (-55) /* nc_rec op when there are no record vars */ |
|
199 |
+#define NC_ECHAR (-56) /* Attempt to convert between text & numbers */ |
|
200 |
+#define NC_EEDGE (-57) /* Start+count exceeds dimension bound */ |
|
201 |
+#define NC_ESTRIDE (-58) /* Illegal stride */ |
|
202 |
+#define NC_EBADNAME (-59) /* Attribute or variable name |
|
203 |
+ contains illegal characters */ |
|
204 |
+/* N.B. following must match value in ncx.h */ |
|
205 |
+#define NC_ERANGE (-60) /* Math result not representable */ |
|
206 |
+#define NC_ENOMEM (-61) /* Memory allocation (malloc) failure */ |
|
207 |
+ |
|
208 |
+#define NC_EVARSIZE (-62) /* One or more variable sizes violate |
|
209 |
+ format constraints */ |
|
210 |
+#define NC_EDIMSIZE (-63) /* Invalid dimension size */ |
|
211 |
+#define NC_ETRUNC (-64) /* File likely truncated or possibly corrupted */ |
|
212 |
+ |
|
213 |
+/* |
|
214 |
+ * The Interface |
|
215 |
+ */ |
|
216 |
+ |
|
217 |
+/* Declaration modifiers for DLL support (MSC et al) */ |
|
218 |
+ |
|
219 |
+#if defined(DLL_NETCDF) /* define when library is a DLL */ |
|
220 |
+# if defined(NC_DLL_EXPORT) /* define when building the library */ |
|
221 |
+# define MSC_EXTRA __declspec(dllexport) |
|
222 |
+# else |
|
223 |
+# define MSC_EXTRA __declspec(dllimport) |
|
224 |
+# endif |
|
225 |
+#include <io.h> |
|
226 |
+#define lseek _lseeki64 |
|
227 |
+#define off_t __int64 |
|
228 |
+#define stat __stat64 |
|
229 |
+#define fstat _fstat64 |
|
230 |
+#else |
|
231 |
+#define MSC_EXTRA |
|
232 |
+#endif /* defined(DLL_NETCDF) */ |
|
233 |
+ |
|
234 |
+# define EXTERNL extern MSC_EXTRA |
|
235 |
+ |
|
236 |
+/* When netCDF is built as a DLL, this will export ncerr and |
|
237 |
+ * ncopts. When it is used as a DLL, it will import them. */ |
|
238 |
+#if defined(DLL_NETCDF) |
|
239 |
+MSC_EXTRA int ncerr; |
|
240 |
+MSC_EXTRA int ncopts; |
|
241 |
+#endif |
|
242 |
+ |
|
243 |
+EXTERNL const char * |
|
244 |
+nc_inq_libvers(void); |
|
245 |
+ |
|
246 |
+EXTERNL const char * |
|
247 |
+nc_strerror(int ncerr); |
|
248 |
+ |
|
249 |
+EXTERNL int |
|
250 |
+nc__create(const char *path, int cmode, size_t initialsz, |
|
251 |
+ size_t *chunksizehintp, int *ncidp); |
|
252 |
+ |
|
253 |
+EXTERNL int |
|
254 |
+nc_create(const char *path, int cmode, int *ncidp); |
|
255 |
+ |
|
256 |
+EXTERNL int |
|
257 |
+nc__open(const char *path, int mode, |
|
258 |
+ size_t *chunksizehintp, int *ncidp); |
|
259 |
+ |
|
260 |
+EXTERNL int |
|
261 |
+nc_open(const char *path, int mode, int *ncidp); |
|
262 |
+ |
|
263 |
+EXTERNL int |
|
264 |
+nc_set_fill(int ncid, int fillmode, int *old_modep); |
|
265 |
+ |
|
266 |
+EXTERNL int |
|
267 |
+nc_redef(int ncid); |
|
268 |
+ |
|
269 |
+EXTERNL int |
|
270 |
+nc__enddef(int ncid, size_t h_minfree, size_t v_align, |
|
271 |
+ size_t v_minfree, size_t r_align); |
|
272 |
+ |
|
273 |
+EXTERNL int |
|
274 |
+nc_enddef(int ncid); |
|
275 |
+ |
|
276 |
+EXTERNL int |
|
277 |
+nc_sync(int ncid); |
|
278 |
+ |
|
279 |
+EXTERNL int |
|
280 |
+nc_abort(int ncid); |
|
281 |
+ |
|
282 |
+EXTERNL int |
|
283 |
+nc_close(int ncid); |
|
284 |
+ |
|
285 |
+EXTERNL int |
|
286 |
+nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp); |
|
287 |
+ |
|
288 |
+EXTERNL int |
|
289 |
+nc_inq_ndims(int ncid, int *ndimsp); |
|
290 |
+ |
|
291 |
+EXTERNL int |
|
292 |
+nc_inq_nvars(int ncid, int *nvarsp); |
|
293 |
+ |
|
294 |
+EXTERNL int |
|
295 |
+nc_inq_natts(int ncid, int *nattsp); |
|
296 |
+ |
|
297 |
+EXTERNL int |
|
298 |
+nc_inq_unlimdim(int ncid, int *unlimdimidp); |
|
299 |
+ |
|
300 |
+EXTERNL int |
|
301 |
+nc_set_default_format(int format, int *old_formatp); |
|
302 |
+ |
|
303 |
+EXTERNL int |
|
304 |
+nc_inq_format(int ncid, int *formatp); |
|
305 |
+ |
|
306 |
+/* Begin _dim */ |
|
307 |
+ |
|
308 |
+EXTERNL int |
|
309 |
+nc_def_dim(int ncid, const char *name, size_t len, int *idp); |
|
310 |
+ |
|
311 |
+EXTERNL int |
|
312 |
+nc_inq_dimid(int ncid, const char *name, int *idp); |
|
313 |
+ |
|
314 |
+EXTERNL int |
|
315 |
+nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp); |
|
316 |
+ |
|
317 |
+EXTERNL int |
|
318 |
+nc_inq_dimname(int ncid, int dimid, char *name); |
|
319 |
+ |
|
320 |
+EXTERNL int |
|
321 |
+nc_inq_dimlen(int ncid, int dimid, size_t *lenp); |
|
322 |
+ |
|
323 |
+EXTERNL int |
|
324 |
+nc_rename_dim(int ncid, int dimid, const char *name); |
|
325 |
+ |
|
326 |
+/* End _dim */ |
|
327 |
+/* Begin _att */ |
|
328 |
+ |
|
329 |
+EXTERNL int |
|
330 |
+nc_inq_att(int ncid, int varid, const char *name, |
|
331 |
+ nc_type *xtypep, size_t *lenp); |
|
332 |
+ |
|
333 |
+EXTERNL int |
|
334 |
+nc_inq_attid(int ncid, int varid, const char *name, int *idp); |
|
335 |
+ |
|
336 |
+EXTERNL int |
|
337 |
+nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep); |
|
338 |
+ |
|
339 |
+EXTERNL int |
|
340 |
+nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp); |
|
341 |
+ |
|
342 |
+EXTERNL int |
|
343 |
+nc_inq_attname(int ncid, int varid, int attnum, char *name); |
|
344 |
+ |
|
345 |
+EXTERNL int |
|
346 |
+nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out); |
|
347 |
+ |
|
348 |
+EXTERNL int |
|
349 |
+nc_rename_att(int ncid, int varid, const char *name, const char *newname); |
|
350 |
+ |
|
351 |
+EXTERNL int |
|
352 |
+nc_del_att(int ncid, int varid, const char *name); |
|
353 |
+ |
|
354 |
+/* End _att */ |
|
355 |
+/* Begin {put,get}_att */ |
|
356 |
+ |
|
357 |
+EXTERNL int |
|
358 |
+nc_put_att(int ncid, int varid, const char *name, nc_type datatype, |
|
359 |
+ size_t len, const void *value); |
|
360 |
+ |
|
361 |
+EXTERNL int |
|
362 |
+nc_get_att(int ncid, int varid, const char *name, void *value); |
|
363 |
+ |
|
364 |
+EXTERNL int |
|
365 |
+nc_put_att_text(int ncid, int varid, const char *name, |
|
366 |
+ size_t len, const char *op); |
|
367 |
+ |
|
368 |
+EXTERNL int |
|
369 |
+nc_get_att_text(int ncid, int varid, const char *name, char *ip); |
|
370 |
+ |
|
371 |
+EXTERNL int |
|
372 |
+nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype, |
|
373 |
+ size_t len, const unsigned char *op); |
|
374 |
+ |
|
375 |
+EXTERNL int |
|
376 |
+nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip); |
|
377 |
+ |
|
378 |
+EXTERNL int |
|
379 |
+nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype, |
|
380 |
+ size_t len, const signed char *op); |
|
381 |
+ |
|
382 |
+EXTERNL int |
|
383 |
+nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip); |
|
384 |
+ |
|
385 |
+EXTERNL int |
|
386 |
+nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype, |
|
387 |
+ size_t len, const short *op); |
|
388 |
+ |
|
389 |
+EXTERNL int |
|
390 |
+nc_get_att_short(int ncid, int varid, const char *name, short *ip); |
|
391 |
+ |
|
392 |
+EXTERNL int |
|
393 |
+nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype, |
|
394 |
+ size_t len, const int *op); |
|
395 |
+ |
|
396 |
+EXTERNL int |
|
397 |
+nc_get_att_int(int ncid, int varid, const char *name, int *ip); |
|
398 |
+ |
|
399 |
+EXTERNL int |
|
400 |
+nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype, |
|
401 |
+ size_t len, const long *op); |
|
402 |
+ |
|
403 |
+EXTERNL int |
|
404 |
+nc_get_att_long(int ncid, int varid, const char *name, long *ip); |
|
405 |
+ |
|
406 |
+EXTERNL int |
|
407 |
+nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype, |
|
408 |
+ size_t len, const float *op); |
|
409 |
+ |
|
410 |
+EXTERNL int |
|
411 |
+nc_get_att_float(int ncid, int varid, const char *name, float *ip); |
|
412 |
+ |
|
413 |
+EXTERNL int |
|
414 |
+nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype, |
|
415 |
+ size_t len, const double *op); |
|
416 |
+ |
|
417 |
+EXTERNL int |
|
418 |
+nc_get_att_double(int ncid, int varid, const char *name, double *ip); |
|
419 |
+ |
|
420 |
+/* End {put,get}_att */ |
|
421 |
+/* Begin _var */ |
|
422 |
+ |
|
423 |
+EXTERNL int |
|
424 |
+nc_def_var(int ncid, const char *name, nc_type xtype, int ndims, |
|
425 |
+ const int *dimidsp, int *varidp); |
|
426 |
+ |
|
427 |
+EXTERNL int |
|
428 |
+nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, |
|
429 |
+ int *ndimsp, int *dimidsp, int *nattsp); |
|
430 |
+ |
|
431 |
+EXTERNL int |
|
432 |
+nc_inq_varid(int ncid, const char *name, int *varidp); |
|
433 |
+ |
|
434 |
+EXTERNL int |
|
435 |
+nc_inq_varname(int ncid, int varid, char *name); |
|
436 |
+ |
|
437 |
+EXTERNL int |
|
438 |
+nc_inq_vartype(int ncid, int varid, nc_type *xtypep); |
|
439 |
+ |
|
440 |
+EXTERNL int |
|
441 |
+nc_inq_varndims(int ncid, int varid, int *ndimsp); |
|
442 |
+ |
|
443 |
+EXTERNL int |
|
444 |
+nc_inq_vardimid(int ncid, int varid, int *dimidsp); |
|
445 |
+ |
|
446 |
+EXTERNL int |
|
447 |
+nc_inq_varnatts(int ncid, int varid, int *nattsp); |
|
448 |
+ |
|
449 |
+EXTERNL int |
|
450 |
+nc_rename_var(int ncid, int varid, const char *name); |
|
451 |
+ |
|
452 |
+EXTERNL int |
|
453 |
+nc_copy_var(int ncid_in, int varid, int ncid_out); |
|
454 |
+#ifndef ncvarcpy |
|
455 |
+/* support the old name for now */ |
|
456 |
+#define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out)) |
|
457 |
+#endif |
|
458 |
+ |
|
459 |
+/* End _var */ |
|
460 |
+/* Begin {put,get}_var1 */ |
|
461 |
+ |
|
462 |
+EXTERNL int |
|
463 |
+nc_put_var1(int ncid, int varid, const size_t *indexp, const void *value); |
|
464 |
+ |
|
465 |
+EXTERNL int |
|
466 |
+nc_get_var1(int ncid, int varid, const size_t *indexp, void *value); |
|
467 |
+ |
|
468 |
+EXTERNL int |
|
469 |
+nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op); |
|
470 |
+ |
|
471 |
+EXTERNL int |
|
472 |
+nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip); |
|
473 |
+ |
|
474 |
+EXTERNL int |
|
475 |
+nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, |
|
476 |
+ const unsigned char *op); |
|
477 |
+ |
|
478 |
+EXTERNL int |
|
479 |
+nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, |
|
480 |
+ unsigned char *ip); |
|
481 |
+ |
|
482 |
+EXTERNL int |
|
483 |
+nc_put_var1_schar(int ncid, int varid, const size_t *indexp, |
|
484 |
+ const signed char *op); |
|
485 |
+ |
|
486 |
+EXTERNL int |
|
487 |
+nc_get_var1_schar(int ncid, int varid, const size_t *indexp, |
|
488 |
+ signed char *ip); |
|
489 |
+ |
|
490 |
+EXTERNL int |
|
491 |
+nc_put_var1_short(int ncid, int varid, const size_t *indexp, |
|
492 |
+ const short *op); |
|
493 |
+ |
|
494 |
+EXTERNL int |
|
495 |
+nc_get_var1_short(int ncid, int varid, const size_t *indexp, |
|
496 |
+ short *ip); |
|
497 |
+ |
|
498 |
+EXTERNL int |
|
499 |
+nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op); |
|
500 |
+ |
|
501 |
+EXTERNL int |
|
502 |
+nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip); |
|
503 |
+ |
|
504 |
+EXTERNL int |
|
505 |
+nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op); |
|
506 |
+ |
|
507 |
+EXTERNL int |
|
508 |
+nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip); |
|
509 |
+ |
|
510 |
+EXTERNL int |
|
511 |
+nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op); |
|
512 |
+ |
|
513 |
+EXTERNL int |
|
514 |
+nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip); |
|
515 |
+ |
|
516 |
+EXTERNL int |
|
517 |
+nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op); |
|
518 |
+ |
|
519 |
+EXTERNL int |
|
520 |
+nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip); |
|
521 |
+ |
|
522 |
+/* End {put,get}_var1 */ |
|
523 |
+/* Begin {put,get}_vara */ |
|
524 |
+ |
|
525 |
+EXTERNL int |
|
526 |
+nc_put_vara(int ncid, int varid, |
|
527 |
+ const size_t *start, const size_t *count, const void *value); |
|
528 |
+ |
|
529 |
+EXTERNL int |
|
530 |
+nc_get_vara(int ncid, int varid, |
|
531 |
+ const size_t *start, const size_t *count, void *value); |
|
532 |
+ |
|
533 |
+EXTERNL int |
|
534 |
+nc_put_vara_text(int ncid, int varid, |
|
535 |
+ const size_t *startp, const size_t *countp, const char *op); |
|
536 |
+ |
|
537 |
+EXTERNL int |
|
538 |
+nc_get_vara_text(int ncid, int varid, |
|
539 |
+ const size_t *startp, const size_t *countp, char *ip); |
|
540 |
+ |
|
541 |
+EXTERNL int |
|
542 |
+nc_put_vara_uchar(int ncid, int varid, |
|
543 |
+ const size_t *startp, const size_t *countp, const unsigned char *op); |
|
544 |
+ |
|
545 |
+EXTERNL int |
|
546 |
+nc_get_vara_uchar(int ncid, int varid, |
|
547 |
+ const size_t *startp, const size_t *countp, unsigned char *ip); |
|
548 |
+ |
|
549 |
+EXTERNL int |
|
550 |
+nc_put_vara_schar(int ncid, int varid, |
|
551 |
+ const size_t *startp, const size_t *countp, const signed char *op); |
|
552 |
+ |
|
553 |
+EXTERNL int |
|
554 |
+nc_get_vara_schar(int ncid, int varid, |
|
555 |
+ const size_t *startp, const size_t *countp, signed char *ip); |
|
556 |
+ |
|
557 |
+EXTERNL int |
|
558 |
+nc_put_vara_short(int ncid, int varid, |
|
559 |
+ const size_t *startp, const size_t *countp, const short *op); |
|
560 |
+ |
|
561 |
+EXTERNL int |
|
562 |
+nc_get_vara_short(int ncid, int varid, |
|
563 |
+ const size_t *startp, const size_t *countp, short *ip); |
|
564 |
+ |
|
565 |
+EXTERNL int |
|
566 |
+nc_put_vara_int(int ncid, int varid, |
|
567 |
+ const size_t *startp, const size_t *countp, const int *op); |
|
568 |
+ |
|
569 |
+EXTERNL int |
|
570 |
+nc_get_vara_int(int ncid, int varid, |
|
571 |
+ const size_t *startp, const size_t *countp, int *ip); |
|
572 |
+ |
|
573 |
+EXTERNL int |
|
574 |
+nc_put_vara_long(int ncid, int varid, |
|
575 |
+ const size_t *startp, const size_t *countp, const long *op); |
|
576 |
+ |
|
577 |
+EXTERNL int |
|
578 |
+nc_get_vara_long(int ncid, int varid, |
|
579 |
+ const size_t *startp, const size_t *countp, long *ip); |
|
580 |
+ |
|
581 |
+EXTERNL int |
|
582 |
+nc_put_vara_float(int ncid, int varid, |
|
583 |
+ const size_t *startp, const size_t *countp, const float *op); |
|
584 |
+ |
|
585 |
+EXTERNL int |
|
586 |
+nc_get_vara_float(int ncid, int varid, |
|
587 |
+ const size_t *startp, const size_t *countp, float *ip); |
|
588 |
+ |
|
589 |
+EXTERNL int |
|
590 |
+nc_put_vara_double(int ncid, int varid, |
|
591 |
+ const size_t *startp, const size_t *countp, const double *op); |
|
592 |
+ |
|
593 |
+EXTERNL int |
|
594 |
+nc_get_vara_double(int ncid, int varid, |
|
595 |
+ const size_t *startp, const size_t *countp, double *ip); |
|
596 |
+ |
|
597 |
+/* End {put,get}_vara */ |
|
598 |
+/* Begin {put,get}_vars */ |
|
599 |
+ |
|
600 |
+EXTERNL int |
|
601 |
+nc_put_vars(int ncid, int varid, |
|
602 |
+ const size_t *start, const size_t *count, const ptrdiff_t *stride, |
|
603 |
+ const void * value); |
|
604 |
+ |
|
605 |
+EXTERNL int |
|
606 |
+nc_get_vars(int ncid, int varid, |
|
607 |
+ const size_t *start, const size_t *count, const ptrdiff_t *stride, |
|
608 |
+ void * value); |
|
609 |
+ |
|
610 |
+EXTERNL int |
|
611 |
+nc_put_vars_text(int ncid, int varid, |
|
612 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
613 |
+ const char *op); |
|
614 |
+ |
|
615 |
+EXTERNL int |
|
616 |
+nc_get_vars_text(int ncid, int varid, |
|
617 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
618 |
+ char *ip); |
|
619 |
+ |
|
620 |
+EXTERNL int |
|
621 |
+nc_put_vars_uchar(int ncid, int varid, |
|
622 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
623 |
+ const unsigned char *op); |
|
624 |
+ |
|
625 |
+EXTERNL int |
|
626 |
+nc_get_vars_uchar(int ncid, int varid, |
|
627 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
628 |
+ unsigned char *ip); |
|
629 |
+ |
|
630 |
+EXTERNL int |
|
631 |
+nc_put_vars_schar(int ncid, int varid, |
|
632 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
633 |
+ const signed char *op); |
|
634 |
+ |
|
635 |
+EXTERNL int |
|
636 |
+nc_get_vars_schar(int ncid, int varid, |
|
637 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
638 |
+ signed char *ip); |
|
639 |
+ |
|
640 |
+EXTERNL int |
|
641 |
+nc_put_vars_short(int ncid, int varid, |
|
642 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
643 |
+ const short *op); |
|
644 |
+ |
|
645 |
+EXTERNL int |
|
646 |
+nc_get_vars_short(int ncid, int varid, |
|
647 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
648 |
+ short *ip); |
|
649 |
+ |
|
650 |
+EXTERNL int |
|
651 |
+nc_put_vars_int(int ncid, int varid, |
|
652 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
653 |
+ const int *op); |
|
654 |
+ |
|
655 |
+EXTERNL int |
|
656 |
+nc_get_vars_int(int ncid, int varid, |
|
657 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
658 |
+ int *ip); |
|
659 |
+ |
|
660 |
+EXTERNL int |
|
661 |
+nc_put_vars_long(int ncid, int varid, |
|
662 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
663 |
+ const long *op); |
|
664 |
+ |
|
665 |
+EXTERNL int |
|
666 |
+nc_get_vars_long(int ncid, int varid, |
|
667 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
668 |
+ long *ip); |
|
669 |
+ |
|
670 |
+EXTERNL int |
|
671 |
+nc_put_vars_float(int ncid, int varid, |
|
672 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
673 |
+ const float *op); |
|
674 |
+ |
|
675 |
+EXTERNL int |
|
676 |
+nc_get_vars_float(int ncid, int varid, |
|
677 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
678 |
+ float *ip); |
|
679 |
+ |
|
680 |
+EXTERNL int |
|
681 |
+nc_put_vars_double(int ncid, int varid, |
|
682 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
683 |
+ const double *op); |
|
684 |
+ |
|
685 |
+EXTERNL int |
|
686 |
+nc_get_vars_double(int ncid, int varid, |
|
687 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
688 |
+ double *ip); |
|
689 |
+ |
|
690 |
+/* End {put,get}_vars */ |
|
691 |
+/* Begin {put,get}_varm */ |
|
692 |
+ |
|
693 |
+EXTERNL int |
|
694 |
+nc_put_varm(int ncid, int varid, const size_t *start, const size_t *count, |
|
695 |
+ const ptrdiff_t *stride, const ptrdiff_t *imapp, |
|
696 |
+ const void *value); |
|
697 |
+ |
|
698 |
+EXTERNL int |
|
699 |
+nc_get_varm(int ncid, int varid, const size_t *start, const size_t *count, |
|
700 |
+ const ptrdiff_t *stride, const ptrdiff_t *imapp, void *value); |
|
701 |
+ |
|
702 |
+EXTERNL int |
|
703 |
+nc_put_varm_text(int ncid, int varid, |
|
704 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
705 |
+ const ptrdiff_t *imapp, |
|
706 |
+ const char *op); |
|
707 |
+ |
|
708 |
+EXTERNL int |
|
709 |
+nc_get_varm_text(int ncid, int varid, |
|
710 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
711 |
+ const ptrdiff_t *imapp, |
|
712 |
+ char *ip); |
|
713 |
+ |
|
714 |
+EXTERNL int |
|
715 |
+nc_put_varm_uchar(int ncid, int varid, |
|
716 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
717 |
+ const ptrdiff_t *imapp, |
|
718 |
+ const unsigned char *op); |
|
719 |
+ |
|
720 |
+EXTERNL int |
|
721 |
+nc_get_varm_uchar(int ncid, int varid, |
|
722 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
723 |
+ const ptrdiff_t *imapp, |
|
724 |
+ unsigned char *ip); |
|
725 |
+ |
|
726 |
+EXTERNL int |
|
727 |
+nc_put_varm_schar(int ncid, int varid, |
|
728 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
729 |
+ const ptrdiff_t *imapp, |
|
730 |
+ const signed char *op); |
|
731 |
+ |
|
732 |
+EXTERNL int |
|
733 |
+nc_get_varm_schar(int ncid, int varid, |
|
734 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
735 |
+ const ptrdiff_t *imapp, |
|
736 |
+ signed char *ip); |
|
737 |
+ |
|
738 |
+EXTERNL int |
|
739 |
+nc_put_varm_short(int ncid, int varid, |
|
740 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
741 |
+ const ptrdiff_t *imapp, |
|
742 |
+ const short *op); |
|
743 |
+ |
|
744 |
+EXTERNL int |
|
745 |
+nc_get_varm_short(int ncid, int varid, |
|
746 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
747 |
+ const ptrdiff_t *imapp, |
|
748 |
+ short *ip); |
|
749 |
+ |
|
750 |
+EXTERNL int |
|
751 |
+nc_put_varm_int(int ncid, int varid, |
|
752 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
753 |
+ const ptrdiff_t *imapp, |
|
754 |
+ const int *op); |
|
755 |
+ |
|
756 |
+EXTERNL int |
|
757 |
+nc_get_varm_int(int ncid, int varid, |
|
758 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
759 |
+ const ptrdiff_t *imapp, |
|
760 |
+ int *ip); |
|
761 |
+ |
|
762 |
+EXTERNL int |
|
763 |
+nc_put_varm_long(int ncid, int varid, |
|
764 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
765 |
+ const ptrdiff_t *imapp, |
|
766 |
+ const long *op); |
|
767 |
+ |
|
768 |
+EXTERNL int |
|
769 |
+nc_get_varm_long(int ncid, int varid, |
|
770 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
771 |
+ const ptrdiff_t *imapp, |
|
772 |
+ long *ip); |
|
773 |
+ |
|
774 |
+EXTERNL int |
|
775 |
+nc_put_varm_float(int ncid, int varid, |
|
776 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
777 |
+ const ptrdiff_t *imapp, |
|
778 |
+ const float *op); |
|
779 |
+ |
|
780 |
+EXTERNL int |
|
781 |
+nc_get_varm_float(int ncid, int varid, |
|
782 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
783 |
+ const ptrdiff_t *imapp, |
|
784 |
+ float *ip); |
|
785 |
+ |
|
786 |
+EXTERNL int |
|
787 |
+nc_put_varm_double(int ncid, int varid, |
|
788 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
789 |
+ const ptrdiff_t *imapp, |
|
790 |
+ const double *op); |
|
791 |
+ |
|
792 |
+EXTERNL int |
|
793 |
+nc_get_varm_double(int ncid, int varid, |
|
794 |
+ const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, |
|
795 |
+ const ptrdiff_t * imapp, |
|
796 |
+ double *ip); |
|
797 |
+ |
|
798 |
+/* End {put,get}_varm */ |
|
799 |
+/* Begin {put,get}_var */ |
|
800 |
+ |
|
801 |
+EXTERNL int |
|
802 |
+nc_put_var_text(int ncid, int varid, const char *op); |
|
803 |
+ |
|
804 |
+EXTERNL int |
|
805 |
+nc_get_var_text(int ncid, int varid, char *ip); |
|
806 |
+ |
|
807 |
+EXTERNL int |
|
808 |
+nc_put_var_uchar(int ncid, int varid, const unsigned char *op); |
|
809 |
+ |
|
810 |
+EXTERNL int |
|
811 |
+nc_get_var_uchar(int ncid, int varid, unsigned char *ip); |
|
812 |
+ |
|
813 |
+EXTERNL int |
|
814 |
+nc_put_var_schar(int ncid, int varid, const signed char *op); |
|
815 |
+ |
|
816 |
+EXTERNL int |
|
817 |
+nc_get_var_schar(int ncid, int varid, signed char *ip); |
|
818 |
+ |
|
819 |
+EXTERNL int |
|
820 |
+nc_put_var_short(int ncid, int varid, const short *op); |
|
821 |
+ |
|
822 |
+EXTERNL int |
|
823 |
+nc_get_var_short(int ncid, int varid, short *ip); |
|
824 |
+ |
|
825 |
+EXTERNL int |
|
826 |
+nc_put_var_int(int ncid, int varid, const int *op); |
|
827 |
+ |
|
828 |
+EXTERNL int |
|
829 |
+nc_get_var_int(int ncid, int varid, int *ip); |
|
830 |
+ |
|
831 |
+EXTERNL int |
|
832 |
+nc_put_var_long(int ncid, int varid, const long *op); |
|
833 |
+ |
|
834 |
+EXTERNL int |
|
835 |
+nc_get_var_long(int ncid, int varid, long *ip); |
|
836 |
+ |
|
837 |
+EXTERNL int |
|
838 |
+nc_put_var_float(int ncid, int varid, const float *op); |
|
839 |
+ |
|
840 |
+EXTERNL int |
|
841 |
+nc_get_var_float(int ncid, int varid, float *ip); |
|
842 |
+ |
|
843 |
+EXTERNL int |
|
844 |
+nc_put_var_double(int ncid, int varid, const double *op); |
|
845 |
+ |
|
846 |
+EXTERNL int |
|
847 |
+nc_get_var_double(int ncid, int varid, double *ip); |
|
848 |
+ |
|
849 |
+#ifdef LOGGING |
|
850 |
+ |
|
851 |
+#ifdef DEBUG |
|
852 |
+EXTERNL void |
|
853 |
+nc_exit(void); |
|
854 |
+#endif |
|
855 |
+ |
|
856 |
+EXTERNL void |
|
857 |
+nc_set_log_level(int new_level); |
|
858 |
+/* Use this to turn off logging by calling |
|
859 |
+ nc_log_level(NC_TURN_OFF_LOGGING) */ |
|
860 |
+#define NC_TURN_OFF_LOGGING (-1) |
|
861 |
+ |
|
862 |
+#else /* not LOGGING */ |
|
863 |
+ |
|
864 |
+#define nc_set_log_level(e) |
|
865 |
+ |
|
866 |
+#endif |
|
867 |
+ |
|
868 |
+/* End {put,get}_var */ |
|
869 |
+ |
|
870 |
+/* #ifdef _CRAYMPP */ |
|
871 |
+/* |
|
872 |
+ * Public interfaces to better support |
|
873 |
+ * CRAY multi-processor systems like T3E. |
|
874 |
+ * A tip of the hat to NERSC. |
|
875 |
+ */ |
|
876 |
+/* |
|
877 |
+ * It turns out we need to declare and define |
|
878 |
+ * these public interfaces on all platforms |
|
879 |
+ * or things get ugly working out the |
|
880 |
+ * FORTRAN interface. On !_CRAYMPP platforms, |
|
881 |
+ * these functions work as advertised, but you |
|
882 |
+ * can only use "processor element" 0. |
|
883 |
+ */ |
|
884 |
+ |
|
885 |
+EXTERNL int |
|
886 |
+nc__create_mp(const char *path, int cmode, size_t initialsz, int basepe, |
|
887 |
+ size_t *chunksizehintp, int *ncidp); |
|
888 |
+ |
|
889 |
+EXTERNL int |
|
890 |
+nc__open_mp(const char *path, int mode, int basepe, |
|
891 |
+ size_t *chunksizehintp, int *ncidp); |
|
892 |
+ |
|
893 |
+EXTERNL int |
|
894 |
+nc_delete(const char * path); |
|
895 |
+ |
|
896 |
+EXTERNL int |
|
897 |
+nc_delete_mp(const char * path, int basepe); |
|
898 |
+ |
|
899 |
+EXTERNL int |
|
900 |
+nc_set_base_pe(int ncid, int pe); |
|
901 |
+ |
|
902 |
+EXTERNL int |
|
903 |
+nc_inq_base_pe(int ncid, int *pe); |
|
904 |
+ |
|
905 |
+/* #endif _CRAYMPP */ |
|
906 |
+ |
|
907 |
+/* Begin v2.4 backward compatiblity */ |
|
908 |
+/* |
|
909 |
+ * defining NO_NETCDF_2 to the preprocessor |
|
910 |
+ * turns off backward compatiblity declarations. |
|
911 |
+ */ |
|
912 |
+#ifndef NO_NETCDF_2 |
|
913 |
+ |
|
914 |
+/* |
|
915 |
+ * Backward compatible aliases |
|
916 |
+ */ |
|
917 |
+#define FILL_BYTE NC_FILL_BYTE |
|
918 |
+#define FILL_CHAR NC_FILL_CHAR |
|
919 |
+#define FILL_SHORT NC_FILL_SHORT |
|
920 |
+#define FILL_LONG NC_FILL_INT |
|
921 |
+#define FILL_FLOAT NC_FILL_FLOAT |
|
922 |
+#define FILL_DOUBLE NC_FILL_DOUBLE |
|
923 |
+ |
|
924 |
+#define MAX_NC_DIMS NC_MAX_DIMS |
|
925 |
+#define MAX_NC_ATTRS NC_MAX_ATTRS |
|
926 |
+#define MAX_NC_VARS NC_MAX_VARS |
|
927 |
+#define MAX_NC_NAME NC_MAX_NAME |
|
928 |
+#define MAX_VAR_DIMS NC_MAX_VAR_DIMS |
|
929 |
+ |
|
930 |
+/* |
|
931 |
+ * If and when 64 integer types become ubiquitous, |
|
932 |
+ * we would like to use NC_LONG for that. |
|
933 |
+ * For now, define for backward compatibility. |
|
934 |
+ */ |
|
935 |
+#define NC_LONG NC_INT |
|
936 |
+ |
|
937 |
+/* |
|
938 |
+ * Global error status |
|
939 |
+ */ |
|
940 |
+EXTERNL int ncerr; |
|
941 |
+ |
|
942 |
+#define NC_ENTOOL NC_EMAXNAME /* Backward compatibility */ |
|
943 |
+#define NC_EXDR (-32) /* */ |
|
944 |
+#define NC_SYSERR (-31) |
|
945 |
+ |
|
946 |
+/* |
|
947 |
+ * Avoid use of this meaningless macro |
|
948 |
+ * Use sysconf(_SC_OPEN_MAX). |
|
949 |
+ */ |
|
950 |
+#ifndef MAX_NC_OPEN |
|
951 |
+#define MAX_NC_OPEN 32 |
|
952 |
+#endif |
|
953 |
+ |
|
954 |
+/* |
|
955 |
+ * Global options variable. |
|
956 |
+ * Used to determine behavior of error handler. |
|
957 |
+ */ |
|
958 |
+#define NC_FATAL 1 |
|
959 |
+#define NC_VERBOSE 2 |
|
960 |
+ |
|
961 |
+EXTERNL int ncopts; /* default is (NC_FATAL | NC_VERBOSE) */ |
|
962 |
+ |
|
963 |
+EXTERNL void |
|
964 |
+nc_advise(const char *cdf_routine_name, int err, const char *fmt,...); |
|
965 |
+ |
|
966 |
+/* |
|
967 |
+ * C data type corresponding to a netCDF NC_LONG argument, |
|
968 |
+ * a signed 32 bit object. |
|
969 |
+ * |
|
970 |
+ * This is the only thing in this file which architecture dependent. |
|
971 |
+ */ |
|
972 |
+typedef int nclong; |
|
973 |
+ |
|
974 |
+EXTERNL int |
|
975 |
+nctypelen(nc_type datatype); |
|
976 |
+ |
|
977 |
+EXTERNL int |
|
978 |
+nccreate(const char* path, int cmode); |
|
979 |
+ |
|
980 |
+EXTERNL int |
|
981 |
+ncopen(const char* path, int mode); |
|
982 |
+ |
|
983 |
+EXTERNL int |
|
984 |
+ncsetfill(int ncid, int fillmode); |
|
985 |
+ |
|
986 |
+EXTERNL int |
|
987 |
+ncredef(int ncid); |
|
988 |
+ |
|
989 |
+EXTERNL int |
|
990 |
+ncendef(int ncid); |
|
991 |
+ |
|
992 |
+EXTERNL int |
|
993 |
+ncsync(int ncid); |
|
994 |
+ |
|
995 |
+EXTERNL int |
|
996 |
+ncabort(int ncid); |
|
997 |
+ |
|
998 |
+EXTERNL int |
|
999 |
+ncclose(int ncid); |
|
1000 |
+ |
|
1001 |
+EXTERNL int |
|
1002 |
+ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp); |
|
1003 |
+ |
|
1004 |
+EXTERNL int |
|
1005 |
+ncdimdef(int ncid, const char *name, long len); |
|
1006 |
+ |
|
1007 |
+EXTERNL int |
|
1008 |
+ncdimid(int ncid, const char *name); |
|
1009 |
+ |
|
1010 |
+EXTERNL int |
|
1011 |
+ncdiminq(int ncid, int dimid, char *name, long *lenp); |
|
1012 |
+ |
|
1013 |
+EXTERNL int |
|
1014 |
+ncdimrename(int ncid, int dimid, const char *name); |
|
1015 |
+ |
|
1016 |
+EXTERNL int |
|
1017 |
+ncattput(int ncid, int varid, const char *name, nc_type xtype, |
|
1018 |
+ int len, const void *op); |
|
1019 |
+ |
|
1020 |
+EXTERNL int |
|
1021 |
+ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp); |
|
1022 |
+ |
|
1023 |
+EXTERNL int |
|
1024 |
+ncattget(int ncid, int varid, const char *name, void *ip); |
|
1025 |
+ |
|
1026 |
+EXTERNL int |
|
1027 |
+ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out, |
|
1028 |
+ int varid_out); |
|
1029 |
+ |
|
1030 |
+EXTERNL int |
|
1031 |
+ncattname(int ncid, int varid, int attnum, char *name); |
|
1032 |
+ |
|
1033 |
+EXTERNL int |
|
1034 |
+ncattrename(int ncid, int varid, const char *name, const char *newname); |
|
1035 |
+ |
|
1036 |
+EXTERNL int |
|
1037 |
+ncattdel(int ncid, int varid, const char *name); |
|
1038 |
+ |
|
1039 |
+EXTERNL int |
|
1040 |
+ncvardef(int ncid, const char *name, nc_type xtype, |
|
1041 |
+ int ndims, const int *dimidsp); |
|
1042 |
+ |
|
1043 |
+EXTERNL int |
|
1044 |
+ncvarid(int ncid, const char *name); |
|
1045 |
+ |
|
1046 |
+EXTERNL int |
|
1047 |
+ncvarinq(int ncid, int varid, char *name, nc_type *xtypep, |
|
1048 |
+ int *ndimsp, int *dimidsp, int *nattsp); |
|
1049 |
+ |
|
1050 |
+EXTERNL int |
|
1051 |
+ncvarput1(int ncid, int varid, const long *indexp, const void *op); |
|
1052 |
+ |
|
1053 |
+EXTERNL int |
|
1054 |
+ncvarget1(int ncid, int varid, const long *indexp, void *ip); |
|
1055 |
+ |
|
1056 |
+EXTERNL int |
|
1057 |
+ncvarput(int ncid, int varid, const long *startp, const long *countp, |
|
1058 |
+ const void *op); |
|
1059 |
+ |
|
1060 |
+EXTERNL int |
|
1061 |
+ncvarget(int ncid, int varid, const long *startp, const long *countp, |
|
1062 |
+ void *ip); |
|
1063 |
+ |
|
1064 |
+EXTERNL int |
|
1065 |
+ncvarputs(int ncid, int varid, const long *startp, const long *countp, |
|
1066 |
+ const long *stridep, const void *op); |
|
1067 |
+ |
|
1068 |
+EXTERNL int |
|
1069 |
+ncvargets(int ncid, int varid, const long *startp, const long *countp, |
|
1070 |
+ const long *stridep, void *ip); |
|
1071 |
+ |
|
1072 |
+EXTERNL int |
|
1073 |
+ncvarputg(int ncid, int varid, const long *startp, const long *countp, |
|
1074 |
+ const long *stridep, const long *imapp, const void *op); |
|
1075 |
+ |
|
1076 |
+EXTERNL int |
|
1077 |
+ncvargetg(int ncid, int varid, const long *startp, const long *countp, |
|
1078 |
+ const long *stridep, const long *imapp, void *ip); |
|
1079 |
+ |
|
1080 |
+EXTERNL int |
|
1081 |
+ncvarrename(int ncid, int varid, const char *name); |
|
1082 |
+ |
|
1083 |
+EXTERNL int |
|
1084 |
+ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp); |
|
1085 |
+ |
|
1086 |
+EXTERNL int |
|
1087 |
+ncrecget(int ncid, long recnum, void **datap); |
|
1088 |
+ |
|
1089 |
+EXTERNL int |
|
1090 |
+ncrecput(int ncid, long recnum, void *const *datap); |
|
1091 |
+ |
|
1092 |
+/* End v2.4 backward compatiblity */ |
|
1093 |
+#endif /*!NO_NETCDF_2*/ |
|
1094 |
+ |
|
1095 |
+#if defined(__cplusplus) |
|
1096 |
+} |
|
1097 |
+#endif |
|
1098 |
+ |
|
1099 |
+#endif /* _NETCDF_ */ |