NetCDF 4.10.1
Loading...
Searching...
No Matches
dgroup.c
Go to the documentation of this file.
1
6
7#include "ncdispatch.h"
8
43 /* All these functions are part of the above defgroup... */
45
58int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
59{
60 NC* ncp;
61 int stat = NC_check_id(ncid,&ncp);
62 if(stat != NC_NOERR) return stat;
63 return ncp->dispatch->inq_ncid(ncid,name,grp_ncid);
64}
65
76int nc_inq_grps(int ncid, int *numgrps, int *ncids)
77{
78 NC* ncp;
79 int stat = NC_check_id(ncid,&ncp);
80 if(stat != NC_NOERR) return stat;
81 return ncp->dispatch->inq_grps(ncid,numgrps,ncids);
82}
83
93int nc_inq_grpname(int ncid, char *name)
94{
95 NC* ncp;
96 int stat = NC_check_id(ncid,&ncp);
97 if(stat != NC_NOERR) return stat;
98 return ncp->dispatch->inq_grpname(ncid,name);
99}
100
112
113int nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
114{
115 NC* ncp;
116 int stat = NC_check_id(ncid,&ncp);
117 if(stat != NC_NOERR) return stat;
118 return ncp->dispatch->inq_grpname_full(ncid,lenp,full_name);
119}
120
131int nc_inq_grpname_len(int ncid, size_t *lenp)
132{
133 int stat = nc_inq_grpname_full(ncid,lenp,NULL);
134 return stat;
135}
136
147int nc_inq_grp_parent(int ncid, int *parent_ncid)
148{
149 NC* ncp;
150 int stat = NC_check_id(ncid,&ncp);
151 if(stat != NC_NOERR) return stat;
152 return ncp->dispatch->inq_grp_parent(ncid,parent_ncid);
153}
154
170int nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
171{
172 return nc_inq_ncid(ncid,grp_name,grp_ncid);
173}
174
188int nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
189{
190 NC* ncp;
191 int stat = NC_check_id(ncid,&ncp);
192 if(stat != NC_NOERR) return stat;
193 return ncp->dispatch->inq_grp_full_ncid(ncid,full_name,grp_ncid);
194}
195
196
207int nc_inq_varids(int ncid, int *nvars, int *varids)
208{
209 NC* ncp;
210 int stat = NC_check_id(ncid,&ncp);
211 if(stat != NC_NOERR) return stat;
212 return ncp->dispatch->inq_varids(ncid,nvars,varids);
213}
214
226int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
227{
228 NC* ncp;
229 int stat = NC_check_id(ncid,&ncp);
230 if(stat != NC_NOERR) return stat;
231 return ncp->dispatch->inq_dimids(ncid,ndims,dimids,include_parents);
232}
233
244
245int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
246{
247 NC* ncp;
248 int stat = NC_check_id(ncid,&ncp);
249 if(stat != NC_NOERR) return stat;
250 return ncp->dispatch->inq_typeids(ncid,ntypes,typeids);
251}
252
296int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
297{
298 NC* ncp;
299 int stat = NC_check_id(parent_ncid,&ncp);
300 if(stat != NC_NOERR) return stat;
301 return ncp->dispatch->def_grp(parent_ncid,name,new_ncid);
302}
303
317int nc_rename_grp(int grpid, const char *name)
318{
319 NC* ncp;
320 int stat = NC_check_id(grpid,&ncp);
321 if(stat != NC_NOERR) return stat;
322 return ncp->dispatch->rename_grp(grpid,name);
323}
324
333int nc_show_metadata(int ncid)
334{
335 NC* ncp;
336 int stat = NC_check_id(ncid,&ncp);
337 if(stat != NC_NOERR) return stat;
338 return ncp->dispatch->show_metadata(ncid);
339}
340
int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
Retrieve a list of types associated with a group.
Definition dgroup.c:245
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:226
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:76
int nc_show_metadata(int ncid)
Print the metadata for a file.
Definition dgroup.c:333
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:188
int nc_inq_grpname(int ncid, char *name)
Get the name of a group given an ID.
Definition dgroup.c:93
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:58
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:207
int nc_inq_grp_parent(int ncid, int *parent_ncid)
Get the ID of the parent based on a group ID.
Definition dgroup.c:147
int nc_inq_grpname_len(int ncid, size_t *lenp)
Get the length of a group name given an ID.
Definition dgroup.c:131
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:113
int nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
Define a new group.
Definition dgroup.c:296
int nc_rename_grp(int grpid, const char *name)
Rename a group.
Definition dgroup.c:317
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:170
#define NC_NOERR
No Error.
Definition netcdf.h:417