Main Content

netcdf.inqGrps

Retrieve array of child group IDs

Syntax

childGrps = netcdf.inqGrps(ncid)

Description

childGrps = netcdf.inqGrps(ncid) returns all the child group IDs in the parent group, specified by ncid.

Input Arguments

ncid

Identifier of NetCDF file, returned by netcdf.create or netcdf.open, or of a NetCDF group, returned by netcdf.defGrp.

Output Arguments

childGrps

Array containing identifiers of child groups in the specified NetCDF file or group.

Examples

This example opens the sample NetCDF file and then gets information about the groups it contains.

 ncid = netcdf.open('example.nc','nowrite');
 childGroups = netcdf.inqGrps(ncid);
 netcdf.close(ncid);

References

This function corresponds to the nc_inq_grps function in the netCDF library C API.