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