cf.ge¶
-
cf.
ge
(value, units=None, attr=None)[source]¶ A
Query
object for a “greater than or equal” condition.- Parameters
- value:
The query condition’s value.
- units:
str
orUnits
, optional The units of value. By default, the same units as the operand being tested are assumed, if applicable. If units is specified and the already value has units (such as a
Data
object`), then they must be equivalent.- attr:
str
, optional Apply the condition to the attribute, or nested attributes, of the operand, rather than the operand itself. Nested attributes are specified by separating them with a
.
. For example, the “month” attribute of the “bounds” attribute is specified as'bounds.month'
.
- Returns
Query
The query object.
Examples:
>>> q = cf.ge(5) >>> q <CF Query: x ge 5> >>> q.evaluate(5) True >>> q.evaluate(4) False
>>> cf.ge(10, 'm') <CF Query: (ge <CF Data: 10 m>)> >>> cf.ge(100, units=Units('kg')) <CF Query: (ge <CF Data: 100 kg>)>
>>> cf.ge(2, attr='month') <CF Query: month(ge 2)>