-
Notifications
You must be signed in to change notification settings - Fork 38
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
xarray can't identify time units in HSDS dataset #45
Comments
Would it be possible to print out what xarray thinks of that variable from the two sources? Have two cells with |
@ajelenak-thg , yes, it looks like HSDS is dropping the variable attributes: BTW, you should be able to run this notebook (at least the HSDS and DAP access cells) -- you just need a username and password for this XSEDE endpoint from @jreadey in your If you sign up for XSEDE I can add you to my project, in case that becomes useful later on. |
Seems like some attributes of the
The HSDS response about the attributes of the |
@ajelenak-thg and @jreadey, yes, HSDS is losing nearly all variable attributes! The variable in the original NC file has attributes:
while in HSDS, the only remaining attribute is:
Does this mean perhaps that HSDS is only handing attributes with integer values or something? |
@rsignell-usgs - do you see any errors during the import (with hsload)? I've seen this issue: h5py/h5py#719 come up when loading NetCDF files. |
Oh yes, I got tons of errors on Looks like the real problem is here: h5py/h5py#719 (comment) :
So maybe |
I don't know if it is possible to get the bytes for such attributes somehow and avoid h5py until that issue is resolved. |
I have just created a PR with a fix for this problem: h5py/h5py#988. It works for the netCDF file used here. Let's what happens. |
In this notebook
https://gist.github.com/rsignell-usgs/07143a5ab54afb8ad6eb1af255d025c9
we use
xarray
to open a local netcdf4 file and then the same dataset that was 'hsload'ed tohsds
.xarray
automatically recognized the CF-compliant time units and converts the time coordinate todatetime
so that the plot is correctly labeled in cell [6].But time is not recognized for the the HSDS dataset plot in cell [5].
Any idea what the problem is?
The text was updated successfully, but these errors were encountered: