NetCDF  4.9.3
netcdf.h
Go to the documentation of this file.
1 
13 #ifndef _NETCDF_
14 #define _NETCDF_
15 
16 #include <stddef.h> /* size_t, ptrdiff_t */
17 #include <errno.h> /* netcdf functions sometimes return system errors */
18 
19 /* Required for alloca on Windows */
20 #if defined(_WIN32) || defined(_WIN64)
21 #include <malloc.h>
22 #endif
23 
25 typedef int nc_type;
26 
27 #if defined(__cplusplus)
28 extern "C" {
29 #endif
30 
31 /*
32  * The netcdf external data types
33  */
34 #define NC_NAT 0
35 #define NC_BYTE 1
36 #define NC_CHAR 2
37 #define NC_SHORT 3
38 #define NC_INT 4
39 #define NC_LONG NC_INT
40 #define NC_FLOAT 5
41 #define NC_DOUBLE 6
42 #define NC_UBYTE 7
43 #define NC_USHORT 8
44 #define NC_UINT 9
45 #define NC_INT64 10
46 #define NC_UINT64 11
47 #define NC_STRING 12
49 #define NC_MAX_ATOMIC_TYPE NC_STRING
51 /* The following are use internally in support of user-defines
52  * types. They are also the class returned by nc_inq_user_type. */
53 #define NC_VLEN 13
54 #define NC_OPAQUE 14
55 #define NC_ENUM 15
56 #define NC_COMPOUND 16
60 #define NC_FIRSTUSERTYPEID 32
61 
67 #define NC_FILL_BYTE ((signed char)-127)
68 #define NC_FILL_CHAR ((char)0)
69 #define NC_FILL_SHORT ((short)-32767)
70 #define NC_FILL_INT (-2147483647)
71 #define NC_FILL_FLOAT (9.9692099683868690e+36f) /* near 15 * 2^119 */
72 #define NC_FILL_DOUBLE (9.9692099683868690e+36)
73 #define NC_FILL_UBYTE (255)
74 #define NC_FILL_USHORT (65535)
75 #define NC_FILL_UINT (4294967295U)
76 #define NC_FILL_INT64 ((long long)-9223372036854775806LL)
77 #define NC_FILL_UINT64 ((unsigned long long)18446744073709551614ULL)
78 #define NC_FILL_STRING ((char *)"")
79 
89 #define NC_MAX_BYTE 127
90 #define NC_MIN_BYTE (-NC_MAX_BYTE-1)
91 #define NC_MAX_CHAR 255
92 #define NC_MAX_SHORT 32767
93 #define NC_MIN_SHORT (-NC_MAX_SHORT - 1)
94 #define NC_MAX_INT 2147483647
95 #define NC_MIN_INT (-NC_MAX_INT - 1)
96 #define NC_MAX_FLOAT 3.402823466e+38f
97 #define NC_MIN_FLOAT (-NC_MAX_FLOAT)
98 #define NC_MAX_DOUBLE 1.7976931348623157e+308
99 #define NC_MIN_DOUBLE (-NC_MAX_DOUBLE)
100 #define NC_MAX_UBYTE NC_MAX_CHAR
101 #define NC_MAX_USHORT 65535U
102 #define NC_MAX_UINT 4294967295U
103 #define NC_MAX_INT64 (9223372036854775807LL)
104 #define NC_MIN_INT64 (-9223372036854775807LL-1)
105 #define NC_MAX_UINT64 (18446744073709551615ULL)
106 
118 #ifdef NETCDF_ENABLE_LEGACY_MACROS
119 #define _FillValue "_FillValue"
120 #endif
121 #define NC_FillValue "_FillValue"
122 #define NC_FILL 0
123 #define NC_NOFILL 0x100
125 /* Define the ioflags bits for nc_create and nc_open.
126  Currently unused in lower 16 bits:
127  0x0002
128  All upper 16 bits are unused except
129  0x20000
130  0x40000
131 */
132 
133 /* Lower 16 bits */
134 
135 #define NC_NOWRITE 0x0000
136 #define NC_WRITE 0x0001
138 #define NC_CLOBBER 0x0000
139 #define NC_NOCLOBBER 0x0004
140 #define NC_DISKLESS 0x0008
141 #define NC_MMAP 0x0010
143 #define NC_64BIT_DATA 0x0020
144 #define NC_CDF5 NC_64BIT_DATA
146 #define NC_UDF0 0x0040
147 #define NC_UDF1 0x0080
149 #define NC_CLASSIC_MODEL 0x0100
150 #define NC_64BIT_OFFSET 0x0200
156 #define NC_LOCK 0x0400
157 
160 #define NC_SHARE 0x0800
161 
162 #define NC_NETCDF4 0x1000
167 #define NC_MPIIO 0x2000
168 #define NC_MPIPOSIX NC_MPIIO
169 #define NC_PNETCDF (NC_MPIIO)
171 #define NC_PERSIST 0x4000
172 #define NC_INMEMORY 0x8000
174 /* Upper 16 bits */
175 #define NC_NOATTCREORD 0x20000
176 #define NC_NODIMSCALE_ATTACH 0x40000
178 #define NC_MAX_MAGIC_NUMBER_LEN 8
187 #define NC_FORMAT_CLASSIC (1)
188 /* After adding CDF5 support, the NC_FORMAT_64BIT
189  flag is somewhat confusing. So, it is renamed.
190  Note that the name in the contributed code
191  NC_FORMAT_64BIT was renamed to NC_FORMAT_CDF2
192 */
193 #define NC_FORMAT_64BIT_OFFSET (2)
194 #define NC_FORMAT_64BIT (NC_FORMAT_64BIT_OFFSET)
195 #define NC_FORMAT_NETCDF4 (3)
196 #define NC_FORMAT_NETCDF4_CLASSIC (4)
197 #define NC_FORMAT_64BIT_DATA (5)
198 
199 /* Alias */
200 #define NC_FORMAT_CDF5 NC_FORMAT_64BIT_DATA
201 
202 /* Define a mask covering format flags only */
203 #define NC_FORMAT_ALL (NC_64BIT_OFFSET|NC_64BIT_DATA|NC_CLASSIC_MODEL|NC_NETCDF4|NC_UDF0|NC_UDF1)
204 
225 #define NC_FORMATX_NC3 (1)
226 #define NC_FORMATX_NC_HDF5 (2)
227 #define NC_FORMATX_NC4 NC_FORMATX_NC_HDF5
228 #define NC_FORMATX_NC_HDF4 (3)
229 #define NC_FORMATX_PNETCDF (4)
230 #define NC_FORMATX_DAP2 (5)
231 #define NC_FORMATX_DAP4 (6)
232 #define NC_FORMATX_UDF0 (8)
233 #define NC_FORMATX_UDF1 (9)
234 #define NC_FORMATX_NCZARR (10)
235 #define NC_FORMATX_UNDEFINED (0)
236 
237  /* To avoid breaking compatibility (such as in the python library),
238  we need to retain the NC_FORMAT_xxx format as well. This may come
239  out eventually, as the NC_FORMATX is more clear that it's an extended
240  format specifier.*/
241 
242 #define NC_FORMAT_NC3 NC_FORMATX_NC3
243 #define NC_FORMAT_NC_HDF5 NC_FORMATX_NC_HDF5
244 #define NC_FORMAT_NC4 NC_FORMATX_NC4
245 #define NC_FORMAT_NC_HDF4 NC_FORMATX_NC_HDF4
246 #define NC_FORMAT_PNETCDF NC_FORMATX_PNETCDF
247 #define NC_FORMAT_DAP2 NC_FORMATX_DAP2
248 #define NC_FORMAT_DAP4 NC_FORMATX_DAP4
249 #define NC_FORMAT_UNDEFINED NC_FORMATX_UNDEFINED
250 #define NC_FORMATX_ZARR NC_FORMATX_NCZARR
255 #define NC_SIZEHINT_DEFAULT 0
256 
258 #define NC_ALIGN_CHUNK ((size_t)(-1))
259 
261 #define NC_UNLIMITED 0L
262 
264 #define NC_GLOBAL -1
265 
288 #define NC_MAX_DIMS 1024 /* not enforced after 4.5.0 */
289 #define NC_MAX_ATTRS 8192 /* not enforced after 4.5.0 */
290 #define NC_MAX_VARS 8192 /* not enforced after 4.5.0 */
291 #define NC_MAX_NAME 256
292 #define NC_MAX_VAR_DIMS 1024
299 #define NC_MAX_HDF4_NAME NC_MAX_NAME
300 
304 #define NC_ENDIAN_NATIVE 0
305 #define NC_ENDIAN_LITTLE 1
306 #define NC_ENDIAN_BIG 2
307 
314 #define NC_CHUNKED 0
315 #define NC_CONTIGUOUS 1
316 #define NC_COMPACT 2
317 #define NC_UNKNOWN_STORAGE 3
318 #define NC_VIRTUAL 4
319 
326 #define NC_NOCHECKSUM 0
327 #define NC_FLETCHER32 1
328 
335 #define NC_NOSHUFFLE 0
336 #define NC_SHUFFLE 1
337 
339 #define NC_MIN_DEFLATE_LEVEL 0
340 #define NC_MAX_DEFLATE_LEVEL 9
342 #define NC_SZIP_NN 32
343 #define NC_SZIP_EC 4
345 #define NC_NOQUANTIZE 0
346 #define NC_QUANTIZE_BITGROOM 1
347 #define NC_QUANTIZE_GRANULARBR 2
348 #define NC_QUANTIZE_BITROUND 3
353 #define NC_QUANTIZE_BITGROOM_ATT_NAME "_QuantizeBitGroomNumberOfSignificantDigits"
354 #define NC_QUANTIZE_GRANULARBR_ATT_NAME "_QuantizeGranularBitRoundNumberOfSignificantDigits"
355 #define NC_QUANTIZE_BITROUND_ATT_NAME "_QuantizeBitRoundNumberOfSignificantBits"
356 
361 #define NC_QUANTIZE_MAX_FLOAT_NSD (7)
362 #define NC_QUANTIZE_MAX_FLOAT_NSB (23)
363 
368 #define NC_QUANTIZE_MAX_DOUBLE_NSD (15)
369 #define NC_QUANTIZE_MAX_DOUBLE_NSB (52)
370 
376 #define NC_ISSYSERR(err) ((err) > 0)
377 
378 #define NC_NOERR 0
379 #define NC2_ERR (-1)
385 #define NC_EBADID (-33)
386 #define NC_ENFILE (-34)
387 #define NC_EEXIST (-35)
388 #define NC_EINVAL (-36)
389 #define NC_EPERM (-37)
394 #define NC_ENOTINDEFINE (-38)
395 
403 #define NC_EINDEFINE (-39)
404 
410 #define NC_EINVALCOORDS (-40)
411 
415 #define NC_EMAXDIMS (-41) /* not enforced after 4.5.0 */
416 
417 #define NC_ENAMEINUSE (-42)
418 #define NC_ENOTATT (-43)
419 #define NC_EMAXATTS (-44)
420 #define NC_EBADTYPE (-45)
421 #define NC_EBADDIM (-46)
422 #define NC_EUNLIMPOS (-47)
427 #define NC_EMAXVARS (-48) /* not enforced after 4.5.0 */
428 
432 #define NC_ENOTVAR (-49)
433 #define NC_EGLOBAL (-50)
434 #define NC_ENOTNC (-51)
435 #define NC_ESTS (-52)
436 #define NC_EMAXNAME (-53)
437 #define NC_EUNLIMIT (-54)
438 #define NC_ENORECVARS (-55)
439 #define NC_ECHAR (-56)
448 #define NC_EEDGE (-57)
449 #define NC_ESTRIDE (-58)
450 #define NC_EBADNAME (-59)
451 /* N.B. following must match value in ncx.h */
452 
457 #define NC_ERANGE (-60)
458 #define NC_ENOMEM (-61)
459 #define NC_EVARSIZE (-62)
460 #define NC_EDIMSIZE (-63)
461 #define NC_ETRUNC (-64)
462 #define NC_EAXISTYPE (-65)
464 /* Following errors are added for DAP */
465 #define NC_EDAP (-66)
466 #define NC_ECURL (-67)
467 #define NC_EIO (-68)
468 #define NC_ENODATA (-69)
469 #define NC_EDAPSVC (-70)
470 #define NC_EDAS (-71)
471 #define NC_EDDS (-72)
472 #define NC_EDMR NC_EDDS
473 #define NC_EDATADDS (-73)
474 #define NC_EDATADAP NC_EDATADDS
475 #define NC_EDAPURL (-74)
476 #define NC_EDAPCONSTRAINT (-75)
477 #define NC_ETRANSLATION (-76)
478 #define NC_EACCESS (-77)
479 #define NC_EAUTH (-78)
481 /* Misc. additional errors */
482 #define NC_ENOTFOUND (-90)
483 #define NC_ECANTREMOVE (-91)
484 #define NC_EINTERNAL (-92)
485 #define NC_EPNETCDF (-93)
487 /* The following was added in support of netcdf-4. Make all netcdf-4
488  error codes < -100 so that errors can be added to netcdf-3 if
489  needed. */
490 #define NC4_FIRST_ERROR (-100)
491 #define NC_EHDFERR (-101)
492 #define NC_ECANTREAD (-102)
493 #define NC_ECANTWRITE (-103)
494 #define NC_ECANTCREATE (-104)
495 #define NC_EFILEMETA (-105)
496 #define NC_EDIMMETA (-106)
497 #define NC_EATTMETA (-107)
498 #define NC_EVARMETA (-108)
499 #define NC_ENOCOMPOUND (-109)
500 #define NC_EATTEXISTS (-110)
501 #define NC_ENOTNC4 (-111)
502 #define NC_ESTRICTNC3 (-112)
503 #define NC_ENOTNC3 (-113)
504 #define NC_ENOPAR (-114)
505 #define NC_EPARINIT (-115)
506 #define NC_EBADGRPID (-116)
507 #define NC_EBADTYPID (-117)
508 #define NC_ETYPDEFINED (-118)
509 #define NC_EBADFIELD (-119)
510 #define NC_EBADCLASS (-120)
511 #define NC_EMAPTYPE (-121)
512 #define NC_ELATEFILL (-122)
513 #define NC_ELATEDEF (-123)
514 #define NC_EDIMSCALE (-124)
515 #define NC_ENOGRP (-125)
516 #define NC_ESTORAGE (-126)
517 #define NC_EBADCHUNK (-127)
518 #define NC_ENOTBUILT (-128)
519 #define NC_EDISKLESS (-129)
520 #define NC_ECANTEXTEND (-130)
521 #define NC_EMPI (-131)
523 #define NC_EFILTER (-132)
524 #define NC_ERCFILE (-133)
525 #define NC_ENULLPAD (-134)
526 #define NC_EINMEMORY (-135)
527 #define NC_ENOFILTER (-136)
528 #define NC_ENCZARR (-137)
529 #define NC_ES3 (-138)
530 #define NC_EEMPTY (-139)
531 #define NC_EOBJECT (-140)
532 #define NC_ENOOBJECT (-141)
533 #define NC_EPLUGIN (-142)
535 #define NC4_LAST_ERROR (-142)
537 /*
538  * Don't forget to update docs/all-error-codes.md if adding new error codes here!
539  *
540  */
541 
542 /* Errors for all remote access methods(e.g. DAP and CDMREMOTE)*/
543 #define NC_EURL (NC_EDAPURL)
544 #define NC_ECONSTRAINT (NC_EDAPCONSTRAINT)
548 #define DIM_WITHOUT_VARIABLE "This is a netCDF dimension but not a netCDF variable."
549 
553 #define NC_HAVE_NEW_CHUNKING_API 1
554 
555 /*
556  * The Interface
557  */
558 
559 /* Declaration modifiers for DLL support (MSC et al) */
560 #if defined(DLL_NETCDF) /* define when library is a DLL */
561 # if defined(DLL_EXPORT) /* define when building the library */
562 # define MSC_EXTRA __declspec(dllexport)
563 # else
564 # define MSC_EXTRA __declspec(dllimport)
565 # endif
566 # include <io.h>
567 #else
568 #define MSC_EXTRA
569 #endif /* defined(DLL_NETCDF) */
570 
571 #define EXTERNL MSC_EXTRA extern
573 #if defined(DLL_NETCDF) /* define when library is a DLL */
574 EXTERNL int ncerr;
575 EXTERNL int ncopts;
576 #endif
577 
578 EXTERNL const char *
579 nc_inq_libvers(void);
580 
581 EXTERNL const char *
582 nc_strerror(int ncerr);
583 
584 /* Set up user-defined format. */
585 typedef struct NC_Dispatch NC_Dispatch;
586 EXTERNL int
587 nc_def_user_format(int mode_flag, NC_Dispatch *dispatch_table, char *magic_number);
588 
589 EXTERNL int
590 nc_inq_user_format(int mode_flag, NC_Dispatch **dispatch_table, char *magic_number);
591 
592 /* Set the global alignment property */
593 EXTERNL int
594 nc_set_alignment(int threshold, int alignment);
595 
596 /* Get the global alignment property */
597 EXTERNL int
598 nc_get_alignment(int* thresholdp, int* alignmentp);
599 
600 EXTERNL int
601 nc__create(const char *path, int cmode, size_t initialsz,
602  size_t *chunksizehintp, int *ncidp);
603 
604 EXTERNL int
605 nc_create(const char *path, int cmode, int *ncidp);
606 
607 EXTERNL int
608 nc__open(const char *path, int mode,
609  size_t *chunksizehintp, int *ncidp);
610 
611 EXTERNL int
612 nc_open(const char *path, int mode, int *ncidp);
613 
614 /* Learn the path used to open/create the file. */
615 EXTERNL int
616 nc_inq_path(int ncid, size_t *pathlen, char *path);
617 
618 /* Given an ncid and group name (NULL gets root group), return
619  * locid. */
620 EXTERNL int
621 nc_inq_ncid(int ncid, const char *name, int *grp_ncid);
622 
623 /* Given a location id, return the number of groups it contains, and
624  * an array of their locids. */
625 EXTERNL int
626 nc_inq_grps(int ncid, int *numgrps, int *ncids);
627 
628 /* Given locid, find name of group. (Root group is named "/".) */
629 EXTERNL int
630 nc_inq_grpname(int ncid, char *name);
631 
632 /* Given ncid, find full name and len of full name. (Root group is
633  * named "/", with length 1.) */
634 EXTERNL int
635 nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name);
636 
637 /* Given ncid, find len of full name. */
638 EXTERNL int
639 nc_inq_grpname_len(int ncid, size_t *lenp);
640 
641 /* Given an ncid, find the ncid of its parent group. */
642 EXTERNL int
643 nc_inq_grp_parent(int ncid, int *parent_ncid);
644 
645 /* Given a name and parent ncid, find group ncid. */
646 EXTERNL int
647 nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid);
648 
649 /* Given a full name and ncid, find group ncid. */
650 EXTERNL int
651 nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid);
652 
653 /* Get a list of ids for all the variables in a group. */
654 EXTERNL int
655 nc_inq_varids(int ncid, int *nvars, int *varids);
656 
657 /* Find all dimids for a location. This finds all dimensions in a
658  * group, or any of its parents. */
659 EXTERNL int
660 nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents);
661 
662 /* Find all user-defined types for a location. This finds all
663  * user-defined types in a group. */
664 EXTERNL int
665 nc_inq_typeids(int ncid, int *ntypes, int *typeids);
666 
667 /* Are two types equal? */
668 EXTERNL int
669 nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2,
670  nc_type typeid2, int *equal);
671 
672 /* Create a group. its ncid is returned in the new_ncid pointer. */
673 EXTERNL int
674 nc_def_grp(int parent_ncid, const char *name, int *new_ncid);
675 
676 /* Rename a group */
677 EXTERNL int
678 nc_rename_grp(int grpid, const char *name);
679 
680 /* Here are functions for dealing with compound types. */
681 
682 /* Create a compound type. */
683 EXTERNL int
684 nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp);
685 
686 /* Insert a named field into a compound type. */
687 EXTERNL int
688 nc_insert_compound(int ncid, nc_type xtype, const char *name,
689  size_t offset, nc_type field_typeid);
690 
691 /* Insert a named array into a compound type. */
692 EXTERNL int
693 nc_insert_array_compound(int ncid, nc_type xtype, const char *name,
694  size_t offset, nc_type field_typeid,
695  int ndims, const int *dim_sizes);
696 
697 /* Get the name and size of a type. */
698 EXTERNL int
699 nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size);
700 
701 /* Get the id of a type from the name, which might be a fully qualified name */
702 EXTERNL int
703 nc_inq_typeid(int ncid, const char *name, nc_type *typeidp);
704 
705 /* Get the name, size, and number of fields in a compound type. */
706 EXTERNL int
707 nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep,
708  size_t *nfieldsp);
709 
710 /* Get the name of a compound type. */
711 EXTERNL int
712 nc_inq_compound_name(int ncid, nc_type xtype, char *name);
713 
714 /* Get the size of a compound type. */
715 EXTERNL int
716 nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep);
717 
718 /* Get the number of fields in this compound type. */
719 EXTERNL int
720 nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp);
721 
722 /* Given the xtype and the fieldid, get all info about it. */
723 EXTERNL int
724 nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name,
725  size_t *offsetp, nc_type *field_typeidp, int *ndimsp,
726  int *dim_sizesp);
727 
728 /* Given the typeid and the fieldid, get the name. */
729 EXTERNL int
730 nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid,
731  char *name);
732 
733 /* Given the xtype and the name, get the fieldid. */
734 EXTERNL int
735 nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name,
736  int *fieldidp);
737 
738 /* Given the xtype and fieldid, get the offset. */
739 EXTERNL int
740 nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid,
741  size_t *offsetp);
742 
743 /* Given the xtype and the fieldid, get the type of that field. */
744 EXTERNL int
745 nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid,
746  nc_type *field_typeidp);
747 
748 /* Given the xtype and the fieldid, get the number of dimensions for
749  * that field (scalars are 0). */
750 EXTERNL int
751 nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid,
752  int *ndimsp);
753 
754 /* Given the xtype and the fieldid, get the sizes of dimensions for
755  * that field. User must have allocated storage for the dim_sizes. */
756 EXTERNL int
757 nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid,
758  int *dim_sizes);
759 
761 typedef struct {
762  size_t len;
763  void *p;
764 } nc_vlen_t;
765 
770 #define NC_COMPOUND_OFFSET(S,M) (offsetof(S,M))
771 
772 /* Create a variable length type. */
773 EXTERNL int
774 nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep);
775 
776 /* Find out about a vlen. */
777 EXTERNL int
778 nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep,
779  nc_type *base_nc_typep);
780 
781 /* Put or get one element in a vlen array. */
782 EXTERNL int
783 nc_put_vlen_element(int ncid, int typeid1, void *vlen_element,
784  size_t len, const void *data);
785 
786 EXTERNL int
787 nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element,
788  size_t *len, void *data);
789 
790 /* Find out about a user defined type. */
791 EXTERNL int
792 nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size,
793  nc_type *base_nc_typep, size_t *nfieldsp, int *classp);
794 
795 /* Write an attribute of any type. */
796 EXTERNL int
797 nc_put_att(int ncid, int varid, const char *name, nc_type xtype,
798  size_t len, const void *op);
799 
800 /* Read an attribute of any type. */
801 EXTERNL int
802 nc_get_att(int ncid, int varid, const char *name, void *ip);
803 
804 /* Enum type. */
805 
806 /* Create an enum type. Provide a base type and a name. At the moment
807  * only ints are accepted as base types. */
808 EXTERNL int
809 nc_def_enum(int ncid, nc_type base_typeid, const char *name,
810  nc_type *typeidp);
811 
812 /* Insert a named value into an enum type. The value must fit within
813  * the size of the enum type, the name size must be <= NC_MAX_NAME. */
814 EXTERNL int
815 nc_insert_enum(int ncid, nc_type xtype, const char *name,
816  const void *value);
817 
818 /* Get information about an enum type: its name, base type and the
819  * number of members defined. */
820 EXTERNL int
821 nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep,
822  size_t *base_sizep, size_t *num_membersp);
823 
824 /* Get information about an enum member: a name and value. Name size
825  * will be <= NC_MAX_NAME. */
826 EXTERNL int
827 nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name,
828  void *value);
829 
830 
831 /* Get enum name from enum value. Name size will be <= NC_MAX_NAME. */
832 /* If value is zero and there is no matching ident, then return _UNDEFINED */
833 #define NC_UNDEFINED_ENUM_IDENT "_UNDEFINED"
834 
835 EXTERNL int
836 nc_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier);
837 
838 /* Opaque type. */
839 
840 /* Create an opaque type. Provide a size and a name. */
841 EXTERNL int
842 nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep);
843 
844 /* Get information about an opaque type. */
845 EXTERNL int
846 nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep);
847 
848 /* Write entire var of any type. */
849 EXTERNL int
850 nc_put_var(int ncid, int varid, const void *op);
851 
852 /* Read entire var of any type. */
853 EXTERNL int
854 nc_get_var(int ncid, int varid, void *ip);
855 
856 /* Write one value. */
857 EXTERNL int
858 nc_put_var1(int ncid, int varid, const size_t *indexp,
859  const void *op);
860 
861 /* Read one value. */
862 EXTERNL int
863 nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip);
864 
865 /* Write an array of values. */
866 EXTERNL int
867 nc_put_vara(int ncid, int varid, const size_t *startp,
868  const size_t *countp, const void *op);
869 
870 /* Read an array of values. */
871 EXTERNL int
872 nc_get_vara(int ncid, int varid, const size_t *startp,
873  const size_t *countp, void *ip);
874 
875 /* Write slices of an array of values. */
876 EXTERNL int
877 nc_put_vars(int ncid, int varid, const size_t *startp,
878  const size_t *countp, const ptrdiff_t *stridep,
879  const void *op);
880 
881 /* Read slices of an array of values. */
882 EXTERNL int
883 nc_get_vars(int ncid, int varid, const size_t *startp,
884  const size_t *countp, const ptrdiff_t *stridep,
885  void *ip);
886 
887 /* Write mapped slices of an array of values. */
888 EXTERNL int
889 nc_put_varm(int ncid, int varid, const size_t *startp,
890  const size_t *countp, const ptrdiff_t *stridep,
891  const ptrdiff_t *imapp, const void *op);
892 
893 /* Read mapped slices of an array of values. */
894 EXTERNL int
895 nc_get_varm(int ncid, int varid, const size_t *startp,
896  const size_t *countp, const ptrdiff_t *stridep,
897  const ptrdiff_t *imapp, void *ip);
898 
899 /* Extra netcdf-4 stuff. */
900 
901 /* Set quantization settings for a variable. Quantizing data improves
902  * later compression. Must be called after nc_def_var and before
903  * nc_enddef. */
904 EXTERNL int
905 nc_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd);
906 
907 /* Find out quantization settings of a var. */
908 EXTERNL int
909 nc_inq_var_quantize(int ncid, int varid, int *quantize_modep, int *nsdp);
910 
911 /* Set compression settings for a variable. Lower is faster, higher is
912  * better. Must be called after nc_def_var and before nc_enddef. */
913 EXTERNL int
914 nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
915  int deflate_level);
916 
917 /* Find out compression settings of a var. */
918 EXTERNL int
919 nc_inq_var_deflate(int ncid, int varid, int *shufflep,
920  int *deflatep, int *deflate_levelp);
921 
922 /* Set szip compression for a variable. */
923 EXTERNL int nc_def_var_szip(int ncid, int varid, int options_mask,
924  int pixels_per_block);
925 
926 /* Find out szip settings of a var. */
927 EXTERNL int
928 nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp);
929 
930 /* Set fletcher32 checksum for a var. This must be done after nc_def_var
931  and before nc_enddef. */
932 EXTERNL int
933 nc_def_var_fletcher32(int ncid, int varid, int fletcher32);
934 
935 /* Inquire about fletcher32 checksum for a var. */
936 EXTERNL int
937 nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p);
938 
939 /* Define chunking for a variable. This must be done after nc_def_var
940  and before nc_enddef. */
941 EXTERNL int
942 nc_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp);
943 
944 /* Inq chunking stuff for a var. */
945 EXTERNL int
946 nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp);
947 
948 /* Define fill value behavior for a variable. This must be done after
949  nc_def_var and before nc_enddef. */
950 EXTERNL int
951 nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value);
952 
953 /* Inq fill value setting for a var. */
954 EXTERNL int
955 nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep);
956 
957 /* Define the endianness of a variable. */
958 EXTERNL int
959 nc_def_var_endian(int ncid, int varid, int endian);
960 
961 /* Learn about the endianness of a variable. */
962 EXTERNL int
963 nc_inq_var_endian(int ncid, int varid, int *endianp);
964 
965 /* Define a filter for a variable */
966 EXTERNL int
967 nc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int* parms);
968 
969 /* Learn about the first filter on a variable */
970 EXTERNL int
971 nc_inq_var_filter(int ncid, int varid, unsigned int* idp, size_t* nparams, unsigned int* params);
972 
973 /* Set the fill mode (classic or 64-bit offset files only). */
974 EXTERNL int
975 nc_set_fill(int ncid, int fillmode, int *old_modep);
976 
977 /* Set the default nc_create format to NC_FORMAT_CLASSIC, NC_FORMAT_64BIT,
978  * NC_FORMAT_CDF5, NC_FORMAT_NETCDF4, or NC_FORMAT_NETCDF4_CLASSIC */
979 EXTERNL int
980 nc_set_default_format(int format, int *old_formatp);
981 
982 /* Set the cache size, nelems, and preemption policy. */
983 EXTERNL int
984 nc_set_chunk_cache(size_t size, size_t nelems, float preemption);
985 
986 /* Get the cache size, nelems, and preemption policy. */
987 EXTERNL int
988 nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp);
989 
990 /* Set the per-variable cache size, nelems, and preemption policy. */
991 EXTERNL int
992 nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
993  float preemption);
994 
995 /* Get the per-variable cache size, nelems, and preemption policy. */
996 EXTERNL int
997 nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp,
998  float *preemptionp);
999 
1000 EXTERNL int
1001 nc_redef(int ncid);
1002 
1003 /* Is this ever used? Convert to parameter form */
1004 EXTERNL int
1005 nc__enddef(int ncid, size_t h_minfree, size_t v_align,
1006  size_t v_minfree, size_t r_align);
1007 
1008 EXTERNL int
1009 nc_enddef(int ncid);
1010 
1011 EXTERNL int
1012 nc_sync(int ncid);
1013 
1014 EXTERNL int
1015 nc_abort(int ncid);
1016 
1017 EXTERNL int
1018 nc_close(int ncid);
1019 
1020 EXTERNL int
1021 nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
1022 
1023 EXTERNL int
1024 nc_inq_ndims(int ncid, int *ndimsp);
1025 
1026 EXTERNL int
1027 nc_inq_nvars(int ncid, int *nvarsp);
1028 
1029 EXTERNL int
1030 nc_inq_natts(int ncid, int *nattsp);
1031 
1032 EXTERNL int
1033 nc_inq_unlimdim(int ncid, int *unlimdimidp);
1034 
1035 /* The next function is for NetCDF-4 only */
1036 EXTERNL int
1037 nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp);
1038 
1039 /* Added in 3.6.1 to return format of netCDF file. */
1040 EXTERNL int
1041 nc_inq_format(int ncid, int *formatp);
1042 
1043 /* Added in 4.3.1 to return additional format info */
1044 EXTERNL int
1045 nc_inq_format_extended(int ncid, int *formatp, int* modep);
1046 
1047 /* Begin _dim */
1048 
1049 EXTERNL int
1050 nc_def_dim(int ncid, const char *name, size_t len, int *idp);
1051 
1052 EXTERNL int
1053 nc_inq_dimid(int ncid, const char *name, int *idp);
1054 
1055 EXTERNL int
1056 nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
1057 
1058 EXTERNL int
1059 nc_inq_dimname(int ncid, int dimid, char *name);
1060 
1061 EXTERNL int
1062 nc_inq_dimlen(int ncid, int dimid, size_t *lenp);
1063 
1064 EXTERNL int
1065 nc_rename_dim(int ncid, int dimid, const char *name);
1066 
1067 /* End _dim */
1068 /* Begin _att */
1069 
1070 EXTERNL int
1071 nc_inq_att(int ncid, int varid, const char *name,
1072  nc_type *xtypep, size_t *lenp);
1073 
1074 EXTERNL int
1075 nc_inq_attid(int ncid, int varid, const char *name, int *idp);
1076 
1077 EXTERNL int
1078 nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep);
1079 
1080 EXTERNL int
1081 nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp);
1082 
1083 EXTERNL int
1084 nc_inq_attname(int ncid, int varid, int attnum, char *name);
1085 
1086 EXTERNL int
1087 nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out);
1088 
1089 EXTERNL int
1090 nc_rename_att(int ncid, int varid, const char *name, const char *newname);
1091 
1092 EXTERNL int
1093 nc_del_att(int ncid, int varid, const char *name);
1094 
1095 /* End _att */
1096 /* Begin {put,get}_att */
1097 EXTERNL int
1098 nc_put_att_text(int ncid, int varid, const char *name,
1099  size_t len, const char *op);
1100 
1101 EXTERNL int
1102 nc_get_att_text(int ncid, int varid, const char *name, char *ip);
1103 
1104 EXTERNL int
1105 nc_put_att_string(int ncid, int varid, const char *name,
1106  size_t len, const char **op);
1107 
1108 EXTERNL int
1109 nc_get_att_string(int ncid, int varid, const char *name, char **ip);
1110 
1111 EXTERNL int
1112 nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype,
1113  size_t len, const unsigned char *op);
1114 
1115 EXTERNL int
1116 nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip);
1117 
1118 EXTERNL int
1119 nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype,
1120  size_t len, const signed char *op);
1121 
1122 EXTERNL int
1123 nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip);
1124 
1125 EXTERNL int
1126 nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype,
1127  size_t len, const short *op);
1128 
1129 EXTERNL int
1130 nc_get_att_short(int ncid, int varid, const char *name, short *ip);
1131 
1132 EXTERNL int
1133 nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype,
1134  size_t len, const int *op);
1135 
1136 EXTERNL int
1137 nc_get_att_int(int ncid, int varid, const char *name, int *ip);
1138 
1139 EXTERNL int
1140 nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype,
1141  size_t len, const long *op);
1142 
1143 EXTERNL int
1144 nc_get_att_long(int ncid, int varid, const char *name, long *ip);
1145 
1146 EXTERNL int
1147 nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype,
1148  size_t len, const float *op);
1149 
1150 EXTERNL int
1151 nc_get_att_float(int ncid, int varid, const char *name, float *ip);
1152 
1153 EXTERNL int
1154 nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype,
1155  size_t len, const double *op);
1156 
1157 EXTERNL int
1158 nc_get_att_double(int ncid, int varid, const char *name, double *ip);
1159 
1160 EXTERNL int
1161 nc_put_att_ushort(int ncid, int varid, const char *name, nc_type xtype,
1162  size_t len, const unsigned short *op);
1163 
1164 EXTERNL int
1165 nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *ip);
1166 
1167 EXTERNL int
1168 nc_put_att_uint(int ncid, int varid, const char *name, nc_type xtype,
1169  size_t len, const unsigned int *op);
1170 
1171 EXTERNL int
1172 nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *ip);
1173 
1174 EXTERNL int
1175 nc_put_att_longlong(int ncid, int varid, const char *name, nc_type xtype,
1176  size_t len, const long long *op);
1177 
1178 EXTERNL int
1179 nc_get_att_longlong(int ncid, int varid, const char *name, long long *ip);
1180 
1181 EXTERNL int
1182 nc_put_att_ulonglong(int ncid, int varid, const char *name, nc_type xtype,
1183  size_t len, const unsigned long long *op);
1184 
1185 EXTERNL int
1186 nc_get_att_ulonglong(int ncid, int varid, const char *name,
1187  unsigned long long *ip);
1188 
1189 
1190 /* End {put,get}_att */
1191 /* Begin _var */
1192 
1193 EXTERNL int
1194 nc_def_var(int ncid, const char *name, nc_type xtype, int ndims,
1195  const int *dimidsp, int *varidp);
1196 
1197 EXTERNL int
1198 nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep,
1199  int *ndimsp, int *dimidsp, int *nattsp);
1200 
1201 EXTERNL int
1202 nc_inq_varid(int ncid, const char *name, int *varidp);
1203 
1204 EXTERNL int
1205 nc_inq_varname(int ncid, int varid, char *name);
1206 
1207 EXTERNL int
1208 nc_inq_vartype(int ncid, int varid, nc_type *xtypep);
1209 
1210 EXTERNL int
1211 nc_inq_varndims(int ncid, int varid, int *ndimsp);
1212 
1213 EXTERNL int
1214 nc_inq_vardimid(int ncid, int varid, int *dimidsp);
1215 
1216 EXTERNL int
1217 nc_inq_varnatts(int ncid, int varid, int *nattsp);
1218 
1219 EXTERNL int
1220 nc_rename_var(int ncid, int varid, const char *name);
1221 
1222 EXTERNL int
1223 nc_copy_var(int ncid_in, int varid, int ncid_out);
1224 
1225 #ifndef ncvarcpy
1226 /* support the old name for now */
1227 #define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out))
1228 #endif
1229 
1230 /* End _var */
1231 /* Begin {put,get}_var1 */
1232 
1233 EXTERNL int
1234 nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op);
1235 
1236 EXTERNL int
1237 nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip);
1238 
1239 EXTERNL int
1240 nc_put_var1_uchar(int ncid, int varid, const size_t *indexp,
1241  const unsigned char *op);
1242 
1243 EXTERNL int
1244 nc_get_var1_uchar(int ncid, int varid, const size_t *indexp,
1245  unsigned char *ip);
1246 
1247 EXTERNL int
1248 nc_put_var1_schar(int ncid, int varid, const size_t *indexp,
1249  const signed char *op);
1250 
1251 EXTERNL int
1252 nc_get_var1_schar(int ncid, int varid, const size_t *indexp,
1253  signed char *ip);
1254 
1255 EXTERNL int
1256 nc_put_var1_short(int ncid, int varid, const size_t *indexp,
1257  const short *op);
1258 
1259 EXTERNL int
1260 nc_get_var1_short(int ncid, int varid, const size_t *indexp,
1261  short *ip);
1262 
1263 EXTERNL int
1264 nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op);
1265 
1266 EXTERNL int
1267 nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip);
1268 
1269 EXTERNL int
1270 nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op);
1271 
1272 EXTERNL int
1273 nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip);
1274 
1275 EXTERNL int
1276 nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op);
1277 
1278 EXTERNL int
1279 nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip);
1280 
1281 EXTERNL int
1282 nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op);
1283 
1284 EXTERNL int
1285 nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip);
1286 
1287 EXTERNL int
1288 nc_put_var1_ushort(int ncid, int varid, const size_t *indexp,
1289  const unsigned short *op);
1290 
1291 EXTERNL int
1292 nc_get_var1_ushort(int ncid, int varid, const size_t *indexp,
1293  unsigned short *ip);
1294 
1295 EXTERNL int
1296 nc_put_var1_uint(int ncid, int varid, const size_t *indexp,
1297  const unsigned int *op);
1298 
1299 EXTERNL int
1300 nc_get_var1_uint(int ncid, int varid, const size_t *indexp,
1301  unsigned int *ip);
1302 
1303 EXTERNL int
1304 nc_put_var1_longlong(int ncid, int varid, const size_t *indexp,
1305  const long long *op);
1306 
1307 EXTERNL int
1308 nc_get_var1_longlong(int ncid, int varid, const size_t *indexp,
1309  long long *ip);
1310 
1311 EXTERNL int
1312 nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp,
1313  const unsigned long long *op);
1314 
1315 EXTERNL int
1316 nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp,
1317  unsigned long long *ip);
1318 
1319 EXTERNL int
1320 nc_put_var1_string(int ncid, int varid, const size_t *indexp,
1321  const char **op);
1322 
1323 EXTERNL int
1324 nc_get_var1_string(int ncid, int varid, const size_t *indexp,
1325  char **ip);
1326 
1327 /* End {put,get}_var1 */
1328 /* Begin {put,get}_vara */
1329 
1330 EXTERNL int
1331 nc_put_vara_text(int ncid, int varid, const size_t *startp,
1332  const size_t *countp, const char *op);
1333 
1334 EXTERNL int
1335 nc_get_vara_text(int ncid, int varid, const size_t *startp,
1336  const size_t *countp, char *ip);
1337 
1338 EXTERNL int
1339 nc_put_vara_uchar(int ncid, int varid, const size_t *startp,
1340  const size_t *countp, const unsigned char *op);
1341 
1342 EXTERNL int
1343 nc_get_vara_uchar(int ncid, int varid, const size_t *startp,
1344  const size_t *countp, unsigned char *ip);
1345 
1346 EXTERNL int
1347 nc_put_vara_schar(int ncid, int varid, const size_t *startp,
1348  const size_t *countp, const signed char *op);
1349 
1350 EXTERNL int
1351 nc_get_vara_schar(int ncid, int varid, const size_t *startp,
1352  const size_t *countp, signed char *ip);
1353 
1354 EXTERNL int
1355 nc_put_vara_short(int ncid, int varid, const size_t *startp,
1356  const size_t *countp, const short *op);
1357 
1358 EXTERNL int
1359 nc_get_vara_short(int ncid, int varid, const size_t *startp,
1360  const size_t *countp, short *ip);
1361 
1362 EXTERNL int
1363 nc_put_vara_int(int ncid, int varid, const size_t *startp,
1364  const size_t *countp, const int *op);
1365 
1366 EXTERNL int
1367 nc_get_vara_int(int ncid, int varid, const size_t *startp,
1368  const size_t *countp, int *ip);
1369 
1370 EXTERNL int
1371 nc_put_vara_long(int ncid, int varid, const size_t *startp,
1372  const size_t *countp, const long *op);
1373 
1374 EXTERNL int
1375 nc_get_vara_long(int ncid, int varid,
1376  const size_t *startp, const size_t *countp, long *ip);
1377 
1378 EXTERNL int
1379 nc_put_vara_float(int ncid, int varid,
1380  const size_t *startp, const size_t *countp, const float *op);
1381 
1382 EXTERNL int
1383 nc_get_vara_float(int ncid, int varid,
1384  const size_t *startp, const size_t *countp, float *ip);
1385 
1386 EXTERNL int
1387 nc_put_vara_double(int ncid, int varid, const size_t *startp,
1388  const size_t *countp, const double *op);
1389 
1390 EXTERNL int
1391 nc_get_vara_double(int ncid, int varid, const size_t *startp,
1392  const size_t *countp, double *ip);
1393 
1394 EXTERNL int
1395 nc_put_vara_ushort(int ncid, int varid, const size_t *startp,
1396  const size_t *countp, const unsigned short *op);
1397 
1398 EXTERNL int
1399 nc_get_vara_ushort(int ncid, int varid, const size_t *startp,
1400  const size_t *countp, unsigned short *ip);
1401 
1402 EXTERNL int
1403 nc_put_vara_uint(int ncid, int varid, const size_t *startp,
1404  const size_t *countp, const unsigned int *op);
1405 
1406 EXTERNL int
1407 nc_get_vara_uint(int ncid, int varid, const size_t *startp,
1408  const size_t *countp, unsigned int *ip);
1409 
1410 EXTERNL int
1411 nc_put_vara_longlong(int ncid, int varid, const size_t *startp,
1412  const size_t *countp, const long long *op);
1413 
1414 EXTERNL int
1415 nc_get_vara_longlong(int ncid, int varid, const size_t *startp,
1416  const size_t *countp, long long *ip);
1417 
1418 EXTERNL int
1419 nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp,
1420  const size_t *countp, const unsigned long long *op);
1421 
1422 EXTERNL int
1423 nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp,
1424  const size_t *countp, unsigned long long *ip);
1425 
1426 EXTERNL int
1427 nc_put_vara_string(int ncid, int varid, const size_t *startp,
1428  const size_t *countp, const char **op);
1429 
1430 EXTERNL int
1431 nc_get_vara_string(int ncid, int varid, const size_t *startp,
1432  const size_t *countp, char **ip);
1433 
1434 /* End {put,get}_vara */
1435 /* Begin {put,get}_vars */
1436 
1437 EXTERNL int
1438 nc_put_vars_text(int ncid, int varid,
1439  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1440  const char *op);
1441 
1442 EXTERNL int
1443 nc_get_vars_text(int ncid, int varid,
1444  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1445  char *ip);
1446 
1447 EXTERNL int
1448 nc_put_vars_uchar(int ncid, int varid,
1449  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1450  const unsigned char *op);
1451 
1452 EXTERNL int
1453 nc_get_vars_uchar(int ncid, int varid,
1454  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1455  unsigned char *ip);
1456 
1457 EXTERNL int
1458 nc_put_vars_schar(int ncid, int varid,
1459  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1460  const signed char *op);
1461 
1462 EXTERNL int
1463 nc_get_vars_schar(int ncid, int varid,
1464  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1465  signed char *ip);
1466 
1467 EXTERNL int
1468 nc_put_vars_short(int ncid, int varid,
1469  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1470  const short *op);
1471 
1472 EXTERNL int
1473 nc_get_vars_short(int ncid, int varid, const size_t *startp,
1474  const size_t *countp, const ptrdiff_t *stridep,
1475  short *ip);
1476 
1477 EXTERNL int
1478 nc_put_vars_int(int ncid, int varid,
1479  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1480  const int *op);
1481 
1482 EXTERNL int
1483 nc_get_vars_int(int ncid, int varid,
1484  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1485  int *ip);
1486 
1487 EXTERNL int
1488 nc_put_vars_long(int ncid, int varid,
1489  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1490  const long *op);
1491 
1492 EXTERNL int
1493 nc_get_vars_long(int ncid, int varid,
1494  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1495  long *ip);
1496 
1497 EXTERNL int
1498 nc_put_vars_float(int ncid, int varid,
1499  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1500  const float *op);
1501 
1502 EXTERNL int
1503 nc_get_vars_float(int ncid, int varid,
1504  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1505  float *ip);
1506 
1507 EXTERNL int
1508 nc_put_vars_double(int ncid, int varid,
1509  const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
1510  const double *op);
1511 
1512 EXTERNL int
1513 nc_get_vars_double(int ncid, int varid, const size_t *startp,
1514  const size_t *countp, const ptrdiff_t *stridep,
1515  double *ip);
1516 
1517 EXTERNL int
1518 nc_put_vars_ushort(int ncid, int varid, const size_t *startp,
1519  const size_t *countp, const ptrdiff_t *stridep,
1520  const unsigned short *op);
1521 
1522 EXTERNL int
1523 nc_get_vars_ushort(int ncid, int varid, const size_t *startp,
1524  const size_t *countp, const ptrdiff_t *stridep,
1525  unsigned short *ip);
1526 
1527 EXTERNL int
1528 nc_put_vars_uint(int ncid, int varid, const size_t *startp,
1529  const size_t *countp, const ptrdiff_t *stridep,
1530  const unsigned int *op);
1531 
1532 EXTERNL int
1533 nc_get_vars_uint(int ncid, int varid, const size_t *startp,
1534  const size_t *countp, const ptrdiff_t *stridep,
1535  unsigned int *ip);
1536 
1537 EXTERNL int
1538 nc_put_vars_longlong(int ncid, int varid, const size_t *startp,
1539  const size_t *countp, const ptrdiff_t *stridep,
1540  const long long *op);
1541 
1542 EXTERNL int
1543 nc_get_vars_longlong(int ncid, int varid, const size_t *startp,
1544  const size_t *countp, const ptrdiff_t *stridep,
1545  long long *ip);
1546 
1547 EXTERNL int
1548 nc_put_vars_ulonglong(int ncid, int varid, const size_t *startp,
1549  const size_t *countp, const ptrdiff_t *stridep,
1550  const unsigned long long *op);
1551 
1552 EXTERNL int
1553 nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp,
1554  const size_t *countp, const ptrdiff_t *stridep,
1555  unsigned long long *ip);
1556 
1557 EXTERNL int
1558 nc_put_vars_string(int ncid, int varid, const size_t *startp,
1559  const size_t *countp, const ptrdiff_t *stridep,
1560  const char **op);
1561 
1562 EXTERNL int
1563 nc_get_vars_string(int ncid, int varid, const size_t *startp,
1564  const size_t *countp, const ptrdiff_t *stridep,
1565  char **ip);
1566 
1567 /* End {put,get}_vars */
1568 /* Begin {put,get}_varm */
1569 
1570 EXTERNL int
1571 nc_put_varm_text(int ncid, int varid, const size_t *startp,
1572  const size_t *countp, const ptrdiff_t *stridep,
1573  const ptrdiff_t *imapp, const char *op);
1574 
1575 EXTERNL int
1576 nc_get_varm_text(int ncid, int varid, const size_t *startp,
1577  const size_t *countp, const ptrdiff_t *stridep,
1578  const ptrdiff_t *imapp, char *ip);
1579 
1580 EXTERNL int
1581 nc_put_varm_uchar(int ncid, int varid, const size_t *startp,
1582  const size_t *countp, const ptrdiff_t *stridep,
1583  const ptrdiff_t *imapp, const unsigned char *op);
1584 
1585 EXTERNL int
1586 nc_get_varm_uchar(int ncid, int varid, const size_t *startp,
1587  const size_t *countp, const ptrdiff_t *stridep,
1588  const ptrdiff_t *imapp, unsigned char *ip);
1589 
1590 EXTERNL int
1591 nc_put_varm_schar(int ncid, int varid, const size_t *startp,
1592  const size_t *countp, const ptrdiff_t *stridep,
1593  const ptrdiff_t *imapp, const signed char *op);
1594 
1595 EXTERNL int
1596 nc_get_varm_schar(int ncid, int varid, const size_t *startp,
1597  const size_t *countp, const ptrdiff_t *stridep,
1598  const ptrdiff_t *imapp, signed char *ip);
1599 
1600 EXTERNL int
1601 nc_put_varm_short(int ncid, int varid, const size_t *startp,
1602  const size_t *countp, const ptrdiff_t *stridep,
1603  const ptrdiff_t *imapp, const short *op);
1604 
1605 EXTERNL int
1606 nc_get_varm_short(int ncid, int varid, const size_t *startp,
1607  const size_t *countp, const ptrdiff_t *stridep,
1608  const ptrdiff_t *imapp, short *ip);
1609 
1610 EXTERNL int
1611 nc_put_varm_int(int ncid, int varid, const size_t *startp,
1612  const size_t *countp, const ptrdiff_t *stridep,
1613  const ptrdiff_t *imapp, const int *op);
1614 
1615 EXTERNL int
1616 nc_get_varm_int(int ncid, int varid, const size_t *startp,
1617  const size_t *countp, const ptrdiff_t *stridep,
1618  const ptrdiff_t *imapp, int *ip);
1619 
1620 EXTERNL int
1621 nc_put_varm_long(int ncid, int varid, const size_t *startp,
1622  const size_t *countp, const ptrdiff_t *stridep,
1623  const ptrdiff_t *imapp, const long *op);
1624 
1625 EXTERNL int
1626 nc_get_varm_long(int ncid, int varid, const size_t *startp,
1627  const size_t *countp, const ptrdiff_t *stridep,
1628  const ptrdiff_t *imapp, long *ip);
1629 
1630 EXTERNL int
1631 nc_put_varm_float(int ncid, int varid,const size_t *startp,
1632  const size_t *countp, const ptrdiff_t *stridep,
1633  const ptrdiff_t *imapp, const float *op);
1634 
1635 EXTERNL int
1636 nc_get_varm_float(int ncid, int varid,const size_t *startp,
1637  const size_t *countp, const ptrdiff_t *stridep,
1638  const ptrdiff_t *imapp, float *ip);
1639 
1640 EXTERNL int
1641 nc_put_varm_double(int ncid, int varid, const size_t *startp,
1642  const size_t *countp, const ptrdiff_t *stridep,
1643  const ptrdiff_t *imapp, const double *op);
1644 
1645 EXTERNL int
1646 nc_get_varm_double(int ncid, int varid, const size_t *startp,
1647  const size_t *countp, const ptrdiff_t *stridep,
1648  const ptrdiff_t * imapp, double *ip);
1649 
1650 EXTERNL int
1651 nc_put_varm_ushort(int ncid, int varid, const size_t *startp,
1652  const size_t *countp, const ptrdiff_t *stridep,
1653  const ptrdiff_t * imapp, const unsigned short *op);
1654 
1655 EXTERNL int
1656 nc_get_varm_ushort(int ncid, int varid, const size_t *startp,
1657  const size_t *countp, const ptrdiff_t *stridep,
1658  const ptrdiff_t * imapp, unsigned short *ip);
1659 
1660 EXTERNL int
1661 nc_put_varm_uint(int ncid, int varid, const size_t *startp,
1662  const size_t *countp, const ptrdiff_t *stridep,
1663  const ptrdiff_t * imapp, const unsigned int *op);
1664 
1665 EXTERNL int
1666 nc_get_varm_uint(int ncid, int varid, const size_t *startp,
1667  const size_t *countp, const ptrdiff_t *stridep,
1668  const ptrdiff_t * imapp, unsigned int *ip);
1669 
1670 EXTERNL int
1671 nc_put_varm_longlong(int ncid, int varid, const size_t *startp,
1672  const size_t *countp, const ptrdiff_t *stridep,
1673  const ptrdiff_t * imapp, const long long *op);
1674 
1675 EXTERNL int
1676 nc_get_varm_longlong(int ncid, int varid, const size_t *startp,
1677  const size_t *countp, const ptrdiff_t *stridep,
1678  const ptrdiff_t * imapp, long long *ip);
1679 
1680 EXTERNL int
1681 nc_put_varm_ulonglong(int ncid, int varid, const size_t *startp,
1682  const size_t *countp, const ptrdiff_t *stridep,
1683  const ptrdiff_t * imapp, const unsigned long long *op);
1684 
1685 EXTERNL int
1686 nc_get_varm_ulonglong(int ncid, int varid, const size_t *startp,
1687  const size_t *countp, const ptrdiff_t *stridep,
1688  const ptrdiff_t * imapp, unsigned long long *ip);
1689 
1690 EXTERNL int
1691 nc_put_varm_string(int ncid, int varid, const size_t *startp,
1692  const size_t *countp, const ptrdiff_t *stridep,
1693  const ptrdiff_t * imapp, const char **op);
1694 
1695 EXTERNL int
1696 nc_get_varm_string(int ncid, int varid, const size_t *startp,
1697  const size_t *countp, const ptrdiff_t *stridep,
1698  const ptrdiff_t * imapp, char **ip);
1699 
1700 /* End {put,get}_varm */
1701 /* Begin {put,get}_var */
1702 
1703 EXTERNL int
1704 nc_put_var_text(int ncid, int varid, const char *op);
1705 
1706 EXTERNL int
1707 nc_get_var_text(int ncid, int varid, char *ip);
1708 
1709 EXTERNL int
1710 nc_put_var_uchar(int ncid, int varid, const unsigned char *op);
1711 
1712 EXTERNL int
1713 nc_get_var_uchar(int ncid, int varid, unsigned char *ip);
1714 
1715 EXTERNL int
1716 nc_put_var_schar(int ncid, int varid, const signed char *op);
1717 
1718 EXTERNL int
1719 nc_get_var_schar(int ncid, int varid, signed char *ip);
1720 
1721 EXTERNL int
1722 nc_put_var_short(int ncid, int varid, const short *op);
1723 
1724 EXTERNL int
1725 nc_get_var_short(int ncid, int varid, short *ip);
1726 
1727 EXTERNL int
1728 nc_put_var_int(int ncid, int varid, const int *op);
1729 
1730 EXTERNL int
1731 nc_get_var_int(int ncid, int varid, int *ip);
1732 
1733 EXTERNL int
1734 nc_put_var_long(int ncid, int varid, const long *op);
1735 
1736 EXTERNL int
1737 nc_get_var_long(int ncid, int varid, long *ip);
1738 
1739 EXTERNL int
1740 nc_put_var_float(int ncid, int varid, const float *op);
1741 
1742 EXTERNL int
1743 nc_get_var_float(int ncid, int varid, float *ip);
1744 
1745 EXTERNL int
1746 nc_put_var_double(int ncid, int varid, const double *op);
1747 
1748 EXTERNL int
1749 nc_get_var_double(int ncid, int varid, double *ip);
1750 
1751 EXTERNL int
1752 nc_put_var_ushort(int ncid, int varid, const unsigned short *op);
1753 
1754 EXTERNL int
1755 nc_get_var_ushort(int ncid, int varid, unsigned short *ip);
1756 
1757 EXTERNL int
1758 nc_put_var_uint(int ncid, int varid, const unsigned int *op);
1759 
1760 EXTERNL int
1761 nc_get_var_uint(int ncid, int varid, unsigned int *ip);
1762 
1763 EXTERNL int
1764 nc_put_var_longlong(int ncid, int varid, const long long *op);
1765 
1766 EXTERNL int
1767 nc_get_var_longlong(int ncid, int varid, long long *ip);
1768 
1769 EXTERNL int
1770 nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op);
1771 
1772 EXTERNL int
1773 nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip);
1774 
1775 EXTERNL int
1776 nc_put_var_string(int ncid, int varid, const char **op);
1777 
1778 EXTERNL int
1779 nc_get_var_string(int ncid, int varid, char **ip);
1780 
1781 /* Begin instance walking functions */
1782 
1783 /* When you read an array of string typed instances, the library will allocate
1784  * the storage space for the strings in the array (but not the array itself).
1785  * The strings must be freed eventually, so pass the pointer to the array plus
1786  * the number of elements in the array to this function when you're done with
1787  * the data, and it will free the all the string instances.
1788  * The caller is still responsible for free'ing the array itself,
1789  * if it was dynamically allocated.
1790  */
1791 EXTERNL int
1792 nc_free_string(size_t nelems, char **data);
1793 
1794 /* When you read an array of VLEN typed instances, the library will allocate
1795  * the storage space for the data in each VLEN in the array (but not the array itself).
1796  * That VLEN data must be freed eventually, so pass the pointer to the array plus
1797  * the number of elements in the array to this function when you're done with
1798  * the data, and it will free the all the VLEN instances.
1799  * The caller is still responsible for free'ing the array itself,
1800  * if it was dynamically allocated.
1801  *
1802  * WARNING: this function only works if the basetype of the vlen type
1803  * is fixed size. This means it is an atomic type except NC_STRING,
1804  * or an NC_ENUM, or and NC_OPAQUE, or an NC_COMPOUND where all
1805  * the fields of the compound type are themselves fixed size.
1806  */
1807 EXTERNL int
1808 nc_free_vlens(size_t nelems, nc_vlen_t vlens[]);
1809 
1810 /* This function is a special case of "nc_free_vlens" where nelem == 1 */
1811 EXTERNL int
1812 nc_free_vlen(nc_vlen_t *vl);
1813 
1832 EXTERNL int nc_reclaim_data(int ncid, nc_type xtypeid, void* memory, size_t nelems);
1833 EXTERNL int nc_reclaim_data_all(int ncid, nc_type xtypeid, void* memory, size_t nelems);
1834 
1848 EXTERNL int nc_copy_data(int ncid, nc_type xtypeid, const void* memory, size_t count, void* copy);
1849 EXTERNL int nc_copy_data_all(int ncid, nc_type xtypeid, const void* memory, size_t count, void** copyp);
1850 
1851 /* end recursive instance walking functions */
1852 
1853 /* Begin Deprecated, same as functions with "_ubyte" replaced by "_uchar" */
1854 EXTERNL int
1855 nc_put_att_ubyte(int ncid, int varid, const char *name, nc_type xtype,
1856  size_t len, const unsigned char *op);
1857 EXTERNL int
1858 nc_get_att_ubyte(int ncid, int varid, const char *name,
1859  unsigned char *ip);
1860 EXTERNL int
1861 nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp,
1862  const unsigned char *op);
1863 EXTERNL int
1864 nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp,
1865  unsigned char *ip);
1866 EXTERNL int
1867 nc_put_vara_ubyte(int ncid, int varid, const size_t *startp,
1868  const size_t *countp, const unsigned char *op);
1869 EXTERNL int
1870 nc_get_vara_ubyte(int ncid, int varid, const size_t *startp,
1871  const size_t *countp, unsigned char *ip);
1872 EXTERNL int
1873 nc_put_vars_ubyte(int ncid, int varid, const size_t *startp,
1874  const size_t *countp, const ptrdiff_t *stridep,
1875  const unsigned char *op);
1876 EXTERNL int
1877 nc_get_vars_ubyte(int ncid, int varid, const size_t *startp,
1878  const size_t *countp, const ptrdiff_t *stridep,
1879  unsigned char *ip);
1880 EXTERNL int
1881 nc_put_varm_ubyte(int ncid, int varid, const size_t *startp,
1882  const size_t *countp, const ptrdiff_t *stridep,
1883  const ptrdiff_t * imapp, const unsigned char *op);
1884 EXTERNL int
1885 nc_get_varm_ubyte(int ncid, int varid, const size_t *startp,
1886  const size_t *countp, const ptrdiff_t *stridep,
1887  const ptrdiff_t * imapp, unsigned char *ip);
1888 EXTERNL int
1889 nc_put_var_ubyte(int ncid, int varid, const unsigned char *op);
1890 
1891 EXTERNL int
1892 nc_get_var_ubyte(int ncid, int varid, unsigned char *ip);
1893 
1894 /* End Deprecated */
1895 
1896 /* Set the log level. 0 shows only errors, 1 only major messages,
1897  * etc., to 5, which shows way too much information. */
1898 EXTERNL int
1899 nc_set_log_level(int new_level);
1900 
1901 /* Use this to turn off logging by calling
1902  nc_log_level(NC_TURN_OFF_LOGGING) */
1903 #define NC_TURN_OFF_LOGGING (-1)
1904 
1905 /* Show the netCDF library's in-memory metadata for a file. */
1906 EXTERNL int
1907 nc_show_metadata(int ncid);
1908 
1909 /* End {put,get}_var */
1910 
1911 /* Delete a file. */
1912 EXTERNL int
1913 nc_delete(const char *path);
1914 
1915 /*
1916  * The following functions were written to accommodate the old Cray
1917  * systems. Modern HPC systems do not use these functions any more,
1918  * but use the nc_open_par()/nc_create_par() functions instead. These
1919  * functions are retained for backward compatibibility. These
1920  * functions work as advertised, but you can only use "processor
1921  * element" 0.
1922  */
1923 
1924 EXTERNL int
1925 nc__create_mp(const char *path, int cmode, size_t initialsz, int basepe,
1926  size_t *chunksizehintp, int *ncidp);
1927 
1928 EXTERNL int
1929 nc__open_mp(const char *path, int mode, int basepe,
1930  size_t *chunksizehintp, int *ncidp);
1931 
1932 EXTERNL int
1933 nc_delete_mp(const char *path, int basepe);
1934 
1935 EXTERNL int
1936 nc_set_base_pe(int ncid, int pe);
1937 
1938 EXTERNL int
1939 nc_inq_base_pe(int ncid, int *pe);
1940 
1941 /* This v2 function is used in the nc_test program. */
1942 EXTERNL int
1943 nctypelen(nc_type datatype);
1944 
1945 /* Begin v2.4 backward compatibility */
1946 
1949 #define FILL_BYTE NC_FILL_BYTE
1950 #define FILL_CHAR NC_FILL_CHAR
1951 #define FILL_SHORT NC_FILL_SHORT
1952 #define FILL_LONG NC_FILL_INT
1953 #define FILL_FLOAT NC_FILL_FLOAT
1954 #define FILL_DOUBLE NC_FILL_DOUBLE
1955 
1956 #define MAX_NC_DIMS NC_MAX_DIMS
1957 #define MAX_NC_ATTRS NC_MAX_ATTRS
1958 #define MAX_NC_VARS NC_MAX_VARS
1959 #define MAX_NC_NAME NC_MAX_NAME
1960 #define MAX_VAR_DIMS NC_MAX_VAR_DIMS
1961 
1964 /*
1965  * Global error status
1966  */
1967 EXTERNL int ncerr;
1968 
1969 #define NC_ENTOOL NC_EMAXNAME
1970 #define NC_EXDR (-32)
1971 #define NC_SYSERR (-31)
1973 /*
1974  * Global options variable.
1975  * Used to determine behavior of error handler.
1976  */
1977 #define NC_FATAL 1
1978 #define NC_VERBOSE 2
1981 EXTERNL int ncopts;
1982 
1983 EXTERNL void
1984 nc_advise(const char *cdf_routine_name, int err, const char *fmt,...);
1985 
1991 typedef int nclong;
1992 
1993 EXTERNL int
1994 nccreate(const char* path, int cmode);
1995 
1996 EXTERNL int
1997 ncopen(const char* path, int mode);
1998 
1999 EXTERNL int
2000 ncsetfill(int ncid, int fillmode);
2001 
2002 EXTERNL int
2003 ncredef(int ncid);
2004 
2005 EXTERNL int
2006 ncendef(int ncid);
2007 
2008 EXTERNL int
2009 ncsync(int ncid);
2010 
2011 EXTERNL int
2012 ncabort(int ncid);
2013 
2014 EXTERNL int
2015 ncclose(int ncid);
2016 
2017 EXTERNL int
2018 ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp);
2019 
2020 EXTERNL int
2021 ncdimdef(int ncid, const char *name, long len);
2022 
2023 EXTERNL int
2024 ncdimid(int ncid, const char *name);
2025 
2026 EXTERNL int
2027 ncdiminq(int ncid, int dimid, char *name, long *lenp);
2028 
2029 EXTERNL int
2030 ncdimrename(int ncid, int dimid, const char *name);
2031 
2032 EXTERNL int
2033 ncattput(int ncid, int varid, const char *name, nc_type xtype,
2034  int len, const void *op);
2035 
2036 EXTERNL int
2037 ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp);
2038 
2039 EXTERNL int
2040 ncattget(int ncid, int varid, const char *name, void *ip);
2041 
2042 EXTERNL int
2043 ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out,
2044  int varid_out);
2045 
2046 EXTERNL int
2047 ncattname(int ncid, int varid, int attnum, char *name);
2048 
2049 EXTERNL int
2050 ncattrename(int ncid, int varid, const char *name, const char *newname);
2051 
2052 EXTERNL int
2053 ncattdel(int ncid, int varid, const char *name);
2054 
2055 EXTERNL int
2056 ncvardef(int ncid, const char *name, nc_type xtype,
2057  int ndims, const int *dimidsp);
2058 
2059 EXTERNL int
2060 ncvarid(int ncid, const char *name);
2061 
2062 EXTERNL int
2063 ncvarinq(int ncid, int varid, char *name, nc_type *xtypep,
2064  int *ndimsp, int *dimidsp, int *nattsp);
2065 
2066 EXTERNL int
2067 ncvarput1(int ncid, int varid, const long *indexp, const void *op);
2068 
2069 EXTERNL int
2070 ncvarget1(int ncid, int varid, const long *indexp, void *ip);
2071 
2072 EXTERNL int
2073 ncvarput(int ncid, int varid, const long *startp, const long *countp,
2074  const void *op);
2075 
2076 EXTERNL int
2077 ncvarget(int ncid, int varid, const long *startp, const long *countp,
2078  void *ip);
2079 
2080 EXTERNL int
2081 ncvarputs(int ncid, int varid, const long *startp, const long *countp,
2082  const long *stridep, const void *op);
2083 
2084 EXTERNL int
2085 ncvargets(int ncid, int varid, const long *startp, const long *countp,
2086  const long *stridep, void *ip);
2087 
2088 EXTERNL int
2089 ncvarputg(int ncid, int varid, const long *startp, const long *countp,
2090  const long *stridep, const long *imapp, const void *op);
2091 
2092 EXTERNL int
2093 ncvargetg(int ncid, int varid, const long *startp, const long *countp,
2094  const long *stridep, const long *imapp, void *ip);
2095 
2096 EXTERNL int
2097 ncvarrename(int ncid, int varid, const char *name);
2098 
2099 EXTERNL int
2100 ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp);
2101 
2102 EXTERNL int
2103 ncrecget(int ncid, long recnum, void **datap);
2104 
2105 EXTERNL int
2106 ncrecput(int ncid, long recnum, void *const *datap);
2107 
2108 /* This function may be called to force the library to
2109  initialize itself. It is not required, however.
2110 */
2111 EXTERNL int nc_initialize(void);
2112 
2113 /* This function may be called to force the library to
2114  cleanup global memory so that memory checkers will not
2115  report errors. It is not required, however.
2116 */
2117 EXTERNL int nc_finalize(void);
2118 
2119 /* Programmatic access to the internal .rc table */
2120 
2121 /* Get the value corresponding to key | return NULL; caller frees result */
2122 EXTERNL char* nc_rc_get(const char* key);
2123 
2124 /* Set/overwrite the value corresponding to key */
2125 EXTERNL int nc_rc_set(const char* key, const char* value);
2126 
2127 #if defined(__cplusplus)
2128 }
2129 #endif
2130 
2131 /* Define two hard-coded functionality-related
2132  (as requested by community developers) macros.
2133  This is not going to be standard practice.
2134  Don't remove without an in-place replacement of some sort,
2135  the are now (for better or worse) used by downstream
2136  software external to Unidata. */
2137 #ifndef NC_HAVE_RENAME_GRP
2138 #define NC_HAVE_RENAME_GRP
2139 #endif
2140 
2141 #ifndef NC_HAVE_INQ_FORMAT_EXTENDED
2142 #define NC_HAVE_INQ_FORMAT_EXTENDED
2143 #endif
2144 
2145 #define NC_HAVE_META_H
2146 
2147 #endif /* _NETCDF_ */
int nc_get_vara_uint(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned int *ip)
Read an array of values from a variable.
Definition: dvarget.c:829
int nc_get_var_uint(int ncid, int varid, unsigned int *ip)
Read an entire variable in one call.
Definition: dvarget.c:1104
int nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
Read a single datum from a variable.
Definition: dvarget.c:900
EXTERNL int nc_rename_att(int ncid, int varid, const char *name, const char *newname)
Rename an attribute.
Definition: datt.c:113
int nc_put_var_long(int ncid, int varid, const long *op)
Write an entire variable with one call.
Definition: dvarput.c:958
EXTERNL int ncattdel(int ncid, int varid, const char *name)
Delete an attribute.
Definition: dv2i.c:1604
EXTERNL int nc_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
Create an enum type.
Definition: denum.c:43
EXTERNL int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
Find the type of an attribute.
Definition: dattinq.c:358
int nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1116
EXTERNL int nc_inq_var_endian(int ncid, int varid, int *endianp)
Find the endianness of a variable.
Definition: dvarinq.c:582
int nc_put_varm_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned char *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1330
int nc_put_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const double *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1124
MSC_EXTRA int ncerr
V2 API error code.
Definition: dv2i.c:37
int nc_put_vars_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned char *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1074
int nc_get_varm_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, short *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1397
EXTERNL int nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
Learn about an opaque type.
Definition: dopaque.c:61
EXTERNL int nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp)
Get the per-variable chunk cache settings from the HDF5 layer.
Definition: dvar.c:1435
EXTERNL int nc_inq_vardimid(int ncid, int varid, int *dimidsp)
Learn the dimension IDs associated with a variable.
Definition: dvarinq.c:225
int nc_put_vara_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const signed char *op)
Write an array of values to a variable.
Definition: dvarput.c:654
EXTERNL int nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *ip)
Get an attribute array of type unsigned short.
Definition: dattget.c:519
EXTERNL int nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
Return information about a netCDF attribute.
Definition: dattinq.c:86
EXTERNL int nc_def_user_format(int mode_flag, NC_Dispatch *dispatch_table, char *magic_number)
Add handling of user-defined format.
Definition: dfile.c:123
EXTERNL int nc_reclaim_data(int ncid, nc_type xtypeid, void *memory, size_t nelems)
Reclaim an array of instances of an arbitrary type.
EXTERNL int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition: ddim.c:409
EXTERNL int nc_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd)
Turn on quantization for a variable.
Definition: dvar.c:560
int nc_get_varm_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned char *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1441
EXTERNL int nc_def_var(int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp)
Define a new variable.
Definition: dvar.c:214
EXTERNL int ncvarid(int ncid, const char *name)
Learn a variable ID from the name.
Definition: dv2i.c:887
EXTERNL int nc_inq_grpname(int ncid, char *name)
Get the name of a group given an ID.
Definition: dgroup.c:88
EXTERNL int ncdiminq(int ncid, int dimid, char *name, long *lenp)
Learn about a dimension.
Definition: dv2i.c:788
int nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char **op)
Write one datum.
Definition: dvarput.c:867
int nc_get_vara_double(int ncid, int varid, const size_t *startp, const size_t *countp, double *ip)
Read an array of values from a variable.
Definition: dvarget.c:808
int nc_put_vars_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned int *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1154
EXTERNL int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
Definition: ddim.c:121
int nc_get_varm_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, float *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1423
EXTERNL int nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype, size_t len, const double *op)
Write an attribute of type double.
Definition: dattput.c:460
EXTERNL int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
Get a group ncid given the group name.
Definition: dgroup.c:155
EXTERNL int ncclose(int ncid)
Close a file.
Definition: dv2i.c:606
int nc_put_vara_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Write an array of values to a variable.
Definition: dvarput.c:662
EXTERNL int nc_redef(int ncid)
Put open netcdf dataset into define mode.
Definition: dfile.c:963
int nc_get_vars_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, char *ip)
Read a strided array from a variable.
Definition: dvarget.c:1182
int nc_get_vars_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned char *ip)
Read a strided array from a variable.
Definition: dvarget.c:1254
EXTERNL int nc__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, size_t r_align)
Leave define mode with performance tuning.
Definition: dfile.c:1118
EXTERNL int nc_inq_nvars(int ncid, int *nvarsp)
Learn the number of variables in a file or group.
Definition: dfile.c:1654
EXTERNL int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
Definition: ddim.c:317
EXTERNL int nc_def_var_szip(int ncid, int varid, int options_mask, int pixels_per_block)
Set szip compression settings on a variable.
Definition: dvar.c:864
EXTERNL int nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
Get the full ncid given a group name.
Definition: dgroup.c:169
EXTERNL int ncrecget(int ncid, long recnum, void **datap)
Read one record's worth of data, except don't read from variables for which the address of the data t...
Definition: dv2i.c:1723
EXTERNL int nc_get_att_ulonglong(int ncid, int varid, const char *name, unsigned long long *ip)
Get an attribute array of type unsigned long long.
Definition: dattget.c:618
EXTERNL int nc_put_att_ushort(int ncid, int varid, const char *name, nc_type xtype, size_t len, const unsigned short *op)
Write an attribute of type unsigned short.
Definition: dattput.c:528
EXTERNL int ncvargets(int ncid, int varid, const long *startp, const long *countp, const long *stridep, void *ip)
Read strided data.
Definition: dv2i.c:1178
EXTERNL int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: ddim.c:285
EXTERNL int nc_show_metadata(int ncid)
Print the metadata for a file.
Definition: dgroup.c:299
EXTERNL int ncvarrename(int ncid, int varid, const char *name)
Rename a variable.
Definition: dv2i.c:1373
EXTERNL int ncopts
V2 API error handling.
Definition: netcdf.h:1981
int nc_get_var1_string(int ncid, int varid, const size_t *indexp, char **ip)
Read a single datum from a variable.
Definition: dvarget.c:986
EXTERNL int nc_copy_var(int ncid_in, int varid, int ncid_out)
This will copy a variable that is an array of primitive type and its attributes from one file to anot...
Definition: dcopy.c:282
EXTERNL const char * nc_inq_libvers(void)
Return the library version.
Definition: derror.c:27
EXTERNL int ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp)
Learn record variables and the lengths of the record dimension.
Definition: dv2i.c:1666
int nc_put_var_uint(int ncid, int varid, const unsigned int *op)
Write an entire variable with one call.
Definition: dvarput.c:988
int nc_put_vars_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const long long *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1164
int nc_put_vara_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const long long *op)
Write an array of values to a variable.
Definition: dvarput.c:734
int nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
Write an entire variable with one call.
Definition: dvarput.c:1000
int nc_put_varm_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned short *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1340
int nc_put_vars_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const int *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1094
int nc_get_var_long(int ncid, int varid, long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1074
EXTERNL int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
Return the group ID for a group given the name.
Definition: dgroup.c:56
EXTERNL int ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out)
Copy an attribute.
Definition: dv2i.c:1511
int nc_get_varm_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, signed char *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1378
int nc_put_vars_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned char *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1134
int nc_put_vars_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned short *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1144
int nc_put_var_schar(int ncid, int varid, const signed char *op)
Write an entire variable with one call.
Definition: dvarput.c:934
EXTERNL int nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_level)
Set the zlib compression and shuffle settings for a variable in an netCDF/HDF5 file.
Definition: dvar.c:461
EXTERNL int ncvarget1(int ncid, int varid, const long *indexp, void *ip)
Read 1 data value.
Definition: dv2i.c:1002
int nc_put_vara_double(int ncid, int varid, const size_t *startp, const size_t *countp, const double *op)
Write an array of values to a variable.
Definition: dvarput.c:702
int nc_put_var_int(int ncid, int varid, const int *op)
Write an entire variable with one call.
Definition: dvarput.c:952
int nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Write one datum.
Definition: dvarput.c:801
EXTERNL int ncattput(int ncid, int varid, const char *name, nc_type xtype, int len, const void *op)
Write an attribute.
Definition: dv2i.c:1405
int nc_put_vara_float(int ncid, int varid, const size_t *startp, const size_t *countp, const float *op)
Write an array of values to a variable.
Definition: dvarput.c:694
EXTERNL int nc_put_var(int ncid, int varid, const void *op)
Write an entire variable with one call.
Definition: dvarput.c:922
int nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
Write one datum.
Definition: dvarput.c:843
EXTERNL int nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp)
Get the storage and (for chunked variables) the chunksizes of a variable.
Definition: dvarinq.c:466
EXTERNL int nc_put_vara(int ncid, int varid, const size_t *startp, const size_t *countp, const void *op)
Write an array of values to a variable.
Definition: dvarput.c:633
EXTERNL int nc_copy_data(int ncid, nc_type xtypeid, const void *memory, size_t count, void *copy)
Copy vector of arbitrary type instances.
int nc_get_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, double *ip)
Read a strided array from a variable.
Definition: dvarget.c:1245
EXTERNL int nc_insert_array_compound(int ncid, nc_type xtype, const char *name, size_t offset, nc_type field_typeid, int ndims, const int *dim_sizes)
Insert a named array field into a compound type.
Definition: dcompound.c:141
EXTERNL int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
Definition: ddim.c:216
EXTERNL int ncredef(int ncid)
Put file in define mode.
Definition: dv2i.c:560
EXTERNL int ncvarput(int ncid, int varid, const long *startp, const long *countp, const void *op)
Write some data.
Definition: dv2i.c:1040
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
Learn how many dimensions are associated with a variable.
Definition: dvarinq.c:202
int nc_get_var_schar(int ncid, int varid, signed char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1050
EXTERNL int nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, int *dim_sizes)
Get information about one of the fields of a compound type.
Definition: dcompound.c:443
int nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
Write one datum.
Definition: dvarput.c:831
EXTERNL int nc_get_att_short(int ncid, int varid, const char *name, short *ip)
Get an attribute array of type short.
Definition: dattget.c:321
EXTERNL int nc_inq_format(int ncid, int *formatp)
Inquire about the binary format of a netCDF file as presented by the API.
Definition: dfile.c:1547
EXTERNL int nc_put_att_ubyte(int ncid, int varid, const char *name, nc_type xtype, size_t len, const unsigned char *op)
Write an attribute of type unsigned char.
Definition: dattput.c:494
EXTERNL int nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep, size_t *base_sizep, size_t *num_membersp)
Learn about a user-define enumeration type.
Definition: denum.c:107
EXTERNL int nc_put_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const void *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1243
int nc_put_vars_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const short *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1084
EXTERNL int nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
Inquire about a file or group.
Definition: dfile.c:1635
EXTERNL int nc_get_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, void *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1370
EXTERNL int ncdimrename(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: dv2i.c:825
EXTERNL int nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep)
Create an opaque type.
Definition: dopaque.c:33
EXTERNL int nccreate(const char *path, int cmode)
Create a netCDF file.
Definition: dv2i.c:511
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:25
int nc_put_varm_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const int *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1290
EXTERNL int nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *ip)
Get an attribute array of type unsigned int.
Definition: dattget.c:552
int nc_get_vara_string(int ncid, int varid, const size_t *startp, const size_t *countp, char **ip)
Read an array of values from a variable.
Definition: dvarget.c:850
EXTERNL int ncdimid(int ncid, const char *name)
Find dimension ID from name.
Definition: dv2i.c:761
EXTERNL int nc__open(const char *path, int mode, size_t *chunksizehintp, int *ncidp)
Open a netCDF file with extra performance parameters for the classic library.
Definition: dfile.c:721
EXTERNL int nc_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const void *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1048
EXTERNL int nc_inq_compound_name(int ncid, nc_type xtype, char *name)
Learn the name of a compound type.
Definition: dcompound.c:203
int nc_put_var_string(int ncid, int varid, const char **op)
Write an entire variable with one call.
Definition: dvarput.c:1006
EXTERNL int nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype, size_t len, const signed char *op)
Write an attribute of type signed char.
Definition: dattput.c:256
int nc_put_vara_short(int ncid, int varid, const size_t *startp, const size_t *countp, const short *op)
Write an array of values to a variable.
Definition: dvarput.c:670
EXTERNL int nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
Find the length of an attribute.
Definition: dattinq.c:424
int nc_put_vara_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned int *op)
Write an array of values to a variable.
Definition: dvarput.c:726
EXTERNL int ncattrename(int ncid, int varid, const char *name, const char *newname)
Rename an attribute.
Definition: dv2i.c:1574
EXTERNL int nc_inq_format_extended(int ncid, int *formatp, int *modep)
Obtain more detailed (vis-a-vis nc_inq_format) format information about an open dataset.
Definition: dfile.c:1582
EXTERNL int ncendef(int ncid)
End define mode for file.
Definition: dv2i.c:583
EXTERNL int nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype, size_t len, const int *op)
Write an attribute of type int.
Definition: dattput.c:358
int nc_put_varm_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const short *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1280
EXTERNL int ncvargetg(int ncid, int varid, const long *startp, const long *countp, const long *stridep, const long *imapp, void *ip)
Read mapped data.
Definition: dv2i.c:1304
EXTERNL int nc_put_att_text(int ncid, int varid, const char *name, size_t len, const char *op)
Write a text attribute.
Definition: dattput.c:153
int nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
Write an entire variable with one call.
Definition: dvarput.c:976
int nc_put_vars_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const float *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1114
size_t len
Length of VL data (in base type units)
Definition: netcdf.h:762
int nc_put_vara_string(int ncid, int varid, const size_t *startp, const size_t *countp, const char **op)
Write an array of values to a variable.
Definition: dvarput.c:750
EXTERNL int ncattget(int ncid, int varid, const char *name, void *ip)
Read an attribute.
Definition: dv2i.c:1479
EXTERNL int nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, float preemption)
Change the cache settings for a chunked variable.
Definition: dvar.c:1394
EXTERNL int nc_inq_natts(int ncid, int *nattsp)
Find number of global or group attributes.
Definition: dattinq.c:300
EXTERNL int nc_rename_var(int ncid, int varid, const char *name)
Rename a variable.
Definition: dvar.c:944
EXTERNL int nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype, size_t len, const short *op)
Write an attribute of type short.
Definition: dattput.c:324
EXTERNL int nc_del_att(int ncid, int varid, const char *name)
Delete an attribute.
Definition: datt.c:177
int nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, long long *ip)
Read a single datum from a variable.
Definition: dvarget.c:972
EXTERNL int nc_rename_grp(int grpid, const char *name)
Rename a group.
Definition: dgroup.c:284
int nc_put_vara_text(int ncid, int varid, const size_t *startp, const size_t *countp, const char *op)
Write an array of values to a variable.
Definition: dvarput.c:646
EXTERNL int ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp)
Learn about a file.
Definition: dv2i.c:635
EXTERNL int ncvarputg(int ncid, int varid, const long *startp, const long *countp, const long *stridep, const long *imapp, const void *op)
Write mapped data.
Definition: dv2i.c:1231
int nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
Write one datum.
Definition: dvarput.c:825
EXTERNL int nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, nc_type *base_nc_typep)
Learn about a VLEN type.
Definition: dvlen.c:121
EXTERNL int nc_close(int ncid)
Close an open netCDF dataset.
Definition: dfile.c:1300
int nc_put_var_longlong(int ncid, int varid, const long long *op)
Write an entire variable with one call.
Definition: dvarput.c:994
int nc_get_varm_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, int *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1405
int nc_get_vars_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, long long *ip)
Read a strided array from a variable.
Definition: dvarget.c:1281
EXTERNL int nc_inq_varids(int ncid, int *nvars, int *varids)
Get a list of varids associated with a group given a group ID.
Definition: dgroup.c:187
int nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Write an array of values to a variable.
Definition: dvarput.c:710
EXTERNL int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
Definition: ddim.c:467
EXTERNL int nc_get_att_string(int ncid, int varid, const char *name, char **ip)
Get an attribute array of type string.
Definition: dattget.c:711
EXTERNL int nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name, size_t *offsetp, nc_type *field_typeidp, int *ndimsp, int *dim_sizesp)
Get information about one of the fields of a compound type.
Definition: dcompound.c:287
int nc_put_varm_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const char *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1251
int nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
Write one datum.
Definition: dvarput.c:813
int nc_get_vara_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned short *ip)
Read an array of values from a variable.
Definition: dvarget.c:822
EXTERNL int nc_inq_grpname_len(int ncid, size_t *lenp)
Get the length of a group name given an ID.
Definition: dgroup.c:122
EXTERNL int nc_get_var(int ncid, int varid, void *ip)
Read an entire variable in one call.
Definition: dvarget.c:1038
EXTERNL int nc_get_att(int ncid, int varid, const char *name, void *ip)
Get an attribute of any type.
Definition: dattget.c:133
int nc_get_var_int(int ncid, int varid, int *ip)
Read an entire variable in one call.
Definition: dvarget.c:1068
int nc_put_varm_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const char **op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1380
int nc_get_vara_short(int ncid, int varid, const size_t *startp, const size_t *countp, short *ip)
Read an array of values from a variable.
Definition: dvarget.c:780
EXTERNL int nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, nc_type *field_typeidp)
Get information about one of the fields of a compound type.
Definition: dcompound.c:383
int nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
Read an entire variable in one call.
Definition: dvarget.c:1098
EXTERNL int nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
Create a compound type.
Definition: dcompound.c:63
EXTERNL int ncvarget(int ncid, int varid, const long *startp, const long *countp, void *ip)
Read some data.
Definition: dv2i.c:1082
EXTERNL int nc_inq_grp_parent(int ncid, int *parent_ncid)
Get the ID of the parent based on a group ID.
Definition: dgroup.c:136
EXTERNL int nc_get_att_text(int ncid, int varid, const char *name, char *ip)
Get a text attribute.
Definition: dattget.c:222
EXTERNL int nc_get_att_longlong(int ncid, int varid, const char *name, long long *ip)
Get an attribute array of type long long.
Definition: dattget.c:585
EXTERNL int nc_inq_var_quantize(int ncid, int varid, int *quantize_modep, int *nsdp)
Learn whether quantization is on for a variable, and, if so, the NSD setting.
Definition: dvarinq.c:545
EXTERNL int nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
Get the full path/groupname of a group/subgroup given an ID.
Definition: dgroup.c:106
int nc_get_var_double(int ncid, int varid, double *ip)
Read an entire variable in one call.
Definition: dvarget.c:1086
int nc_put_varm_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned long long *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1370
EXTERNL int ncabort(int ncid)
Abort defining a file.
Definition: dv2i.c:700
int nc_get_vara_float(int ncid, int varid, const size_t *startp, const size_t *countp, float *ip)
Read an array of values from a variable.
Definition: dvarget.c:801
EXTERNL int nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype, size_t len, const long *op)
Write an attribute of type long.
Definition: dattput.c:392
int nc_put_vara_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned short *op)
Write an array of values to a variable.
Definition: dvarput.c:718
int nc_get_varm_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned int *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1461
int nc_get_var_string(int ncid, int varid, char **ip)
Read an entire variable in one call.
Definition: dvarget.c:1122
EXTERNL int nc_abort(int ncid)
No longer necessary for user to invoke manually.
Definition: dfile.c:1247
int nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
Write one datum.
Definition: dvarput.c:855
int nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
Definition: dvarget.c:951
int nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
Definition: dvarget.c:912
EXTERNL int nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
Read a single datum from a variable.
Definition: dvarget.c:894
EXTERNL int nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, size_t *nfieldsp)
Learn about a compound type.
Definition: dcompound.c:175
int nc_get_vara_int(int ncid, int varid, const size_t *startp, const size_t *countp, int *ip)
Read an array of values from a variable.
Definition: dvarget.c:787
EXTERNL int nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp)
Learn the szip settings of a variable.
Definition: dvarinq.c:732
int nc_put_vara_long(int ncid, int varid, const size_t *startp, const size_t *countp, const long *op)
Write an array of values to a variable.
Definition: dvarput.c:686
EXTERNL int nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
Learn the checksum settings for a variable.
Definition: dvarinq.c:378
int nc_get_var1_uint(int ncid, int varid, const size_t *indexp, unsigned int *ip)
Read a single datum from a variable.
Definition: dvarget.c:965
EXTERNL int ncvarputs(int ncid, int varid, const long *startp, const long *countp, const long *stridep, const void *op)
Write strided data.
Definition: dv2i.c:1125
EXTERNL int nc_get_att_float(int ncid, int varid, const char *name, float *ip)
Get an attribute array of type float.
Definition: dattget.c:420
int nc_get_vara_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, long long *ip)
Read an array of values from a variable.
Definition: dvarget.c:836
int nc_put_varm_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const long long *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1360
EXTERNL int nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
Write one datum.
Definition: dvarput.c:783
EXTERNL int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
Retrieve a list of dimension ids associated with a group.
Definition: dgroup.c:205
EXTERNL int nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype, size_t len, const unsigned char *op)
Write an attribute of type unsigned char.
Definition: dattput.c:290
EXTERNL int nc_free_vlens(size_t nelems, nc_vlen_t vlens[])
Free an array of vlens given the number of elements and an array.
Definition: dvlen.c:40
int nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned long long *ip)
Read an array of values from a variable.
Definition: dvarget.c:843
EXTERNL int nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip)
Get an attribute of an signed char type.
Definition: dattget.c:288
int nc_get_vars_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned char *ip)
Read a strided array from a variable.
Definition: dvarget.c:1200
EXTERNL int nc_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp)
Define storage and, if chunked storage is used, chunking parameters for a variable.
Definition: dvar.c:729
int nc_get_var_text(int ncid, int varid, char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1044
EXTERNL int nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
Learn the number of fields in a compound type.
Definition: dcompound.c:249
int nc_get_varm_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned char *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1388
EXTERNL int ncsync(int ncid)
Sync a file.
Definition: dv2i.c:677
EXTERNL int nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, int *ndimsp)
Get information about one of the fields of a compound type.
Definition: dcompound.c:413
int nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned long long *ip)
Read a strided array from a variable.
Definition: dvarget.c:1290
int nc_get_vars_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, int *ip)
Read a strided array from a variable.
Definition: dvarget.c:1218
int nc_get_vara_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned char *ip)
Read an array of values from a variable.
Definition: dvarget.c:815
int nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip)
Read a single datum from a variable.
Definition: dvarget.c:937
EXTERNL int nc_set_fill(int ncid, int fillmode, int *old_modep)
Change the fill-value mode to improve write performance.
Definition: dfile.c:1474
int nc_get_vara_text(int ncid, int varid, const size_t *startp, const size_t *countp, char *ip)
Read an array of values from a variable.
Definition: dvarget.c:759
void * p
Pointer to VL data.
Definition: netcdf.h:763
EXTERNL int nc_put_att_uint(int ncid, int varid, const char *name, nc_type xtype, size_t len, const unsigned int *op)
Write an attribute of type unsigned int.
Definition: dattput.c:562
int nc_get_vara_schar(int ncid, int varid, const size_t *startp, const size_t *countp, signed char *ip)
Read an array of values from a variable.
Definition: dvarget.c:766
int nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
Write one datum.
Definition: dvarput.c:795
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
Definition: dvarinq.c:178
EXTERNL int nc_put_att(int ncid, int varid, const char *name, nc_type xtype, size_t len, const void *op)
Write an attribute of any type.
Definition: dattput.c:222
int nc_get_vars_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, float *ip)
Read a strided array from a variable.
Definition: dvarget.c:1236
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
Definition: dfile.c:1728
EXTERNL int nc_put_att_ulonglong(int ncid, int varid, const char *name, nc_type xtype, size_t len, const unsigned long long *op)
Write an attribute of type unsigned long long.
Definition: dattput.c:631
EXTERNL int nc_free_vlen(nc_vlen_t *vl)
Free memory in a single VLEN object.
Definition: dvlen.c:61
int nc_put_vara_int(int ncid, int varid, const size_t *startp, const size_t *countp, const int *op)
Write an array of values to a variable.
Definition: dvarput.c:678
EXTERNL int nc_free_string(size_t nelems, char **data)
Free string space allocated by the library.
Definition: dvar.c:1316
int nc_put_varm_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const signed char *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1260
EXTERNL int nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, int *fieldidp)
Learn the Index of a Named Field in a Compound Type.
Definition: dcompound.c:475
EXTERNL int nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, size_t *offsetp)
Get information about one of the fields of a compound type.
Definition: dcompound.c:353
EXTERNL int nc_inq_var_filter(int ncid, int varid, unsigned int *idp, size_t *nparams, unsigned int *params)
Find the first filter (if any) associated with a variable.
Definition: dfilter.c:167
int nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1092
EXTERNL int nc_inq_varname(int ncid, int varid, char *name)
Learn the name of a variable.
Definition: dvarinq.c:156
EXTERNL int ncopen(const char *path, int mode)
Open a netCDF file.
Definition: dv2i.c:536
int nc_get_var_longlong(int ncid, int varid, long long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1110
int nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
Write one datum.
Definition: dvarput.c:861
int nc_put_varm_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const double *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1320
EXTERNL int nc_get_att_long(int ncid, int varid, const char *name, long *ip)
Get an attribute array of type long.
Definition: dattget.c:387
#define EXTERNL
Needed for DLL build.
Definition: netcdf.h:571
int nc_get_vars_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, short *ip)
Read a strided array from a variable.
Definition: dvarget.c:1209
int nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, unsigned short *ip)
Read a single datum from a variable.
Definition: dvarget.c:958
EXTERNL int nc_def_var_endian(int ncid, int varid, int endian)
Define endianness of a variable.
Definition: dvar.c:807
EXTERNL int nc__create(const char *path, int cmode, size_t initialsz, size_t *chunksizehintp, int *ncidp)
Create a netCDF file with some extra parameters controlling classic file caching. ...
Definition: dfile.c:470
EXTERNL int ncrecput(int ncid, long recnum, void *const *datap)
Write one record's worth of data, except don't write to variables for which the address of the data t...
Definition: dv2i.c:1754
int nc_get_varm_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, char *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1490
EXTERNL int nc_open(const char *path, int mode, int *ncidp)
Open an existing netCDF file.
Definition: dfile.c:664
EXTERNL int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
Define a new group.
Definition: dgroup.c:268
int nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
Write one datum.
Definition: dvarput.c:807
EXTERNL int nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, char *name)
Get information about one of the fields of a compound type.
Definition: dcompound.c:321
int nc_get_var1_schar(int ncid, int varid, const size_t *indexp, signed char *ip)
Read a single datum from a variable.
Definition: dvarget.c:906
int nc_put_var_double(int ncid, int varid, const double *op)
Write an entire variable with one call.
Definition: dvarput.c:970
EXTERNL int nc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int *parms)
Define a new variable filter Assumes HDF5 format using unsigned ints.
Definition: dfilter.c:126
int nc_get_vars_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, signed char *ip)
Read a strided array from a variable.
Definition: dvarget.c:1191
EXTERNL int nc_insert_enum(int ncid, nc_type xtype, const char *name, const void *value)
Insert a named member into a enum type.
Definition: denum.c:71
int nc_get_vars_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, long *ip)
Read a strided array from a variable.
Definition: dvarget.c:1227
EXTERNL int nc_inq_varid(int ncid, const char *name, int *varidp)
Find the ID of a variable, from the name.
Definition: dvarinq.c:60
EXTERNL int nc_insert_compound(int ncid, nc_type xtype, const char *name, size_t offset, nc_type field_typeid)
Insert a named field into a compound type.
Definition: dcompound.c:99
int nc_get_vars_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned short *ip)
Read a strided array from a variable.
Definition: dvarget.c:1263
EXTERNL int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
Definition: ddim.c:152
int nc_put_varm_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const long *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1300
int nc_get_vara_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned char *ip)
Read an array of values from a variable.
Definition: dvarget.c:773
int nc_get_var_float(int ncid, int varid, float *ip)
Read an entire variable in one call.
Definition: dvarget.c:1080
int nc_get_var1_short(int ncid, int varid, const size_t *indexp, short *ip)
Read a single datum from a variable.
Definition: dvarget.c:918
EXTERNL int nc_get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, void *ip)
Read a strided array from a variable.
Definition: dvarget.c:1173
EXTERNL int nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype, size_t len, const float *op)
Write an attribute of type float.
Definition: dattput.c:426
EXTERNL int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
Definition: ddim.c:350
int nclong
C data type corresponding to a netCDF NC_LONG argument, a signed 32 bit object.
Definition: netcdf.h:1991
EXTERNL int ncsetfill(int ncid, int fillmode)
Set the fill mode.
Definition: dv2i.c:1636
int nc_put_var_text(int ncid, int varid, const char *op)
Write an entire variable with one call.
Definition: dvarput.c:928
EXTERNL int nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name, void *value)
Learn about a about a member of an enum type.
Definition: denum.c:140
This is the type of arrays of vlens.
Definition: netcdf.h:761
int nc_get_var_short(int ncid, int varid, short *ip)
Read an entire variable in one call.
Definition: dvarget.c:1062
EXTERNL int ncvardef(int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp)
Define a variable.
Definition: dv2i.c:856
int nc_put_varm_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned int *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1350
EXTERNL int nc_inq_user_format(int mode_flag, NC_Dispatch **dispatch_table, char *magic_number)
Inquire about user-defined format.
Definition: dfile.c:179
int nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, unsigned long long *ip)
Read a single datum from a variable.
Definition: dvarget.c:979
EXTERNL int nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip)
Get an attribute of an signed char type.
Definition: dattget.c:255
EXTERNL int nc_put_att_longlong(int ncid, int varid, const char *name, nc_type xtype, size_t len, const long long *op)
Write an attribute of type long long.
Definition: dattput.c:596
EXTERNL void nc_advise(const char *cdf_routine_name, int err, const char *fmt,...)
Show an error message and exit (based on ncopts).
Definition: dv2i.c:466
EXTERNL int ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp)
Learn about an attribute.
Definition: dv2i.c:1440
EXTERNL int nc_set_chunk_cache(size_t size, size_t nelems, float preemption)
Set chunk cache size.
Definition: nc4cache.c:66
int nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
Write one datum.
Definition: dvarput.c:789
EXTERNL int ncattname(int ncid, int varid, int attnum, char *name)
Learn attribute name from its number.
Definition: dv2i.c:1543
int nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned long long *op)
Write an array of values to a variable.
Definition: dvarput.c:742
int nc_put_var_float(int ncid, int varid, const float *op)
Write an entire variable with one call.
Definition: dvarput.c:964
EXTERNL int nc_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier)
Get the name which is associated with an enum member value.
Definition: denum.c:164
int nc_put_vars_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1056
int nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip)
Read a single datum from a variable.
Definition: dvarget.c:944
EXTERNL int ncdimdef(int ncid, const char *name, long len)
Define a dimension.
Definition: dv2i.c:726
int nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
Write one datum.
Definition: dvarput.c:819
int nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
Write an entire variable with one call.
Definition: dvarput.c:982
EXTERNL int ncvarinq(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
Learn about a variable.
Definition: dv2i.c:920
EXTERNL int nc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep, int *deflate_levelp)
Learn the shuffle and deflate settings for a variable.
Definition: dvarinq.c:295
EXTERNL int nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
Return number and list of unlimited dimensions.
Definition: dvarinq.c:672
EXTERNL int nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
Learn about a variable.
Definition: dvarinq.c:124
int nc_put_vars_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const signed char *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1065
int nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1056
EXTERNL int nc_inq_path(int ncid, size_t *pathlen, char *path)
Get the file pathname (or the opendap URL) which was used to open/create the ncid's file...
Definition: dfile.c:898
int nc_put_vars_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const long *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1104
EXTERNL int nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
Set the fill value for a variable.
Definition: dvar.c:309
int nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip)
Read a single datum from a variable.
Definition: dvarget.c:930
int nc_get_varm_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, long *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1414
EXTERNL int nc_put_att_string(int ncid, int varid, const char *name, size_t len, const char **op)
Write a string attribute.
Definition: dattput.c:75
EXTERNL int nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep)
Use this function to define a variable length array type.
Definition: dvlen.c:93
EXTERNL int nc_inq_grps(int ncid, int *numgrps, int *ncids)
Get a list of groups or subgroups from a file or groupID.
Definition: dgroup.c:73
EXTERNL int nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int *equal)
Learn if two types are equal.
Definition: dtype.c:69
EXTERNL int nc_inq_varnatts(int ncid, int varid, int *nattsp)
Learn how many attributes are associated with a variable.
Definition: dvarinq.c:249
EXTERNL int nc_get_att_ubyte(int ncid, int varid, const char *name, unsigned char *ip)
Get an attribute array of type unsigned char.
Definition: dattget.c:486
int nc_put_vars_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned long long *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1174
EXTERNL int nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep)
Learn the size of a compound type.
Definition: dcompound.c:226
EXTERNL int nc_enddef(int ncid)
Leave define mode.
Definition: dfile.c:1027
int nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
Write one datum.
Definition: dvarput.c:849
EXTERNL int nc_get_att_int(int ncid, int varid, const char *name, int *ip)
Get an attribute array of type int.
Definition: dattget.c:354
EXTERNL int nc_get_att_double(int ncid, int varid, const char *name, double *ip)
Get an attribute array of type double.
Definition: dattget.c:453
EXTERNL const char * nc_strerror(int ncerr)
Given an error number, return an error message.
Definition: derror.c:87
EXTERNL int nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
Learn about a user defined type.
Definition: dtype.c:146
EXTERNL int nc_inq_attid(int ncid, int varid, const char *name, int *idp)
Find an attribute ID.
Definition: dattinq.c:164
int nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip)
Read a single datum from a variable.
Definition: dvarget.c:924
int nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
Write an entire variable with one call.
Definition: dvarput.c:940
int nc_get_varm_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned short *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1451
int nc_put_var_short(int ncid, int varid, const short *op)
Write an entire variable with one call.
Definition: dvarput.c:946
EXTERNL int nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep)
Learn the fill mode of a variable.
Definition: dvarinq.c:502
int nc_put_varm_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const float *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1310
int nc_get_varm_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, char **ip)
Read a mapped array from a variable.
Definition: dvarget.c:1499
EXTERNL int nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp)
Get current netCDF chunk cache settings.
Definition: nc4cache.c:95
int nc_get_varm_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, double *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1432
EXTERNL int nc_sync(int ncid)
Synchronize an open netcdf dataset to disk.
Definition: dfile.c:1195
EXTERNL int nc_get_vara(int ncid, int varid, const size_t *startp, const size_t *countp, void *ip)
Read an array of values from a variable.
Definition: dvarget.c:746
EXTERNL int nc_create(const char *path, int cmode, int *ncidp)
Create a new netCDF file.
Definition: dfile.c:398
int nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Write one datum.
Definition: dvarput.c:837
int nc_put_varm_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned char *op)
Write a mapped array of values to a variable.
Definition: dvarput.c:1270
EXTERNL int nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out)
Copy an attribute from one open file to another.
Definition: dcopy.c:587
EXTERNL int nc_def_var_fletcher32(int ncid, int varid, int fletcher32)
Set checksum for a var.
Definition: dvar.c:609
int nc_get_vara_long(int ncid, int varid, const size_t *startp, const size_t *countp, long *ip)
Read an array of values from a variable.
Definition: dvarget.c:794
int nc_get_varm_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, long long *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1471
int nc_put_vars_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char **op)
Write a strided array of values to a variable.
Definition: dvarput.c:1184
int nc_get_vars_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, char **ip)
Read a strided array from a variable.
Definition: dvarget.c:1299
EXTERNL int ncvarput1(int ncid, int varid, const long *indexp, const void *op)
Write 1 data value.
Definition: dv2i.c:965
EXTERNL int nc_inq_attname(int ncid, int varid, int attnum, char *name)
Find the name of an attribute.
Definition: dattinq.c:255
int nc_get_vars_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned int *ip)
Read a strided array from a variable.
Definition: dvarget.c:1272
EXTERNL int nc_inq_typeid(int ncid, const char *name, nc_type *typeidp)
Find a type by name.
Definition: dtype.c:102
int nc_get_varm_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned long long *ip)
Read a mapped array from a variable.
Definition: dvarget.c:1480
EXTERNL int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
Retrieve a list of types associated with a group.
Definition: dgroup.c:223