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