cfdm.DomainAncillary.nc_del_variable¶
-
DomainAncillary.
nc_del_variable
(default=ValueError())[source]¶ Remove the netCDF variable name.
New in version (cfdm): 1.7.0
See also
- Parameters
- default: optional
Return the value of the default parameter if the netCDF variable name has not been set. If set to an
Exception
instance then it will be raised instead.
- Returns
str
The removed netCDF variable name.
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