Main Content

netcdf.inqGrpNameFull

Complete pathname of group

    Description

    groupName = netcdf.inqGrpNameFull(ncid) returns the complete pathname of the group specified by ncid.

    Note

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

    Examples

    Retrieve All Group Names from NetCDF Dataset

    Open the NetCDF sample dataset and retrieve the names of all groups.

    ncid = netcdf.open("example.nc",'NOWRITE');
    gid = netcdf.inqNcid(ncid,"grid2");
    fullName = netcdf.inqGrpNameFull(gid);
    netcdf.close(ncid);

    Input Arguments

    collapse all

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

    Data Types: double

    Output Arguments

    collapse all

    Complete path of the group returned as a character vector. The root group has the name '/'. The names of parent groups and child groups use the forward slash '/' separator, as in UNIX folder names, for example, '/group1/subgrp2/subsubgrp3'.

    Data Types: char

    Version History

    Introduced in R2010b