Skip to content

Commit

Permalink
try adding type to findmax
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Jul 9, 2024
1 parent 8d138cb commit 340c46d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit 340c46d

Please sign in to comment.