cf.Index.nc_sample_dimension_groups

Index.nc_sample_dimension_groups()[source]

Return the netCDF sample dimension group hierarchy.

The group hierarchy is defined by the netCDF name. Groups are delimited by / (slash) characters in the netCDF name. The groups are returned, in hierarchical order, as a sequence of strings. If the name is not set, or contains no / characters then an empty sequence is returned, signifying the root group.

New in version (cfdm): 1.8.6

Returns
tuple of str

The group structure.

Examples

>>> f.nc_set_sample_dimension('element')
>>> f.nc_sample_dimension_groups()
()
>>> f.nc_set_sample_dimension_groups(['forecast', 'model'])
>>> f.nc_sample_dimension_groups()
('forecast', 'model')
>>> f.nc_get_sample_dimension()
'/forecast/model/element'
>>> f.nc_clear_sample_dimension_groups()
('forecast', 'model')
>>> f.nc_get_sample_dimension()
'element'
>>> f.nc_set_sample_dimension('/forecast/model/element')
>>> f.nc_sample_dimension_groups()
('forecast', 'model')
>>> f.nc_del_sample_dimension('/forecast/model/element')
'/forecast/model/element'
>>> f.nc_sample_dimension_groups()
()