cfdm.Data.nc_set_aggregated_data

Data.nc_set_aggregated_data(value)[source]

Set the netCDF aggregated_data elements.

The aggregated data terms define the names of the fragment array variables, and are stored in a netCDF file in an “aggregated_data” attribute.

If there are any / (slash) characters in the netCDF variable names then these act as delimiters for a group hierarchy. By default, or if the name starts with a / character and contains no others, the name is assumed to be in the root group.

Added in version (cfdm): 1.12.0.0

Parameters:
value: dict or str

The netCDF aggregated_data terms in a dictionary whose key/value pairs are the feature names and their corresponding fragment array variable names; or else an equivalent string formatted with the the CF-netCDF encoding.

Returns:

None

Examples

>>> f.nc_set_aggregated_data(
...     {'map': 'fragment_map',
...      'uris': 'fragment_uris',
...      'identifiers': 'fragment_identifiers'}
... )
>>> f.nc_has_aggregated_data()
True
>>> f.nc_get_aggregated_data()
{'map': 'fragment_map',
 'uris': 'fragment_uris',
 'identifiers': 'fragment_identifiers'}
>>> f.nc_del_aggregated_data()
{'map': 'fragment_map',
 'uris': 'fragment_uris',
 'identifiers': 'fragment_identifiers'}
>>> f.nc_has_aggregated_data()
False
>>> f.nc_del_aggregated_data()
{}
>>> f.nc_get_aggregated_data()
{}
>>> f.nc_set_aggregated_data(
...     'map: fragment_map, uris: fragment_uris identifiers: fragment_idenfiers'
... )