cfdm.H5netcdfArray.get_groups

H5netcdfArray.get_groups(address)[source]

The netCDF4 group structure of a netCDF variable.

New in version (cfdm): 1.11.2.0

Parameters
address: str or int

The netCDF variable name, or integer varid, from which to get the groups.

Returns
(list, str) or (list, int)

The group structure and the name within the group. If address is a varid then an empty list and the varid are returned.

Examples

>>>
>>> n.get_groups('tas')
([], 'tas')
>>>
>>> n.get_groups('/tas')
([], 'tas')
>>>
>>> n.get_groups('/data/model/tas')
(['data', 'model'], 'tas')
>>>
>>> n.get_groups(9)
([], 9)