NetCDF  4.4.1.1
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
124 nc_def_dim(int ncid, const char *name, size_t len, int *idp)
125 {
126  NC* ncp;
127  int stat = NC_check_id(ncid, &ncp);
128  if(stat != NC_NOERR) return stat;
129  TRACE(nc_def_dim);
130  return ncp->dispatch->def_dim(ncid, name, len, idp);
131 }
132 
153 int
154 nc_inq_dimid(int ncid, const char *name, int *idp)
155 {
156  NC* ncp;
157  int stat = NC_check_id(ncid, &ncp);
158  if(stat != NC_NOERR) return stat;
159  TRACE(nc_inq_dimid);
160  return ncp->dispatch->inq_dimid(ncid,name,idp);
161 }
162 
217 int
218 nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
219 {
220  NC* ncp;
221  int stat = NC_check_id(ncid, &ncp);
222  if(stat != NC_NOERR) return stat;
223  TRACE(nc_inq_dim);
224  return ncp->dispatch->inq_dim(ncid,dimid,name,lenp);
225 }
226 
279 int
280 nc_rename_dim(int ncid, int dimid, const char *name)
281 {
282  NC* ncp;
283  int stat = NC_check_id(ncid, &ncp);
284  if(stat != NC_NOERR) return stat;
285  TRACE(nc_rename_dim);
286  return ncp->dispatch->rename_dim(ncid,dimid,name);
287 }
288 
310 int
311 nc_inq_ndims(int ncid, int *ndimsp)
312 {
313  NC* ncp;
314  int stat = NC_check_id(ncid, &ncp);
315  if(stat != NC_NOERR) return stat;
316  if(ndimsp == NULL) return NC_NOERR;
317  TRACE(nc_inq_ndims);
318  return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
319 }
320 
341 int
342 nc_inq_unlimdim(int ncid, int *unlimdimidp)
343 {
344  NC* ncp;
345  int stat = NC_check_id(ncid, &ncp);
346  if(stat != NC_NOERR) return stat;
347  TRACE(nc_inq_unlimdim);
348  return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
349 }
350 
400 int
401 nc_inq_dimname(int ncid, int dimid, char *name)
402 {
403  NC* ncp;
404  int stat = NC_check_id(ncid, &ncp);
405  if(stat != NC_NOERR) return stat;
406  if(name == NULL) return NC_NOERR;
407  TRACE(nc_inq_dimname);
408  return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
409 }
410 
457 int
458 nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
459 {
460  NC* ncp;
461  int stat = NC_check_id(ncid, &ncp);
462  if(stat != NC_NOERR) return stat;
463  if(lenp == NULL) return NC_NOERR;
464  TRACE(nc_inq_dimlen);
465  return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
466 }
467  /* End of named group ...*/
469  /* End of defgroup. */
int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition: ddim.c:401
int nc_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a new dimension.
Definition: ddim.c:124
int nc_inq_ndims(int ncid, int *ndimsp)
Find the number of dimensions.
Definition: ddim.c:311
int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: ddim.c:280
int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Find the name and length of a dimension.
Definition: ddim.c:218
int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
Find the length of a dimension.
Definition: ddim.c:458
int nc_inq_dimid(int ncid, const char *name, int *idp)
Find the ID of a dimension from the name.
Definition: ddim.c:154
int nc_inq_unlimdim(int ncid, int *unlimdimidp)
Find the ID of the unlimited dimension.
Definition: ddim.c:342
#define NC_NOERR
No Error.
Definition: netcdf.h:315

Return to the Main Unidata NetCDF page.
Generated on Tue Nov 29 2016 17:35:36 for NetCDF. NetCDF is a Unidata library.