Retrieve ID of parent group.
parentGroupID = netcdf.inqGrpParent(ncid)
parentGroupID = netcdf.inqGrpParent(ncid)
returns
the ID of the parent group given the location of the child group,
specified by ncid
.
|
Identifier of a NetCDF file, returned by |
|
Identifier of the NetCDF group or file that is the parent of the specified file or group. |
This example opens the NetCDF sample file and gets the full path of the parent of the specified group.
ncid = netcdf.open('example.nc','NOWRITE'); gid = netcdf.inqNcid(ncid,'grid2'); parentId = netcdf.inqGrpParent(gid); fullName = netcdf.inqGrpNameFull(parentId); netcdf.close(ncid);
This function corresponds to the nc_inq_grp_parent
function
in the NetCDF library C API.
For copyright information, read the netcdfcopyright.txt
and mexnccopyright.txt
files.