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 | |
---|
35 | #ifndef _NC3DISPATCH_H |
---|
36 | #define _NC3DISPATCH_H |
---|
37 | |
---|
38 | #include <stddef.h> /* size_t, ptrdiff_t */ |
---|
39 | #include "netcdf.h" |
---|
40 | #include "ncdispatch.h" |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | #if defined(__cplusplus) |
---|
45 | extern "C" { |
---|
46 | #endif |
---|
47 | |
---|
48 | /* |
---|
49 | * The Interface |
---|
50 | */ |
---|
51 | |
---|
52 | /* WARNING: this signature differs from external nc_create API*/ |
---|
53 | EXTERNL int |
---|
54 | NC3_create(const char *path, int cmode, |
---|
55 | size_t initialsz, int basepe, size_t *chunksizehintp, |
---|
56 | int useparallel, void* mpidata, |
---|
57 | struct NC_Dispatch*, NC** ncp); |
---|
58 | |
---|
59 | /* WARNING: this signature differs from external nc_open API*/ |
---|
60 | EXTERNL int |
---|
61 | NC3_open(const char *path, int mode, |
---|
62 | int basepe, size_t *chunksizehintp, |
---|
63 | int use_parallel, void* mpidata, |
---|
64 | NC_Dispatch*, NC** ncp); |
---|
65 | |
---|
66 | EXTERNL int |
---|
67 | NC3_new_nc(NC**); |
---|
68 | |
---|
69 | EXTERNL int |
---|
70 | NC3_redef(int ncid); |
---|
71 | |
---|
72 | EXTERNL int |
---|
73 | NC3__enddef(int ncid, size_t h_minfree, size_t v_align, |
---|
74 | size_t v_minfree, size_t r_align); |
---|
75 | |
---|
76 | EXTERNL int |
---|
77 | NC3_sync(int ncid); |
---|
78 | |
---|
79 | EXTERNL int |
---|
80 | NC3_abort(int ncid); |
---|
81 | |
---|
82 | EXTERNL int |
---|
83 | NC3_close(int ncid); |
---|
84 | |
---|
85 | EXTERNL int |
---|
86 | NC3_set_fill(int ncid, int fillmode, int *old_modep); |
---|
87 | |
---|
88 | EXTERNL int |
---|
89 | NC3_set_base_pe(int ncid, int pe); |
---|
90 | |
---|
91 | EXTERNL int |
---|
92 | NC3_inq_base_pe(int ncid, int *pe); |
---|
93 | |
---|
94 | EXTERNL int |
---|
95 | NC3_inq_format(int ncid, int *formatp); |
---|
96 | |
---|
97 | EXTERNL int |
---|
98 | NC3_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp); |
---|
99 | |
---|
100 | EXTERNL int |
---|
101 | NC3_inq_type(int, nc_type, char *, size_t *); |
---|
102 | |
---|
103 | /* Begin _dim */ |
---|
104 | |
---|
105 | EXTERNL int |
---|
106 | NC3_def_dim(int ncid, const char *name, size_t len, int *idp); |
---|
107 | |
---|
108 | EXTERNL int |
---|
109 | NC3_inq_dimid(int ncid, const char *name, int *idp); |
---|
110 | |
---|
111 | EXTERNL int |
---|
112 | NC3_inq_dim(int ncid, int dimid, char *name, size_t *lenp); |
---|
113 | |
---|
114 | EXTERNL int |
---|
115 | NC3_inq_unlimdim(int ncid, int *unlimdimidp); |
---|
116 | |
---|
117 | EXTERNL int |
---|
118 | NC3_rename_dim(int ncid, int dimid, const char *name); |
---|
119 | |
---|
120 | /* End _dim */ |
---|
121 | /* Begin _att */ |
---|
122 | |
---|
123 | EXTERNL int |
---|
124 | NC3_inq_att(int ncid, int varid, const char *name, |
---|
125 | nc_type *xtypep, size_t *lenp); |
---|
126 | |
---|
127 | EXTERNL int |
---|
128 | NC3_inq_attid(int ncid, int varid, const char *name, int *idp); |
---|
129 | |
---|
130 | EXTERNL int |
---|
131 | NC3_inq_attname(int ncid, int varid, int attnum, char *name); |
---|
132 | |
---|
133 | EXTERNL int |
---|
134 | NC3_rename_att(int ncid, int varid, const char *name, const char *newname); |
---|
135 | |
---|
136 | EXTERNL int |
---|
137 | NC3_del_att(int ncid, int varid, const char*); |
---|
138 | |
---|
139 | /* End _att */ |
---|
140 | /* Begin {put,get}_att */ |
---|
141 | |
---|
142 | EXTERNL int |
---|
143 | NC3_get_att(int ncid, int varid, const char *name, void *value, nc_type); |
---|
144 | |
---|
145 | EXTERNL int |
---|
146 | NC3_put_att(int ncid, int varid, const char *name, nc_type datatype, |
---|
147 | size_t len, const void *value, nc_type); |
---|
148 | |
---|
149 | /* End {put,get}_att */ |
---|
150 | /* Begin _var */ |
---|
151 | |
---|
152 | EXTERNL int |
---|
153 | NC3_def_var(int ncid, const char *name, |
---|
154 | nc_type xtype, int ndims, const int *dimidsp, int *varidp); |
---|
155 | |
---|
156 | EXTERNL int |
---|
157 | NC3_inq_var(int ncid, int varid, char *name, |
---|
158 | nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp); |
---|
159 | |
---|
160 | EXTERNL int |
---|
161 | NC3_inq_varid(int ncid, const char *name, int *varidp); |
---|
162 | |
---|
163 | EXTERNL int |
---|
164 | NC3_rename_var(int ncid, int varid, const char *name); |
---|
165 | |
---|
166 | |
---|
167 | EXTERNL int |
---|
168 | NC3_put_vara(int ncid, int varid, |
---|
169 | const size_t *start, const size_t *count, |
---|
170 | const void *value, nc_type); |
---|
171 | |
---|
172 | EXTERNL int |
---|
173 | NC3_get_vara(int ncid, int varid, |
---|
174 | const size_t *start, const size_t *count, |
---|
175 | void *value, nc_type); |
---|
176 | |
---|
177 | /* End _var */ |
---|
178 | |
---|
179 | extern int NC3_initialize(); |
---|
180 | |
---|
181 | |
---|
182 | #if defined(__cplusplus) |
---|
183 | } |
---|
184 | #endif |
---|
185 | |
---|
186 | #endif /*_NC3DISPATCH_H*/ |
---|