iris
iris copied to clipboard
Ensure callback argument in iris.load() function always returns cube as specified in callback.
📰 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.
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.
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.
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.