Skip to content

Conversation

@pp-mo
Copy link
Member

@pp-mo pp-mo commented Aug 18, 2022

I suspect that [this line] does not do anything useful, but recent testing changes have to accommodate it, e.g.
Notably here, and this supporting code,
which were introduced in #3411

This is now affecting #4913, which is also having to work around testing for this usage.
But I can't see that this usage does any good (!)

UPDATE:

This fails in iris.tests.test_file_save, demonstrating that there was originally an intention to support saving to an open file (handle), which is what this code was supposed to enable.
So, at present, this does work for PP files (as tested in iris/tests/test_file_save.py), but not for netcdf saves.

Not knowing about this, I recently wrote a PoC patch to add saving to an open netCDF4.Dataset object, via a different mechanism here
TODO: possibly should fix to support this mode?

@pp-mo
Copy link
Member Author

pp-mo commented Aug 25, 2022

Result : it is not actually obsolete !
This corresponds to passing an open file object as the 'target' of iris.save (it is these which have a 'name' property).
Though, it seems only usable for DOT+PNG at present, which we have now agreed to remove : #4515.

@pp-mo pp-mo closed this Aug 25, 2022
@pp-mo pp-mo deleted the no_save_namedobject branch November 29, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant