cf.cellsize

cf.cellsize(value, units=None)[source]

Return a cf.Query object for the cell size of a coordinate object.

In this context, a coordinate is any object which has a cellsize attribute.

If value is a cf.Query object then cf.cellsize(value) is equivalent to value.addattr('cellsize') (see cf.Query.addattr). Otherwise cf.cellsize(value) is equivalent to cf.eq(value, attr='cellsize').

Parameters:
value :

Either the value that the cell size is to be compared with, or a cf.Query object for testing the cell size.

Returns:
out : cf.Query

The query object.

Examples:
>>> cf.cellsize(cf.lt(5, 'km'))
<CF Query: cellsize(lt <CF Data: 5 km>)>
>>> cf.cellsize(5) 
<CF Query: cellsize(eq 5)>
>>> cf.cellsize(cf.Data(5, 'km'))
<CF Query: cellsize(eq <CF Data: 5 km>)>
>>> cf.cellsize(cf.Data(5, 'km'))  
<CF Query: cellsize(eq <CF Data: 5 km>)>
>>> cf.cellsize(5, units='km')   
<CF Query: cellsize(eq <CF Data: 5 km>)>