netcdf.getConstant
Return the numeric value of a named netCDF constant.
📝Syntax
value = netcdf.getConstant(name)
📥Input Arguments
Parameter Description
arguments Input arguments follow the syntax shown above. File and group identifiers are numeric values returned by netCDF open, create, group, dimension, and variable definition calls. Named netCDF constants can be obtained with netcdf.getConstant.
📤Output Arguments
Parameter Description
value Return value described by the syntax shown above.
📄Description

netcdf.getConstant converts a netCDF C library constant name to its numeric value.

Use constants instead of hard-coded numeric values for readable low-level code.

💡Examples
Copy-paste example for netcdf.getConstant.
mode = netcdf.getConstant('NC_CLOBBER')
🔗See Also
netcdf.getConstantNames
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub