cfdm.AuxiliaryCoordinate.nc_set_node_coordinate_variable_groups

AuxiliaryCoordinate.nc_set_node_coordinate_variable_groups(groups)[source]

Set the netCDF node_coordinate_variable 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.

An alternative technique for setting the group structure is to set the netCDF node coordinate variable name, with nc_set_node_coordinate_variable, with the group structure delimited by / characters.

New in version (cfdm): 1.11.0.0

Parameters
groups: sequence of str

The new group structure.

Returns
tuple of str

The group structure prior to being reset.

Examples

>>> f.nc_set_node_coordinate_variable('time')
>>> f.nc_node_coordinate_variable_groups()
()
>>> f.nc_set_node_coordinate_variable_groups(['forecast', 'model'])
>>> f.nc_node_coordinate_variable_groups()
('forecast', 'model')
>>> f.nc_get_node_coordinate_variable()
'/forecast/model/time'
>>> f.nc_clear_node_coordinate_variable_groups()
('forecast', 'model')
>>> f.nc_get_variable()
'time'
>>> f.nc_set_node_coordinate_variable('/forecast/model/time')
>>> f.nc_variable_groups()
('forecast', 'model')
>>> f.nc_del_node_coordinate_variable('/forecast/model/time')
'/forecast/model/time'
>>> f.nc_node_coordinate_variable_groups()
()