home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1039303417

This data as json

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-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': 'm2 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 tosub.nc`:

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
Powered by Datasette · Queries took 0.989ms · About: xarray-datasette