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

Generated on Tue Jul 9 2013 19:18:05 for netCDF. NetCDF is a Unidata library.