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/4784#issuecomment-761141874,https://api.github.com/repos/pydata/xarray/issues/4784,761141874,MDEyOklzc3VlQ29tbWVudDc2MTE0MTg3NA==,10194086,2021-01-15T19:25:25Z,2021-01-15T19:25:25Z,MEMBER,@fmaussion - do you have an opinion here?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,782440858
https://github.com/pydata/xarray/issues/4784#issuecomment-760459257,https://api.github.com/repos/pydata/xarray/issues/4784,760459257,MDEyOklzc3VlQ29tbWVudDc2MDQ1OTI1Nw==,53100696,2021-01-14T20:32:48Z,2021-01-14T20:32:48Z,NONE,"I haven't found anywhere where geotiffs are meant to follow cf-conventions and the HDF from which the geotiff was generated doesn't seem to have the scale_factor/add_offset metadata. I think the change that should be made is that when loading a zarr or anything else that is expected to follow CF conventions a type check (and possible type cast) is made before trying to apply `scale_factor` and `add_offset`
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,782440858
https://github.com/pydata/xarray/issues/4784#issuecomment-757791198,https://api.github.com/repos/pydata/xarray/issues/4784,757791198,MDEyOklzc3VlQ29tbWVudDc1Nzc5MTE5OA==,10194086,2021-01-11T09:27:49Z,2021-01-11T09:27:49Z,MEMBER,"The scale factor is already a string in `img.attrs`
```python
img.attrs[""scale_factor""]
# returns '0.0001'
```
The `attrs` are assigned without making any change
https://github.com/pydata/xarray/blob/5296ed18272a856d478fbbb3d3253205508d1c2d/xarray/backends/rasterio_.py#L337
So I think there is nothing going ""wrong"" - but maybe they should be converted anyways? I am not familiar with tif files - do they follow cf-conventions? Can they save `meta` only as string? Or is that wrong in your source file?
There is also
```python
img.attrs[""scales""]
(0.0001,)
```
https://github.com/pydata/xarray/blob/5296ed18272a856d478fbbb3d3253205508d1c2d/xarray/backends/rasterio_.py#L310
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,782440858