intake / intake-xarray

Intake plugin for xarray
https://intake-xarray.readthedocs.io/
BSD 2-Clause "Simplified" License
76 stars 36 forks source link

accept a list of netcdf paths #30

Closed rabernat closed 5 years ago

rabernat commented 5 years ago

Xarray's open_mfdataset function accepts a wildcard (passed to glob) OR an explicit list of paths to open.

Intake, however, currently only supports the wildcard option https://github.com/ContinuumIO/intake-xarray/blob/4985727425b2b6fa75237d40f3163b404d926dc0/intake_xarray/netcdf.py#L29-L31

What I would like is to have a catalog like this:

sources:
  some_dataset:
    driver: netcdf
    args:
      urlpath:
        - file1.nc
        - file2.nc

and have this get translated as xr.open_mfdataset(['file1.nc', 'file2.nc']).

This is both more urgent (to me!) and more doable than #29.

jsignell commented 5 years ago

I agree. Making the netcdf plugin accept more inputs has been on my todo list for a while.

jsignell commented 5 years ago

closed by #22

rabernat commented 5 years ago

Wow that was fast! Thanks @jsignell!

So the example catalog syntax I provided in my issue above should now work?

jsignell commented 5 years ago

Should work :) please try it out! I am doing a release of 0.3.0 right now.