Skip to content

Commit

Permalink
Remove drop('x') from add_s_alpha_geometry_coords()
Browse files Browse the repository at this point in the history
The index-value coordinates are now added for dimensions without
coordinates after the geometry is applied, so no 'x' coordinate has been
created to drop.
  • Loading branch information
johnomotani committed Aug 16, 2020
1 parent af22f10 commit 43fe97b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions xbout/geometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,6 @@ def add_s_alpha_geometry_coords(ds, *, coordinates=None, grid=None):
"geometry='s-alpha'")
ds['r'] = ds['hthe'].isel({ycoord: 0}).squeeze(drop=True)
ds['r'].attrs['units'] = 'm'
# remove x-index coordinate, don't need when we have 'r' as a radial coordinate
ds = ds.drop('x')
ds = ds.set_coords('r')
ds = ds.rename(x='r')
ds.metadata['bout_xdim'] = 'r'
Expand Down

0 comments on commit 43fe97b

Please sign in to comment.