ecmwf / earthkit-data

A format-agnostic Python interface for geospatial data
Apache License 2.0
47 stars 9 forks source link

Weird behaviour of indices() function #264

Closed corentincarton closed 7 months ago

corentincarton commented 7 months ago

What happened?

When I create a first FieldList object and call the fl.indices() function, I get a nice dictionary of metadata like this one:

{'class': ['od'], 'stream': ['enfo'], 'levtype': ['sfc'], 'type': ['pf'], 'expver': ['0001'], 'date': [20231128], 'time': [1200], 'domain': ['g'], 'number': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'param': ['2t']}

but when I operate on the object, by doing fl_new = fl.sel(param='2t') or fl_new = ekds.order_by("number", "stepRange"), then I get the following error when calling fl_new.indices():

TypeError: 'list' object is not callable

Do you know what is the issue?

What are the steps to reproduce the bug?

See above.

Version

feature/tensor

Platform (OS and architecture)

macOS

Relevant log output

No response

Accompanying data

No response

Organisation

No response