home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 400902555

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/2256#issuecomment-400902555 https://api.github.com/repos/pydata/xarray/issues/2256 400902555 MDEyOklzc3VlQ29tbWVudDQwMDkwMjU1NQ== 1197350 2018-06-28T03:51:34Z 2018-06-28T03:51:34Z MEMBER

Can you clarify what you are trying to achieve with the transformations?

Why not do something like this? python for file in filenames: ds = xr.open_dataset(file) ds.to_zarr(file + '.zarr')

I'm particularly confused by this line: cycles[int(ds.CYCLE_NUMBER.values[0])-1]=ds Could it be that you are describing the "straight pickle to zarr array" workflow you referred to in your earlier post? This is definitely an unconventional and not recommended way to interface xarray with zarr. It would be better to use the built-in .to_zarr() function. We can help you debug why that isn't working well, but we need more information.

Specifically:

Could you please post the repr of a single netcdf dataset from this collection, i.e. python ds = xr.open_dataset('file.nc') print(ds)

Then could you call ds.to_zarr() and describe the contents of the resulting zarr store in more detail? (For example, could you list the directories within the store?)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  336458472
Powered by Datasette · Queries took 0.625ms · About: xarray-datasette