Skip to content

Commit

Permalink
Merge pull request #297 from zmoon/cli-dims-warning
Browse files Browse the repository at this point in the history
CLI: address xarray `.dims` -> `.sizes` warning
  • Loading branch information
zmoon authored Nov 4, 2024
2 parents 104162a + c01e098 commit ae42d6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions melodies_monet/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_aeronet(
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(site_vns)
.assign(x=range(ds_site.dims["x"]))
.assign(x=range(ds_site.sizes["x"]))
.expand_dims("y")
.transpose("time", "y", "x")
)
Expand Down Expand Up @@ -459,7 +459,7 @@ def get_airnow(
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(["latitude", "longitude"])
.assign(x=range(ds_site.dims["x"]))
.assign(x=range(ds_site.sizes["x"]))
)

# Add units
Expand Down Expand Up @@ -670,7 +670,7 @@ def get_utc_offset(*, lat, lon):
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(["latitude", "longitude"])
.assign(x=range(ds_site.dims["x"]))
.assign(x=range(ds_site.sizes["x"]))
)

# Add units
Expand Down Expand Up @@ -889,7 +889,7 @@ def get_utc_offset(*, lat, lon):
.drop_vars(site_vns)
.merge(ds_site)
.set_coords(["latitude", "longitude"])
.assign(x=range(ds_site.dims["x"]))
.assign(x=range(ds_site.sizes["x"]))
)

# Add units
Expand Down Expand Up @@ -1129,7 +1129,7 @@ def get_aqs(
.swap_dims(siteid="x")
.merge(ds_site)
.set_coords(["latitude", "longitude"])
.assign(x=range(ds_site.dims["x"]))
.assign(x=range(ds_site.sizes["x"]))
)

# Add units
Expand Down

0 comments on commit ae42d6d

Please sign in to comment.