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"})
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.
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"})