coecms / xmhw

Xarray version of Marine Heatwaves code by Eric Olivier
https://xmhw.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

using swap_dims instead of rename for time dimension #51

Closed paolap closed 1 year ago

paolap commented 1 year ago

UserWarning: rename 'time' to 'time' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate. temp = temp.rename({tdim: "time"})

paolap commented 1 year ago

Turns out this is different, there's now a specific rename_dims option but works only for Dataset, and using "rename" on a test DataArray still keep the index. So I will ignore the warning.