cf.AncillaryVariables.setprop

AncillaryVariables.setprop(prop, value)[source]

Set a CF property on each element of the list.

Parameters :
prop : str

The name of the property to set.

value :

The value for the property.

Returns :

None

Examples

>>> len(fl)
2
>>> fl.setprop('foo', 'bar')
>>> fl.getprop('foo')
['bar', 'bar']

Note that recognised CF propeties (such as ‘long_name’) may be set directly:

>>> fl.standard_name = 'air_temperature'
>>> fl.standard_name
['air_temperature', 'air_temperature']

Previous topic

cf.AncillaryVariables.set_equals

Next topic

cf.AncillaryVariables.sort

This Page