-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove the encoding attribute from xray.DataArray? #628
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
Comments
@shoyer - It would be nice to simplify the In the climate modeling world, non-standard calendars are ubiquitous and I know of many people that have come to |
I agree that reading a I'm less sure about what a good solution looks like for preserving variable specific coordinates. I know you just added that fix, but what are the actual use cases for that information? If coordinates are do not apply to all variables in your dataset, then perhaps an |
Certainly, if we get rid of the encoding attribute, we need to keep the time attributes intact. That is a fine solution in my view. I'm not tied to my fix for the coordinates attribute. The balance we need to strike is to not go too far in supporting everything in the CF conventions while not working against supported features in the conventions. |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity |
As described in the dev version of our documentation on encoding, we now support a keyword argument for controlling how netCDF files are written to disk with
to_netcdf
:http://xray.readthedocs.org/en/latest/io.html#reading-encoded-data
We still retain the feature that there is an "encoding" dictionary that sticks around with xray
Variable
objects, which stores how they were compressed/encoded on disk. This can be occasionally handy. It means, for example, that we always write out netCDF files with the same time units as the files we read from disk.It might make sense to eliminate this feature for the sake of significantly simplifying xray's internal data model. For cases where it really matters, users can now use the
encoding
keyword argument toto_netcdf
instead. This would leave three attributes on theVariable
object:dims
,_data
andattrs
.Thoughts?
The text was updated successfully, but these errors were encountered: