issues: 307444427
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
307444427 | MDU6SXNzdWUzMDc0NDQ0Mjc= | 2005 | What is the recommended way to do proper compression/ scaling of vars? | 13906519 | closed | 0 | 3 | 2018-03-21T22:45:05Z | 2020-03-22T10:38:42Z | 2020-03-22T09:38:42Z | NONE | Code Sample, a copy-pastable example if possible```python if level == 'HIGH': ctype = 'i4' else: ctype = 'i2' max_int = np.iinfo(ctype).max min_val = ds[data_var].min().values max_val = ds[data_var].max().values offset_ = min_val
``` Problem descriptionUsing i2 I mostly get proper output. However, when I try to use i4 or i8 I don't get anything resembling my input... I write to file with format='NETCDF4_CLASSIC' My DataArray encoding is:
extra is added to DataArray like so: ```python @xr.register_dataarray_accessor('extra') class TileAccessor(object): def init(self, xarray_obj): self._obj = xarray_obj
``` Expected OutputNot sure if one is supposed to use types other than i2 for compressed storage? Or is my approach wrong? Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2005/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |