home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 430780110

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/2022#issuecomment-430780110 https://api.github.com/repos/pydata/xarray/issues/2022 430780110 MDEyOklzc3VlQ29tbWVudDQzMDc4MDExMA== 1197350 2018-10-17T20:37:28Z 2018-10-17T20:37:28Z MEMBER

We may have people interested in working on this soon.

I think we have some details to sort out regarding the api for appending. The most generic case looks something like this

```python ds1 = xr.open_dataset('file1.nc')

file2.nc already exists

ds1.to_netcdf('file2.nc', mode='a+') ```

We need to figure out what should happen under different circumstances. Some cases are: - We are just adding or completely overwriting variables. This works currently (from the docs: "If mode=’a’, existing variables will be overwritten"). But I'm not sure what happens if there is a conflict between coordinates among the new and old variables. - ds1 has some of the same variables as ds2, possibly with overlapping coordinates. In this case, we want to do some kind of append. If there is no overlap between coordinates, then it's straightforward: put the extra values from ds1 into file2.nc. If there is overlap, then there are two options: - overwrite all of the overlapping portion with ds1, or - keep the existing values from ds2. - With netCDF, there is an additional limitation that the underlying library will only let you extend along one dimension (the UNLIMITED one). Other backends like zarr will let you extend along many dimensions.

It seems like much of the logic for overlapping dimension should be able to be handled via align. The hard part will be figuring out how to tell the store to write to the appropriate regions of its arrays.

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