cf.DimensionCoordinate.nc_has_variable

DimensionCoordinate.nc_has_variable()[source]

Whether the netCDF variable name has been set.

New in version (cfdm): 1.7.0

Returns
bool

True if the netCDF variable name has been set, otherwise False.

Examples

>>> f.nc_set_variable('tas')
>>> f.nc_has_variable()
True
>>> f.nc_get_variable()
'tas'
>>> f.nc_del_variable()
'tas'
>>> f.nc_has_variable()
False
>>> print(f.nc_get_variable(None))
None
>>> print(f.nc_del_variable(None))
None