home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1395962467

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1395962467 I_kwDOAMm_X85TNLJj 7121 Add rename_variables argument to xr.open_dataset() to workaround vars with same names as dims 60435591 closed 0     2 2022-10-04T09:43:56Z 2022-10-05T10:00:12Z 2022-10-05T10:00:12Z CONTRIBUTOR      

Is your feature request related to a problem?

Yes, xarray not being able to open netcdf files with non-unique variable/dimension names is an issue for many people. Me personally have come across several files where this is an issue. As a not so nice workaround I use drop_variables for variables x/y before reading the file with xarray, and then adding them again under a different name with help of the netCDF4 library. It would be very convenient to have a rename_variables argument for xr.open_dataset() (and xr.open_mfdataset()).

This suggestion was also made by others in other issues but I cannot find a feature request for it: by @jthielen in https://github.com/pydata/xarray/issues/2233#issuecomment-782188310 by @markelg in https://github.com/pydata/xarray/issues/2368#issuecomment-415402600

Describe the solution you'd like

rename_variables argument for xr.open_dataset() (and xr.open_mfdataset()).

Describe alternatives you've considered

No response

Additional context

No response

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7121/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.634ms · About: xarray-datasette