How to loop through one array and select values based on indices in another array?
I am trying to take values from t2m_data (a dataarray of lat/lon with associated 2 meter temperatures in chronological order from November 1 1980 through March 31 2021) and index them based on weather regimes in Regimes_cluster (a data array of just the clusters in chronological order from November 1 1980 through March 31 2021). The end result would be a data array of 2 meter temperatures for regime 0 (Arctic Low), regime 1 (Alaskan Ridge), regime 3 (Pacific trough), and regime 4 (Arctic High), which I could then make composites for each.