From 340c46d8f299034436cdf6329ec6bba9437cfad6 Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:49:54 -0700 Subject: [PATCH] try adding type to findmax --- src/callbacks/callbacks.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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...)