NetCDF  4.9.2
dgroup.c
Go to the documentation of this file.
1 
7 #include "ncdispatch.h"
8  /* All these functions are part of the above defgroup... */
45 
56 int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
57 {
58  NC* ncp;
59  int stat = NC_check_id(ncid,&ncp);
60  if(stat != NC_NOERR) return stat;
61  return ncp->dispatch->inq_ncid(ncid,name,grp_ncid);
62 }
63 
73 int nc_inq_grps(int ncid, int *numgrps, int *ncids)
74 {
75  NC* ncp;
76  int stat = NC_check_id(ncid,&ncp);
77  if(stat != NC_NOERR) return stat;
78  return ncp->dispatch->inq_grps(ncid,numgrps,ncids);
79 }
80 
88 int nc_inq_grpname(int ncid, char *name)
89 {
90  NC* ncp;
91  int stat = NC_check_id(ncid,&ncp);
92  if(stat != NC_NOERR) return stat;
93  return ncp->dispatch->inq_grpname(ncid,name);
94 }
95 
106 int nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
107 {
108  NC* ncp;
109  int stat = NC_check_id(ncid,&ncp);
110  if(stat != NC_NOERR) return stat;
111  return ncp->dispatch->inq_grpname_full(ncid,lenp,full_name);
112 }
113 
122 int nc_inq_grpname_len(int ncid, size_t *lenp)
123 {
124  int stat = nc_inq_grpname_full(ncid,lenp,NULL);
125  return stat;
126 }
127 
136 int nc_inq_grp_parent(int ncid, int *parent_ncid)
137 {
138  NC* ncp;
139  int stat = NC_check_id(ncid,&ncp);
140  if(stat != NC_NOERR) return stat;
141  return ncp->dispatch->inq_grp_parent(ncid,parent_ncid);
142 }
143 
155 int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
156 {
157  return nc_inq_ncid(ncid,grp_name,grp_ncid);
158 }
159 
169 int nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
170 {
171  NC* ncp;
172  int stat = NC_check_id(ncid,&ncp);
173  if(stat != NC_NOERR) return stat;
174  return ncp->dispatch->inq_grp_full_ncid(ncid,full_name,grp_ncid);
175 }
176 
177 
187 int nc_inq_varids(int ncid, int *nvars, int *varids)
188 {
189  NC* ncp;
190  int stat = NC_check_id(ncid,&ncp);
191  if(stat != NC_NOERR) return stat;
192  return ncp->dispatch->inq_varids(ncid,nvars,varids);
193 }
194 
205 int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
206 {
207  NC* ncp;
208  int stat = NC_check_id(ncid,&ncp);
209  if(stat != NC_NOERR) return stat;
210  return ncp->dispatch->inq_dimids(ncid,ndims,dimids,include_parents);
211 }
212 
223 int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
224 {
225  NC* ncp;
226  int stat = NC_check_id(ncid,&ncp);
227  if(stat != NC_NOERR) return stat;
228  return ncp->dispatch->inq_typeids(ncid,ntypes,typeids);
229 }
230 
268 int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
269 {
270  NC* ncp;
271  int stat = NC_check_id(parent_ncid,&ncp);
272  if(stat != NC_NOERR) return stat;
273  return ncp->dispatch->def_grp(parent_ncid,name,new_ncid);
274 }
275 
284 int nc_rename_grp(int grpid, const char *name)
285 {
286  NC* ncp;
287  int stat = NC_check_id(grpid,&ncp);
288  if(stat != NC_NOERR) return stat;
289  return ncp->dispatch->rename_grp(grpid,name);
290 }
291 
299 int nc_show_metadata(int ncid)
300 {
301  NC* ncp;
302  int stat = NC_check_id(ncid,&ncp);
303  if(stat != NC_NOERR) return stat;
304  return ncp->dispatch->show_metadata(ncid);
305 }
306 
int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
Retrieve a list of types associated with a group.
Definition: dgroup.c:223
int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
Retrieve a list of dimension ids associated with a group.
Definition: dgroup.c:205
int nc_inq_grps(int ncid, int *numgrps, int *ncids)
Get a list of groups or subgroups from a file or groupID.
Definition: dgroup.c:73
int nc_show_metadata(int ncid)
Print the metadata for a file.
Definition: dgroup.c:299
int nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
Get the full ncid given a group name.
Definition: dgroup.c:169
int nc_inq_grpname(int ncid, char *name)
Get the name of a group given an ID.
Definition: dgroup.c:88
int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
Return the group ID for a group given the name.
Definition: dgroup.c:56
int nc_inq_varids(int ncid, int *nvars, int *varids)
Get a list of varids associated with a group given a group ID.
Definition: dgroup.c:187
int nc_inq_grp_parent(int ncid, int *parent_ncid)
Get the ID of the parent based on a group ID.
Definition: dgroup.c:136
int nc_inq_grpname_len(int ncid, size_t *lenp)
Get the length of a group name given an ID.
Definition: dgroup.c:122
int nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
Get the full path/groupname of a group/subgroup given an ID.
Definition: dgroup.c:106
int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
Define a new group.
Definition: dgroup.c:268
int nc_rename_grp(int grpid, const char *name)
Rename a group.
Definition: dgroup.c:284
int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
Get a group ncid given the group name.
Definition: dgroup.c:155
#define NC_NOERR
No Error.
Definition: netcdf.h:368