iris icon indicating copy to clipboard operation
iris copied to clipboard

Netcdf separate loadsave

Open pp-mo opened this issue 3 years ago • 8 comments

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.~

pp-mo avatar Jun 15 '22 17:06 pp-mo

Status update : doing sort-of OK various tests to sort, largely Mock issues

pp-mo avatar Jun 15 '22 22:06 pp-mo

Rebased following #4503 / #4809 Expecting various fixes still needed...

pp-mo avatar Jun 17 '22 11:06 pp-mo

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

pp-mo avatar Jun 17 '22 14:06 pp-mo

Rebased onto main, following #4794

pp-mo avatar Jun 20 '22 15:06 pp-mo

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.

pp-mo avatar Jun 20 '22 17:06 pp-mo

Brilliant thanks @jamesp .
Busy elsewhere but will respond in a bit ...

pp-mo avatar Jun 29 '22 09:06 pp-mo

~## 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 !

pp-mo avatar Jun 29 '22 09:06 pp-mo

Thanks @trexfeathers .
I think I finally have it working now (after several tries at fixing the import problem!) Can you please re-review ?

pp-mo avatar Jul 21 '22 15:07 pp-mo

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.

pp-mo avatar Sep 28 '22 12:09 pp-mo

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

trexfeathers avatar Oct 04 '22 11:10 trexfeathers