NetCDF  4.6.2
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 
280 int
281 nc_rename_dim(int ncid, int dimid, const char *name)
282 {
283  NC* ncp;
284  int stat = NC_check_id(ncid, &ncp);
285  if(stat != NC_NOERR) return stat;
286  TRACE(nc_rename_dim);
287  return ncp->dispatch->rename_dim(ncid,dimid,name);
288 }
289 
311 int
312 nc_inq_ndims(int ncid, int *ndimsp)
313 {
314  NC* ncp;
315  int stat = NC_check_id(ncid, &ncp);
316  if(stat != NC_NOERR) return stat;
317  if(ndimsp == NULL) return NC_NOERR;
318  TRACE(nc_inq_ndims);
319  return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
320 }
321 
342 int
343 nc_inq_unlimdim(int ncid, int *unlimdimidp)
344 {
345  NC* ncp;
346  int stat = NC_check_id(ncid, &ncp);
347  if(stat != NC_NOERR) return stat;
348  TRACE(nc_inq_unlimdim);
349  return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
350 }
351 
401 int
402 nc_inq_dimname(int ncid, int dimid, char *name)
403 {
404  NC* ncp;
405  int stat = NC_check_id(ncid, &ncp);
406  if(stat != NC_NOERR) return stat;
407  if(name == NULL) return NC_NOERR;
408  TRACE(nc_inq_dimname);
409  return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
410 }
411 
458 int
459 nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
460 {
461  NC* ncp;
462  int stat = NC_check_id(ncid, &ncp);
463  if(stat != NC_NOERR) return stat;
464  if(lenp == NULL) return NC_NOERR;
465  TRACE(nc_inq_dimlen);
466  return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
467 }
468  /* End of named group ...*/
470  /* End of defgroup. */
int nc_inq_dimname(int ncid, int dimid, char *name)
Find out the name of a dimension.
Definition: ddim.c:402
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:312
int nc_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension.
Definition: ddim.c:281
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:459
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:343
#define NC_NOERR
No Error.
Definition: netcdf.h:322

Return to the Main Unidata NetCDF page.
Generated on Tue Nov 20 2018 06:04:35 for NetCDF. NetCDF is a Unidata library.