diff --git a/src/callbacks/callbacks.jl b/src/callbacks/callbacks.jl index 5ace4bbd53a..5ec29cc8eaf 100644 --- a/src/callbacks/callbacks.jl +++ b/src/callbacks/callbacks.jl @@ -262,11 +262,7 @@ function set_aerosol_type(; OC2 = 0, _..., ) - maxval = max(DST01, SSLT01, SO4, CB1, CB2, OC1, OC2) - index = findfirst( - c -> c == maxval, - (DST01, SSLT01, SO4, CB1, CB2, OC1, OC2), - ) + _, index = findmax((DST01, SSLT01, SO4, CB1, CB2, OC1, OC2))::Tuple{Float32, Int} return index end set_aerosol_type(NT) = set_aerosol_type(; NT...)