Skip to content

Commit

Permalink
make aerosol radiation work on GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Jul 9, 2024
1 parent 1b7ecf2 commit b4c8b21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/model_configs/gpu_aquaplanet_dyamond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
5 changes: 2 additions & 3 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,9 @@ function set_aerosol_type(;
OC2 = 0,
_...,
)
_, index = findmax((DST01, SSLT01, SO4, CB1, CB2, OC1, OC2))
return index
return argmax(n -> (DST01, SSLT01, SO4, CB1, CB2, OC1, OC2)[n], 1:7)
end
set_aerosol_type(NT) = set_aerosol_type(; NT...)
set_aerosol_type(nt) = set_aerosol_type(; nt...)

NVTX.@annotate function save_state_to_disk_func(integrator, output_dir)
(; t, u, p) = integrator
Expand Down

0 comments on commit b4c8b21

Please sign in to comment.