-
-
Notifications
You must be signed in to change notification settings - Fork 47
Consolidate numpy conversion functions #368
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestocf-internalAn issue to be addressed internally by Open Climate Fix and not suitable for external contributorsAn issue to be addressed internally by Open Climate Fix and not suitable for external contributors
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestocf-internalAn issue to be addressed internally by Open Climate Fix and not suitable for external contributorsAn issue to be addressed internally by Open Climate Fix and not suitable for external contributors
Currently we have a whole suite of numpy conversion functions in the numpy_sample module. In the samplers we convert each modality into a dictionary separately and then merge the dictionaries.
I think it could be cleaner to create a single function which replaces all the numpy conversion functions in the
numpy_samplemodule. As part of this I would also suggest that we should remove all of the{X}SampleKeyclasses scattered throughout thenumpy_samplemodule. Instead all of the keys of the returned dictionary would be obvious from the new single numpy conversion function.The new conversion function could accept a dictionary of xarray objects identical to the dictionary we pass around inside the PVNet Dataset classes to slice time and space components. We'd need to decide a little more on how to add
t0, the time encodings and the solar coords to the sample, but I feel like this should be reasonably straight forward