iris icon indicating copy to clipboard operation
iris copied to clipboard

Ensure callback argument in iris.load() function always returns cube as specified in callback.

Open christophesarran opened this issue 2 years ago • 3 comments

📰 Custom Issue

Cubes with the specifications given by the callback argument are expected when using iris.load(), for instance when callback specifies that cubes must have three dimensions (time-latitude-longitude). At present, when applying a constraint in iris.load() such as returning a single time step, a cube with two dimensions (latitude-longitude) is returned even when using callback to request three dimensions. Users must modify the cube after loading, creating their own load function with the callback code, to have appropriately dimensioned cubes, to concatenate them for instance. Suggest modifying the iris.load() function so that it runs the callback after any constraints so as to always return cubes that follow the callback specifications.

christophesarran avatar Nov 22 '21 14:11 christophesarran

Thanks @christophesarran! This is a contentious issue, and it is likely that whichever order we choose breaks different workflows - #3944.

In any case, your voice adds support to the need to be clearer on this topic.

trexfeathers avatar Nov 23 '21 10:11 trexfeathers

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

github-actions[bot] avatar Oct 29 '23 00:10 github-actions[bot]

I understand that this is still an issue that needs to be at least clarified or, even better, users could be given an option keep the dimensions thereby not breaking any existing workflows.

christophesarran avatar Oct 30 '23 10:10 christophesarran