netcdf.inqAttID
Work with netCDF attributes.
📝Syntax
attid = netcdf.inqAttID(ncid, varid, attname)
📥Input Arguments
Parameter Description
ncid Open netCDF file or group identifier.
varid Variable identifier, or NC_GLOBAL for a global attribute.
attname Attribute name.
attvalue Attribute value.
📤Output Arguments
Parameter Description
attid Return value described by the syntax shown above.
📄Description

netcdf.inqAttID exposes low-level attribute operations.

Attributes store metadata such as units, titles, comments, scale factors, and valid ranges.

💡Examples
Copy-paste example for netcdf.inqAttID.
filename = [tempdir(), 'help_netcdf_inqAttID.nc'];
ncid = netcdf.create(filename, netcdf.getConstant('NC_CLOBBER'));
netcdf.putAtt(ncid, netcdf.getConstant('NC_GLOBAL'), 'title', 'sample file');
attid = netcdf.inqAttID(ncid, netcdf.getConstant('NC_GLOBAL'), 'title');
netcdf.close(ncid);
🔗See Also
netcdf.putVarnetcdf.getConstant
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub