cfdm.Count.nc_get_sample_dimension

Count.nc_get_sample_dimension(default=ValueError())[source]

Return the netCDF sample dimension name.

New in version (cfdm): 1.7.0

Parameters
default: optional

Return the value of the default parameter if the netCDF sample dimension name has not been set. If set to an Exception instance then it will be raised instead.

Returns
str

The netCDF sample dimension name.

Examples:

>>> f.nc_set_sample_dimension('time')
>>> f.nc_has_sample_dimension()
True
>>> f.nc_get_sample_dimension()
'time'
>>> f.nc_del_sample_dimension()
'time'
>>> f.nc_has_sample_dimension()
False
>>> print(f.nc_get_sample_dimension(None))
None
>>> print(f.nc_del_sample_dimension(None))
None