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: |
|
---|---|
Returns: |
|
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>)>