{"action":"closed","issue":{"url":"https://api.github.com/repos/pydata/xarray/issues/1877","repository_url":"https://api.github.com/repos/pydata/xarray","labels_url":"https://api.github.com/repos/pydata/xarray/issues/1877/labels{/name}","comments_url":"https://api.github.com/repos/pydata/xarray/issues/1877/comments","events_url":"https://api.github.com/repos/pydata/xarray/issues/1877/events","html_url":"https://github.com/pydata/xarray/issues/1877","id":293445250,"number":1877,"title":"TypeError for NetCDF float16 output","user":{"login":"duncanwp","id":3169620,"avatar_url":"https://avatars0.githubusercontent.com/u/3169620?v=4","gravatar_id":"","url":"https://api.github.com/users/duncanwp","html_url":"https://github.com/duncanwp","followers_url":"https://api.github.com/users/duncanwp/followers","following_url":"https://api.github.com/users/duncanwp/following{/other_user}","gists_url":"https://api.github.com/users/duncanwp/gists{/gist_id}","starred_url":"https://api.github.com/users/duncanwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncanwp/subscriptions","organizations_url":"https://api.github.com/users/duncanwp/orgs","repos_url":"https://api.github.com/users/duncanwp/repos","events_url":"https://api.github.com/users/duncanwp/events{/privacy}","received_events_url":"https://api.github.com/users/duncanwp/received_events","type":"User","site_admin":false},"labels":[{"id":114009210,"url":"https://api.github.com/repos/pydata/xarray/labels/backends","name":"backends","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-01T08:39:03Z","updated_at":"2018-02-26T10:46:47Z","closed_at":"2018-02-26T10:46:47Z","author_association":"CONTRIBUTOR","body":"```python\r\nds = xr.Dataset({\"test\": np.arange(0, 5, dtype='float16')})\r\nds.to_netcdf('test.nc')\r\n\r\n```\r\n\r\nThis fails because the float16 type doesn't exist for NetCDF files, throwing an `TypeError: illegal primitive data type.`\r\n\r\nIt might be nice if the xarray netCDF engine promoted this to float32 instead.\r\n\r\n#### Output of ``xr.show_versions()``\r\n\r\n<details>\r\nINSTALLED VERSIONS                                  \r\n------------------                                  \r\ncommit: None                                        \r\npython: 3.6.4.final.0                               \r\npython-bits: 64                                     \r\nOS: Linux                                           \r\nOS-release: 3.11.0-26-generic                       \r\nmachine: x86_64                                     \r\nprocessor: x86_64                                   \r\nbyteorder: little                                   \r\nLC_ALL: None                                        \r\nLANG: en_GB.UTF-8                                   \r\nLOCALE: en_GB.UTF-8                                 \r\n                                                    \r\nxarray: 0.10.0                                      \r\npandas: 0.22.0                                      \r\nnumpy: 1.14.0                                       \r\nscipy: 1.0.0                                        \r\nnetCDF4: 1.3.1                                      \r\nh5netcdf: 0.5.0                                     \r\nNio: None                                           \r\nbottleneck: 1.2.1                                   \r\ncyordereddict: None                                 \r\ndask: 0.16.1                                        \r\nmatplotlib: 2.1.2                                   \r\ncartopy: 0.15.1                                     \r\nseaborn: 0.8.1                                      \r\nsetuptools: 38.4.0                                  \r\npip: 9.0.1                                          \r\nconda: None                                         \r\npytest: None                                        \r\nIPython: 6.2.1                                      \r\nsphinx: None                                        \r\n</details>\r\n"}}
{"actor":{"display_login":"duncanwp"}}