nc3dispatch.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /*
  2. * Copyright 1993-1996 University Corporation for Atmospheric Research/Unidata
  3. *
  4. * Portions of this software were developed by the Unidata Program at the
  5. * University Corporation for Atmospheric Research.
  6. *
  7. * Access and use of this software shall impose the following obligations
  8. * and understandings on the user. The user is granted the right, without
  9. * any fee or cost, to use, copy, modify, alter, enhance and distribute
  10. * this software, and any derivative works thereof, and its supporting
  11. * documentation for any purpose whatsoever, provided that this entire
  12. * notice appears in all copies of the software, derivative works and
  13. * supporting documentation. Further, UCAR requests that the user credit
  14. * UCAR/Unidata in any publications that result from the use of this
  15. * software or in any product that includes this software. The names UCAR
  16. * and/or Unidata, however, may not be used in any advertising or publicity
  17. * to endorse or promote any products or commercial entity unless specific
  18. * written permission is obtained from UCAR/Unidata. The user also
  19. * understands that UCAR/Unidata is not obligated to provide the user with
  20. * any support, consulting, training or assistance of any kind with regard
  21. * to the use, operation and performance of this software nor to provide
  22. * the user with any updates, revisions, new versions or "bug fixes."
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
  25. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  26. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL,
  28. * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
  29. * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  30. * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  31. * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
  32. */
  33. /* "$Id: nc3dispatch.h,v 2.8 2010/05/26 18:11:08 dmh Exp $" */
  34. #ifndef _NC3DISPATCH_H
  35. #define _NC3DISPATCH_H
  36. #include <stddef.h> /* size_t, ptrdiff_t */
  37. #include "netcdf.h"
  38. #include "ncdispatch.h"
  39. #if defined(__cplusplus)
  40. extern "C" {
  41. #endif
  42. /*
  43. * The Interface
  44. */
  45. /* WARNING: this signature differs from external nc_create API*/
  46. EXTERNL int
  47. NC3_create(const char *path, int cmode,
  48. size_t initialsz, int basepe, size_t *chunksizehintp,
  49. int useparallel, void* mpidata,
  50. struct NC_Dispatch*, NC** ncp);
  51. /* WARNING: this signature differs from external nc_open API*/
  52. EXTERNL int
  53. NC3_open(const char *path, int mode,
  54. int basepe, size_t *chunksizehintp,
  55. int use_parallel, void* mpidata,
  56. NC_Dispatch*, NC** ncp);
  57. EXTERNL int
  58. NC3_new_nc(NC**);
  59. EXTERNL int
  60. NC3_redef(int ncid);
  61. EXTERNL int
  62. NC3__enddef(int ncid, size_t h_minfree, size_t v_align,
  63. size_t v_minfree, size_t r_align);
  64. EXTERNL int
  65. NC3_sync(int ncid);
  66. EXTERNL int
  67. NC3_abort(int ncid);
  68. EXTERNL int
  69. NC3_close(int ncid);
  70. EXTERNL int
  71. NC3_set_fill(int ncid, int fillmode, int *old_modep);
  72. EXTERNL int
  73. NC3_set_base_pe(int ncid, int pe);
  74. EXTERNL int
  75. NC3_inq_base_pe(int ncid, int *pe);
  76. EXTERNL int
  77. NC3_inq_format(int ncid, int *formatp);
  78. EXTERNL int
  79. NC3_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
  80. EXTERNL int
  81. NC3_inq_type(int, nc_type, char *, size_t *);
  82. /* Begin _dim */
  83. EXTERNL int
  84. NC3_def_dim(int ncid, const char *name, size_t len, int *idp);
  85. EXTERNL int
  86. NC3_inq_dimid(int ncid, const char *name, int *idp);
  87. EXTERNL int
  88. NC3_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
  89. EXTERNL int
  90. NC3_inq_unlimdim(int ncid, int *unlimdimidp);
  91. EXTERNL int
  92. NC3_rename_dim(int ncid, int dimid, const char *name);
  93. /* End _dim */
  94. /* Begin _att */
  95. EXTERNL int
  96. NC3_inq_att(int ncid, int varid, const char *name,
  97. nc_type *xtypep, size_t *lenp);
  98. EXTERNL int
  99. NC3_inq_attid(int ncid, int varid, const char *name, int *idp);
  100. EXTERNL int
  101. NC3_inq_attname(int ncid, int varid, int attnum, char *name);
  102. EXTERNL int
  103. NC3_rename_att(int ncid, int varid, const char *name, const char *newname);
  104. EXTERNL int
  105. NC3_del_att(int ncid, int varid, const char*);
  106. /* End _att */
  107. /* Begin {put,get}_att */
  108. EXTERNL int
  109. NC3_get_att(int ncid, int varid, const char *name, void *value, nc_type);
  110. EXTERNL int
  111. NC3_put_att(int ncid, int varid, const char *name, nc_type datatype,
  112. size_t len, const void *value, nc_type);
  113. /* End {put,get}_att */
  114. /* Begin _var */
  115. EXTERNL int
  116. NC3_def_var(int ncid, const char *name,
  117. nc_type xtype, int ndims, const int *dimidsp, int *varidp);
  118. EXTERNL int
  119. NC3_inq_var(int ncid, int varid, char *name,
  120. nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp);
  121. EXTERNL int
  122. NC3_inq_varid(int ncid, const char *name, int *varidp);
  123. EXTERNL int
  124. NC3_rename_var(int ncid, int varid, const char *name);
  125. EXTERNL int
  126. NC3_put_vara(int ncid, int varid,
  127. const size_t *start, const size_t *count,
  128. const void *value, nc_type);
  129. EXTERNL int
  130. NC3_get_vara(int ncid, int varid,
  131. const size_t *start, const size_t *count,
  132. void *value, nc_type);
  133. /* End _var */
  134. extern int NC3_initialize();
  135. #if defined(__cplusplus)
  136. }
  137. #endif
  138. #endif /*_NC3DISPATCH_H*/