Возвращает идентификатор атрибута netCDF
attnum = netcdf.inqAttID(ncid,varid,attname)
attnum = netcdf.inqAttID(ncid,varid,attname) извлекает attnum, идентификатор атрибута, обозначенного attname. Задайте attname как вектор символов или строковый скаляр.
varid задает переменную, с которой связан атрибут.
ncid - идентификатор файла netCDF, возвращаемый netcdf.create или netcdf.open.
Эта функция соответствует nc_inq_attid функция в библиотеке netCDF С API. Чтобы использовать эту функцию, вы должны ознакомиться с парадигмой программирования netCDF.
Этот пример открывает файл примера netCDF, включенный в MATLAB®, example.nc.
% Open the netCDF example file.
ncid = netcdf.open('example.nc','NC_NOWRITE');
% Get the identifier of a variable in the file.
varid = netcdf.inqVarID(ncid,'avagadros_number');
% Retrieve the identifier of the attribute associated with the variable.
attid = netcdf.inqAttID(ncid,varid,'description');