cf.Field.cyclic

Field.cyclic(axis=None, iscyclic=True, period=None, **kwargs)[source]

Set the cyclicity of an axis.

New in version 1.0.

Parameters:
axis, kwargs : optional

Select the unique axis which would be selected by this call of the field’s axes method: f.axes(axis, **kwargs). See cf.Field.axes for details.

iscyclic : bool, optional

If False then the axis is set to be non-cyclic. By default the axis is set to be cyclic.

period : data-like, optional

Set the period for a dimension coordinate object which spans the selected axis. The absolute value of period is used.

Returns:
out : list

The axes of the field which were cyclic prior to the new setting, or the current cyclic axes if no axis was specified.

Examples:
>>> f.axes('X')
{'dim3'}
>>> f.cyclic()
[]
>>> f.cyclic('X', period=360)
[]
>>> f.cyclic()
['dim3']
>>> f.cyclic('X', False)
['dim3']
>>> f.cyclic()
[]
>>> f.cyclic('longitude', period=360, exact=True)
[]
>>> f.cyclic()
['dim3']
>>> f.cyclic('dim3', False)
['dim3']
>>> f.cyclic()
[]

Previous topic

cf.Field.cos

Next topic

cf.Field.data_axes

This Page