Hi,

I have the following dataset:

<xarray.DataArray 'tp_climatology_mean' (dayofyear: 366, lat: 21, lon: 21)>
[161406 values with dtype=float32]
Coordinates:
    realization  int64 ...
  * lat          (lat) float64 -2.0 -1.9 -1.8 -1.7 -1.6 ... -0.3 -0.2 -0.1 0.0
  * lon          (lon) float64 34.0 34.1 34.2 34.3 34.4 ... 35.7 35.8 35.9 36.0
  * dayofyear    (dayofyear) int64 1 2 3 4 5 6 7 ... 360 361 362 363 364 365 366
Attributes:
    units:    m

Would it be possible to find the dayofyear where the value is smallest/largest for each grid cell? I can find the minimum/maximum value but I can't find the day of this value.

Thank you.