NetCDF  4.3.2
 All Data Structures Files Functions Variables Typedefs Macros Modules Pages
ddim.c
Go to the documentation of this file.
1 
10 #include "ncdispatch.h"
11 
66 int
67 nc_def_dim(int ncid, const char *name, size_t len, int *idp)
68 {
69  NC* ncp;
70  int stat = NC_check_id(ncid, &ncp);
71  if(stat != NC_NOERR) return stat;
72  return ncp->dispatch->def_dim(ncid, name, len, idp);
73 }
74 
95 int
96 nc_inq_dimid(int ncid, const char *name, int *idp)
97 {
98  NC* ncp;
99  int stat = NC_check_id(ncid, &ncp);
100  if(stat != NC_NOERR) return stat;
101  return ncp->dispatch->inq_dimid(ncid,name,idp);
102 }
103 
158 int
159 nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
160 {
161  NC* ncp;
162  int stat = NC_check_id(ncid, &ncp);
163  if(stat != NC_NOERR) return stat;
164  return ncp->dispatch->inq_dim(ncid,dimid,name,lenp);
165 }
166 
219 int
220 nc_rename_dim(int ncid, int dimid, const char *name)
221 {
222  NC* ncp;
223  int stat = NC_check_id(ncid, &ncp);
224  if(stat != NC_NOERR) return stat;
225  return ncp->dispatch->rename_dim(ncid,dimid,name);
226 }
227 
249 int
250 nc_inq_ndims(int ncid, int *ndimsp)
251 {
252  NC* ncp;
253  int stat = NC_check_id(ncid, &ncp);
254  if(stat != NC_NOERR) return stat;
255  if(ndimsp == NULL) return NC_NOERR;
256  return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
257 }
258 
279 int
280 nc_inq_unlimdim(int ncid, int *unlimdimidp)
281 {
282  NC* ncp;
283  int stat = NC_check_id(ncid, &ncp);
284  if(stat != NC_NOERR) return stat;
285  return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
286 }
287 
337 int
338 nc_inq_dimname(int ncid, int dimid, char *name)
339 {
340  NC* ncp;
341  int stat = NC_check_id(ncid, &ncp);
342  if(stat != NC_NOERR) return stat;
343  if(name == NULL) return NC_NOERR;
344  return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
345 }
346 
393 int
394 nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
395 {
396  NC* ncp;
397  int stat = NC_check_id(ncid, &ncp);
398  if(stat != NC_NOERR) return stat;
399  if(lenp == NULL) return NC_NOERR;
400  return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
401 }
int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
Definition: ddim.c:280
int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
Definition: ddim.c:394
int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
Definition: ddim.c:250
int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
Definition: ddim.c:67
int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
Definition: ddim.c:159
int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition: ddim.c:338
int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: ddim.c:220
#define NC_NOERR
No Error.
Definition: netcdf.h:278
int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
Definition: ddim.c:96

Return to the Main Unidata NetCDF page.
Generated on Sun Nov 23 2014 16:20:09 for NetCDF. NetCDF is a Unidata library.