At cfdm v1.11.1.0, when an invalid selection is passed to cfdm.Field.cell_methods, all cell method constructs are returned, rather than none of them as expected:
>>> import cfdm
>>> f = cfdm.example_field(1)
>>> print(f.cell_methods()) # CORRECT output:
Constructs:
{'cellmethod0': <CellMethod: domainaxis1: domainaxis2: mean where land (interval: 0.1 degrees)>,
'cellmethod1': <CellMethod: domainaxis3: maximum>}
>>> print(f.cell_methods('bad identifier')) # WRONG output, expected: Constructs: {}
Constructs:
{'cellmethod0': <CellMethod: domainaxis1: domainaxis2: mean where land (interval: 0.1 degrees)>,
'cellmethod1': <CellMethod: domainaxis3: maximum>}
At cfdm
v1.11.1.0
, when an invalid selection is passed tocfdm.Field.cell_methods
, all cell method constructs are returned, rather than none of them as expected: