Dear Nagarjuna,
I am not sure if I understood exactly what you want, but have you tried the @min and @max?
If you want to find the min and max at each point along a time series, all you have to do is:
(Assuming your variable is the temperature)
let temp_max = temperature[L=@max]
let temp_min = temperature[L=@min]
In the same fashion, if you want to find the min and max along the depth, all you have to do is substitute the "L" for "K", and so on.
let temp_max = temperature[K=@max]
let temp_min = temperature[K=@min]
Was that your question?
Regards,
André Paim