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

Consider using RNetCDF rather than ncdf4 for read_ncdf? #87

Closed
dblodgett-usgs opened this issue Jan 7, 2019 · 3 comments
Closed

Consider using RNetCDF rather than ncdf4 for read_ncdf? #87

dblodgett-usgs opened this issue Jan 7, 2019 · 3 comments

Comments

@dblodgett-usgs
Copy link
Contributor

Looking here: https://github.com/r-spatial/stars/blob/master/R/ncdf.R#L89 I'm haunted by the special handling of coordinate variables in ncdf4. RNetCDF is much closer to the native NetCDF-C API and I think would be a safer way to go.

I'll work up a quick PR for consideration that uses the ncmeta function to find coordinate variables in this area of the function.

@mdsumner
Copy link
Member

mdsumner commented Jan 7, 2019

I definitely support this! I actually can't remember why I used ncdf4 here for read - it's usually my default for raw reading, but I'm much more familiar with RNetCDF generally (as you can see from ncmeta).

There might be some gotchas still.

@mdsumner
Copy link
Member

mdsumner commented Jan 7, 2019

What is the special handling that scares you?

@dblodgett-usgs
Copy link
Contributor Author

Cool. PR on the way.

I've stumbled over the way ncdf4 reads coordinate variables into the dim object and then doesn't treat the variables like variables in their own right.

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

3 participants