Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

netcdf.inqGrpParent

检索父组的 ID。

    说明

    parentGroupID = netcdf.inqGrpParent(ncid) 根据由 ncid 指定的子组位置,返回父组的 ID。

    示例

    检索父组路径

    本例打开 NetCDF 示例文件并获取指定组的父级的完整路径。

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

    输入参数

    全部折叠

    netcdf.create 函数或 netcdf.open 函数返回的 NetCDF 文件的标识符,或由 netcdf.defGrp 函数返回的 NetCDF 组的标识符。

    数据类型: double

    输出参量

    全部折叠

    指定的文件或组的父级 NetCDF 组或文件标识符,以整数形式返回。

    数据类型: double

    版本历史记录

    在 R2010b 中推出