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.

    example

    Examples

    collapse all

    Open the netCDF sample file and retrieve the names of all groups.

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

    Close the file.

    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