Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

netcdf.inqNcid

Return ID of named group

Syntax

childGroupId = netcdf.inqNcid(ncid,childGroupName)

Description

childGroupId = netcdf.inqNcid(ncid,childGroupName) returns the ID of the child group, specified by the name childGroupName, in the file or group specified by ncid.

Input Arguments

ncid

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

childGroupName

Text string specifying the name of a NetCDF group.

Output Arguments

childGroupID

Identifier of a NetCDF group.

Examples

This example opens the sample NetCDF dataset and then gets the ID of a group in the dataset.

ncid = netcdf.open('example.nc','nowrite');
gid = netcdf.inqNcid(ncid,'grid1');
netcdf.close(ncid);

References

This function corresponds to the nc_inq_ncid function in the netCDF library C API. Read the files netcdfcopyright.txt and mexnccopyright.txt for more information.

Was this topic helpful?