-
Notifications
You must be signed in to change notification settings - Fork 17
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
Module Design #7
Comments
@mgrover1 The loading would not work as long as xarray does not adopt datatree unfortunately. Currently we would need to employ datatree functionality directly or to begin with just return a specific sweep. |
@kmuehlbauer I think we can do this with the existing datatree API, so it might look like import datatree as dt
import xradar
ds = dt.open_datatree("some_radar_data.nc", engine="xradar") We would just need to make sure the backend API is configured to support this |
I'll try this, but there might be more involved with the Backend API. The thing is, the backend API is relying on getting back single groups from files by calling open_dataset multiple times . With cfradial1 there is only one call to open_dataset. Not sure, if it makes much sense to replicate the multiple open approach for cfradial1 files. Anyway, thanks for the suggestion, I''ll definitely have a look that way. |
@mgrover1 Ah, and we would need to make datatree work with other engines... https://github.com/xarray-contrib/datatree/blob/main/datatree/io.py#L55-L60 |
@kmuehlbauer - what would you think if we redesigned the model module? Right now, it has a collection of helper functions, but each backend/tree needs to put together its own implementation of it; what if we created a main This object would then have the other methods associated with it (ex. ex. dt= Xradar() This would also allow us to add special indexing functionality and such (allowing things like |
You mean like a class wrapper around xr.Dataset? Hmm, how would we get a sweep dataset out of it? Or do you mean accessor based? I think I'm missing something. |
I think a wrapper around the datatree... |
Ok, I can't imagine that right now, but we can try several things. Not bound to a single solution. |
I can draft something up :) |
Hi, Jordi |
Let's think about the design!
We would like users to be able to use the following:
This would return a datatree, with a tree which contains datasets.
We should use the xwrf package as an inspiration here - https://github.com/xarray-contrib/xwrf, which uses a similar approach and API design.
The general xradar reader here would contain the different formats within it (ex. ODIM_H5, CfRadial1, CfRadial2).
General API
One decision we need to make is whether we should make functionality:
The text was updated successfully, but these errors were encountered: