source: XIOS/dev/dev_olga/extern/src_netcdf4/netcdf.h @ 1620

Last change on this file since 1620 was 409, checked in by ymipsl, 11 years ago

Add improved nectdf internal library src

YM

  • Property svn:eol-style set to native
File size: 56.8 KB
Line 
1/*! \file
2
3Main header file for the C API.
4
5Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
62003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 University
7Corporation for Atmospheric Research/Unidata. See \ref copyright file
8for more info.
9*/
10
11#ifndef _NETCDF_
12#define _NETCDF_
13
14#include <stddef.h> /* size_t, ptrdiff_t */
15#include <errno.h>  /* netcdf functions sometimes return system errors */
16
17/*! The nc_type type is just an int. */
18typedef int nc_type;
19
20#if defined(__cplusplus)
21extern "C" {
22#endif
23
24/*
25 *  The netcdf external data types
26 */
27#define NC_NAT          0       /**< Not A Type */
28#define NC_BYTE         1       /**< signed 1 byte integer */
29#define NC_CHAR         2       /**< ISO/ASCII character */
30#define NC_SHORT        3       /**< signed 2 byte integer */
31#define NC_INT          4       /**< signed 4 byte integer */
32#define NC_LONG         NC_INT  /**< deprecated, but required for backward compatibility. */
33#define NC_FLOAT        5       /**< single precision floating point number */
34#define NC_DOUBLE       6       /**< double precision floating point number */
35#define NC_UBYTE        7       /**< unsigned 1 byte int */
36#define NC_USHORT       8       /**< unsigned 2-byte int */
37#define NC_UINT         9       /**< unsigned 4-byte int */
38#define NC_INT64        10      /**< signed 8-byte int */
39#define NC_UINT64       11      /**< unsigned 8-byte int */
40#define NC_STRING       12      /**< string */
41
42#define NC_MAX_ATOMIC_TYPE NC_STRING
43
44/* The following are use internally in support of user-defines
45 * types. They are also the class returned by nc_inq_user_type. */
46#define NC_VLEN         13      /**< vlen types */
47#define NC_OPAQUE       14      /**< opaque types */
48#define NC_ENUM         15      /**< enum types */
49#define NC_COMPOUND     16      /**< compound types */
50
51/* Define the first user defined type id (leave some room) */
52#define NC_FIRSTUSERTYPEID 32
53
54/** Default fill value. This is used unless _FillValue attribute
55 * is set.  These values are stuffed into newly allocated space as
56 * appropriate.  The hope is that one might use these to notice that a
57 * particular datum has not been set. */
58/**@{*/
59#define NC_FILL_BYTE    ((signed char)-127)
60#define NC_FILL_CHAR    ((char)0)
61#define NC_FILL_SHORT   ((short)-32767)
62#define NC_FILL_INT     (-2147483647L)
63#define NC_FILL_FLOAT   (9.9692099683868690e+36f) /* near 15 * 2^119 */
64#define NC_FILL_DOUBLE  (9.9692099683868690e+36)
65#define NC_FILL_UBYTE   (255)
66#define NC_FILL_USHORT  (65535)
67#define NC_FILL_UINT    (4294967295U)
68#define NC_FILL_INT64   ((long long)-9223372036854775806LL)
69#define NC_FILL_UINT64  ((unsigned long long)18446744073709551614ULL)
70#define NC_FILL_STRING  ""
71/**@}*/
72
73/*! Max or min values for a type. Nothing greater/smaller can be
74 * stored in a netCDF file for their associated types. Recall that a C
75 * compiler may define int to be any length it wants, but a NC_INT is
76 * *always* a 4 byte signed int. On a platform with 64 bit ints,
77 * there will be many ints which are outside the range supported by
78 * NC_INT. But since NC_INT is an external format, it has to mean the
79 * same thing everywhere. */
80/**@{*/
81#define NC_MAX_BYTE 127
82#define NC_MIN_BYTE (-NC_MAX_BYTE-1)
83#define NC_MAX_CHAR 255
84#define NC_MAX_SHORT 32767
85#define NC_MIN_SHORT (-NC_MAX_SHORT - 1)
86#define NC_MAX_INT 2147483647
87#define NC_MIN_INT (-NC_MAX_INT - 1)
88#define NC_MAX_FLOAT 3.402823466e+38f
89#define NC_MIN_FLOAT (-NC_MAX_FLOAT)
90#define NC_MAX_DOUBLE 1.7976931348623157e+308
91#define NC_MIN_DOUBLE (-NC_MAX_DOUBLE)
92#define NC_MAX_UBYTE NC_MAX_CHAR
93#define NC_MAX_USHORT 65535U
94#define NC_MAX_UINT 4294967295U
95#define NC_MAX_INT64 (9223372036854775807LL)
96#define NC_MIN_INT64 (-9223372036854775807LL-1)
97#define NC_MAX_UINT64 (18446744073709551615ULL)
98#define X_INT64_MAX     (9223372036854775807LL)
99#define X_INT64_MIN     (-X_INT64_MAX - 1)
100#define X_UINT64_MAX    (18446744073709551615ULL)
101/**@}*/
102
103/** Name of fill value attribute.  If you wish a variable to use a
104 * different value than the above defaults, create an attribute with
105 * the same type as the variable and this reserved name. The value you
106 * give the attribute will be used as the fill value for that
107 * variable. */
108#define _FillValue      "_FillValue"
109#define NC_FILL         0       /**< Argument to nc_set_fill() to clear NC_NOFILL */
110#define NC_NOFILL       0x100   /**< Argument to nc_set_fill() to turn off filling of data. */
111
112/* Define the ioflags bits for nc_create and nc_open.
113   currently unused: 0x0010,0x0020,0x0040,0x0080
114   and the whole upper 16 bits
115*/
116
117#define NC_NOWRITE       0x0000 /**< Set read-only access for nc_open(). */
118#define NC_WRITE         0x0001 /**< Set read-write access for nc_open(). */
119/* unused: 0x0002 */
120#define NC_CLOBBER       0x0000 /**< Destroy existing file. Mode flag for nc_create(). */
121#define NC_NOCLOBBER     0x0004 /**< Don't destroy existing file. Mode flag for nc_create(). */
122
123#define NC_DISKLESS      0x0008  /**< Use diskless file. Mode flag for nc_open() or nc_create(). */
124#define NC_MMAP          0x0010  /**< Use diskless file with mmap. Mode flag for nc_open() or nc_create(). */
125
126#define NC_CLASSIC_MODEL 0x0100 /**< Enforce classic model. Mode flag for nc_create(). */
127#define NC_64BIT_OFFSET  0x0200  /**< Use large (64-bit) file offsets. Mode flag for nc_create(). */
128
129/** \deprecated The following flag currently is ignored, but use in
130 * nc_open() or nc_create() may someday support use of advisory
131 * locking to prevent multiple writers from clobbering a file
132 */
133#define NC_LOCK          0x0400
134
135/** Share updates, limit cacheing.
136Use this in mode flags for both nc_create() and nc_open(). */
137#define NC_SHARE         0x0800
138
139#define NC_NETCDF4       0x1000  /**< Use netCDF-4/HDF5 format. Mode flag for nc_create(). */
140
141/** Turn on MPI I/O.
142Use this in mode flags for both nc_create() and nc_open(). */
143#define NC_MPIIO         0x2000
144/** Turn on MPI POSIX I/O.
145Use this in mode flags for both nc_create() and nc_open(). */
146#define NC_MPIPOSIX      0x4000
147#define NC_PNETCDF       0x8000 /**< Use parallel-netcdf library. Mode flag for nc_open(). */
148
149/** Format specifier for nc_set_default_format().  Starting with
150 * version 3.6, there are different format netCDF files. 4.0
151 * introduces the third one. \see netcdf_format
152 */
153/**@{*/
154#define NC_FORMAT_CLASSIC (1)
155#define NC_FORMAT_64BIT   (2)
156#define NC_FORMAT_NETCDF4 (3)
157#define NC_FORMAT_NETCDF4_CLASSIC  (4)
158/**@}*/
159
160/** Let nc__create() or nc__open() figure out as suitable chunk
161 * size. */
162#define NC_SIZEHINT_DEFAULT 0
163
164/** In nc__enddef(), align to the chunk size. */
165#define NC_ALIGN_CHUNK ((size_t)(-1))
166
167/** Size argument to nc_def_dim() for an unlimited dimension. */
168#define NC_UNLIMITED 0L
169
170/** Attribute id to put/get a global attribute. */
171#define NC_GLOBAL -1
172
173/**
174Maximum for classic library.
175
176In the classic netCDF model there are maximum values for the number of
177dimensions in the file (\ref NC_MAX_DIMS), the number of global or per
178variable attributes (\ref NC_MAX_ATTRS), the number of variables in
179the file (\ref NC_MAX_VARS), and the length of a name (\ref
180NC_MAX_NAME).
181
182This maximum is enforced by the interface, to facilitate writing
183applications and utilities.  However, nothing is statically allocated
184to this size internally.
185
186This maximum is not used for netCDF-4/HDF5 files unless they were
187created with the ::NC_CLASSIC_MODEL flag.
188
189As a rule, NC_MAX_VAR_DIMS <= NC_MAX_DIMS.
190*/
191/**@{*/
192#define NC_MAX_DIMS     1024   
193#define NC_MAX_ATTRS    8192   
194#define NC_MAX_VARS     8192   
195#define NC_MAX_NAME     256     
196#define NC_MAX_VAR_DIMS 1024 /**< max per variable dimensions */
197/**@}*/
198
199/** This is the max size of an SD dataset name in HDF4 (from HDF4 documentation).*/
200#define NC_MAX_HDF4_NAME 64
201
202/** In HDF5 files you can set the endianness of variables with
203    nc_def_var_endian(). This define is used there. */   
204/**@{*/
205#define NC_ENDIAN_NATIVE 0
206#define NC_ENDIAN_LITTLE 1
207#define NC_ENDIAN_BIG    2
208/**@}*/
209
210/** In HDF5 files you can set storage for each variable to be either
211 * contiguous or chunked, with nc_def_var_chunking().  This define is
212 * used there. */
213/**@{*/
214#define NC_CHUNKED    0
215#define NC_CONTIGUOUS 1
216/**@}*/
217
218/** In HDF5 files you can set check-summing for each variable.
219Currently the only checksum available is Fletcher-32, which can be set
220with the function nc_def_var_fletcher32.  These defines are used
221there. */
222/**@{*/
223#define NC_NOCHECKSUM 0
224#define NC_FLETCHER32 1
225/**@}*/
226
227/**@{*/
228/** Control the HDF5 shuffle filter. In HDF5 files you can specify
229 * that a shuffle filter should be used on each chunk of a variable to
230 * improve compression for that variable. This per-variable shuffle
231 * property can be set with the function nc_def_var_deflate(). */
232#define NC_NOSHUFFLE 0
233#define NC_SHUFFLE   1
234/**@}*/
235
236/** The netcdf version 3 functions all return integer error status.
237 * These are the possible values, in addition to certain values from
238 * the system errno.h.
239 */
240#define NC_ISSYSERR(err)        ((err) > 0)
241
242#define NC_NOERR        0   /**< No Error */
243#define NC2_ERR         (-1)       /**< Returned for all errors in the v2 API. */
244
245/** Not a netcdf id.
246
247The specified netCDF ID does not refer to an
248open netCDF dataset. */
249#define NC_EBADID       (-33)     
250#define NC_ENFILE       (-34)      /**< Too many netcdfs open */
251#define NC_EEXIST       (-35)      /**< netcdf file exists && NC_NOCLOBBER */
252#define NC_EINVAL       (-36)      /**< Invalid Argument */
253#define NC_EPERM        (-37)      /**< Write to read only */
254
255/** Operation not allowed in data mode. This is returned for netCDF
256classic or 64-bit offset files, or for netCDF-4 files, when they were
257been created with ::NC_CLASSIC_MODEL flag in nc_create(). */
258#define NC_ENOTINDEFINE (-38)     
259
260/** Operation not allowed in define mode.
261
262The specified netCDF is in define mode rather than data mode.
263
264With netCDF-4/HDF5 files, this error will not occur, unless
265::NC_CLASSIC_MODEL was used in nc_create().
266 */
267#define NC_EINDEFINE    (-39)     
268
269/** Index exceeds dimension bound.
270
271The specified corner indices were out of range for the rank of the
272specified variable. For example, a negative index or an index that is
273larger than the corresponding dimension length will cause an error. */
274#define NC_EINVALCOORDS (-40)     
275#define NC_EMAXDIMS     (-41)      /**< NC_MAX_DIMS exceeded */
276#define NC_ENAMEINUSE   (-42)      /**< String match to name in use */
277#define NC_ENOTATT      (-43)      /**< Attribute not found */
278#define NC_EMAXATTS     (-44)      /**< NC_MAX_ATTRS exceeded */
279#define NC_EBADTYPE     (-45)      /**< Not a netcdf data type */
280#define NC_EBADDIM      (-46)      /**< Invalid dimension id or name */
281#define NC_EUNLIMPOS    (-47)      /**< NC_UNLIMITED in the wrong index */
282
283/** NC_MAX_VARS exceeded. Max number of variables exceeded in a
284classic or 64-bit offset file, or an netCDF-4 file with
285::NC_CLASSIC_MODEL on. */
286#define NC_EMAXVARS     (-48)     
287
288/** Variable not found.
289
290The variable ID is invalid for the specified netCDF dataset. */
291#define NC_ENOTVAR      (-49)     
292#define NC_EGLOBAL      (-50)      /**< Action prohibited on NC_GLOBAL varid */
293#define NC_ENOTNC       (-51)      /**< Not a netcdf file */
294#define NC_ESTS         (-52)      /**< In Fortran, string too short */
295#define NC_EMAXNAME     (-53)      /**< NC_MAX_NAME exceeded */
296#define NC_EUNLIMIT     (-54)      /**< NC_UNLIMITED size already in use */
297#define NC_ENORECVARS   (-55)      /**< nc_rec op when there are no record vars */
298#define NC_ECHAR        (-56)      /**< Attempt to convert between text & numbers */
299
300/** Start+count exceeds dimension bound.
301
302The specified edge lengths added to the specified corner would have
303referenced data out of range for the rank of the specified
304variable. For example, an edge length that is larger than the
305corresponding dimension length minus the corner index will cause an
306error. */
307#define NC_EEDGE        (-57)     
308#define NC_ESTRIDE      (-58)      /**< Illegal stride */
309#define NC_EBADNAME     (-59)      /**< Attribute or variable name contains illegal characters */
310/* N.B. following must match value in ncx.h */
311
312/** Math result not representable.
313
314One or more of the values are out of the range of values representable
315by the desired type. */
316#define NC_ERANGE       (-60)     
317#define NC_ENOMEM       (-61)      /**< Memory allocation (malloc) failure */
318#define NC_EVARSIZE     (-62)      /**< One or more variable sizes violate format constraints */ 
319#define NC_EDIMSIZE     (-63)      /**< Invalid dimension size */
320#define NC_ETRUNC       (-64)      /**< File likely truncated or possibly corrupted */
321#define NC_EAXISTYPE    (-65)      /**< Unknown axis type. */
322
323/* Following errors are added for DAP */
324#define NC_EDAP         (-66)      /**< Generic DAP error */
325#define NC_ECURL        (-67)      /**< Generic libcurl error */
326#define NC_EIO          (-68)      /**< Generic IO error */
327#define NC_ENODATA      (-69)      /**< Attempt to access variable with no data */
328#define NC_EDAPSVC      (-70)      /**< DAP server error */
329#define NC_EDAS         (-71)      /**< Malformed or inaccessible DAS */
330#define NC_EDDS         (-72)      /**< Malformed or inaccessible DDS */
331#define NC_EDATADDS     (-73)      /**< Malformed or inaccessible DATADDS */
332#define NC_EDAPURL      (-74)      /**< Malformed DAP URL */
333#define NC_EDAPCONSTRAINT (-75)      /**< Malformed DAP Constraint*/
334#define NC_ETRANSLATION (-76)      /**< Untranslatable construct */
335
336/* The following was added in support of netcdf-4. Make all netcdf-4
337   error codes < -100 so that errors can be added to netcdf-3 if
338   needed. */
339#define NC4_FIRST_ERROR  (-100)
340
341/** Error at HDF5 layer. */
342#define NC_EHDFERR       (-101)   
343#define NC_ECANTREAD     (-102)    /**< Can't read. */
344#define NC_ECANTWRITE    (-103)    /**< Can't write. */
345#define NC_ECANTCREATE   (-104)    /**< Can't create. */
346#define NC_EFILEMETA     (-105)    /**< Problem with file metadata. */
347#define NC_EDIMMETA      (-106)    /**< Problem with dimension metadata. */
348#define NC_EATTMETA      (-107)    /**< Problem with attribute metadata. */
349#define NC_EVARMETA      (-108)    /**< Problem with variable metadata. */
350#define NC_ENOCOMPOUND   (-109)    /**< Not a compound type. */
351#define NC_EATTEXISTS    (-110)    /**< Attribute already exists. */
352#define NC_ENOTNC4       (-111)    /**< Attempting netcdf-4 operation on netcdf-3 file. */ 
353
354/** Attempting netcdf-4 operation on strict nc3 netcdf-4 file. */ 
355#define NC_ESTRICTNC3    (-112)   
356#define NC_ENOTNC3       (-113)    /**< Attempting netcdf-3 operation on netcdf-4 file. */ 
357#define NC_ENOPAR        (-114)    /**< Parallel operation on file opened for non-parallel access. */ 
358#define NC_EPARINIT      (-115)    /**< Error initializing for parallel access. */ 
359#define NC_EBADGRPID     (-116)    /**< Bad group ID. */ 
360#define NC_EBADTYPID     (-117)    /**< Bad type ID. */ 
361#define NC_ETYPDEFINED   (-118)    /**< Type has already been defined and may not be edited. */
362#define NC_EBADFIELD     (-119)    /**< Bad field ID. */ 
363#define NC_EBADCLASS     (-120)    /**< Bad class. */ 
364#define NC_EMAPTYPE      (-121)    /**< Mapped access for atomic types only. */ 
365#define NC_ELATEFILL     (-122)    /**< Attempt to define fill value when data already exists. */
366#define NC_ELATEDEF      (-123)    /**< Attempt to define var properties, like deflate, after enddef. */
367#define NC_EDIMSCALE     (-124)    /**< Probem with HDF5 dimscales. */
368#define NC_ENOGRP        (-125)    /**< No group found. */
369#define NC_ESTORAGE      (-126)    /**< Can't specify both contiguous and chunking. */
370#define NC_EBADCHUNK     (-127)    /**< Bad chunksize. */
371#define NC_ENOTBUILT     (-128)    /**< Attempt to use feature that was not turned on when netCDF was built. */
372#define NC_EDISKLESS     (-129)    /**< Error in using diskless  access. */ 
373
374#define NC4_LAST_ERROR   (-129)
375
376/* This is used in netCDF-4 files for dimensions without coordinate
377 * vars. */
378#define DIM_WITHOUT_VARIABLE "This is a netCDF dimension but not a netCDF variable."
379
380/* This is here at the request of the NCO team to support our
381 * mistake of having chunksizes be first ints, then size_t. Doh! */
382#define NC_HAVE_NEW_CHUNKING_API 1
383
384
385/*Errors for all remote access methods(e.g. DAP and CDMREMOTE)*/
386#define NC_EURL         (NC_EDAPURL)   /* Malformed URL */
387#define NC_ECONSTRAINT  (NC_EDAPCONSTRAINT)   /* Malformed Constraint*/
388
389
390/*
391 * The Interface
392 */
393
394/* Declaration modifiers for DLL support (MSC et al) */
395
396#if defined(DLL_NETCDF) /* define when library is a DLL */
397#  if defined(DLL_EXPORT) /* define when building the library */
398#   define MSC_EXTRA __declspec(dllexport)
399#  else
400#   define MSC_EXTRA __declspec(dllimport)
401#  endif
402#include <io.h>
403/*#define lseek _lseeki64
404  #define off_t __int64*/
405#else
406#define MSC_EXTRA
407#endif  /* defined(DLL_NETCDF) */
408
409# define EXTERNL MSC_EXTRA extern
410
411#if defined(DLL_NETCDF) /* define when library is a DLL */
412EXTERNL int ncerr;
413EXTERNL int ncopts;
414#endif
415
416EXTERNL const char *
417nc_inq_libvers(void);
418
419EXTERNL const char *
420nc_strerror(int ncerr);
421
422EXTERNL int
423nc__create(const char *path, int cmode, size_t initialsz,
424         size_t *chunksizehintp, int *ncidp);
425
426EXTERNL int
427nc_create(const char *path, int cmode, int *ncidp);
428
429EXTERNL int
430nc__open(const char *path, int mode, 
431        size_t *chunksizehintp, int *ncidp);
432
433EXTERNL int
434nc_open(const char *path, int mode, int *ncidp);
435
436/* Learn the path used to open/create the file. */
437EXTERNL int
438nc_inq_path(int ncid, size_t *pathlen, char *path);
439
440/* Use these with nc_var_par_access(). */
441#define NC_INDEPENDENT 0
442#define NC_COLLECTIVE 1
443
444/* Set parallel access for a variable to independent (the default) or
445 * collective. */
446EXTERNL int
447nc_var_par_access(int ncid, int varid, int par_access);
448
449/* Given an ncid and group name (NULL gets root group), return
450 * locid. */
451EXTERNL int
452nc_inq_ncid(int ncid, const char *name, int *grp_ncid);
453
454/* Given a location id, return the number of groups it contains, and
455 * an array of their locids. */
456EXTERNL int
457nc_inq_grps(int ncid, int *numgrps, int *ncids);
458
459/* Given locid, find name of group. (Root group is named "/".) */
460EXTERNL int
461nc_inq_grpname(int ncid, char *name);
462
463/* Given ncid, find full name and len of full name. (Root group is
464 * named "/", with length 1.) */
465EXTERNL int
466nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name);
467
468/* Given ncid, find len of full name. */
469EXTERNL int
470nc_inq_grpname_len(int ncid, size_t *lenp);
471
472/* Given an ncid, find the ncid of its parent group. */
473EXTERNL int
474nc_inq_grp_parent(int ncid, int *parent_ncid);
475
476/* Given a name and parent ncid, find group ncid. */
477EXTERNL int
478nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid);
479
480/* Given a full name and ncid, find group ncid. */
481EXTERNL int
482nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid);
483
484/* Get a list of ids for all the variables in a group. */
485EXTERNL int 
486nc_inq_varids(int ncid, int *nvars, int *varids);
487
488/* Find all dimids for a location. This finds all dimensions in a
489 * group, or any of its parents. */
490EXTERNL int 
491nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents);
492
493/* Find all user-defined types for a location. This finds all
494 * user-defined types in a group. */
495EXTERNL int 
496nc_inq_typeids(int ncid, int *ntypes, int *typeids);
497
498/* Are two types equal? */
499EXTERNL int
500nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, 
501                  nc_type typeid2, int *equal);
502
503/* Create a group. its ncid is returned in the new_ncid pointer. */
504EXTERNL int
505nc_def_grp(int parent_ncid, const char *name, int *new_ncid);
506
507/* Here are functions for dealing with compound types. */
508
509/* Create a compound type. */
510EXTERNL int
511nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp);
512
513/* Insert a named field into a compound type. */
514EXTERNL int
515nc_insert_compound(int ncid, nc_type xtype, const char *name, 
516                   size_t offset, nc_type field_typeid);
517
518/* Insert a named array into a compound type. */
519EXTERNL int
520nc_insert_array_compound(int ncid, nc_type xtype, const char *name, 
521                         size_t offset, nc_type field_typeid,
522                         int ndims, const int *dim_sizes);
523
524/* Get the name and size of a type. */
525EXTERNL int
526nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size);
527
528/* Get the id of a type from the name. */
529EXTERNL int
530nc_inq_typeid(int ncid, const char *name, nc_type *typeidp);
531
532/* Get the name, size, and number of fields in a compound type. */
533EXTERNL int
534nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, 
535                size_t *nfieldsp);
536
537/* Get the name of a compound type. */
538EXTERNL int
539nc_inq_compound_name(int ncid, nc_type xtype, char *name);
540
541/* Get the size of a compound type. */
542EXTERNL int
543nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep);
544
545/* Get the number of fields in this compound type. */
546EXTERNL int
547nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp);
548
549/* Given the xtype and the fieldid, get all info about it. */
550EXTERNL int
551nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name, 
552                      size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
553                      int *dim_sizesp);
554
555/* Given the typeid and the fieldid, get the name. */
556EXTERNL int
557nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, 
558                          char *name);
559
560/* Given the xtype and the name, get the fieldid. */
561EXTERNL int
562nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, 
563                           int *fieldidp);
564
565/* Given the xtype and fieldid, get the offset. */
566EXTERNL int
567nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, 
568                            size_t *offsetp);
569
570/* Given the xtype and the fieldid, get the type of that field. */
571EXTERNL int
572nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, 
573                          nc_type *field_typeidp);
574
575/* Given the xtype and the fieldid, get the number of dimensions for
576 * that field (scalars are 0). */
577EXTERNL int
578nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, 
579                           int *ndimsp);
580
581/* Given the xtype and the fieldid, get the sizes of dimensions for
582 * that field. User must have allocated storage for the dim_sizes. */
583EXTERNL int
584nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, 
585                               int *dim_sizes);
586
587/** This is the type of arrays of vlens. */
588typedef struct {
589    size_t len; /**< Length of VL data (in base type units) */
590    void *p;    /**< Pointer to VL data */
591} nc_vlen_t;
592
593/** Calculate an offset for creating a compound type. This calls a
594 * mysterious C macro which was found carved into one of the blocks of
595 * the Newgrange passage tomb in County Meath, Ireland. This code has
596 * been carbon dated to 3200 B.C.E. */
597#define NC_COMPOUND_OFFSET(S,M)    (offsetof(S,M))
598
599/* Create a variable length type. */
600EXTERNL int
601nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep);
602
603/* Find out about a vlen. */
604EXTERNL int
605nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, 
606            nc_type *base_nc_typep);
607
608/* When you read VLEN type the library will actually allocate the
609 * storage space for the data. This storage space must be freed, so
610 * pass the pointer back to this function, when you're done with the
611 * data, and it will free the vlen memory. */
612EXTERNL int
613nc_free_vlen(nc_vlen_t *vl);
614
615EXTERNL int
616nc_free_vlens(size_t len, nc_vlen_t vlens[]);
617
618/* Put or get one element in a vlen array. */
619EXTERNL int
620nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, 
621                    size_t len, const void *data);
622
623EXTERNL int
624nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element, 
625                    size_t *len, void *data);
626   
627/* When you read the string type the library will allocate the storage
628 * space for the data. This storage space must be freed, so pass the
629 * pointer back to this function, when you're done with the data, and
630 * it will free the string memory. */
631EXTERNL int
632nc_free_string(size_t len, char **data);
633
634/* Find out about a user defined type. */
635EXTERNL int
636nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, 
637                 nc_type *base_nc_typep, size_t *nfieldsp, int *classp);
638
639/* Write an attribute of any type. */
640EXTERNL int
641nc_put_att(int ncid, int varid, const char *name, nc_type xtype, 
642           size_t len, const void *op);
643
644/* Read an attribute of any type. */
645EXTERNL int
646nc_get_att(int ncid, int varid, const char *name, void *ip);
647
648/* Enum type. */
649
650/* Create an enum type. Provide a base type and a name. At the moment
651 * only ints are accepted as base types. */
652EXTERNL int
653nc_def_enum(int ncid, nc_type base_typeid, const char *name, 
654            nc_type *typeidp);
655
656/* Insert a named value into an enum type. The value must fit within
657 * the size of the enum type, the name size must be <= NC_MAX_NAME. */
658EXTERNL int
659nc_insert_enum(int ncid, nc_type xtype, const char *name, 
660               const void *value);
661
662/* Get information about an enum type: its name, base type and the
663 * number of members defined. */
664EXTERNL int
665nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep, 
666            size_t *base_sizep, size_t *num_membersp);
667
668/* Get information about an enum member: a name and value. Name size
669 * will be <= NC_MAX_NAME. */
670EXTERNL int
671nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name, 
672                   void *value);
673
674
675/* Get enum name from enum value. Name size will be <= NC_MAX_NAME. */
676EXTERNL int
677nc_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier);
678
679/* Opaque type. */
680
681/* Create an opaque type. Provide a size and a name. */
682EXTERNL int
683nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep);
684
685/* Get information about an opaque type. */
686EXTERNL int
687nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep);
688
689/* Write entire var of any type. */
690EXTERNL int
691nc_put_var(int ncid, int varid,  const void *op);
692
693/* Read entire var of any type. */
694EXTERNL int
695nc_get_var(int ncid, int varid,  void *ip);
696
697/* Write one value. */
698EXTERNL int
699nc_put_var1(int ncid, int varid,  const size_t *indexp,
700            const void *op);
701
702/* Read one value. */
703EXTERNL int
704nc_get_var1(int ncid, int varid,  const size_t *indexp, void *ip);
705
706/* Write an array of values. */
707EXTERNL int
708nc_put_vara(int ncid, int varid,  const size_t *startp, 
709            const size_t *countp, const void *op);
710
711/* Read an array of values. */
712EXTERNL int
713nc_get_vara(int ncid, int varid,  const size_t *startp, 
714            const size_t *countp, void *ip);
715
716/* Write slices of an array of values. */
717EXTERNL int
718nc_put_vars(int ncid, int varid,  const size_t *startp, 
719            const size_t *countp, const ptrdiff_t *stridep,
720            const void *op);
721
722/* Read slices of an array of values. */
723EXTERNL int
724nc_get_vars(int ncid, int varid,  const size_t *startp, 
725            const size_t *countp, const ptrdiff_t *stridep,
726            void *ip);
727
728/* Write mapped slices of an array of values. */
729EXTERNL int
730nc_put_varm(int ncid, int varid,  const size_t *startp, 
731            const size_t *countp, const ptrdiff_t *stridep,
732            const ptrdiff_t *imapp, const void *op);
733
734/* Read mapped slices of an array of values. */
735EXTERNL int
736nc_get_varm(int ncid, int varid,  const size_t *startp, 
737            const size_t *countp, const ptrdiff_t *stridep,
738            const ptrdiff_t *imapp, void *ip);
739
740/* Extra netcdf-4 stuff. */
741
742/* Set compression settings for a variable. Lower is faster, higher is
743 * better. Must be called after nc_def_var and before nc_enddef. */
744EXTERNL int
745nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, 
746                   int deflate_level);
747
748/* Find out compression settings of a var. */
749EXTERNL int
750nc_inq_var_deflate(int ncid, int varid, int *shufflep, 
751                   int *deflatep, int *deflate_levelp);
752
753/* Find out szip settings of a var. */
754EXTERNL int
755nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp);
756
757/* Set fletcher32 checksum for a var. This must be done after nc_def_var
758   and before nc_enddef. */
759EXTERNL int
760nc_def_var_fletcher32(int ncid, int varid, int fletcher32);
761   
762/* Inquire about fletcher32 checksum for a var. */
763EXTERNL int
764nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p);
765
766/* Define chunking for a variable. This must be done after nc_def_var
767   and before nc_enddef. */
768EXTERNL int
769nc_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp);
770
771/* Inq chunking stuff for a var. */
772EXTERNL int
773nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp);
774
775/* Define fill value behavior for a variable. This must be done after
776   nc_def_var and before nc_enddef. */
777EXTERNL int
778nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value);
779
780/* Inq fill value setting for a var. */
781EXTERNL int
782nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep);
783
784/* Define the endianness of a variable. */
785EXTERNL int
786nc_def_var_endian(int ncid, int varid, int endian);
787
788/* Learn about the endianness of a variable. */
789EXTERNL int
790nc_inq_var_endian(int ncid, int varid, int *endianp);
791
792/* Set the fill mode (classic or 64-bit offset files only). */
793EXTERNL int
794nc_set_fill(int ncid, int fillmode, int *old_modep);
795
796/* Set the default nc_create format to NC_FORMAT_CLASSIC,
797 * NC_FORMAT_64BIT, NC_FORMAT_NETCDF4, NC_FORMAT_NETCDF4_CLASSIC. */
798EXTERNL int
799nc_set_default_format(int format, int *old_formatp);
800
801/* Set the cache size, nelems, and preemption policy. */
802EXTERNL int
803nc_set_chunk_cache(size_t size, size_t nelems, float preemption);
804
805/* Get the cache size, nelems, and preemption policy. */
806EXTERNL int
807nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp);
808
809/* Set the per-variable cache size, nelems, and preemption policy. */
810EXTERNL int
811nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, 
812                       float preemption);
813
814/* Set the per-variable cache size, nelems, and preemption policy. */
815EXTERNL int
816nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, 
817                       float *preemptionp);
818
819EXTERNL int
820nc_redef(int ncid);
821
822EXTERNL int
823nc__enddef(int ncid, size_t h_minfree, size_t v_align,
824        size_t v_minfree, size_t r_align);
825
826EXTERNL int
827nc_enddef(int ncid);
828
829EXTERNL int
830nc_sync(int ncid);
831
832EXTERNL int
833nc_abort(int ncid);
834
835EXTERNL int
836nc_close(int ncid);
837
838EXTERNL int
839nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
840
841EXTERNL int 
842nc_inq_ndims(int ncid, int *ndimsp);
843
844EXTERNL int 
845nc_inq_nvars(int ncid, int *nvarsp);
846
847EXTERNL int 
848nc_inq_natts(int ncid, int *nattsp);
849
850EXTERNL int 
851nc_inq_unlimdim(int ncid, int *unlimdimidp);
852
853/* The next function is for NetCDF-4 only */
854EXTERNL int 
855nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp);
856
857/* Added in 3.6.1 to return format of netCDF file. */
858EXTERNL int
859nc_inq_format(int ncid, int *formatp);
860
861/* Begin _dim */
862
863EXTERNL int
864nc_def_dim(int ncid, const char *name, size_t len, int *idp);
865
866EXTERNL int
867nc_inq_dimid(int ncid, const char *name, int *idp);
868
869EXTERNL int
870nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
871
872EXTERNL int 
873nc_inq_dimname(int ncid, int dimid, char *name);
874
875EXTERNL int 
876nc_inq_dimlen(int ncid, int dimid, size_t *lenp);
877
878EXTERNL int
879nc_rename_dim(int ncid, int dimid, const char *name);
880
881/* End _dim */
882/* Begin _att */
883
884EXTERNL int
885nc_inq_att(int ncid, int varid, const char *name,
886           nc_type *xtypep, size_t *lenp);
887
888EXTERNL int 
889nc_inq_attid(int ncid, int varid, const char *name, int *idp);
890
891EXTERNL int 
892nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep);
893
894EXTERNL int 
895nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp);
896
897EXTERNL int
898nc_inq_attname(int ncid, int varid, int attnum, char *name);
899
900EXTERNL int
901nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out);
902
903EXTERNL int
904nc_rename_att(int ncid, int varid, const char *name, const char *newname);
905
906EXTERNL int
907nc_del_att(int ncid, int varid, const char *name);
908
909/* End _att */
910/* Begin {put,get}_att */
911
912EXTERNL int
913nc_put_att_text(int ncid, int varid, const char *name,
914                size_t len, const char *op);
915
916EXTERNL int
917nc_get_att_text(int ncid, int varid, const char *name, char *ip);
918
919EXTERNL int
920nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype,
921                 size_t len, const unsigned char *op);
922
923EXTERNL int
924nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip);
925
926EXTERNL int
927nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype,
928                 size_t len, const signed char *op);
929
930EXTERNL int
931nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip);
932
933EXTERNL int
934nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype,
935                 size_t len, const short *op);
936
937EXTERNL int
938nc_get_att_short(int ncid, int varid, const char *name, short *ip);
939
940EXTERNL int
941nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype,
942               size_t len, const int *op);
943
944EXTERNL int
945nc_get_att_int(int ncid, int varid, const char *name, int *ip);
946
947EXTERNL int
948nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype,
949                size_t len, const long *op);
950
951EXTERNL int
952nc_get_att_long(int ncid, int varid, const char *name, long *ip);
953
954EXTERNL int
955nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype,
956                 size_t len, const float *op);
957
958EXTERNL int
959nc_get_att_float(int ncid, int varid, const char *name, float *ip);
960
961EXTERNL int
962nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype,
963                  size_t len, const double *op);
964
965EXTERNL int
966nc_get_att_double(int ncid, int varid, const char *name, double *ip);
967
968EXTERNL int
969nc_put_att_ushort(int ncid, int varid, const char *name, nc_type xtype,
970                  size_t len, const unsigned short *op);
971
972EXTERNL int
973nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *ip);
974
975EXTERNL int
976nc_put_att_uint(int ncid, int varid, const char *name, nc_type xtype,
977                size_t len, const unsigned int *op);
978
979EXTERNL int
980nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *ip);
981
982EXTERNL int
983nc_put_att_longlong(int ncid, int varid, const char *name, nc_type xtype,
984                 size_t len, const long long *op);
985
986EXTERNL int
987nc_get_att_longlong(int ncid, int varid, const char *name, long long *ip);
988
989EXTERNL int
990nc_put_att_ulonglong(int ncid, int varid, const char *name, nc_type xtype,
991                     size_t len, const unsigned long long *op);
992
993EXTERNL int
994nc_get_att_ulonglong(int ncid, int varid, const char *name, 
995                     unsigned long long *ip);
996
997EXTERNL int
998nc_put_att_string(int ncid, int varid, const char *name, 
999                  size_t len, const char **op);
1000
1001EXTERNL int
1002nc_get_att_string(int ncid, int varid, const char *name, char **ip);
1003
1004/* End {put,get}_att */
1005/* Begin _var */
1006
1007EXTERNL int
1008nc_def_var(int ncid, const char *name, nc_type xtype, int ndims, 
1009           const int *dimidsp, int *varidp);
1010
1011EXTERNL int
1012nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, 
1013           int *ndimsp, int *dimidsp, int *nattsp);
1014
1015EXTERNL int
1016nc_inq_varid(int ncid, const char *name, int *varidp);
1017
1018EXTERNL int 
1019nc_inq_varname(int ncid, int varid, char *name);
1020
1021EXTERNL int 
1022nc_inq_vartype(int ncid, int varid, nc_type *xtypep);
1023
1024EXTERNL int 
1025nc_inq_varndims(int ncid, int varid, int *ndimsp);
1026
1027EXTERNL int 
1028nc_inq_vardimid(int ncid, int varid, int *dimidsp);
1029
1030EXTERNL int 
1031nc_inq_varnatts(int ncid, int varid, int *nattsp);
1032
1033EXTERNL int
1034nc_rename_var(int ncid, int varid, const char *name);
1035
1036EXTERNL int
1037nc_copy_var(int ncid_in, int varid, int ncid_out);
1038
1039#ifndef ncvarcpy
1040/* support the old name for now */
1041#define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out))
1042#endif
1043
1044/* End _var */
1045/* Begin {put,get}_var1 */
1046
1047EXTERNL int
1048nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op);
1049
1050EXTERNL int
1051nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip);
1052
1053EXTERNL int
1054nc_put_var1_uchar(int ncid, int varid, const size_t *indexp,
1055                  const unsigned char *op);
1056
1057EXTERNL int
1058nc_get_var1_uchar(int ncid, int varid, const size_t *indexp,
1059                  unsigned char *ip);
1060
1061EXTERNL int
1062nc_put_var1_schar(int ncid, int varid, const size_t *indexp,
1063                  const signed char *op);
1064
1065EXTERNL int
1066nc_get_var1_schar(int ncid, int varid, const size_t *indexp,
1067                  signed char *ip);
1068
1069EXTERNL int
1070nc_put_var1_short(int ncid, int varid, const size_t *indexp,
1071                  const short *op);
1072
1073EXTERNL int
1074nc_get_var1_short(int ncid, int varid, const size_t *indexp,
1075                  short *ip);
1076
1077EXTERNL int
1078nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op);
1079
1080EXTERNL int
1081nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip);
1082
1083EXTERNL int
1084nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op);
1085
1086EXTERNL int
1087nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip);
1088
1089EXTERNL int
1090nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op);
1091
1092EXTERNL int
1093nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip);
1094
1095EXTERNL int
1096nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op);
1097
1098EXTERNL int
1099nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip);
1100
1101EXTERNL int
1102nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, 
1103                   const unsigned short *op);
1104
1105EXTERNL int
1106nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, 
1107                   unsigned short *ip);
1108
1109EXTERNL int
1110nc_put_var1_uint(int ncid, int varid, const size_t *indexp, 
1111                 const unsigned int *op);
1112
1113EXTERNL int
1114nc_get_var1_uint(int ncid, int varid, const size_t *indexp, 
1115                 unsigned int *ip);
1116
1117EXTERNL int
1118nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, 
1119                     const long long *op);
1120
1121EXTERNL int
1122nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, 
1123                  long long *ip);
1124
1125EXTERNL int
1126nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, 
1127                   const unsigned long long *op);
1128
1129EXTERNL int
1130nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, 
1131                   unsigned long long *ip);
1132
1133EXTERNL int
1134nc_put_var1_string(int ncid, int varid, const size_t *indexp, 
1135                   const char **op);
1136
1137EXTERNL int
1138nc_get_var1_string(int ncid, int varid, const size_t *indexp, 
1139                   char **ip);
1140
1141/* End {put,get}_var1 */
1142/* Begin {put,get}_vara */
1143
1144EXTERNL int
1145nc_put_vara_text(int ncid, int varid, const size_t *startp, 
1146                 const size_t *countp, const char *op);
1147
1148EXTERNL int
1149nc_get_vara_text(int ncid, int varid, const size_t *startp, 
1150                 const size_t *countp, char *ip);
1151
1152EXTERNL int
1153nc_put_vara_uchar(int ncid, int varid, const size_t *startp, 
1154                  const size_t *countp, const unsigned char *op);
1155
1156EXTERNL int
1157nc_get_vara_uchar(int ncid, int varid, const size_t *startp, 
1158                  const size_t *countp, unsigned char *ip);
1159
1160EXTERNL int
1161nc_put_vara_schar(int ncid, int varid, const size_t *startp, 
1162                  const size_t *countp, const signed char *op);
1163
1164EXTERNL int
1165nc_get_vara_schar(int ncid, int varid, const size_t *startp, 
1166                  const size_t *countp, signed char *ip);
1167
1168EXTERNL int
1169nc_put_vara_short(int ncid, int varid, const size_t *startp, 
1170                  const size_t *countp, const short *op);
1171
1172EXTERNL int
1173nc_get_vara_short(int ncid, int varid, const size_t *startp, 
1174                  const size_t *countp, short *ip);
1175
1176EXTERNL int
1177nc_put_vara_int(int ncid, int varid, const size_t *startp, 
1178                const size_t *countp, const int *op);
1179
1180EXTERNL int
1181nc_get_vara_int(int ncid, int varid, const size_t *startp, 
1182                const size_t *countp, int *ip);
1183
1184EXTERNL int
1185nc_put_vara_long(int ncid, int varid, const size_t *startp, 
1186                 const size_t *countp, const long *op);
1187
1188EXTERNL int
1189nc_get_vara_long(int ncid, int varid,
1190        const size_t *startp, const size_t *countp, long *ip);
1191
1192EXTERNL int
1193nc_put_vara_float(int ncid, int varid,
1194        const size_t *startp, const size_t *countp, const float *op);
1195
1196EXTERNL int
1197nc_get_vara_float(int ncid, int varid,
1198        const size_t *startp, const size_t *countp, float *ip);
1199
1200EXTERNL int
1201nc_put_vara_double(int ncid, int varid, const size_t *startp, 
1202                   const size_t *countp, const double *op);
1203
1204EXTERNL int
1205nc_get_vara_double(int ncid, int varid, const size_t *startp, 
1206                   const size_t *countp, double *ip);
1207
1208EXTERNL int
1209nc_put_vara_ushort(int ncid, int varid, const size_t *startp, 
1210                   const size_t *countp, const unsigned short *op);
1211
1212EXTERNL int
1213nc_get_vara_ushort(int ncid, int varid, const size_t *startp, 
1214                   const size_t *countp, unsigned short *ip);
1215
1216EXTERNL int
1217nc_put_vara_uint(int ncid, int varid, const size_t *startp, 
1218                 const size_t *countp, const unsigned int *op);
1219
1220EXTERNL int
1221nc_get_vara_uint(int ncid, int varid, const size_t *startp, 
1222                 const size_t *countp, unsigned int *ip);
1223
1224EXTERNL int
1225nc_put_vara_longlong(int ncid, int varid, const size_t *startp, 
1226                  const size_t *countp, const long long *op);
1227
1228EXTERNL int
1229nc_get_vara_longlong(int ncid, int varid, const size_t *startp, 
1230                  const size_t *countp, long long *ip);
1231
1232EXTERNL int
1233nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, 
1234                   const size_t *countp, const unsigned long long *op);
1235
1236EXTERNL int
1237nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp, 
1238                   const size_t *countp, unsigned long long *ip);
1239
1240EXTERNL int
1241nc_put_vara_string(int ncid, int varid, const size_t *startp, 
1242                   const size_t *countp, const char **op);
1243
1244EXTERNL int
1245nc_get_vara_string(int ncid, int varid, const size_t *startp, 
1246                   const size_t *countp, char **ip);
1247
1248/* End {put,get}_vara */
1249/* Begin {put,get}_vars */
1250
1251EXTERNL int
1252nc_put_vars_text(int ncid, int varid,
1253        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1254        const char *op);
1255
1256EXTERNL int
1257nc_get_vars_text(int ncid, int varid,
1258        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1259        char *ip);
1260
1261EXTERNL int
1262nc_put_vars_uchar(int ncid, int varid,
1263        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1264        const unsigned char *op);
1265
1266EXTERNL int
1267nc_get_vars_uchar(int ncid, int varid,
1268        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1269        unsigned char *ip);
1270
1271EXTERNL int
1272nc_put_vars_schar(int ncid, int varid,
1273        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1274        const signed char *op);
1275
1276EXTERNL int
1277nc_get_vars_schar(int ncid, int varid,
1278        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1279        signed char *ip);
1280
1281EXTERNL int
1282nc_put_vars_short(int ncid, int varid,
1283        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1284        const short *op);
1285
1286EXTERNL int
1287nc_get_vars_short(int ncid, int varid, const size_t *startp, 
1288                  const size_t *countp, const ptrdiff_t *stridep,
1289                  short *ip);
1290
1291EXTERNL int
1292nc_put_vars_int(int ncid, int varid,
1293        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1294        const int *op);
1295
1296EXTERNL int
1297nc_get_vars_int(int ncid, int varid,
1298        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1299        int *ip);
1300
1301EXTERNL int
1302nc_put_vars_long(int ncid, int varid,
1303        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1304        const long *op);
1305
1306EXTERNL int
1307nc_get_vars_long(int ncid, int varid,
1308        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1309        long *ip);
1310
1311EXTERNL int
1312nc_put_vars_float(int ncid, int varid,
1313        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1314        const float *op);
1315
1316EXTERNL int
1317nc_get_vars_float(int ncid, int varid,
1318        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1319        float *ip);
1320
1321EXTERNL int
1322nc_put_vars_double(int ncid, int varid,
1323        const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1324        const double *op);
1325
1326EXTERNL int
1327nc_get_vars_double(int ncid, int varid, const size_t *startp, 
1328                   const size_t *countp, const ptrdiff_t *stridep,
1329                   double *ip);
1330
1331EXTERNL int
1332nc_put_vars_ushort(int ncid, int varid, const size_t *startp, 
1333                   const size_t *countp, const ptrdiff_t *stridep, 
1334                   const unsigned short *op);
1335
1336EXTERNL int
1337nc_get_vars_ushort(int ncid, int varid, const size_t *startp, 
1338                   const size_t *countp, const ptrdiff_t *stridep, 
1339                   unsigned short *ip);
1340
1341EXTERNL int
1342nc_put_vars_uint(int ncid, int varid, const size_t *startp, 
1343                 const size_t *countp, const ptrdiff_t *stridep, 
1344                 const unsigned int *op);
1345
1346EXTERNL int
1347nc_get_vars_uint(int ncid, int varid, const size_t *startp, 
1348                 const size_t *countp, const ptrdiff_t *stridep, 
1349                 unsigned int *ip);
1350
1351EXTERNL int
1352nc_put_vars_longlong(int ncid, int varid, const size_t *startp, 
1353                  const size_t *countp, const ptrdiff_t *stridep, 
1354                  const long long *op);
1355
1356EXTERNL int
1357nc_get_vars_longlong(int ncid, int varid, const size_t *startp, 
1358                  const size_t *countp, const ptrdiff_t *stridep, 
1359                  long long *ip);
1360
1361EXTERNL int
1362nc_put_vars_ulonglong(int ncid, int varid, const size_t *startp, 
1363                   const size_t *countp, const ptrdiff_t *stridep, 
1364                   const unsigned long long *op);
1365
1366EXTERNL int
1367nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp, 
1368                   const size_t *countp, const ptrdiff_t *stridep, 
1369                   unsigned long long *ip);
1370
1371EXTERNL int
1372nc_put_vars_string(int ncid, int varid, const size_t *startp, 
1373                   const size_t *countp, const ptrdiff_t *stridep, 
1374                   const char **op);
1375
1376EXTERNL int
1377nc_get_vars_string(int ncid, int varid, const size_t *startp, 
1378                   const size_t *countp, const ptrdiff_t *stridep, 
1379                   char **ip);
1380
1381/* End {put,get}_vars */
1382/* Begin {put,get}_varm */
1383
1384EXTERNL int
1385nc_put_varm_text(int ncid, int varid, const size_t *startp, 
1386                 const size_t *countp, const ptrdiff_t *stridep,
1387                 const ptrdiff_t *imapp, const char *op);
1388
1389EXTERNL int
1390nc_get_varm_text(int ncid, int varid, const size_t *startp, 
1391                 const size_t *countp, const ptrdiff_t *stridep,
1392                 const ptrdiff_t *imapp, char *ip);
1393
1394EXTERNL int
1395nc_put_varm_uchar(int ncid, int varid, const size_t *startp, 
1396                  const size_t *countp, const ptrdiff_t *stridep,
1397                  const ptrdiff_t *imapp, const unsigned char *op);
1398
1399EXTERNL int
1400nc_get_varm_uchar(int ncid, int varid, const size_t *startp, 
1401                  const size_t *countp, const ptrdiff_t *stridep,
1402                  const ptrdiff_t *imapp, unsigned char *ip);
1403
1404EXTERNL int
1405nc_put_varm_schar(int ncid, int varid, const size_t *startp, 
1406                  const size_t *countp, const ptrdiff_t *stridep,
1407                  const ptrdiff_t *imapp, const signed char *op);
1408
1409EXTERNL int
1410nc_get_varm_schar(int ncid, int varid, const size_t *startp, 
1411                  const size_t *countp, const ptrdiff_t *stridep,
1412                  const ptrdiff_t *imapp, signed char *ip);
1413
1414EXTERNL int
1415nc_put_varm_short(int ncid, int varid, const size_t *startp, 
1416                  const size_t *countp, const ptrdiff_t *stridep,
1417                  const ptrdiff_t *imapp, const short *op);
1418
1419EXTERNL int
1420nc_get_varm_short(int ncid, int varid, const size_t *startp, 
1421                  const size_t *countp, const ptrdiff_t *stridep,
1422                  const ptrdiff_t *imapp, short *ip);
1423
1424EXTERNL int
1425nc_put_varm_int(int ncid, int varid, const size_t *startp, 
1426                const size_t *countp, const ptrdiff_t *stridep,
1427                const ptrdiff_t *imapp, const int *op);
1428
1429EXTERNL int
1430nc_get_varm_int(int ncid, int varid, const size_t *startp, 
1431                const size_t *countp, const ptrdiff_t *stridep,
1432                const ptrdiff_t *imapp, int *ip);
1433
1434EXTERNL int
1435nc_put_varm_long(int ncid, int varid, const size_t *startp, 
1436                 const size_t *countp, const ptrdiff_t *stridep,
1437                 const ptrdiff_t *imapp, const long *op);
1438
1439EXTERNL int
1440nc_get_varm_long(int ncid, int varid, const size_t *startp, 
1441                 const size_t *countp, const ptrdiff_t *stridep,
1442                 const ptrdiff_t *imapp, long *ip);
1443
1444EXTERNL int
1445nc_put_varm_float(int ncid, int varid,const size_t *startp, 
1446                  const size_t *countp, const ptrdiff_t *stridep,
1447                  const ptrdiff_t *imapp, const float *op);
1448
1449EXTERNL int
1450nc_get_varm_float(int ncid, int varid,const size_t *startp, 
1451                  const size_t *countp, const ptrdiff_t *stridep,
1452                  const ptrdiff_t *imapp, float *ip);
1453
1454EXTERNL int
1455nc_put_varm_double(int ncid, int varid, const size_t *startp, 
1456                   const size_t *countp, const ptrdiff_t *stridep,
1457                   const ptrdiff_t *imapp, const double *op);
1458
1459EXTERNL int
1460nc_get_varm_double(int ncid, int varid, const size_t *startp, 
1461                   const size_t *countp, const ptrdiff_t *stridep,
1462                   const ptrdiff_t * imapp, double *ip);
1463
1464EXTERNL int
1465nc_put_varm_ushort(int ncid, int varid, const size_t *startp, 
1466                   const size_t *countp, const ptrdiff_t *stridep, 
1467                   const ptrdiff_t * imapp, const unsigned short *op);
1468
1469EXTERNL int
1470nc_get_varm_ushort(int ncid, int varid, const size_t *startp, 
1471                   const size_t *countp, const ptrdiff_t *stridep, 
1472                   const ptrdiff_t * imapp, unsigned short *ip);
1473
1474EXTERNL int
1475nc_put_varm_uint(int ncid, int varid, const size_t *startp, 
1476                 const size_t *countp, const ptrdiff_t *stridep, 
1477                 const ptrdiff_t * imapp, const unsigned int *op);
1478
1479EXTERNL int
1480nc_get_varm_uint(int ncid, int varid, const size_t *startp, 
1481                 const size_t *countp, const ptrdiff_t *stridep, 
1482                 const ptrdiff_t * imapp, unsigned int *ip);
1483
1484EXTERNL int
1485nc_put_varm_longlong(int ncid, int varid, const size_t *startp, 
1486                  const size_t *countp, const ptrdiff_t *stridep, 
1487                  const ptrdiff_t * imapp, const long long *op);
1488
1489EXTERNL int
1490nc_get_varm_longlong(int ncid, int varid, const size_t *startp, 
1491                  const size_t *countp, const ptrdiff_t *stridep, 
1492                  const ptrdiff_t * imapp, long long *ip);
1493
1494EXTERNL int
1495nc_put_varm_ulonglong(int ncid, int varid, const size_t *startp, 
1496                   const size_t *countp, const ptrdiff_t *stridep, 
1497                   const ptrdiff_t * imapp, const unsigned long long *op);
1498
1499EXTERNL int
1500nc_get_varm_ulonglong(int ncid, int varid, const size_t *startp, 
1501                   const size_t *countp, const ptrdiff_t *stridep, 
1502                   const ptrdiff_t * imapp, unsigned long long *ip);
1503
1504EXTERNL int
1505nc_put_varm_string(int ncid, int varid, const size_t *startp, 
1506                   const size_t *countp, const ptrdiff_t *stridep, 
1507                   const ptrdiff_t * imapp, const char **op);
1508
1509EXTERNL int
1510nc_get_varm_string(int ncid, int varid, const size_t *startp, 
1511                   const size_t *countp, const ptrdiff_t *stridep, 
1512                   const ptrdiff_t * imapp, char **ip);
1513
1514/* End {put,get}_varm */
1515/* Begin {put,get}_var */
1516
1517EXTERNL int
1518nc_put_var_text(int ncid, int varid, const char *op);
1519
1520EXTERNL int
1521nc_get_var_text(int ncid, int varid, char *ip);
1522
1523EXTERNL int
1524nc_put_var_uchar(int ncid, int varid, const unsigned char *op);
1525
1526EXTERNL int
1527nc_get_var_uchar(int ncid, int varid, unsigned char *ip);
1528
1529EXTERNL int
1530nc_put_var_schar(int ncid, int varid, const signed char *op);
1531
1532EXTERNL int
1533nc_get_var_schar(int ncid, int varid, signed char *ip);
1534
1535EXTERNL int
1536nc_put_var_short(int ncid, int varid, const short *op);
1537
1538EXTERNL int
1539nc_get_var_short(int ncid, int varid, short *ip);
1540
1541EXTERNL int
1542nc_put_var_int(int ncid, int varid, const int *op);
1543
1544EXTERNL int
1545nc_get_var_int(int ncid, int varid, int *ip);
1546
1547EXTERNL int
1548nc_put_var_long(int ncid, int varid, const long *op);
1549
1550EXTERNL int
1551nc_get_var_long(int ncid, int varid, long *ip);
1552
1553EXTERNL int
1554nc_put_var_float(int ncid, int varid, const float *op);
1555
1556EXTERNL int
1557nc_get_var_float(int ncid, int varid, float *ip);
1558
1559EXTERNL int
1560nc_put_var_double(int ncid, int varid, const double *op);
1561
1562EXTERNL int
1563nc_get_var_double(int ncid, int varid, double *ip);
1564
1565EXTERNL int
1566nc_put_var_ushort(int ncid, int varid, const unsigned short *op);
1567
1568EXTERNL int
1569nc_get_var_ushort(int ncid, int varid, unsigned short *ip);
1570
1571EXTERNL int
1572nc_put_var_uint(int ncid, int varid, const unsigned int *op);
1573
1574EXTERNL int
1575nc_get_var_uint(int ncid, int varid, unsigned int *ip);
1576
1577EXTERNL int
1578nc_put_var_longlong(int ncid, int varid, const long long *op);
1579
1580EXTERNL int
1581nc_get_var_longlong(int ncid, int varid, long long *ip);
1582
1583EXTERNL int
1584nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op);
1585
1586EXTERNL int
1587nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip);
1588
1589EXTERNL int
1590nc_put_var_string(int ncid, int varid, const char **op);
1591
1592EXTERNL int
1593nc_get_var_string(int ncid, int varid, char **ip);
1594
1595/* Begin Deprecated, same as functions with "_ubyte" replaced by "_uchar" */
1596EXTERNL int
1597nc_put_att_ubyte(int ncid, int varid, const char *name, nc_type xtype,
1598                 size_t len, const unsigned char *op);
1599EXTERNL int
1600nc_get_att_ubyte(int ncid, int varid, const char *name, 
1601                 unsigned char *ip);
1602EXTERNL int
1603nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, 
1604                  const unsigned char *op);
1605EXTERNL int
1606nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, 
1607                  unsigned char *ip);
1608EXTERNL int
1609nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, 
1610                  const size_t *countp, const unsigned char *op);
1611EXTERNL int
1612nc_get_vara_ubyte(int ncid, int varid, const size_t *startp, 
1613                  const size_t *countp, unsigned char *ip);
1614EXTERNL int
1615nc_put_vars_ubyte(int ncid, int varid, const size_t *startp, 
1616                  const size_t *countp, const ptrdiff_t *stridep, 
1617                  const unsigned char *op);
1618EXTERNL int
1619nc_get_vars_ubyte(int ncid, int varid, const size_t *startp, 
1620                  const size_t *countp, const ptrdiff_t *stridep, 
1621                  unsigned char *ip);
1622EXTERNL int
1623nc_put_varm_ubyte(int ncid, int varid, const size_t *startp, 
1624                  const size_t *countp, const ptrdiff_t *stridep, 
1625                  const ptrdiff_t * imapp, const unsigned char *op);
1626EXTERNL int
1627nc_get_varm_ubyte(int ncid, int varid, const size_t *startp, 
1628                  const size_t *countp, const ptrdiff_t *stridep, 
1629                  const ptrdiff_t * imapp, unsigned char *ip);
1630EXTERNL int
1631nc_put_var_ubyte(int ncid, int varid, const unsigned char *op);
1632EXTERNL int
1633nc_get_var_ubyte(int ncid, int varid, unsigned char *ip);
1634/* End Deprecated */
1635
1636#ifdef LOGGING
1637
1638/* Set the log level. 0 shows only errors, 1 only major messages,
1639 * etc., to 5, which shows way too much information. */
1640EXTERNL int
1641nc_set_log_level(int new_level);
1642
1643/* Use this to turn off logging by calling
1644   nc_log_level(NC_TURN_OFF_LOGGING) */
1645#define NC_TURN_OFF_LOGGING (-1)
1646
1647#else /* not LOGGING */
1648
1649#define nc_set_log_level(e)
1650
1651#endif /* LOGGING */
1652
1653/* Show the netCDF library's in-memory metadata for a file. */
1654EXTERNL int 
1655nc_show_metadata(int ncid);
1656
1657/* End {put,get}_var */
1658
1659/* #ifdef _CRAYMPP */
1660/*
1661 * Public interfaces to better support
1662 * CRAY multi-processor systems like T3E.
1663 * A tip of the hat to NERSC.
1664 */
1665/*
1666 * It turns out we need to declare and define
1667 * these public interfaces on all platforms
1668 * or things get ugly working out the
1669 * FORTRAN interface. On !_CRAYMPP platforms,
1670 * these functions work as advertised, but you
1671 * can only use "processor element" 0.
1672 */
1673
1674EXTERNL int
1675nc__create_mp(const char *path, int cmode, size_t initialsz, int basepe,
1676         size_t *chunksizehintp, int *ncidp);
1677
1678EXTERNL int
1679nc__open_mp(const char *path, int mode, int basepe,
1680        size_t *chunksizehintp, int *ncidp);
1681
1682EXTERNL int
1683nc_delete(const char *path);
1684
1685EXTERNL int
1686nc_delete_mp(const char *path, int basepe);
1687
1688EXTERNL int
1689nc_set_base_pe(int ncid, int pe);
1690
1691EXTERNL int
1692nc_inq_base_pe(int ncid, int *pe);
1693
1694/* #endif _CRAYMPP */
1695
1696/* This v2 function is used in the nc_test program. */
1697EXTERNL int
1698nctypelen(nc_type datatype);
1699
1700/* Begin v2.4 backward compatiblity */
1701/*
1702 * defining NO_NETCDF_2 to the preprocessor
1703 * turns off backward compatiblity declarations.
1704 */
1705#ifndef NO_NETCDF_2
1706
1707/** Backward compatible alias. */
1708/**@{*/
1709#define FILL_BYTE       NC_FILL_BYTE
1710#define FILL_CHAR       NC_FILL_CHAR
1711#define FILL_SHORT      NC_FILL_SHORT
1712#define FILL_LONG       NC_FILL_INT
1713#define FILL_FLOAT      NC_FILL_FLOAT
1714#define FILL_DOUBLE     NC_FILL_DOUBLE
1715
1716#define MAX_NC_DIMS     NC_MAX_DIMS
1717#define MAX_NC_ATTRS    NC_MAX_ATTRS
1718#define MAX_NC_VARS     NC_MAX_VARS
1719#define MAX_NC_NAME     NC_MAX_NAME
1720#define MAX_VAR_DIMS    NC_MAX_VAR_DIMS
1721/**@}*/
1722
1723
1724/*
1725 * Global error status
1726 */
1727EXTERNL int ncerr;
1728
1729#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
1730#define NC_EXDR         (-32)   /* */
1731#define NC_SYSERR       (-31)
1732
1733/*
1734 * Global options variable.
1735 * Used to determine behavior of error handler.
1736 */
1737#define NC_FATAL        1
1738#define NC_VERBOSE      2
1739
1740EXTERNL int ncopts;     /* default is (NC_FATAL | NC_VERBOSE) */
1741
1742EXTERNL void
1743nc_advise(const char *cdf_routine_name, int err, const char *fmt,...);
1744
1745/*
1746 * C data type corresponding to a netCDF NC_LONG argument,
1747 * a signed 32 bit object.
1748 *
1749 * This is the only thing in this file which architecture dependent.
1750 */
1751typedef int nclong;
1752
1753EXTERNL int
1754nccreate(const char* path, int cmode);
1755
1756EXTERNL int
1757ncopen(const char* path, int mode);
1758
1759EXTERNL int
1760ncsetfill(int ncid, int fillmode);
1761
1762EXTERNL int
1763ncredef(int ncid);
1764
1765EXTERNL int
1766ncendef(int ncid);
1767
1768EXTERNL int
1769ncsync(int ncid);
1770
1771EXTERNL int
1772ncabort(int ncid);
1773
1774EXTERNL int
1775ncclose(int ncid);
1776
1777EXTERNL int
1778ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp);
1779
1780EXTERNL int
1781ncdimdef(int ncid, const char *name, long len);
1782
1783EXTERNL int
1784ncdimid(int ncid, const char *name);
1785
1786EXTERNL int
1787ncdiminq(int ncid, int dimid, char *name, long *lenp);
1788
1789EXTERNL int
1790ncdimrename(int ncid, int dimid, const char *name);
1791
1792EXTERNL int
1793ncattput(int ncid, int varid, const char *name, nc_type xtype,
1794        int len, const void *op);
1795
1796EXTERNL int
1797ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp);
1798
1799EXTERNL int
1800ncattget(int ncid, int varid, const char *name, void *ip);
1801
1802EXTERNL int
1803ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out,
1804        int varid_out);
1805
1806EXTERNL int
1807ncattname(int ncid, int varid, int attnum, char *name);
1808
1809EXTERNL int
1810ncattrename(int ncid, int varid, const char *name, const char *newname);
1811
1812EXTERNL int
1813ncattdel(int ncid, int varid, const char *name);
1814
1815EXTERNL int
1816ncvardef(int ncid, const char *name, nc_type xtype,
1817        int ndims, const int *dimidsp);
1818
1819EXTERNL int
1820ncvarid(int ncid, const char *name);
1821
1822EXTERNL int
1823ncvarinq(int ncid, int varid, char *name, nc_type *xtypep,
1824        int *ndimsp, int *dimidsp, int *nattsp);
1825
1826EXTERNL int
1827ncvarput1(int ncid, int varid, const long *indexp, const void *op);
1828
1829EXTERNL int
1830ncvarget1(int ncid, int varid, const long *indexp, void *ip);
1831
1832EXTERNL int
1833ncvarput(int ncid, int varid, const long *startp, const long *countp,
1834        const void *op);
1835
1836EXTERNL int
1837ncvarget(int ncid, int varid, const long *startp, const long *countp, 
1838        void *ip);
1839
1840EXTERNL int
1841ncvarputs(int ncid, int varid, const long *startp, const long *countp,
1842        const long *stridep, const void *op);
1843
1844EXTERNL int
1845ncvargets(int ncid, int varid, const long *startp, const long *countp,
1846        const long *stridep, void *ip);
1847
1848EXTERNL int
1849ncvarputg(int ncid, int varid, const long *startp, const long *countp,
1850        const long *stridep, const long *imapp, const void *op);
1851
1852EXTERNL int
1853ncvargetg(int ncid, int varid, const long *startp, const long *countp,
1854        const long *stridep, const long *imapp, void *ip);
1855
1856EXTERNL int
1857ncvarrename(int ncid, int varid, const char *name);
1858
1859EXTERNL int
1860ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp);
1861
1862EXTERNL int
1863ncrecget(int ncid, long recnum, void **datap);
1864
1865EXTERNL int
1866ncrecput(int ncid, long recnum, void *const *datap);
1867
1868/* End v2.4 backward compatiblity */
1869#endif /*!NO_NETCDF_2*/
1870
1871#if defined(__cplusplus)
1872}
1873#endif
1874
1875/* Temporary hack to shut up warnings */
1876#ifndef __MINGW32_VERSION
1877#define END_OF_MAIN()
1878#endif
1879
1880#endif /* _NETCDF_ */
1881
1882
1883
Note: See TracBrowser for help on using the repository browser.