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/6272#issuecomment-1039323638,https://api.github.com/repos/pydata/xarray/issues/6272,1039323638,IC_kwDOAMm_X8498tH2,2042458,2022-02-14T16:59:07Z,2022-02-14T16:59:07Z,NONE,"oh and another strange thing. The timeseries I multiply by 1 and save to `sub1.nc` is not exaclty the same: ![image](https://user-images.githubusercontent.com/2042458/153910341-afadaa94-364f-43d8-b51a-0adae0843df0.png) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1136315478 https://github.com/pydata/xarray/issues/6272#issuecomment-1039317394,https://api.github.com/repos/pydata/xarray/issues/6272,1039317394,IC_kwDOAMm_X8498rmS,2042458,2022-02-14T16:53:06Z,2022-02-14T16:53:06Z,NONE,"and in case I multiply the variable `z` prioir to save `to_netcdf()` ``` In [78]: (ds.z.isel(latitude=[1,2,3], longitude=[3,4,5])*1).to_netcdf('sub1.nc') In [79]: d1 = xr.open_dataset('sub1.nc') In [80]: d1.z.encoding Out[80]: {'zlib': False, 'shuffle': False, 'complevel': 0, 'fletcher32': False, 'contiguous': True, 'chunksizes': None, 'source': '/home/simonfi/github/TopoPyScale_examples/ex1_norway_finse/sub1.nc', 'original_shape': (35760, 14, 3, 3), 'dtype': dtype('float32'), '_FillValue': nan} ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1136315478 https://github.com/pydata/xarray/issues/6272#issuecomment-1039303417,https://api.github.com/repos/pydata/xarray/issues/6272,1039303417,IC_kwDOAMm_X8498oL5,2042458,2022-02-14T16:39:49Z,2022-02-14T16:41:15Z,NONE,"Thank you for your reply @andersy005. So this is the encodiing before writing to netcdf, when loaded with `xr.open_mfdataset()`: ``` In [61]: ds.z.isel(latitude=[1,2,3], longitude=[3,4,5]).encoding Out[61]: {'source': '/home/simonfi/github/TopoPyScale_examples/ex1_norway_finse/inputs/climate/PLEV_197810.nc', 'original_shape': (744, 14, 7, 10), 'dtype': dtype('int16'), 'missing_value': -32767, '_FillValue': -32767, 'scale_factor': 0.6796473581594864, 'add_offset': 21239.89345268811} In [63]: ds.z.isel(latitude=[1,2,3], longitude=[3,4,5]).attrs Out[63]: {'units': 'm**2 s**-2', 'long_name': 'Geopotential', 'standard_name': 'geopotential'} ``` After saving to netcdf with `ds.z.isel(latitude=[1,2,3], longitude=[3,4,5]).to_netcdf('sub.nc')`, ``` In [64]: d.z.encoding Out[64]: {'zlib': False, 'shuffle': False, 'complevel': 0, 'fletcher32': False, 'contiguous': True, 'chunksizes': None, 'source': '/home/simonfi/github/TopoPyScale_examples/ex1_norway_finse/sub.nc', 'original_shape': (35760, 14, 3, 3), 'dtype': dtype('int16'), 'missing_value': -32767, '_FillValue': -32767, 'scale_factor': 0.6796473581594864, 'add_offset': 21239.89345268811} ``` So the chuncks were concatenated into this single file. Now, if I look at for instance the same timeseries before and after saving to `sub.nc`: ![image](https://user-images.githubusercontent.com/2042458/153906437-82ead64c-9fdb-46d5-916d-917c2b15957e.png) As this offset is not applied constantly in the dimension `time`, I though this could be seen as a ""bug"". Could it be that if the encoding is not specified, each dask chunck are encoded independently? *sorry for the large data gap in between 1980 and the 2000's. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1136315478