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

Add support for reading entire dataset #100

Open
charleskawczynski opened this issue Sep 18, 2019 · 2 comments
Open

Add support for reading entire dataset #100

charleskawczynski opened this issue Sep 18, 2019 · 2 comments

Comments

@charleskawczynski
Copy link

It seems ncread requires a variable argument name. It would be convenient, and more efficient in some cases, to be able to read the entire dataset rather than specified variables.

@meggart
Copy link
Member

meggart commented Sep 19, 2019

Would you imagine something like this?

function ncread(filename::String)
    nc = NetCDF.open(filename) 
    d = Dict(k=>NetCDF.readvar(v) for (k,v) in nc.vars)
    NetCDF.close(nc)
    d
end

i.e. just returning a Dict containing all the variables or would you rather return a full struct with all the metadata + data?

@charleskawczynski
Copy link
Author

Yes, I think that would be a fine interface.

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

2 participants