20#if defined(_WIN32) || defined(_WIN64)
27#if defined(__cplusplus)
49#define NC_MAX_ATOMIC_TYPE NC_STRING
60#define NC_FIRSTUSERTYPEID 32
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)
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"
121#define NC_FillValue "_FillValue"
123#define NC_NOFILL 0x100
135#define NC_NOWRITE 0x0000
136#define NC_WRITE 0x0001
138#define NC_CLOBBER 0x0000
139#define NC_NOCLOBBER 0x0004
140#define NC_DISKLESS 0x0008
141#define NC_MMAP 0x0010
143#define NC_64BIT_DATA 0x0020
144#define NC_CDF5 NC_64BIT_DATA
146#define NC_UDF0 0x0040
147#define NC_UDF1 0x0080
149#define NC_CLASSIC_MODEL 0x0100
150#define NC_64BIT_OFFSET 0x0200
156#define NC_LOCK 0x0400
160#define NC_SHARE 0x0800
162#define NC_NETCDF4 0x1000
167#define NC_MPIIO 0x2000
168#define NC_MPIPOSIX NC_MPIIO
169#define NC_PNETCDF (NC_MPIIO)
171#define NC_PERSIST 0x4000
172#define NC_INMEMORY 0x8000
175#define NC_NOATTCREORD 0x20000
176#define NC_NODIMSCALE_ATTACH 0x40000
178#define NC_MAX_MAGIC_NUMBER_LEN 8
187#define NC_FORMAT_CLASSIC (1)
193#define NC_FORMAT_64BIT_OFFSET (2)
194#define NC_FORMAT_64BIT (NC_FORMAT_64BIT_OFFSET)
195#define NC_FORMAT_NETCDF4 (3)
196#define NC_FORMAT_NETCDF4_CLASSIC (4)
197#define NC_FORMAT_64BIT_DATA (5)
200#define NC_FORMAT_CDF5 NC_FORMAT_64BIT_DATA
203#define NC_FORMAT_ALL (NC_64BIT_OFFSET|NC_64BIT_DATA|NC_CLASSIC_MODEL|NC_NETCDF4|NC_UDF0|NC_UDF1)
225#define NC_FORMATX_NC3 (1)
226#define NC_FORMATX_NC_HDF5 (2)
227#define NC_FORMATX_NC4 NC_FORMATX_NC_HDF5
228#define NC_FORMATX_NC_HDF4 (3)
229#define NC_FORMATX_PNETCDF (4)
230#define NC_FORMATX_DAP2 (5)
231#define NC_FORMATX_DAP4 (6)
232#define NC_FORMATX_UDF0 (8)
233#define NC_FORMATX_UDF1 (9)
234#define NC_FORMATX_NCZARR (10)
235#define NC_FORMATX_UNDEFINED (0)
242#define NC_FORMAT_NC3 NC_FORMATX_NC3
243#define NC_FORMAT_NC_HDF5 NC_FORMATX_NC_HDF5
244#define NC_FORMAT_NC4 NC_FORMATX_NC4
245#define NC_FORMAT_NC_HDF4 NC_FORMATX_NC_HDF4
246#define NC_FORMAT_PNETCDF NC_FORMATX_PNETCDF
247#define NC_FORMAT_DAP2 NC_FORMATX_DAP2
248#define NC_FORMAT_DAP4 NC_FORMATX_DAP4
249#define NC_FORMAT_UNDEFINED NC_FORMATX_UNDEFINED
250#define NC_FORMATX_ZARR NC_FORMATX_NCZARR
255#define NC_SIZEHINT_DEFAULT 0
258#define NC_ALIGN_CHUNK ((size_t)(-1))
261#define NC_UNLIMITED 0L
288#define NC_MAX_DIMS 1024
289#define NC_MAX_ATTRS 8192
290#define NC_MAX_VARS 8192
291#define NC_MAX_NAME 256
292#define NC_MAX_VAR_DIMS 1024
299#define NC_MAX_HDF4_NAME NC_MAX_NAME
304#define NC_ENDIAN_NATIVE 0
305#define NC_ENDIAN_LITTLE 1
306#define NC_ENDIAN_BIG 2
315#define NC_CONTIGUOUS 1
317#define NC_UNKNOWN_STORAGE 3
326#define NC_NOCHECKSUM 0
327#define NC_FLETCHER32 1
335#define NC_NOSHUFFLE 0
339#define NC_MIN_DEFLATE_LEVEL 0
340#define NC_MAX_DEFLATE_LEVEL 9
345#define NC_NOQUANTIZE 0
346#define NC_QUANTIZE_BITGROOM 1
347#define NC_QUANTIZE_GRANULARBR 2
348#define NC_QUANTIZE_BITROUND 3
353#define NC_QUANTIZE_BITGROOM_ATT_NAME "_QuantizeBitGroomNumberOfSignificantDigits"
354#define NC_QUANTIZE_GRANULARBR_ATT_NAME "_QuantizeGranularBitRoundNumberOfSignificantDigits"
355#define NC_QUANTIZE_BITROUND_ATT_NAME "_QuantizeBitRoundNumberOfSignificantBits"
361#define NC_QUANTIZE_MAX_FLOAT_NSD (7)
362#define NC_QUANTIZE_MAX_FLOAT_NSB (23)
368#define NC_QUANTIZE_MAX_DOUBLE_NSD (15)
369#define NC_QUANTIZE_MAX_DOUBLE_NSB (52)
376#define NC_ISSYSERR(err) ((err) > 0)
385#define NC_EBADID (-33)
386#define NC_ENFILE (-34)
387#define NC_EEXIST (-35)
388#define NC_EINVAL (-36)
389#define NC_EPERM (-37)
394#define NC_ENOTINDEFINE (-38)
403#define NC_EINDEFINE (-39)
410#define NC_EINVALCOORDS (-40)
415#define NC_EMAXDIMS (-41)
417#define NC_ENAMEINUSE (-42)
418#define NC_ENOTATT (-43)
419#define NC_EMAXATTS (-44)
420#define NC_EBADTYPE (-45)
421#define NC_EBADDIM (-46)
422#define NC_EUNLIMPOS (-47)
427#define NC_EMAXVARS (-48)
432#define NC_ENOTVAR (-49)
433#define NC_EGLOBAL (-50)
434#define NC_ENOTNC (-51)
436#define NC_EMAXNAME (-53)
437#define NC_EUNLIMIT (-54)
438#define NC_ENORECVARS (-55)
439#define NC_ECHAR (-56)
448#define NC_EEDGE (-57)
449#define NC_ESTRIDE (-58)
450#define NC_EBADNAME (-59)
457#define NC_ERANGE (-60)
458#define NC_ENOMEM (-61)
459#define NC_EVARSIZE (-62)
460#define NC_EDIMSIZE (-63)
461#define NC_ETRUNC (-64)
462#define NC_EAXISTYPE (-65)
466#define NC_ECURL (-67)
468#define NC_ENODATA (-69)
469#define NC_EDAPSVC (-70)
472#define NC_EDMR NC_EDDS
473#define NC_EDATADDS (-73)
474#define NC_EDATADAP NC_EDATADDS
475#define NC_EDAPURL (-74)
476#define NC_EDAPCONSTRAINT (-75)
477#define NC_ETRANSLATION (-76)
478#define NC_EACCESS (-77)
479#define NC_EAUTH (-78)
482#define NC_ENOTFOUND (-90)
483#define NC_ECANTREMOVE (-91)
484#define NC_EINTERNAL (-92)
485#define NC_EPNETCDF (-93)
490#define NC4_FIRST_ERROR (-100)
491#define NC_EHDFERR (-101)
492#define NC_ECANTREAD (-102)
493#define NC_ECANTWRITE (-103)
494#define NC_ECANTCREATE (-104)
495#define NC_EFILEMETA (-105)
496#define NC_EDIMMETA (-106)
497#define NC_EATTMETA (-107)
498#define NC_EVARMETA (-108)
499#define NC_ENOCOMPOUND (-109)
500#define NC_EATTEXISTS (-110)
501#define NC_ENOTNC4 (-111)
502#define NC_ESTRICTNC3 (-112)
503#define NC_ENOTNC3 (-113)
504#define NC_ENOPAR (-114)
505#define NC_EPARINIT (-115)
506#define NC_EBADGRPID (-116)
507#define NC_EBADTYPID (-117)
508#define NC_ETYPDEFINED (-118)
509#define NC_EBADFIELD (-119)
510#define NC_EBADCLASS (-120)
511#define NC_EMAPTYPE (-121)
512#define NC_ELATEFILL (-122)
513#define NC_ELATEDEF (-123)
514#define NC_EDIMSCALE (-124)
515#define NC_ENOGRP (-125)
516#define NC_ESTORAGE (-126)
517#define NC_EBADCHUNK (-127)
518#define NC_ENOTBUILT (-128)
519#define NC_EDISKLESS (-129)
520#define NC_ECANTEXTEND (-130)
521#define NC_EMPI (-131)
523#define NC_EFILTER (-132)
524#define NC_ERCFILE (-133)
525#define NC_ENULLPAD (-134)
526#define NC_EINMEMORY (-135)
527#define NC_ENOFILTER (-136)
528#define NC_ENCZARR (-137)
530#define NC_EEMPTY (-139)
531#define NC_EOBJECT (-140)
532#define NC_ENOOBJECT (-141)
533#define NC_EPLUGIN (-142)
535#define NC4_LAST_ERROR (-142)
543#define NC_EURL (NC_EDAPURL)
544#define NC_ECONSTRAINT (NC_EDAPCONSTRAINT)
548#define DIM_WITHOUT_VARIABLE "This is a netCDF dimension but not a netCDF variable."
553#define NC_HAVE_NEW_CHUNKING_API 1
560#if defined(DLL_NETCDF)
561# if defined(DLL_EXPORT)
562# define MSC_EXTRA __declspec(dllexport)
564# define MSC_EXTRA __declspec(dllimport)
571#define EXTERNL MSC_EXTRA extern
573#if defined(DLL_NETCDF)
585typedef struct NC_Dispatch NC_Dispatch;
594nc_set_alignment(
int threshold,
int alignment);
598nc_get_alignment(
int* thresholdp,
int* alignmentp);
601nc__create(
const char *path,
int cmode,
size_t initialsz,
602 size_t *chunksizehintp,
int *ncidp);
605nc_create(
const char *path,
int cmode,
int *ncidp);
609 size_t *chunksizehintp,
int *ncidp);
612nc_open(
const char *path,
int mode,
int *ncidp);
621nc_inq_ncid(
int ncid,
const char *name,
int *grp_ncid);
660nc_inq_dimids(
int ncid,
int *ndims,
int *dimids,
int include_parents);
674nc_def_grp(
int parent_ncid,
const char *name,
int *new_ncid);
689 size_t offset,
nc_type field_typeid);
694 size_t offset,
nc_type field_typeid,
695 int ndims,
const int *dim_sizes);
725 size_t *offsetp,
nc_type *field_typeidp,
int *ndimsp,
770#define NC_COMPOUND_OFFSET(S,M) (offsetof(S,M))
783nc_put_vlen_element(
int ncid,
int typeid1,
void *vlen_element,
784 size_t len,
const void *data);
787nc_get_vlen_element(
int ncid,
int typeid1,
const void *vlen_element,
788 size_t *len,
void *data);
793 nc_type *base_nc_typep,
size_t *nfieldsp,
int *classp);
798 size_t len,
const void *op);
802nc_get_att(
int ncid,
int varid,
const char *name,
void *ip);
822 size_t *base_sizep,
size_t *num_membersp);
833#define NC_UNDEFINED_ENUM_IDENT "_UNDEFINED"
850nc_put_var(
int ncid,
int varid,
const void *op);
858nc_put_var1(
int ncid,
int varid,
const size_t *indexp,
863nc_get_var1(
int ncid,
int varid,
const size_t *indexp,
void *ip);
867nc_put_vara(
int ncid,
int varid,
const size_t *startp,
868 const size_t *countp,
const void *op);
872nc_get_vara(
int ncid,
int varid,
const size_t *startp,
873 const size_t *countp,
void *ip);
877nc_put_vars(
int ncid,
int varid,
const size_t *startp,
878 const size_t *countp,
const ptrdiff_t *stridep,
883nc_get_vars(
int ncid,
int varid,
const size_t *startp,
884 const size_t *countp,
const ptrdiff_t *stridep,
889nc_put_varm(
int ncid,
int varid,
const size_t *startp,
890 const size_t *countp,
const ptrdiff_t *stridep,
891 const ptrdiff_t *imapp,
const void *op);
895nc_get_varm(
int ncid,
int varid,
const size_t *startp,
896 const size_t *countp,
const ptrdiff_t *stridep,
897 const ptrdiff_t *imapp,
void *ip);
920 int *deflatep,
int *deflate_levelp);
924 int pixels_per_block);
928nc_inq_var_szip(
int ncid,
int varid,
int *options_maskp,
int *pixels_per_blockp);
951nc_def_var_fill(
int ncid,
int varid,
int no_fill,
const void *fill_value);
967nc_def_var_filter(
int ncid,
int varid,
unsigned int id,
size_t nparams,
const unsigned int* parms);
971nc_inq_var_filter(
int ncid,
int varid,
unsigned int* idp,
size_t* nparams,
unsigned int* params);
975nc_set_fill(
int ncid,
int fillmode,
int *old_modep);
980nc_set_default_format(
int format,
int *old_formatp);
1005nc__enddef(
int ncid,
size_t h_minfree,
size_t v_align,
1006 size_t v_minfree,
size_t r_align);
1021nc_inq(
int ncid,
int *ndimsp,
int *nvarsp,
int *nattsp,
int *unlimdimidp);
1050nc_def_dim(
int ncid,
const char *name,
size_t len,
int *idp);
1056nc_inq_dim(
int ncid,
int dimid,
char *name,
size_t *lenp);
1071nc_inq_att(
int ncid,
int varid,
const char *name,
1072 nc_type *xtypep,
size_t *lenp);
1075nc_inq_attid(
int ncid,
int varid,
const char *name,
int *idp);
1081nc_inq_attlen(
int ncid,
int varid,
const char *name,
size_t *lenp);
1087nc_copy_att(
int ncid_in,
int varid_in,
const char *name,
int ncid_out,
int varid_out);
1090nc_rename_att(
int ncid,
int varid,
const char *name,
const char *newname);
1093nc_del_att(
int ncid,
int varid,
const char *name);
1099 size_t len,
const char *op);
1106 size_t len,
const char **op);
1113 size_t len,
const unsigned char *op);
1120 size_t len,
const signed char *op);
1127 size_t len,
const short *op);
1134 size_t len,
const int *op);
1141 size_t len,
const long *op);
1148 size_t len,
const float *op);
1155 size_t len,
const double *op);
1162 size_t len,
const unsigned short *op);
1169 size_t len,
const unsigned int *op);
1172nc_get_att_uint(
int ncid,
int varid,
const char *name,
unsigned int *ip);
1176 size_t len,
const long long *op);
1183 size_t len,
const unsigned long long *op);
1187 unsigned long long *ip);
1195 const int *dimidsp,
int *varidp);
1199 int *ndimsp,
int *dimidsp,
int *nattsp);
1227#define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out))
1234nc_put_var1_text(
int ncid,
int varid,
const size_t *indexp,
const char *op);
1237nc_get_var1_text(
int ncid,
int varid,
const size_t *indexp,
char *ip);
1240nc_put_var1_uchar(
int ncid,
int varid,
const size_t *indexp,
1241 const unsigned char *op);
1244nc_get_var1_uchar(
int ncid,
int varid,
const size_t *indexp,
1248nc_put_var1_schar(
int ncid,
int varid,
const size_t *indexp,
1249 const signed char *op);
1252nc_get_var1_schar(
int ncid,
int varid,
const size_t *indexp,
1256nc_put_var1_short(
int ncid,
int varid,
const size_t *indexp,
1260nc_get_var1_short(
int ncid,
int varid,
const size_t *indexp,
1264nc_put_var1_int(
int ncid,
int varid,
const size_t *indexp,
const int *op);
1267nc_get_var1_int(
int ncid,
int varid,
const size_t *indexp,
int *ip);
1270nc_put_var1_long(
int ncid,
int varid,
const size_t *indexp,
const long *op);
1273nc_get_var1_long(
int ncid,
int varid,
const size_t *indexp,
long *ip);
1276nc_put_var1_float(
int ncid,
int varid,
const size_t *indexp,
const float *op);
1279nc_get_var1_float(
int ncid,
int varid,
const size_t *indexp,
float *ip);
1282nc_put_var1_double(
int ncid,
int varid,
const size_t *indexp,
const double *op);
1285nc_get_var1_double(
int ncid,
int varid,
const size_t *indexp,
double *ip);
1288nc_put_var1_ushort(
int ncid,
int varid,
const size_t *indexp,
1289 const unsigned short *op);
1292nc_get_var1_ushort(
int ncid,
int varid,
const size_t *indexp,
1293 unsigned short *ip);
1296nc_put_var1_uint(
int ncid,
int varid,
const size_t *indexp,
1297 const unsigned int *op);
1300nc_get_var1_uint(
int ncid,
int varid,
const size_t *indexp,
1304nc_put_var1_longlong(
int ncid,
int varid,
const size_t *indexp,
1305 const long long *op);
1308nc_get_var1_longlong(
int ncid,
int varid,
const size_t *indexp,
1312nc_put_var1_ulonglong(
int ncid,
int varid,
const size_t *indexp,
1313 const unsigned long long *op);
1316nc_get_var1_ulonglong(
int ncid,
int varid,
const size_t *indexp,
1317 unsigned long long *ip);
1320nc_put_var1_string(
int ncid,
int varid,
const size_t *indexp,
1324nc_get_var1_string(
int ncid,
int varid,
const size_t *indexp,
1331nc_put_vara_text(
int ncid,
int varid,
const size_t *startp,
1332 const size_t *countp,
const char *op);
1335nc_get_vara_text(
int ncid,
int varid,
const size_t *startp,
1336 const size_t *countp,
char *ip);
1339nc_put_vara_uchar(
int ncid,
int varid,
const size_t *startp,
1340 const size_t *countp,
const unsigned char *op);
1343nc_get_vara_uchar(
int ncid,
int varid,
const size_t *startp,
1344 const size_t *countp,
unsigned char *ip);
1347nc_put_vara_schar(
int ncid,
int varid,
const size_t *startp,
1348 const size_t *countp,
const signed char *op);
1351nc_get_vara_schar(
int ncid,
int varid,
const size_t *startp,
1352 const size_t *countp,
signed char *ip);
1355nc_put_vara_short(
int ncid,
int varid,
const size_t *startp,
1356 const size_t *countp,
const short *op);
1359nc_get_vara_short(
int ncid,
int varid,
const size_t *startp,
1360 const size_t *countp,
short *ip);
1363nc_put_vara_int(
int ncid,
int varid,
const size_t *startp,
1364 const size_t *countp,
const int *op);
1367nc_get_vara_int(
int ncid,
int varid,
const size_t *startp,
1368 const size_t *countp,
int *ip);
1371nc_put_vara_long(
int ncid,
int varid,
const size_t *startp,
1372 const size_t *countp,
const long *op);
1375nc_get_vara_long(
int ncid,
int varid,
1376 const size_t *startp,
const size_t *countp,
long *ip);
1379nc_put_vara_float(
int ncid,
int varid,
1380 const size_t *startp,
const size_t *countp,
const float *op);
1383nc_get_vara_float(
int ncid,
int varid,
1384 const size_t *startp,
const size_t *countp,
float *ip);
1387nc_put_vara_double(
int ncid,
int varid,
const size_t *startp,
1388 const size_t *countp,
const double *op);
1391nc_get_vara_double(
int ncid,
int varid,
const size_t *startp,
1392 const size_t *countp,
double *ip);
1395nc_put_vara_ushort(
int ncid,
int varid,
const size_t *startp,
1396 const size_t *countp,
const unsigned short *op);
1399nc_get_vara_ushort(
int ncid,
int varid,
const size_t *startp,
1400 const size_t *countp,
unsigned short *ip);
1403nc_put_vara_uint(
int ncid,
int varid,
const size_t *startp,
1404 const size_t *countp,
const unsigned int *op);
1407nc_get_vara_uint(
int ncid,
int varid,
const size_t *startp,
1408 const size_t *countp,
unsigned int *ip);
1411nc_put_vara_longlong(
int ncid,
int varid,
const size_t *startp,
1412 const size_t *countp,
const long long *op);
1415nc_get_vara_longlong(
int ncid,
int varid,
const size_t *startp,
1416 const size_t *countp,
long long *ip);
1419nc_put_vara_ulonglong(
int ncid,
int varid,
const size_t *startp,
1420 const size_t *countp,
const unsigned long long *op);
1423nc_get_vara_ulonglong(
int ncid,
int varid,
const size_t *startp,
1424 const size_t *countp,
unsigned long long *ip);
1427nc_put_vara_string(
int ncid,
int varid,
const size_t *startp,
1428 const size_t *countp,
const char **op);
1431nc_get_vara_string(
int ncid,
int varid,
const size_t *startp,
1432 const size_t *countp,
char **ip);
1438nc_put_vars_text(
int ncid,
int varid,
1439 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1443nc_get_vars_text(
int ncid,
int varid,
1444 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1448nc_put_vars_uchar(
int ncid,
int varid,
1449 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1450 const unsigned char *op);
1453nc_get_vars_uchar(
int ncid,
int varid,
1454 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1458nc_put_vars_schar(
int ncid,
int varid,
1459 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1460 const signed char *op);
1463nc_get_vars_schar(
int ncid,
int varid,
1464 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1468nc_put_vars_short(
int ncid,
int varid,
1469 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1473nc_get_vars_short(
int ncid,
int varid,
const size_t *startp,
1474 const size_t *countp,
const ptrdiff_t *stridep,
1478nc_put_vars_int(
int ncid,
int varid,
1479 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1483nc_get_vars_int(
int ncid,
int varid,
1484 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1488nc_put_vars_long(
int ncid,
int varid,
1489 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1493nc_get_vars_long(
int ncid,
int varid,
1494 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1498nc_put_vars_float(
int ncid,
int varid,
1499 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1503nc_get_vars_float(
int ncid,
int varid,
1504 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1508nc_put_vars_double(
int ncid,
int varid,
1509 const size_t *startp,
const size_t *countp,
const ptrdiff_t *stridep,
1513nc_get_vars_double(
int ncid,
int varid,
const size_t *startp,
1514 const size_t *countp,
const ptrdiff_t *stridep,
1518nc_put_vars_ushort(
int ncid,
int varid,
const size_t *startp,
1519 const size_t *countp,
const ptrdiff_t *stridep,
1520 const unsigned short *op);
1523nc_get_vars_ushort(
int ncid,
int varid,
const size_t *startp,
1524 const size_t *countp,
const ptrdiff_t *stridep,
1525 unsigned short *ip);
1528nc_put_vars_uint(
int ncid,
int varid,
const size_t *startp,
1529 const size_t *countp,
const ptrdiff_t *stridep,
1530 const unsigned int *op);
1533nc_get_vars_uint(
int ncid,
int varid,
const size_t *startp,
1534 const size_t *countp,
const ptrdiff_t *stridep,
1538nc_put_vars_longlong(
int ncid,
int varid,
const size_t *startp,
1539 const size_t *countp,
const ptrdiff_t *stridep,
1540 const long long *op);
1543nc_get_vars_longlong(
int ncid,
int varid,
const size_t *startp,
1544 const size_t *countp,
const ptrdiff_t *stridep,
1548nc_put_vars_ulonglong(
int ncid,
int varid,
const size_t *startp,
1549 const size_t *countp,
const ptrdiff_t *stridep,
1550 const unsigned long long *op);
1553nc_get_vars_ulonglong(
int ncid,
int varid,
const size_t *startp,
1554 const size_t *countp,
const ptrdiff_t *stridep,
1555 unsigned long long *ip);
1558nc_put_vars_string(
int ncid,
int varid,
const size_t *startp,
1559 const size_t *countp,
const ptrdiff_t *stridep,
1563nc_get_vars_string(
int ncid,
int varid,
const size_t *startp,
1564 const size_t *countp,
const ptrdiff_t *stridep,
1571nc_put_varm_text(
int ncid,
int varid,
const size_t *startp,
1572 const size_t *countp,
const ptrdiff_t *stridep,
1573 const ptrdiff_t *imapp,
const char *op);
1576nc_get_varm_text(
int ncid,
int varid,
const size_t *startp,
1577 const size_t *countp,
const ptrdiff_t *stridep,
1578 const ptrdiff_t *imapp,
char *ip);
1581nc_put_varm_uchar(
int ncid,
int varid,
const size_t *startp,
1582 const size_t *countp,
const ptrdiff_t *stridep,
1583 const ptrdiff_t *imapp,
const unsigned char *op);
1586nc_get_varm_uchar(
int ncid,
int varid,
const size_t *startp,
1587 const size_t *countp,
const ptrdiff_t *stridep,
1588 const ptrdiff_t *imapp,
unsigned char *ip);
1591nc_put_varm_schar(
int ncid,
int varid,
const size_t *startp,
1592 const size_t *countp,
const ptrdiff_t *stridep,
1593 const ptrdiff_t *imapp,
const signed char *op);
1596nc_get_varm_schar(
int ncid,
int varid,
const size_t *startp,
1597 const size_t *countp,
const ptrdiff_t *stridep,
1598 const ptrdiff_t *imapp,
signed char *ip);
1601nc_put_varm_short(
int ncid,
int varid,
const size_t *startp,
1602 const size_t *countp,
const ptrdiff_t *stridep,
1603 const ptrdiff_t *imapp,
const short *op);
1606nc_get_varm_short(
int ncid,
int varid,
const size_t *startp,
1607 const size_t *countp,
const ptrdiff_t *stridep,
1608 const ptrdiff_t *imapp,
short *ip);
1611nc_put_varm_int(
int ncid,
int varid,
const size_t *startp,
1612 const size_t *countp,
const ptrdiff_t *stridep,
1613 const ptrdiff_t *imapp,
const int *op);
1616nc_get_varm_int(
int ncid,
int varid,
const size_t *startp,
1617 const size_t *countp,
const ptrdiff_t *stridep,
1618 const ptrdiff_t *imapp,
int *ip);
1621nc_put_varm_long(
int ncid,
int varid,
const size_t *startp,
1622 const size_t *countp,
const ptrdiff_t *stridep,
1623 const ptrdiff_t *imapp,
const long *op);
1626nc_get_varm_long(
int ncid,
int varid,
const size_t *startp,
1627 const size_t *countp,
const ptrdiff_t *stridep,
1628 const ptrdiff_t *imapp,
long *ip);
1631nc_put_varm_float(
int ncid,
int varid,
const size_t *startp,
1632 const size_t *countp,
const ptrdiff_t *stridep,
1633 const ptrdiff_t *imapp,
const float *op);
1636nc_get_varm_float(
int ncid,
int varid,
const size_t *startp,
1637 const size_t *countp,
const ptrdiff_t *stridep,
1638 const ptrdiff_t *imapp,
float *ip);
1641nc_put_varm_double(
int ncid,
int varid,
const size_t *startp,
1642 const size_t *countp,
const ptrdiff_t *stridep,
1643 const ptrdiff_t *imapp,
const double *op);
1646nc_get_varm_double(
int ncid,
int varid,
const size_t *startp,
1647 const size_t *countp,
const ptrdiff_t *stridep,
1648 const ptrdiff_t * imapp,
double *ip);
1651nc_put_varm_ushort(
int ncid,
int varid,
const size_t *startp,
1652 const size_t *countp,
const ptrdiff_t *stridep,
1653 const ptrdiff_t * imapp,
const unsigned short *op);
1656nc_get_varm_ushort(
int ncid,
int varid,
const size_t *startp,
1657 const size_t *countp,
const ptrdiff_t *stridep,
1658 const ptrdiff_t * imapp,
unsigned short *ip);
1661nc_put_varm_uint(
int ncid,
int varid,
const size_t *startp,
1662 const size_t *countp,
const ptrdiff_t *stridep,
1663 const ptrdiff_t * imapp,
const unsigned int *op);
1666nc_get_varm_uint(
int ncid,
int varid,
const size_t *startp,
1667 const size_t *countp,
const ptrdiff_t *stridep,
1668 const ptrdiff_t * imapp,
unsigned int *ip);
1671nc_put_varm_longlong(
int ncid,
int varid,
const size_t *startp,
1672 const size_t *countp,
const ptrdiff_t *stridep,
1673 const ptrdiff_t * imapp,
const long long *op);
1676nc_get_varm_longlong(
int ncid,
int varid,
const size_t *startp,
1677 const size_t *countp,
const ptrdiff_t *stridep,
1678 const ptrdiff_t * imapp,
long long *ip);
1681nc_put_varm_ulonglong(
int ncid,
int varid,
const size_t *startp,
1682 const size_t *countp,
const ptrdiff_t *stridep,
1683 const ptrdiff_t * imapp,
const unsigned long long *op);
1686nc_get_varm_ulonglong(
int ncid,
int varid,
const size_t *startp,
1687 const size_t *countp,
const ptrdiff_t *stridep,
1688 const ptrdiff_t * imapp,
unsigned long long *ip);
1691nc_put_varm_string(
int ncid,
int varid,
const size_t *startp,
1692 const size_t *countp,
const ptrdiff_t *stridep,
1693 const ptrdiff_t * imapp,
const char **op);
1696nc_get_varm_string(
int ncid,
int varid,
const size_t *startp,
1697 const size_t *countp,
const ptrdiff_t *stridep,
1698 const ptrdiff_t * imapp,
char **ip);
1704nc_put_var_text(
int ncid,
int varid,
const char *op);
1707nc_get_var_text(
int ncid,
int varid,
char *ip);
1710nc_put_var_uchar(
int ncid,
int varid,
const unsigned char *op);
1713nc_get_var_uchar(
int ncid,
int varid,
unsigned char *ip);
1716nc_put_var_schar(
int ncid,
int varid,
const signed char *op);
1719nc_get_var_schar(
int ncid,
int varid,
signed char *ip);
1722nc_put_var_short(
int ncid,
int varid,
const short *op);
1725nc_get_var_short(
int ncid,
int varid,
short *ip);
1728nc_put_var_int(
int ncid,
int varid,
const int *op);
1731nc_get_var_int(
int ncid,
int varid,
int *ip);
1734nc_put_var_long(
int ncid,
int varid,
const long *op);
1737nc_get_var_long(
int ncid,
int varid,
long *ip);
1740nc_put_var_float(
int ncid,
int varid,
const float *op);
1743nc_get_var_float(
int ncid,
int varid,
float *ip);
1746nc_put_var_double(
int ncid,
int varid,
const double *op);
1749nc_get_var_double(
int ncid,
int varid,
double *ip);
1752nc_put_var_ushort(
int ncid,
int varid,
const unsigned short *op);
1755nc_get_var_ushort(
int ncid,
int varid,
unsigned short *ip);
1758nc_put_var_uint(
int ncid,
int varid,
const unsigned int *op);
1761nc_get_var_uint(
int ncid,
int varid,
unsigned int *ip);
1764nc_put_var_longlong(
int ncid,
int varid,
const long long *op);
1767nc_get_var_longlong(
int ncid,
int varid,
long long *ip);
1770nc_put_var_ulonglong(
int ncid,
int varid,
const unsigned long long *op);
1773nc_get_var_ulonglong(
int ncid,
int varid,
unsigned long long *ip);
1776nc_put_var_string(
int ncid,
int varid,
const char **op);
1779nc_get_var_string(
int ncid,
int varid,
char **ip);
1833EXTERNL int nc_reclaim_data_all(
int ncid,
nc_type xtypeid,
void* memory,
size_t nelems);
1849EXTERNL int nc_copy_data_all(
int ncid,
nc_type xtypeid,
const void* memory,
size_t count,
void** copyp);
1856 size_t len,
const unsigned char *op);
1861nc_put_var1_ubyte(
int ncid,
int varid,
const size_t *indexp,
1862 const unsigned char *op);
1864nc_get_var1_ubyte(
int ncid,
int varid,
const size_t *indexp,
1867nc_put_vara_ubyte(
int ncid,
int varid,
const size_t *startp,
1868 const size_t *countp,
const unsigned char *op);
1870nc_get_vara_ubyte(
int ncid,
int varid,
const size_t *startp,
1871 const size_t *countp,
unsigned char *ip);
1873nc_put_vars_ubyte(
int ncid,
int varid,
const size_t *startp,
1874 const size_t *countp,
const ptrdiff_t *stridep,
1875 const unsigned char *op);
1877nc_get_vars_ubyte(
int ncid,
int varid,
const size_t *startp,
1878 const size_t *countp,
const ptrdiff_t *stridep,
1881nc_put_varm_ubyte(
int ncid,
int varid,
const size_t *startp,
1882 const size_t *countp,
const ptrdiff_t *stridep,
1883 const ptrdiff_t * imapp,
const unsigned char *op);
1885nc_get_varm_ubyte(
int ncid,
int varid,
const size_t *startp,
1886 const size_t *countp,
const ptrdiff_t *stridep,
1887 const ptrdiff_t * imapp,
unsigned char *ip);
1889nc_put_var_ubyte(
int ncid,
int varid,
const unsigned char *op);
1892nc_get_var_ubyte(
int ncid,
int varid,
unsigned char *ip);
1899nc_set_log_level(
int new_level);
1903#define NC_TURN_OFF_LOGGING (-1)
1913nc_delete(
const char *path);
1925nc__create_mp(
const char *path,
int cmode,
size_t initialsz,
int basepe,
1926 size_t *chunksizehintp,
int *ncidp);
1929nc__open_mp(
const char *path,
int mode,
int basepe,
1930 size_t *chunksizehintp,
int *ncidp);
1933nc_delete_mp(
const char *path,
int basepe);
1936nc_set_base_pe(
int ncid,
int pe);
1939nc_inq_base_pe(
int ncid,
int *pe);
1949#define FILL_BYTE NC_FILL_BYTE
1950#define FILL_CHAR NC_FILL_CHAR
1951#define FILL_SHORT NC_FILL_SHORT
1952#define FILL_LONG NC_FILL_INT
1953#define FILL_FLOAT NC_FILL_FLOAT
1954#define FILL_DOUBLE NC_FILL_DOUBLE
1956#define MAX_NC_DIMS NC_MAX_DIMS
1957#define MAX_NC_ATTRS NC_MAX_ATTRS
1958#define MAX_NC_VARS NC_MAX_VARS
1959#define MAX_NC_NAME NC_MAX_NAME
1960#define MAX_VAR_DIMS NC_MAX_VAR_DIMS
1969#define NC_ENTOOL NC_EMAXNAME
1970#define NC_EXDR (-32)
1971#define NC_SYSERR (-31)
1984nc_advise(
const char *cdf_routine_name,
int err,
const char *fmt,...);
1994nccreate(
const char* path,
int cmode);
1997ncopen(
const char* path,
int mode);
2018ncinquire(
int ncid,
int *ndimsp,
int *nvarsp,
int *nattsp,
int *unlimdimp);
2021ncdimdef(
int ncid,
const char *name,
long len);
2024ncdimid(
int ncid,
const char *name);
2027ncdiminq(
int ncid,
int dimid,
char *name,
long *lenp);
2030ncdimrename(
int ncid,
int dimid,
const char *name);
2034 int len,
const void *op);
2037ncattinq(
int ncid,
int varid,
const char *name,
nc_type *xtypep,
int *lenp);
2040ncattget(
int ncid,
int varid,
const char *name,
void *ip);
2043ncattcopy(
int ncid_in,
int varid_in,
const char *name,
int ncid_out,
2047ncattname(
int ncid,
int varid,
int attnum,
char *name);
2050ncattrename(
int ncid,
int varid,
const char *name,
const char *newname);
2053ncattdel(
int ncid,
int varid,
const char *name);
2057 int ndims,
const int *dimidsp);
2060ncvarid(
int ncid,
const char *name);
2064 int *ndimsp,
int *dimidsp,
int *nattsp);
2067ncvarput1(
int ncid,
int varid,
const long *indexp,
const void *op);
2070ncvarget1(
int ncid,
int varid,
const long *indexp,
void *ip);
2073ncvarput(
int ncid,
int varid,
const long *startp,
const long *countp,
2077ncvarget(
int ncid,
int varid,
const long *startp,
const long *countp,
2081ncvarputs(
int ncid,
int varid,
const long *startp,
const long *countp,
2082 const long *stridep,
const void *op);
2085ncvargets(
int ncid,
int varid,
const long *startp,
const long *countp,
2086 const long *stridep,
void *ip);
2089ncvarputg(
int ncid,
int varid,
const long *startp,
const long *countp,
2090 const long *stridep,
const long *imapp,
const void *op);
2093ncvargetg(
int ncid,
int varid,
const long *startp,
const long *countp,
2094 const long *stridep,
const long *imapp,
void *ip);
2097ncvarrename(
int ncid,
int varid,
const char *name);
2100ncrecinq(
int ncid,
int *nrecvarsp,
int *recvaridsp,
long *recsizesp);
2103ncrecget(
int ncid,
long recnum,
void **datap);
2106ncrecput(
int ncid,
long recnum,
void *
const *datap);
2111EXTERNL int nc_initialize(
void);
2122EXTERNL char* nc_rc_get(
const char* key);
2125EXTERNL int nc_rc_set(
const char* key,
const char* value);
2127#if defined(__cplusplus)
2137#ifndef NC_HAVE_RENAME_GRP
2138#define NC_HAVE_RENAME_GRP
2141#ifndef NC_HAVE_INQ_FORMAT_EXTENDED
2142#define NC_HAVE_INQ_FORMAT_EXTENDED
2145#define NC_HAVE_META_H
EXTERNL int nc_get_att_int(int ncid, int varid, const char *name, int *ip)
Get an attribute array of type int.
EXTERNL int nc_get_att_string(int ncid, int varid, const char *name, char **ip)
Get an attribute array of type string.
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.
EXTERNL int nc_get_att(int ncid, int varid, const char *name, void *ip)
Get an attribute of any type.
EXTERNL int nc_get_att_float(int ncid, int varid, const char *name, float *ip)
Get an attribute array of type float.
EXTERNL int nc_get_att_long(int ncid, int varid, const char *name, long *ip)
Get an attribute array of type long.
EXTERNL int nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip)
Get an attribute of an signed char type.
EXTERNL int nc_inq_attid(int ncid, int varid, const char *name, int *idp)
Find an attribute ID.
EXTERNL int nc_get_att_longlong(int ncid, int varid, const char *name, long long *ip)
Get an attribute array of type long long.
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.
EXTERNL int nc_get_att_ubyte(int ncid, int varid, const char *name, unsigned char *ip)
Get an attribute array of type unsigned char.
EXTERNL int nc_put_att_string(int ncid, int varid, const char *name, size_t len, const char **op)
Write a string attribute.
EXTERNL int nc_inq_natts(int ncid, int *nattsp)
Find number of global or group attributes.
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.
EXTERNL int nc_put_att_text(int ncid, int varid, const char *name, size_t len, const char *op)
Write a text attribute.
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.
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.
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.
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.
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.
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.
EXTERNL int nc_get_att_text(int ncid, int varid, const char *name, char *ip)
Get a text attribute.
EXTERNL int nc_get_att_short(int ncid, int varid, const char *name, short *ip)
Get an attribute array of type short.
EXTERNL int nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
Return information about a netCDF attribute.
EXTERNL int nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip)
Get an attribute of an signed char type.
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.
EXTERNL int nc_get_att_double(int ncid, int varid, const char *name, double *ip)
Get an attribute array of type double.
EXTERNL int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
Find the type of an attribute.
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.
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.
EXTERNL int nc_del_att(int ncid, int varid, const char *name)
Delete an attribute.
EXTERNL int nc_rename_att(int ncid, int varid, const char *name, const char *newname)
Rename an attribute.
EXTERNL int nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *ip)
Get an attribute array of type unsigned short.
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.
EXTERNL int nc_inq_attname(int ncid, int varid, int attnum, char *name)
Find the name of an attribute.
EXTERNL int nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
Find the length of an attribute.
EXTERNL int nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *ip)
Get an attribute array of type unsigned int.
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.
EXTERNL int nc_inq_user_format(int mode_flag, NC_Dispatch **dispatch_table, char *magic_number)
Inquire about user-defined format.
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.
EXTERNL int nc_close(int ncid)
Close an open netCDF dataset.
EXTERNL int nc_abort(int ncid)
No longer necessary for user to invoke manually.
EXTERNL int nc_create(const char *path, int cmode, int *ncidp)
Create a new netCDF file.
EXTERNL int nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
Inquire about a file or group.
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.
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.
EXTERNL int nc_set_fill(int ncid, int fillmode, int *old_modep)
Change the fill-value mode to improve write performance.
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.
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.
EXTERNL int nc_def_user_format(int mode_flag, NC_Dispatch *dispatch_table, char *magic_number)
Add handling of user-defined format.
EXTERNL int nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp)
Get current netCDF chunk cache settings.
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
EXTERNL int nc_enddef(int ncid)
Leave define mode.
EXTERNL int nc_redef(int ncid)
Put open netcdf dataset into define mode.
EXTERNL int nc_open(const char *path, int mode, int *ncidp)
Open an existing netCDF file.
EXTERNL int nc_set_chunk_cache(size_t size, size_t nelems, float preemption)
Set chunk cache size.
EXTERNL int nc_inq_format(int ncid, int *formatp)
Inquire about the binary format of a netCDF file as presented by the API.
EXTERNL int nc_sync(int ncid)
Synchronize an open netcdf dataset to disk.
EXTERNL int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
EXTERNL int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
EXTERNL int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
EXTERNL int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
EXTERNL int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
EXTERNL int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
EXTERNL int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
EXTERNL int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
EXTERNL const char * nc_strerror(int ncerr)
Given an error number, return an error message.
EXTERNL int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
Retrieve a list of types associated with a group.
EXTERNL int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
Retrieve a list of dimension ids associated with a group.
EXTERNL int nc_inq_grps(int ncid, int *numgrps, int *ncids)
Get a list of groups or subgroups from a file or groupID.
EXTERNL int nc_show_metadata(int ncid)
Print the metadata for a file.
EXTERNL int nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
Get the full ncid given a group name.
EXTERNL int nc_inq_grpname(int ncid, char *name)
Get the name of a group given an ID.
EXTERNL int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
Return the group ID for a group given the name.
EXTERNL int nc_inq_varids(int ncid, int *nvars, int *varids)
Get a list of varids associated with a group given a group ID.
EXTERNL int nc_inq_grp_parent(int ncid, int *parent_ncid)
Get the ID of the parent based on a group ID.
EXTERNL int nc_inq_grpname_len(int ncid, size_t *lenp)
Get the length of a group name given an ID.
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.
EXTERNL int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
Define a new group.
EXTERNL int nc_rename_grp(int grpid, const char *name)
Rename a group.
EXTERNL int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
Get a group ncid given the group name.
EXTERNL int nc_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
Create an enum type.
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.
EXTERNL int nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int *equal)
Learn if two types are equal.
EXTERNL int nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, size_t *nfieldsp)
Learn about a compound type.
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.
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.
EXTERNL int nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep)
Create an opaque type.
EXTERNL int nc_inq_compound_name(int ncid, nc_type xtype, char *name)
Learn the name of a compound type.
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.
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.
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.
EXTERNL int nc_free_vlen(nc_vlen_t *vl)
Free memory in a single VLEN object.
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.
EXTERNL int nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
Learn about an opaque type.
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.
EXTERNL int nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
Create a compound type.
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.
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.
EXTERNL int nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
Learn the number of fields in a compound type.
EXTERNL int nc_insert_enum(int ncid, nc_type xtype, const char *name, const void *value)
Insert a named member into a enum type.
EXTERNL int nc_inq_typeid(int ncid, const char *name, nc_type *typeidp)
Find a type by name.
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.
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.
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.
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.
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.
EXTERNL int nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep)
Learn the size of a compound type.
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.
EXTERNL int ncvardef(int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp)
Define a variable.
EXTERNL int ncclose(int ncid)
Close a file.
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.
EXTERNL int ncattget(int ncid, int varid, const char *name, void *ip)
Read an attribute.
EXTERNL int ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp)
Learn about an attribute.
EXTERNL int ncattrename(int ncid, int varid, const char *name, const char *newname)
Rename an attribute.
EXTERNL int ncattname(int ncid, int varid, int attnum, char *name)
Learn attribute name from its number.
EXTERNL int ncvarput1(int ncid, int varid, const long *indexp, const void *op)
Write 1 data value.
EXTERNL int ncvarid(int ncid, const char *name)
Learn a variable ID from the name.
EXTERNL int nccreate(const char *path, int cmode)
Create a netCDF file.
EXTERNL int ncendef(int ncid)
End define mode for file.
EXTERNL int ncopen(const char *path, int mode)
Open a netCDF file.
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...
EXTERNL int ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out)
Copy an attribute.
EXTERNL int ncdimrename(int ncid, int dimid, const char *name)
Rename a dimension.
EXTERNL int ncattdel(int ncid, int varid, const char *name)
Delete an attribute.
EXTERNL int ncvarputs(int ncid, int varid, const long *startp, const long *countp, const long *stridep, const void *op)
Write strided data.
EXTERNL int ncvarput(int ncid, int varid, const long *startp, const long *countp, const void *op)
Write some data.
EXTERNL int ncdiminq(int ncid, int dimid, char *name, long *lenp)
Learn about a dimension.
EXTERNL int ncvarget1(int ncid, int varid, const long *indexp, void *ip)
Read 1 data value.
EXTERNL int ncvargetg(int ncid, int varid, const long *startp, const long *countp, const long *stridep, const long *imapp, void *ip)
Read mapped data.
EXTERNL int ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp)
Learn about a file.
EXTERNL int ncvarinq(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
Learn about a variable.
EXTERNL int ncattput(int ncid, int varid, const char *name, nc_type xtype, int len, const void *op)
Write an attribute.
EXTERNL void nc_advise(const char *cdf_routine_name, int err, const char *fmt,...)
Show an error message and exit (based on ncopts).
EXTERNL int ncabort(int ncid)
Abort defining a file.
EXTERNL int ncsync(int ncid)
Sync a file.
EXTERNL int ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp)
Learn record variables and the lengths of the record dimension.
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...
EXTERNL int ncsetfill(int ncid, int fillmode)
Set the fill mode.
EXTERNL int ncdimdef(int ncid, const char *name, long len)
Define a dimension.
EXTERNL int ncvarget(int ncid, int varid, const long *startp, const long *countp, void *ip)
Read some data.
EXTERNL int ncvargets(int ncid, int varid, const long *startp, const long *countp, const long *stridep, void *ip)
Read strided data.
EXTERNL int ncredef(int ncid)
Put file in define mode.
EXTERNL int ncvarrename(int ncid, int varid, const char *name)
Rename a variable.
EXTERNL int ncdimid(int ncid, const char *name)
Find dimension ID from name.
EXTERNL int nc_inq_var_endian(int ncid, int varid, int *endianp)
Find the endianness of a variable.
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
Learn how many dimensions are associated with a variable.
EXTERNL int nc_def_var_endian(int ncid, int varid, int endian)
Define endianness of a variable.
EXTERNL int nc_inq_varname(int ncid, int varid, char *name)
Learn the name of a variable.
EXTERNL int nc_free_string(size_t nelems, char **data)
Free string space allocated by the library.
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.
EXTERNL int nc_def_var_szip(int ncid, int varid, int options_mask, int pixels_per_block)
Set szip compression settings on a variable.
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.
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.
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.
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
EXTERNL int nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
Learn the checksum settings for a variable.
EXTERNL int nc_inq_varid(int ncid, const char *name, int *varidp)
Find the ID of a variable, from the name.
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.
EXTERNL int nc_inq_varnatts(int ncid, int varid, int *nattsp)
Learn how many attributes are associated with a variable.
EXTERNL int nc_put_var(int ncid, int varid, const void *op)
Write an entire variable with one call.
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.
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.
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.
EXTERNL int nc_def_var_fletcher32(int ncid, int varid, int fletcher32)
Set checksum for a var.
EXTERNL int nc_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd)
Turn on quantization for a variable.
EXTERNL int nc_get_var(int ncid, int varid, void *ip)
Read an entire variable in one call.
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.
EXTERNL int nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
Learn about a variable.
EXTERNL int nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp)
Learn the szip settings of a variable.
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.
EXTERNL int nc_inq_vardimid(int ncid, int varid, int *dimidsp)
Learn the dimension IDs associated with a variable.
EXTERNL int nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
Read a single datum from a variable.
EXTERNL int nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
Set the fill value for a variable.
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.
EXTERNL int nc_def_var(int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp)
Define a new variable.
EXTERNL int nc_rename_var(int ncid, int varid, const char *name)
Rename a variable.
EXTERNL int nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
Write one datum.
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.
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.
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.
EXTERNL int nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep)
Learn the fill mode of a variable.
EXTERNL int nc_inq_nvars(int ncid, int *nvarsp)
Learn the number of variables in a file or group.
EXTERNL const char * nc_inq_libvers(void)
Return the library version.
void * p
Pointer to VL data.
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)
EXTERNL int nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
Return number and list of unlimited dimensions.
#define EXTERNL
Needed for DLL build.
EXTERNL int ncopts
V2 API error handling.
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.
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.
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...
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.
int nc_type
The nc_type type is just an int.
This is the type of arrays of vlens.