Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prescribe hourly cloud and water vapor #3498

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ NVTX.@annotate function rrtmgp_model_callback!(integrator)
end

# assume that ᶜq_vap = ᶜq_tot when computing ᶜvmr_h2o
@. ᶜvmr_h2o = TD.shum_to_mixing_ratio(ᶜq_tot, ᶜq_tot)
@. ᶜvmr_h2o = TD.vol_vapor_mixing_ratio(
thermo_params,
TD.PhasePartition(ᶜq_tot),
)
else
@. ᶜvmr_h2o = TD.vol_vapor_mixing_ratio(
thermo_params,
Expand All @@ -148,6 +151,16 @@ NVTX.@annotate function rrtmgp_model_callback!(integrator)
if radiation_mode isa RRTMGPI.AllSkyRadiation ||
radiation_mode isa RRTMGPI.AllSkyRadiationWithClearSkyDiagnostics
if !radiation_mode.idealized_clouds
if radiation_mode.cloud isa PrescribedCloudInRadiation
@. ᶜvmr_h2o = TD.vol_vapor_mixing_ratio(
thermo_params,
TD.PhasePartition(
p.radiation.prescribed_clouds_field.q,
p.radiation.prescribed_clouds_field.clwc,
p.radiation.prescribed_clouds_field.ciwc,
),
)
end
ᶜΔz = Fields.Δz_field(Y.c)
ᶜlwp = Fields.array2field(
rrtmgp_model.center_cloud_liquid_water_path,
Expand Down Expand Up @@ -241,7 +254,7 @@ NVTX.@annotate function rrtmgp_model_callback!(integrator)
p.tracers.prescribed_aerosols_field,
prescribed_aerosol_name,
)
@. ᶜaero_conc = aerosol_field * Y.c.ρ * ᶜΔz
@. ᶜaero_conc = aerosol_field * Y.c.ρ * ᶜΔz * 2
else
@. ᶜaero_conc = 0
end
Expand Down
4 changes: 2 additions & 2 deletions src/parameterized_tendencies/radiation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function radiation_model_cache(
kwargs = (;
kwargs...,
# assuming fixed aerosol radius
center_dust_radius = 0.2,
center_dust_radius = 0.1,
center_ss_radius = 11.5,
center_dust_column_mass_density = NaN, # initialized in callback
center_ss_column_mass_density = NaN, # initialized in callback
Expand Down Expand Up @@ -290,7 +290,7 @@ end
get_cloud_cache(_, _, _) = (;)
function get_cloud_cache(::PrescribedCloudInRadiation, Y, start_date)
target_space = axes(Y.c)
prescribed_cloud_names = ("cc", "clwc", "ciwc")
prescribed_cloud_names = ("cc", "clwc", "ciwc", "q")
prescribed_cloud_names_as_symbols = Symbol.(prescribed_cloud_names)
extrapolation_bc = (Intp.Periodic(), Intp.Flat(), Intp.Flat())
timevaryinginputs = [
Expand Down
Loading