- 
                Notifications
    
You must be signed in to change notification settings  - Fork 297
 
Description
📰 Custom Issue
I tried to run the following line of code and was surprised to find myself running into problems:
u_cubes = iris.load(filenames, domain & 'eastward_wind', callback=cb)
Here, domain is an iris.Constraint object and cb is a valid callback function.  The callback function relies on the correct domain already having been extracted from the Cube, but this didn't happen!  Therefore, I assume the callback function is applied first, then the constraint afterwards.  However, only the 'eastward_wind' data were loaded from the file (other variables were also present) so in fact it seems to apply the string constraint first, then the callback function, then the Constraint object.  I can work around this by putting cube = cube.extract(domain) at the top of the callback function, but Iris' behaviour seems counter-intuitive here.
- I couldn't see anything in the documentation about this, but I think this behaviour needs to be documented clearly.
 - Is there any particular reason for the constraints and callback being applied in this order?
 
Metadata
Metadata
Assignees
Labels
Type
Projects
Status