nc4dispatch.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*********************************************************************
  2. * Copyright 2010, UCAR/Unidata. See netcdf/COPYRIGHT file for copying
  3. * and redistribution conditions.
  4. *
  5. * This header file contains the prototypes for the netCDF-4 versions
  6. * of all the netCDF functions.
  7. *********************************************************************/
  8. #ifndef _NC4DISPATCH_H
  9. #define _NC4DISPATCH_H
  10. #include "config.h"
  11. #include <stddef.h> /* size_t, ptrdiff_t */
  12. #include <errno.h> /* netcdf functions sometimes return system errors */
  13. #include "ncdispatch.h"
  14. #if defined(__cplusplus)
  15. extern "C" {
  16. #endif
  17. extern int
  18. NC4_create(const char *path, int cmode,
  19. size_t initialsz, int basepe, size_t *chunksizehintp,
  20. int useparallel, void* parameters,
  21. NC_Dispatch*, NC**);
  22. extern int
  23. NC4_open(const char *path, int mode,
  24. int basepe, size_t *chunksizehintp,
  25. int use_parallel, void* parameters,
  26. NC_Dispatch*, NC**);
  27. extern int
  28. NC4_new_nc(NC**);
  29. extern int
  30. NC4_free_nc(NC*);
  31. extern int
  32. NC4_redef(int ncid);
  33. extern int
  34. NC4__enddef(int ncid, size_t h_minfree, size_t v_align,
  35. size_t v_minfree, size_t r_align);
  36. extern int
  37. NC4_sync(int ncid);
  38. extern int
  39. NC4_abort(int ncid);
  40. extern int
  41. NC4_close(int ncid);
  42. extern int
  43. NC4_set_fill(int ncid, int fillmode, int *old_modep);
  44. extern int
  45. NC4_set_base_pe(int ncid, int pe);
  46. extern int
  47. NC4_inq_base_pe(int ncid, int *pe);
  48. extern int
  49. NC4_inq_format(int ncid, int *formatp);
  50. extern int
  51. NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
  52. extern int
  53. NC4_inq_type(int, nc_type, char *, size_t *);
  54. /* Begin _dim */
  55. extern int
  56. NC4_def_dim(int ncid, const char *name, size_t len, int *idp);
  57. extern int
  58. NC4_inq_dimid(int ncid, const char *name, int *idp);
  59. extern int
  60. NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
  61. extern int
  62. NC4_inq_unlimdim(int ncid, int *unlimdimidp);
  63. extern int
  64. NC4_rename_dim(int ncid, int dimid, const char *name);
  65. /* End _dim */
  66. /* Begin _att */
  67. extern int
  68. NC4_inq_att(int ncid, int varid, const char *name,
  69. nc_type *xtypep, size_t *lenp);
  70. extern int
  71. NC4_inq_attid(int ncid, int varid, const char *name, int *idp);
  72. extern int
  73. NC4_inq_attname(int ncid, int varid, int attnum, char *name);
  74. extern int
  75. NC4_rename_att(int ncid, int varid, const char *name, const char *newname);
  76. extern int
  77. NC4_del_att(int ncid, int varid, const char*);
  78. /* End _att */
  79. /* Begin {put,get}_att */
  80. extern int
  81. NC4_get_att(int ncid, int varid, const char *name, void *value, nc_type);
  82. extern int
  83. NC4_put_att(int ncid, int varid, const char *name, nc_type datatype,
  84. size_t len, const void *value, nc_type);
  85. /* End {put,get}_att */
  86. /* Begin _var */
  87. extern int
  88. NC4_def_var(int ncid, const char *name,
  89. nc_type xtype, int ndims, const int *dimidsp, int *varidp);
  90. extern int
  91. NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
  92. int *ndimsp, int *dimidsp, int *nattsp,
  93. int *shufflep, int *deflatep, int *deflate_levelp,
  94. int *fletcher32p, int *contiguousp, size_t *chunksizesp,
  95. int *no_fill, void *fill_valuep, int *endiannessp,
  96. int *options_maskp, int *pixels_per_blockp);
  97. extern int
  98. NC4_inq_varid(int ncid, const char *name, int *varidp);
  99. extern int
  100. NC4_rename_var(int ncid, int varid, const char *name);
  101. extern int
  102. NC4_put_vara(int ncid, int varid,
  103. const size_t *start, const size_t *count,
  104. const void *value, nc_type);
  105. extern int
  106. NC4_get_vara(int ncid, int varid,
  107. const size_t *start, const size_t *count,
  108. void *value, nc_type);
  109. /* End _var */
  110. /* netCDF4 API only */
  111. extern int
  112. NC4_var_par_access(int, int, int);
  113. extern int
  114. NC4_inq_ncid(int, const char *, int *);
  115. extern int
  116. NC4_inq_grps(int, int *, int *);
  117. extern int
  118. NC4_inq_grpname(int, char *);
  119. extern int
  120. NC4_inq_grpname_full(int, size_t *, char *);
  121. extern int
  122. NC4_inq_grp_parent(int, int *);
  123. extern int
  124. NC4_inq_grp_full_ncid(int, const char *, int *);
  125. extern int
  126. NC4_inq_varids(int, int * nvars, int *);
  127. extern int
  128. NC4_inq_dimids(int, int * ndims, int *, int);
  129. extern int
  130. NC4_inq_typeids(int, int * ntypes, int *);
  131. extern int
  132. NC4_inq_type_equal(int, nc_type, int, nc_type, int *);
  133. extern int
  134. NC4_def_grp(int, const char *, int *);
  135. extern int
  136. NC4_inq_user_type(int, nc_type, char *, size_t *, nc_type *,
  137. size_t *, int *);
  138. extern int
  139. NC4_def_compound(int, size_t, const char *, nc_type *);
  140. extern int
  141. NC4_insert_compound(int, nc_type, const char *, size_t, nc_type);
  142. extern int
  143. NC4_insert_array_compound(int, nc_type, const char *, size_t,
  144. nc_type, int, const int *);
  145. extern int
  146. NC4_inq_typeid(int, const char *, nc_type *);
  147. extern int
  148. NC4_inq_compound_field(int, nc_type, int, char *, size_t *,
  149. nc_type *, int *, int *);
  150. extern int
  151. NC4_inq_compound_fieldindex(int, nc_type, const char *, int *);
  152. extern int
  153. NC4_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
  154. extern int
  155. NC4_put_vlen_element(int, int, void *, size_t, const void *);
  156. extern int
  157. NC4_get_vlen_element(int, int, const void *, size_t *, void *);
  158. extern int
  159. NC4_def_enum(int, nc_type, const char *, nc_type *);
  160. extern int
  161. NC4_insert_enum(int, nc_type, const char *, const void *);
  162. extern int
  163. NC4_inq_enum_member(int, nc_type, int, char *, void *);
  164. extern int
  165. NC4_inq_enum_ident(int, nc_type, long long, char *);
  166. extern int
  167. NC4_def_opaque(int, size_t, const char *, nc_type *);
  168. extern int
  169. NC4_def_var_deflate(int, int, int, int, int);
  170. extern int
  171. NC4_def_var_fletcher32(int, int, int);
  172. extern int
  173. NC4_def_var_chunking(int, int, int, const size_t *);
  174. extern int
  175. NC4_def_var_fill(int, int, int, const void *);
  176. extern int
  177. NC4_def_var_endian(int, int, int);
  178. extern int
  179. NC4_set_var_chunk_cache(int, int, size_t, size_t, float);
  180. extern int
  181. NC4_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
  182. extern int
  183. NC4_inq_unlimdims(int, int *, int *);
  184. extern int
  185. NC4_show_metadata(int);
  186. extern int
  187. NC4_initialize(void);
  188. #if defined(__cplusplus)
  189. }
  190. #endif
  191. #endif /*_NC4DISPATCH_H */