home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1028730657

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/6174#issuecomment-1028730657 https://api.github.com/repos/pydata/xarray/issues/6174 1028730657 IC_kwDOAMm_X849US8h 57705593 2022-02-03T08:39:45Z 2022-02-03T08:41:16Z CONTRIBUTOR

Have you seen xarray.save_mfdataset?

In principle, it was designed for exactly this sort of thing.

Thanks for the hint! Unfortunately, it says already in the docstring that "it is no different than calling to_netcdf repeatedly". And I explained in my OP that this would cause repeated file open/close operations - which is the whole point of this issue.

Furthermore, when using save_mfdataset with my setup, it complains: ValueError: cannot use mode='w' when writing multiple datasets to the same path But when using mode='a' instead, it will complain that the file doesn't exist.

However, it might still be the way to go API-wise. So, when talking about the solution of this issue, we could aim at fixing save_mfdataset: 1) Writing to the same file should use a single open/close operation. 2) Support mode='w' (or mode='w+') when writing several datasets to the same path.

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