issues: 100601294
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 100601294 | MDU6SXNzdWUxMDA2MDEyOTQ= | 526 | 64-bit values are coerced to 32-bit when writing as NETCDF4_CLASSIC | 6645714 | closed | 0 | 5 | 2015-08-12T18:06:42Z | 2015-09-01T21:02:08Z | 2015-09-01T21:02:08Z | CONTRIBUTOR | ``` import xray import numpy ds = xray.Dataset() time_data = numpy.arange(10.0, 100.0, .5) raw_data = time_data.copy() times = xray.Variable('time', time_data) data = xray.DataArray(raw_data, dims=['time'], coords={'time': times}) ds['data'] = data ``` If you examine ds now, you’ll see:
Now, if we dump to netcdf and reload:
The formerly 64-bit values are now 32-bit:
It looks to me like coerce_nc3_dtype is being called for all formats that aren't straight NETCDF4. |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/526/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |