From bc1f44a0f39cd19acace4906bc4d87b2d0c1754a Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Wed, 29 Jan 2025 09:34:45 -0800 Subject: [PATCH] add different sizes for dust and sea salt --- NEWS.md | 9 ++- Project.toml | 2 +- .../gpu_aquaplanet_dyamond_diag_1process.yml | 2 +- .../gpu_configs/gpu_aquaplanet_dyamond_ss.yml | 2 +- .../gpu_aquaplanet_dyamond_summer.yml | 2 +- .../gpu_aquaplanet_dyamond_ws_1process.yml | 2 +- .../gpu_aquaplanet_dyamond_ws_2process.yml | 2 +- .../gpu_aquaplanet_dyamond_ws_4process.yml | 2 +- .../longrun_configs/amip_target_diagedmf.yml | 2 +- .../model_configs/gpu_aquaplanet_dyamond.yml | 2 +- src/callbacks/callbacks.jl | 47 +++++--------- src/compat.jl | 45 +++++++++++++ src/diagnostics/tracer_diagnostics.jl | 14 +++-- .../radiation/RRTMGPInterface.jl | 63 ++++++++++++++----- .../radiation/radiation.jl | 60 ++++++++++++++---- src/solver/type_getters.jl | 10 +-- src/solver/types.jl | 10 +-- 17 files changed, 191 insertions(+), 85 deletions(-) diff --git a/NEWS.md b/NEWS.md index 64fbdf6afd..f681488aec 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,13 @@ ClimaAtmos.jl Release Notes Main ------- +### Features + +### Allow different sizes of dust and sea salt for radiation + +Added functionality to allow five different size bins of dust and sea salt aerosols +for radiation calculation. This feature requires RRTMGP version v0.20.0 or later. +PR [3555](https://github.com/CliMA/ClimaAtmos.jl/pull/3555) v0.28.4 ------- @@ -12,7 +19,7 @@ The `.dev` was deprecated. The two utilities in this folder can be replaced with more established and better developed tools: - instead of `clima_format`, use `JuliaFormatter`, - instead of `up_deps`, use `PkgDevTools`. -See the [documentation](https://clima.github.io/ClimaAtmos.jl/dev/contributor_guide/#Formatting) for more information. +See the [documentation](https://clima.github.io/ClimaAtmos.jl/dev/contributor_guide/#Formatting) for more information. `ClimaAtmos` now only support equilibrium moisture + 0-moment microphysics and nonequilibrium + 1-moment microphysics (No precipitation is still supported too). diff --git a/Project.toml b/Project.toml index a1f1241cf8..d25ecb4e36 100644 --- a/Project.toml +++ b/Project.toml @@ -57,7 +57,7 @@ LinearAlgebra = "1" Logging = "1" NCDatasets = "0.14.2" NVTX = "0.3" -RRTMGP = "0.19" +RRTMGP = "0.19, 0.20" Random = "1" SciMLBase = "2.12" StaticArrays = "1.7" diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_diag_1process.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_diag_1process.yml index c385e357c2..3d62e96130 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_diag_1process.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_diag_1process.yml @@ -26,4 +26,4 @@ diagnostics: period: "12hours" prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_ss.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_ss.yml index 41e095a4c2..c6a03f2544 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_ss.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_ss.yml @@ -22,4 +22,4 @@ t_end: "1days" toml: [toml/longrun_aquaplanet.toml] prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_summer.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_summer.yml index c7abb52bbd..095d7c02b7 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_summer.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_summer.yml @@ -21,7 +21,7 @@ t_end: "1hours" toml: [toml/longrun_aquaplanet.toml] prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] start_date: "20160801" initial_condition: "artifact\"DYAMOND_SUMMER_ICS_p98deg\"/DYAMOND_SUMMER_ICS_p98deg.nc" topography: "Earth" diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_1process.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_1process.yml index f8c28a3ced..37c6744ace 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_1process.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_1process.yml @@ -23,4 +23,4 @@ t_end: "1days" toml: [toml/longrun_aquaplanet.toml] prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_2process.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_2process.yml index f95ead399f..95e41fd59f 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_2process.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_2process.yml @@ -23,4 +23,4 @@ t_end: "1days" toml: [toml/longrun_aquaplanet.toml] prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] diff --git a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_4process.yml b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_4process.yml index ca33a34712..3b1db62503 100644 --- a/config/gpu_configs/gpu_aquaplanet_dyamond_ws_4process.yml +++ b/config/gpu_configs/gpu_aquaplanet_dyamond_ws_4process.yml @@ -22,4 +22,4 @@ t_end: "1days" toml: [toml/longrun_aquaplanet.toml] prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] diff --git a/config/longrun_configs/amip_target_diagedmf.yml b/config/longrun_configs/amip_target_diagedmf.yml index f293f77d87..e2e94e8857 100644 --- a/config/longrun_configs/amip_target_diagedmf.yml +++ b/config/longrun_configs/amip_target_diagedmf.yml @@ -16,7 +16,7 @@ insolation: "timevarying" co2_model: maunaloa prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] surface_setup: "DefaultMoninObukhov" turbconv: "diagnostic_edmfx" implicit_diffusion: true diff --git a/config/model_configs/gpu_aquaplanet_dyamond.yml b/config/model_configs/gpu_aquaplanet_dyamond.yml index ebad2b65fd..2d97f9ab0c 100644 --- a/config/model_configs/gpu_aquaplanet_dyamond.yml +++ b/config/model_configs/gpu_aquaplanet_dyamond.yml @@ -20,7 +20,7 @@ dt: "90secs" t_end: "8hours" prescribe_ozone: true aerosol_radiation: true -prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04"] +prescribed_aerosols: ["CB1", "CB2", "DST01", "DST02", "DST03", "DST04", "DST05", "OC1", "OC2", "SO4", "SSLT01", "SSLT02", "SSLT03", "SSLT04", "SSLT05"] prescribe_clouds_in_radiation: true radiation_reset_rng_seed: true toml: [toml/longrun_aquaplanet.toml] diff --git a/src/callbacks/callbacks.jl b/src/callbacks/callbacks.jl index 9c6e3fa98c..8f10c5e78b 100644 --- a/src/callbacks/callbacks.jl +++ b/src/callbacks/callbacks.jl @@ -198,41 +198,28 @@ NVTX.@annotate function rrtmgp_model_callback!(integrator) if !(radiation_mode isa RRTMGPI.GrayRadiation) if radiation_mode.aerosol_radiation + _update_some_aerosol_conc(Y, p) ᶜΔz = Fields.Δz_field(Y.c) - ᶜaero_conc = Fields.array2field( - rrtmgp_model.center_dust_column_mass_density, - axes(Y.c), - ) - @. ᶜaero_conc = 0 - for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04] - if prescribed_aerosol_name in - propertynames(p.tracers.prescribed_aerosols_field) - aerosol_field = getproperty( - p.tracers.prescribed_aerosols_field, - prescribed_aerosol_name, - ) - @. ᶜaero_conc += aerosol_field * Y.c.ρ * ᶜΔz - end - end - - ᶜaero_conc = Fields.array2field( - rrtmgp_model.center_ss_column_mass_density, - axes(Y.c), - ) - @. ᶜaero_conc = 0 - for prescribed_aerosol_name in [:SSLT01, :SSLT02, :SSLT03, :SSLT04] - if prescribed_aerosol_name in - propertynames(p.tracers.prescribed_aerosols_field) - aerosol_field = getproperty( - p.tracers.prescribed_aerosols_field, - prescribed_aerosol_name, - ) - @. ᶜaero_conc += aerosol_field * Y.c.ρ * ᶜΔz - end + if pkgversion(RRTMGP) <= v"0.19.2" + more_aerosols = () + else + more_aerosols = ( + (:center_dust1_column_mass_density, :DST01), + (:center_dust2_column_mass_density, :DST02), + (:center_dust3_column_mass_density, :DST03), + (:center_dust4_column_mass_density, :DST04), + (:center_dust5_column_mass_density, :DST05), + (:center_ss1_column_mass_density, :SSLT01), + (:center_ss2_column_mass_density, :SSLT02), + (:center_ss3_column_mass_density, :SSLT03), + (:center_ss4_column_mass_density, :SSLT04), + (:center_ss5_column_mass_density, :SSLT05), + ) end aerosol_names_pair = [ + more_aerosols..., (:center_so4_column_mass_density, :SO4), (:center_bcpi_column_mass_density, :CB2), (:center_bcpo_column_mass_density, :CB1), diff --git a/src/compat.jl b/src/compat.jl index 03b9931e53..4e82f0a783 100644 --- a/src/compat.jl +++ b/src/compat.jl @@ -1,6 +1,7 @@ import ClimaCore import ClimaUtilities import ClimaCore: Domains, Spaces, Topologies +import RRTMGP # To allow for backwards compatibility of ClimaCore: if pkgversion(ClimaCore) < v"0.14.18" @@ -95,3 +96,47 @@ else WallTimeInfo = ClimaUtilities.OnlineLogging.WallTimeInfo report_walltime = ClimaUtilities.OnlineLogging.report_walltime end + + +if pkgversion(RRTMGP) <= v"0.19.2" + function _update_some_aerosol_conc(Y, p) + ᶜΔz = Fields.Δz_field(Y.c) + rrtmgp_model = p.radiation.rrtmgp_model + ᶜaero_conc = Fields.array2field( + rrtmgp_model.center_dust_column_mass_density, + axes(Y.c), + ) + @. ᶜaero_conc = 0 + for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04] + if prescribed_aerosol_name in + propertynames(p.tracers.prescribed_aerosols_field) + aerosol_field = getproperty( + p.tracers.prescribed_aerosols_field, + prescribed_aerosol_name, + ) + @. ᶜaero_conc += aerosol_field * Y.c.ρ * ᶜΔz + end + end + + ᶜaero_conc = Fields.array2field( + rrtmgp_model.center_ss_column_mass_density, + axes(Y.c), + ) + @. ᶜaero_conc = 0 + for prescribed_aerosol_name in [:SSLT01, :SSLT02, :SSLT03, :SSLT04] + if prescribed_aerosol_name in + propertynames(p.tracers.prescribed_aerosols_field) + aerosol_field = getproperty( + p.tracers.prescribed_aerosols_field, + prescribed_aerosol_name, + ) + @. ᶜaero_conc += aerosol_field * Y.c.ρ * ᶜΔz + end + end + return nothing + end +else + function _update_some_aerosol_conc(_, _) + return nothing + end +end diff --git a/src/diagnostics/tracer_diagnostics.jl b/src/diagnostics/tracer_diagnostics.jl index 3a9e66f3d1..ec98cd6c70 100644 --- a/src/diagnostics/tracer_diagnostics.jl +++ b/src/diagnostics/tracer_diagnostics.jl @@ -32,12 +32,12 @@ function compute_dust!(out, state, cache, time) error("Aerosols do not exist in the model") any( x -> x in propertynames(cache.tracers.prescribed_aerosols_field), - [:DST01, :DST02, :DST03, :DST04], + [:DST01, :DST02, :DST03, :DST04, :DST05], ) || error("Dust does not exist in the model") if isnothing(out) aero_conc = cache.scratch.ᶜtemp_scalar @. aero_conc = 0 - for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04] + for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04, :DST05] if prescribed_aerosol_name in propertynames(cache.tracers.prescribed_aerosols_field) aerosol_field = getproperty( @@ -51,7 +51,7 @@ function compute_dust!(out, state, cache, time) else aero_conc = cache.scratch.ᶜtemp_scalar @. aero_conc = 0 - for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04] + for prescribed_aerosol_name in [:DST01, :DST02, :DST03, :DST04, :DST05] if prescribed_aerosol_name in propertynames(cache.tracers.prescribed_aerosols_field) aerosol_field = getproperty( @@ -70,12 +70,13 @@ function compute_sea_salt!(out, state, cache, time) error("Aerosols do not exist in the model") any( x -> x in propertynames(cache.tracers.prescribed_aerosols_field), - [:SSLT01, :SSLT02, :SSLT03, :SSLT04], + [:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05], ) || error("Sea salt does not exist in the model") if isnothing(out) aero_conc = cache.scratch.ᶜtemp_scalar @. aero_conc = 0 - for prescribed_aerosol_name in [:SSLT01, :SSLT02, :SSLT03, :SSLT04] + for prescribed_aerosol_name in + [:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05] if prescribed_aerosol_name in propertynames(cache.tracers.prescribed_aerosols_field) aerosol_field = getproperty( @@ -89,7 +90,8 @@ function compute_sea_salt!(out, state, cache, time) else aero_conc = cache.scratch.ᶜtemp_scalar @. aero_conc = 0 - for prescribed_aerosol_name in [:SSLT01, :SSLT02, :SSLT03, :SSLT04] + for prescribed_aerosol_name in + [:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05] if prescribed_aerosol_name in propertynames(cache.tracers.prescribed_aerosols_field) aerosol_field = getproperty( diff --git a/src/parameterized_tendencies/radiation/RRTMGPInterface.jl b/src/parameterized_tendencies/radiation/RRTMGPInterface.jl index fa2c98dd3f..499153cca4 100644 --- a/src/parameterized_tendencies/radiation/RRTMGPInterface.jl +++ b/src/parameterized_tendencies/radiation/RRTMGPInterface.jl @@ -30,9 +30,9 @@ struct AllSkyRadiation{ACR <: AbstractCloudInRadiation} <: AbstractRRTMGPMode add_isothermal_boundary_layer::Bool aerosol_radiation::Bool """ - Reset the RNG seed before calling RRTGMP to a known value (the timestep number). - When modeling cloud optics, RRTGMP uses a random number generator. - Resetting the seed every time RRTGMP is called to a deterministic value ensures that + Reset the RNG seed before calling RRTMGP to a known value (the timestep number). + When modeling cloud optics, RRTMGP uses a random number generator. + Resetting the seed every time RRTMGP is called to a deterministic value ensures that the simulation is fully reproducible and can be restarted in a reproducible way. Disable this option when running production runs. """ @@ -47,9 +47,9 @@ struct AllSkyRadiationWithClearSkyDiagnostics{ add_isothermal_boundary_layer::Bool aerosol_radiation::Bool """ - Reset the RNG seed before calling RRTGMP to a known value (the timestep number). - When modeling cloud optics, RRTGMP uses a random number generator. - Resetting the seed every time RRTGMP is called to a deterministic value ensures that + Reset the RNG seed before calling RRTMGP to a known value (the timestep number). + When modeling cloud optics, RRTMGP uses a random number generator. + Resetting the seed every time RRTMGP is called to a deterministic value ensures that the simulation is fully reproducible and can be restarted in a reproducible way. Disable this option when running production runs. """ @@ -831,16 +831,47 @@ function RRTMGPModel( # See the lookup table in RRTMGP for the order of aerosols aero_size = DA{FT}(undef, n_aerosol_sizes, nlay, ncol) aero_mass = DA{FT}(undef, n_aerosols, nlay, ncol) - aerosol_size_names = ["dust", "ss"] - aerosol_names = - ["dust", "ss", "so4", "bcpi", "bcpo", "ocpi", "ocpo"] - for (i, name) in enumerate(aerosol_size_names) - set_and_save!( - view(aero_size, i, :, :), - "center_$(name)_radius", - t..., - dict, - ) + + if pkgversion(RRTMGP) <= v"0.19.2" + aerosol_size_names = ["dust", "ss"] + aerosol_names = + ["dust", "ss", "so4", "bcpi", "bcpo", "ocpi", "ocpo"] + for (i, name) in enumerate(aerosol_size_names) + set_and_save!( + view(aero_size, i, :, :), + "center_$(name)_radius", + t..., + dict, + ) + end + else + aerosol_names = [ + "dust1", + "ss1", + "so4", + "bcpi", + "bcpo", + "ocpi", + "ocpo", + "dust2", + "dust3", + "dust4", + "dust5", + "ss2", + "ss3", + "ss4", + "ss5", + ] + for (i, name) in enumerate(aerosol_names) + if occursin("dust", name) || occursin("ss", name) + set_and_save!( + view(aero_size, i, :, :), + "center_$(name)_radius", + t..., + dict, + ) + end + end end for (i, name) in enumerate(aerosol_names) set_and_save!( diff --git a/src/parameterized_tendencies/radiation/radiation.jl b/src/parameterized_tendencies/radiation/radiation.jl index 65f8d4055c..554a2770e8 100644 --- a/src/parameterized_tendencies/radiation/radiation.jl +++ b/src/parameterized_tendencies/radiation/radiation.jl @@ -121,10 +121,12 @@ function radiation_model_cache( "DST02", "DST03", "DST04", + "DST05", "SSLT01", "SSLT02", "SSLT03", "SSLT04", + "SSLT05", "SO4", "CB1", "CB2", @@ -244,19 +246,51 @@ function radiation_model_cache( end if aerosol_radiation - kwargs = (; - kwargs..., - # assuming fixed aerosol radius - center_dust_radius = 0.55, - center_ss_radius = 11.5, - center_dust_column_mass_density = NaN, # initialized in callback - center_ss_column_mass_density = NaN, # initialized in callback - center_so4_column_mass_density = NaN, # initialized in callback - center_bcpi_column_mass_density = NaN, # initialized in callback - center_bcpo_column_mass_density = NaN, # initialized in callback - center_ocpi_column_mass_density = NaN, # initialized in callback - center_ocpo_column_mass_density = NaN, # initialized in callback - ) + if pkgversion(RRTMGP) <= v"0.19.2" + kwargs = (; + kwargs..., + # assuming fixed aerosol radius + center_dust_radius = 0.55, + center_ss_radius = 11.5, + center_dust_column_mass_density = NaN, # initialized in callback + center_ss_column_mass_density = NaN, # initialized in callback + center_so4_column_mass_density = NaN, # initialized in callback + center_bcpi_column_mass_density = NaN, # initialized in callback + center_bcpo_column_mass_density = NaN, # initialized in callback + center_ocpi_column_mass_density = NaN, # initialized in callback + center_ocpo_column_mass_density = NaN, # initialized in callback + ) + else + kwargs = (; + kwargs..., + # assuming fixed aerosol radius + center_dust1_radius = 0.55, + center_dust2_radius = 1.4, + center_dust3_radius = 2.4, + center_dust4_radius = 4.5, + center_dust5_radius = 7.5, + center_ss1_radius = 0.55, + center_ss2_radius = 1.4, + center_ss3_radius = 2.4, + center_ss4_radius = 4.5, + center_ss5_radius = 7.5, + center_dust1_column_mass_density = NaN, # initialized in callback + center_dust2_column_mass_density = NaN, # initialized in callback + center_dust3_column_mass_density = NaN, # initialized in callback + center_dust4_column_mass_density = NaN, # initialized in callback + center_dust5_column_mass_density = NaN, # initialized in callback + center_ss1_column_mass_density = NaN, # initialized in callback + center_ss2_column_mass_density = NaN, # initialized in callback + center_ss3_column_mass_density = NaN, # initialized in callback + center_ss4_column_mass_density = NaN, # initialized in callback + center_ss5_column_mass_density = NaN, # initialized in callback + center_so4_column_mass_density = NaN, # initialized in callback + center_bcpi_column_mass_density = NaN, # initialized in callback + center_bcpo_column_mass_density = NaN, # initialized in callback + center_ocpi_column_mass_density = NaN, # initialized in callback + center_ocpo_column_mass_density = NaN, # initialized in callback + ) + end end end diff --git a/src/solver/type_getters.jl b/src/solver/type_getters.jl index 9763f02e56..f3cfe3b1f5 100644 --- a/src/solver/type_getters.jl +++ b/src/solver/type_getters.jl @@ -31,15 +31,15 @@ function get_atmos(config::AtmosConfig, params) ozone = IdealizedOzone() end co2 = get_co2(parsed_args) - with_rrtgmp = radiation_mode isa RRTMGPI.AbstractRRTMGPMode - if with_rrtgmp && isnothing(co2) + with_rrtmgp = radiation_mode isa RRTMGPI.AbstractRRTMGPMode + if with_rrtmgp && isnothing(co2) @warn ( - "co2_model set to nothing with an RRTGMP model. Resetting to FixedCO2" + "co2_model set to nothing with an RRTMGP model. Resetting to FixedCO2" ) co2 = FixedCO2() end - (isnothing(co2) && !with_rrtgmp) && - @warn ("$(co2) does nothing if RRTGMP is not used") + (isnothing(co2) && !with_rrtmgp) && + @warn ("$(co2) does nothing if RRTMGP is not used") diffuse_momentum = !(forcing_type isa HeldSuarezForcing) diff --git a/src/solver/types.jl b/src/solver/types.jl index ebdbe804ca..d6794ffd85 100644 --- a/src/solver/types.jl +++ b/src/solver/types.jl @@ -139,7 +139,7 @@ abstract type AbstractCO2 end Implement a static CO2 profile as read from disk. -The data used is the one distributed with `RRTGMP.jl`. +The data used is the one distributed with `RRTMGP.jl`. By default, this is 397.547 parts per million. @@ -168,7 +168,7 @@ struct MaunaLoaCO2 <: AbstractCO2 end Describe how cloud properties should be set in radiation. -This is only relevant for RRTGMP. +This is only relevant for RRTMGP. """ abstract type AbstractCloudInRadiation end @@ -523,11 +523,11 @@ Base.@kwdef struct AtmosModel{ forcing_type::F = nothing subsidence::S = nothing - # Currently only relevant for RRTGMP, but will hopefully become standalone + # Currently only relevant for RRTMGP, but will hopefully become standalone # in the future - """What to do with ozone for radiation (when using RRTGMP)""" + """What to do with ozone for radiation (when using RRTMGP)""" ozone::OZ = nothing - """What to do with co2 for radiation (when using RRTGMP)""" + """What to do with co2 for radiation (when using RRTMGP)""" co2::CO2 = nothing radiation_mode::RM = nothing