Skip to content
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

'Warm start' for open_mfdataset? #893

Closed
mangecoeur opened this issue Jun 30, 2016 · 3 comments
Closed

'Warm start' for open_mfdataset? #893

mangecoeur opened this issue Jun 30, 2016 · 3 comments

Comments

@mangecoeur
Copy link
Contributor

I'm using xarray in ipython to do interactive/exploratory analysis on large multi-file datasets. To avoid having too many files open, I'm wrapping my file-open code in a with block. However, this means that every time I re-run the code the multi-file dataset is re-initialised, causing xarray to re-scan every input datafile to construct the Dataset.

It would be good to have some kind of 'warm start' or caching mechanism to make it easier to re-open multifile datasets without having to re-scan the input files, but equally without having to keep the dataset open which keeps all the file handles open (I've hit the OS max file limit because of this).

Not sure what API would suit this - since it while being a useful usecase it's also a bit wierd. Something like open_cached_mfdataset which closes input files after initialisation but caches the information collected and simply assumes that files don't move or change between accesses.

@shoyer
Copy link
Member

shoyer commented Jul 6, 2016

Agreed, this could be useful. Potentially ncml would be a good way to save this information: http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/Aggregation.html

@dcherian
Copy link
Contributor

Has this been fixed by the recent addition of caching?

@keewis
Copy link
Collaborator

keewis commented May 29, 2023

I think this has been fixed by xncml and/or kerchunk.

@keewis keewis closed this as completed May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants