issues: 455200681
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
455200681 | MDU6SXNzdWU0NTUyMDA2ODE= | 3017 | Why am I running into a IndexVariable error message while assigning dims? | 2014301 | closed | 0 | 1 | 2019-06-12T13:01:44Z | 2020-04-06T22:43:53Z | 2020-04-06T22:43:53Z | NONE | Code Sample, a copy-pastable example if possibleI am trying to remove the (north_south, east_west) from ```python ncdat = xr.open_mfdataset(files_lis) ncdat['lat']=ncdat['lat'].isel(time=0).drop('time') ncdat['lon']=ncdat['lon'].isel(time=0).drop('time') ncdat=ncdat.rename({'north_south':'lat', 'east_west':'lon'}) lat_coords = ncdat['lat'].values[:,-1] #Extract latitudes lon_coords = ncdat['lon'].values[-1,:] #Extract longitudes reformatted_ncdat=ncdat.assign_coords(lat=lat_coords, lon=lon_coords, time=ncdat.coords['time']) ``` Problem descriptionThis is Error
Expected OutputPlease ignore values. Just an illustration.
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3017/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |