diff --git a/config/model_configs/gpu_aquaplanet_dyamond.yml b/config/model_configs/gpu_aquaplanet_dyamond.yml index 50c4a508696..c4e0430a780 100644 --- a/config/model_configs/gpu_aquaplanet_dyamond.yml +++ b/config/model_configs/gpu_aquaplanet_dyamond.yml @@ -18,5 +18,6 @@ surface_setup: "DefaultMoninObukhov" rayleigh_sponge: true dt: "100secs" t_end: "8hours" +aerosol_radiation: true prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "OC1", "OC2", "SO4", "SOA", "SSLT01", "SSLT02", "SSLT03", "SSLT04"] toml: [toml/longrun_aquaplanet_dyamond.toml] diff --git a/src/callbacks/callbacks.jl b/src/callbacks/callbacks.jl index 1da95fe6b20..333a284f92d 100644 --- a/src/callbacks/callbacks.jl +++ b/src/callbacks/callbacks.jl @@ -262,7 +262,11 @@ function set_aerosol_type(; OC2 = 0, _..., ) - _, index = findmax((DST01, SSLT01, SO4, CB1, CB2, OC1, OC2)) + maxval = max(DST01, SSLT01, SO4, CB1, CB2, OC1, OC2) + index = findfirst( + c -> c == maxval, + (DST01, SSLT01, SO4, CB1, CB2, OC1, OC2), + )::Int return index end set_aerosol_type(NT) = set_aerosol_type(; NT...)