I have an image collection with precipitation data for one year, say TerraClimate data, with 12 images in the collection (one for each month), each containing average monthly precipitation data. Let's call this image collection "
To get the minimum monthly precipitation at each location across the year one would simply do the following and apply a minimum reducer:
var minprecip = precip.min();
However, how would one go about getting the MONTH in which the minimum value occurred?
I.e. the resulting image would have values ranging from 1-12, depending on which image in the collection contained the minimum precipitation value for the pixel.
This seems like a relatively simple question, but I am unable to find any way to get a reducer key or otherwise figure out how to approach the problem.