iris
iris copied to clipboard
Netcdf separate loadsave
This "just" splits the iris.fileformats.netcdf module into separate sourcefiles for load + save code. There's very little talk between the two, and this should makes it much easier for devs to find their way around. Note that I haven't forced the split upon the user : All the public API is exported in the parent module, so everything there is as it was.
~TODO: in draft while I test with Cirrus-Ci memory hacks, just to run the tests.~
Status update : doing sort-of OK various tests to sort, largely Mock issues
Rebased following #4503 / #4809 Expecting various fixes still needed...
Rebased onto #4795 branch (which is passing tests), pro-tem, to get it testing with new GHA-based CI. TODO: rebase again onto main branch, when #4795 is merged
Rebased onto main, following #4794
Hi @trexfeathers I think this is now ready. No pressure, but ... I hope we can nail this before it needs rebasing again, because it has proved rather awkward for that.
Brilliant thanks @jamesp .
Busy elsewhere but will respond in a bit ...
~## Context : things this can be used for ?~ ~In addition to just "fixing data a bit" on either load or save,~ ~I think this might possibly help with a number of awkward outstanding desired features relating to netcdf :~
- ~load chunks control : https://github.com/SciTools/iris/issues/3333~
- ~precise formatting round-trips : https://github.com/SciTools/iris/discussions/4215~
- ~lazy saving : https://github.com/SciTools/iris/issues/4190~
- ~output "append" mode : https://github.com/SciTools/iris/issues/565~
UPDATE: oops, put this on the wrong issue !
Thanks @trexfeathers .
I think I finally have it working now (after several tries at fixing the import problem!)
Can you please re-review ?
Please also shout if merging this now is going to cause any problems with the Split cube-attrs project. Perhaps it's worth the problems sweat_smile
Good thought, but should be nothing serious I think -- this has only moved things, not reorganised.
I've been re-running some missed benchmarks. FWIW you would have seen this (predictable I suppose!):
before after ratio
[e96a0536] [d8f8dac7]
- 646±5μs 130±1μs 0.20 import_iris.Iris.time_fileformats_netcdf