Skip to content

Commit

Permalink
rename_dims -> swap_dims
Browse files Browse the repository at this point in the history
seems like this allows things to work

possibly relevant: pydata/xarray#6607
  • Loading branch information
zmoon committed Oct 25, 2022
1 parent 74977fc commit 89ac0d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions melodies_monet/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ def get_aeronet(
.groupby("siteid")
.first() # TODO: would be nice to confirm unique-ness
.to_xarray()
.rename_dims(siteid="x")
.swap_dims(siteid="x")
)

ds = (
df
.set_index(["time", "siteid"])
.to_xarray()
.rename_dims(siteid="x")
.swap_dims(siteid="x")
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(site_vns)
Expand Down Expand Up @@ -384,7 +384,7 @@ def get_airnow(
.groupby("siteid")
.first()
.to_xarray()
.rename_dims(siteid="x")
.swap_dims(siteid="x")
)

# Extract units info so we can add as attrs
Expand All @@ -398,7 +398,7 @@ def get_airnow(
df[cols]
.set_index(["time", "siteid"])
.to_xarray()
.rename_dims(siteid="x")
.swap_dims(siteid="x")
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(["latitude", "longitude"])
Expand Down

0 comments on commit 89ac0d2

Please sign in to comment.