NetCDF  4.4.0
ddim.c
Go to the documentation of this file.
1 
10 #include "ncdispatch.h"
11  /* All these functions are part of the above defgroup... */
65  /* All these functions are part of this named group... */
70 
123 int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
124 {
125  NC* ncp;
126  int stat = NC_check_id(ncid, &ncp);
127  if(stat != NC_NOERR) return stat;
128  return ncp->dispatch->def_dim(ncid, name, len, idp);
129 }
130 
151 int
152 nc_inq_dimid(int ncid, const char *name, int *idp)
153 {
154  NC* ncp;
155  int stat = NC_check_id(ncid, &ncp);
156  if(stat != NC_NOERR) return stat;
157  return ncp->dispatch->inq_dimid(ncid,name,idp);
158 }
159 
214 int
215 nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
216 {
217  NC* ncp;
218  int stat = NC_check_id(ncid, &ncp);
219  if(stat != NC_NOERR) return stat;
220  return ncp->dispatch->inq_dim(ncid,dimid,name,lenp);
221 }
222 
275 int
276 nc_rename_dim(int ncid, int dimid, const char *name)
277 {
278  NC* ncp;
279  int stat = NC_check_id(ncid, &ncp);
280  if(stat != NC_NOERR) return stat;
281  return ncp->dispatch->rename_dim(ncid,dimid,name);
282 }
283 
305 int
306 nc_inq_ndims(int ncid, int *ndimsp)
307 {
308  NC* ncp;
309  int stat = NC_check_id(ncid, &ncp);
310  if(stat != NC_NOERR) return stat;
311  if(ndimsp == NULL) return NC_NOERR;
312  return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
313 }
314 
335 int
336 nc_inq_unlimdim(int ncid, int *unlimdimidp)
337 {
338  NC* ncp;
339  int stat = NC_check_id(ncid, &ncp);
340  if(stat != NC_NOERR) return stat;
341  return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
342 }
343 
393 int
394 nc_inq_dimname(int ncid, int dimid, char *name)
395 {
396  NC* ncp;
397  int stat = NC_check_id(ncid, &ncp);
398  if(stat != NC_NOERR) return stat;
399  if(name == NULL) return NC_NOERR;
400  return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
401 }
402 
449 int
450 nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
451 {
452  NC* ncp;
453  int stat = NC_check_id(ncid, &ncp);
454  if(stat != NC_NOERR) return stat;
455  if(lenp == NULL) return NC_NOERR;
456  return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
457 }
458  /* End of named group ...*/
460  /* End of defgroup. */
int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition: ddim.c:394
int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
Definition: ddim.c:123
int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
Definition: ddim.c:306
int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: ddim.c:276
int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
Definition: ddim.c:215
int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
Definition: ddim.c:450
int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
Definition: ddim.c:152
int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
Definition: ddim.c:336
#define NC_NOERR
No Error.
Definition: netcdf.h:315

Return to the Main Unidata NetCDF page.
Generated on Tue May 3 2016 08:56:00 for NetCDF. NetCDF is a Unidata library.