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/3991#issuecomment-617402384,https://api.github.com/repos/pydata/xarray/issues/3991,617402384,MDEyOklzc3VlQ29tbWVudDYxNzQwMjM4NA==,23484003,2020-04-21T20:39:56Z,2020-04-21T20:39:56Z,NONE,"Thanks, I'll close this, since it looks like an issue of bad input. I can't use h5netcdf due to conda env nonsense, but I've worked around it by just dropping the 'name' variable during loading. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,604210297 https://github.com/pydata/xarray/issues/3991#issuecomment-617375423,https://api.github.com/repos/pydata/xarray/issues/3991,617375423,MDEyOklzc3VlQ29tbWVudDYxNzM3NTQyMw==,5821660,2020-04-21T19:45:02Z,2020-04-21T19:45:02Z,MEMBER,"@lamorton You can look at this in two different ways. First, try to use `dtype=""|S9""` on both occasions, since this will apply the zero-termination which is needed for the string to be interpreted correctly by netcdf (IIRC). ```python import h5py f = h5py.File(""error_demo.h5"",mode='w') f.create_dataset('name',shape=(),dtype=""|S9"",data=np.array([b'f(Pt,TE)'],dtype='|S9')) f.close() for i in range(20): xr.load_dataset(""error_demo.h5"") ``` ``` Dimensions: () Data variables: name Dimensions: () Data variables: name |S8 b'f(Pt,TE)' ``` From your expectations It seems that the zero-padding is the culprit, since the output of the 'h5netcdf' backend doesn't quite fit. Unfortunately I do not have links at hand with further comments on string handling differences between netcdf/hdf5. There are quite some... ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,604210297