A variable with the same name as a dimension is called a coordinate variable. Many programs that read netCDF files recognize and use any coordinate values they find.
To be useful for defining a coordinate system, a coordinate variable should:
The notion of coordinate variables has been generalized to multidimensional coordinate axes and sets of coordinate axes that comprise coordinate systems in the netCDF Java library and the Common Data Model it supports.