html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/7093#issuecomment-1267558344,https://api.github.com/repos/pydata/xarray/issues/7093,1267558344,IC_kwDOAMm_X85LjWfI,865212,2022-10-04T20:46:32Z,2022-10-04T20:46:32Z,NONE,"I believe NetCDF, CF-Conventions, and `xarray` should all be considered independently. It is not necessarily the responsibility of `xarray` serialization to ensure a CF-complaint file...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1388326248 https://github.com/pydata/xarray/issues/7093#issuecomment-1264596449,https://api.github.com/repos/pydata/xarray/issues/7093,1264596449,IC_kwDOAMm_X85LYDXh,10563614,2022-10-02T09:37:47Z,2022-10-02T09:37:47Z,CONTRIBUTOR,"- this issue was submitted because of https://github.com/pydata/xarray/pull/7085#discussion_r981443796 - I also tend to agree that this behavior is fine for the non-specific netcdf attributes. - For specific attributes as unit and _FillValue, is it also fine ? I would expect that Dataset.to_netcdf check the type (string for unit and the type of the variable for _FillValue and raise at least a warning. It is currently possible to save a number for the unit... Is the resulting netcdf CF-compliant ? - if any kind of types for attributes is allowed, this requires to chase bugs of the kind solved in #7085. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1388326248 https://github.com/pydata/xarray/issues/7093#issuecomment-1264566866,https://api.github.com/repos/pydata/xarray/issues/7093,1264566866,IC_kwDOAMm_X85LX8JS,43316012,2022-10-02T06:46:08Z,2022-10-02T06:46:08Z,COLLABORATOR,"What exactly do you mean by netcdf attributes? The special meaning ones like units, _FillValue or long_name? In general xarray is quite relaxed on what users put into the attrs, internally it is simply a dict of anything (see e.g. #7111 where people put in recursive DataArrays). As soon as you try to write it into a netCDF it has to be serializable, but that's why it raises an error. Personally I think the current behavior is fine (ofc, plotting etc should be able to deal with non-standard units etc.)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1388326248