-
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
passing / overriding kwargs when opening datasets #52
Comments
Yes, you can do this, but it may not be obvious...
The netCDF source class explicitly has chunks as a kwarg and xarray_kwargs for any extra kwargs, like
The container type is xarray; like all other sources, when you do read() or to_dask(), you get a version of the container that the source promises. With read(), it is in-memory, with to_dask() it is chunked. |
Ok good to know. I find the syntax a bit confusing. Why would I be "calling" the catalog entry? Also, where would I find this information in the intake documentation? |
entry(...) -> source instance. This allows, exactly as shown, applying of parameters, whether explicitly given in the cat or as overrides. When you do |
I'd consider that an implicit call, myself! :-) |
right |
I also can't find where this is discussed in the docs. @rabernat is there a specific place where you'd expect it to be? |
Closing this as old, and we have plans to unify the "entry" and "source" classes to avoid the confusion. |
I would like to be able to optionally override or pass additional keyword arguments to xarray when opening datasets from intake.
Consider our cannonical example
There are many options I might want to pass to
open_zarr
. For examplechunks=None
: skip auto chunkingdecode_cf=False
: don't decode cfIf I open this file via intake:
there is no way to choose any of those options.
Could we make
.to_dask()
(itself a strange syntax...why not.to_xarray()
) accept arbitrary keyword arguments which are passed to the reader function?The text was updated successfully, but these errors were encountered: