Main Content

netcdf.inqGrps

Return array of child group IDs

    Description

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

    example

    Examples

    collapse all

    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);
    

    Input Arguments

    collapse all

    Identifier of a netCDF file, returned by netcdf.create or netcdf.open, or of a netCDF group, returned by netcdf.defGrp, specified as a nonnegative integer scalar.

    Data Types: double

    Output Arguments

    collapse all

    Identifiers of child groups in the specified netCDF file or group, returned as a nonnegative integer array.

    Data Types: double

    Tips

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

    Version History

    Introduced in R2010b