-
Notifications
You must be signed in to change notification settings - Fork 36
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
recursively combine items from catalog using xarray.auto_combine #29
Comments
I believe the AliasSource might be a good model to derive from for this, where you pass the original catalogue plus some parameters to the CombinedXarraySource (or whatever) and it instantiates the xarrays from the cat for each input parameter and then calls |
@martindurant, I'm afraid I can't understand how to use AliasSource. Could you give an example? |
I'll try to knock something up for you, @rabernat . However, were you expecting a source which could
|
Sorry this has slipped through the net. |
This is of interest to me also. We have several datasets comprised of hourly output of nd-gridded data in netCDF format (10's of thousands of files). I have played with defining the I have looked through the code of intake-esm to try and get a better understanding of how that works too. The metadata (aside from the time coordinate) is consistent across the files, so theoretically I should be able to read the first file and infer from the filenames the complete stack. But I am failing to understand how to implement this in Intake and would appreciate some pointers. From a user perspective the funcationality I am going for is:
Should I write a plugin using the DataSourceMixin? Im trying to work out how the file paths are mapped into the metadata for the concatenated (time in my case) coordinate. Thanks for any suggesttions |
Xarray has a function called auto_combine which takes several datasets and combines them into one, using a series of heuristics to figure out the best way to merge. This is used internally in
open_mfdataset
.It would be quite cool if I could take an intake catalog containing many xarray datasets in a hierarchy and open any point of this hierarchy into a single xarray dataset.
Sorry for the vague issue, but I just wanted to jot this idea down before I forgot it. Could be very useful in multiple contexts (e.g. intake/intake-thredds#2).
The text was updated successfully, but these errors were encountered: