cf.Data.cfa_set_aggregated_data

Data.cfa_set_aggregated_data(value)[source]

Set the CFA-netCDF aggregation instruction terms.

The aggregation instructions are stored in the aggregation_data attribute of a CFA-netCDF aggregation variable.

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.

New in version 3.15.0.

Parameters
value: str or dict

The aggregation instruction terms and their corresponding netCDF variable names. Either a CFA-netCDF-compliant string value of an aggregated_data attribute, or a dictionary whose key/value pairs are the aggregation instruction terms and their corresponding variable names.

Returns

None

Examples

>>> f.cfa_set_aggregated_data(
...     {'location': 'cfa_location',
...      'file': 'cfa_file',
...      'address': 'cfa_address',
...      'format': 'cfa_format',
...      'tracking_id': 'tracking_id'}
... )
>>> f.cfa_has_aggregated_data()
True
>>> f.cfa_get_aggregated_data()
{'location': 'cfa_location',
 'file': 'cfa_file',
 'address': 'cfa_address',
 'format': 'cfa_format',
 'tracking_id': 'tracking_id'}
>>> f.cfa_del_aggregated_data()
{'location': 'cfa_location',
 'file': 'cfa_file',
 'address': 'cfa_address',
 'format': 'cfa_format',
 'tracking_id': 'tracking_id'}
>>> f.cfa_has_aggregated_data()
False
>>> f.cfa_del_aggregated_data()
{}
>>> f.cfa_get_aggregated_data()
{}