-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support netcdf variable emulation #5212
Conversation
Included in Iris 3.6 project Although we've now bumped #4994 to Iris 3.7, the remainder of that work will happen in a separate "ncdata" package. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #5212 +/- ##
=======================================
Coverage 89.31% 89.32%
=======================================
Files 89 89
Lines 22375 22379 +4
Branches 5368 5370 +2
=======================================
+ Hits 19985 19989 +4
Misses 1640 1640
Partials 750 750
☔ View full report in Codecov by Sentry. |
IMHO this should be a stretch goal, since we've already committed to the work that we will do for 3.5. |
It was a mistake ! now in Iris 3.6 |
Update : rebasedActually more re-written, but it parallels what went before. BTW still in draft.
|
Update : Ready for ReviewExisting tests now passing. Ping @ESadek-MO is this for you to review also ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in it's current state, is this waiting on threadsafety as in #5214?
I think I was wrong about the conflicts -- using an older version. |
Ok thanks @ESadek-MO , I'm happy this is good to go ! ( btw I tested a combination of this+#5414 against prototype ncdata, and it seems good 👍 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pp-mo, looks good to me!
* upstream/main: Updated environment lockfiles (SciTools#5332) Support netcdf variable emulation (SciTools#5212) Support netCDF load+save on dataset-like objects as well as filepaths. (SciTools#5214) minor refinement to release do-nothing script (SciTools#5326) update bibtex citation for v3.6.0 release (SciTools#5324) Whats new updates for v3.6.0 (SciTools#5323) Added whatsnew notes on netcdf delayed saving and Distributed support. (SciTools#5322) Updated environment lockfiles (SciTools#5320) Bugfix 4566 (SciTools#4569) Simpler/faster data aggregation code in `aggregated_by` (SciTools#4970)
* upstream/main: Updated environment lockfiles (SciTools#5334) Iris Docs: Dark theme ready (SciTools#5299) Updated environment lockfiles (SciTools#5332) Support netcdf variable emulation (SciTools#5212) Support netCDF load+save on dataset-like objects as well as filepaths. (SciTools#5214) minor refinement to release do-nothing script (SciTools#5326) update bibtex citation for v3.6.0 release (SciTools#5324) Whats new updates for v3.6.0 (SciTools#5323) Added whatsnew notes on netcdf delayed saving and Distributed support. (SciTools#5322) Updated environment lockfiles (SciTools#5320) Bugfix 4566 (SciTools#4569) Simpler/faster data aggregation code in `aggregated_by` (SciTools#4970) update release_do_nothing script (SciTools#5311) Restore latest Whats New files. Updated environment lockfiles (SciTools#5308) release_do_nothing script updates from v3.6.0rc0 (SciTools#5306) Whats new updates for v3.6.0rc0 (SciTools#5300) Bump scitools/workflows from 2023.04.3 to 2023.05.0 (SciTools#5303)
The basic idea : when loading from / saving to a dataset-like object (as provided by #5214), Iris can spot objects which "emulate" a netCDF4.Variable and provide direct access to a content array (i.e. not via file access).
This allows us to directly transfer array data (real or lazy) without copying.
TODO: in retrospect,
_in_memory_array
is really not a good choice, as it seems to imply numpy data, whereas crucially it will often be dask. We should change the name to something better.Maybe "_data_array".
This, along with #5214 (formerly #5024), should provide all we need to support the intended "Xarray bridge" - see #4994 .
Scheduled for Iris 3.6
Currently draft/WIP, because this will need adjustment after #5191, and it's far easier to resolve if that goes in first !
Also note comment here