Skip to content

Commit e805a8a

Browse files
committed
Add 1M cloud condensate and precip sedimentation in prognostic EDMF
1 parent 5557f30 commit e805a8a

File tree

10 files changed

+428
-26
lines changed

10 files changed

+428
-26
lines changed

.buildkite/Manifest-v1.11.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ weakdeps = ["CUDA", "MPI"]
381381

382382
[[deps.ClimaCore]]
383383
deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LazyBroadcast", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "UnrolledUtilities"]
384-
git-tree-sha1 = "14d3d5810ce1e3c990450a2ce7abc6a1e162855f"
384+
git-tree-sha1 = "a273452127dbb052f2963e3c1095730a996d49a6"
385385
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
386-
version = "0.14.35"
386+
version = "0.14.36"
387387
weakdeps = ["CUDA", "Krylov"]
388388

389389
[deps.ClimaCore.extensions]

.buildkite/pipeline.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ steps:
8383
--config_file $CONFIG_PATH/single_column_precipitation_test.yml
8484
--job_id single_column_precipitation_test
8585
artifact_paths: "single_column_precipitation_test/output_active/*"
86-
86+
8787
- label: ":umbrella: 2-moment precipitation sanity test single column"
8888
command: >
8989
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
@@ -854,6 +854,15 @@ steps:
854854
agents:
855855
slurm_mem: 20GB
856856

857+
- label: ":genie: Prognostic EDMFX Dycoms RF02 in a column"
858+
command: >
859+
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
860+
--config_file $CONFIG_PATH/prognostic_edmfx_dycoms_rf02_column.yml
861+
--job_id prognostic_edmfx_dycoms_rf02_column
862+
artifact_paths: "prognostic_edmfx_dycoms_rf02_column/output_active/*"
863+
agents:
864+
slurm_mem: 20GB
865+
857866
- label: ":umbrella: Prognostic EDMFX Rico in a column"
858867
command: >
859868
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
@@ -1035,9 +1044,9 @@ steps:
10351044
agents:
10361045
slurm_gpus: 1
10371046
slurm_mem: 16GB
1038-
1047+
10391048
- label: ":earth_americas: GPU: Diagnostic EDMFX ERA5 Weather Model Initial Condition"
1040-
command: >
1049+
command: >
10411050
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
10421051
--config_file $CONFIG_PATH/diagnostic_edmfx_era5_initial_condition.yml
10431052
--job_id diagnostic_edmfx_era5_initial_condition

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ArgParse = "1"
4343
Artifacts = "1"
4444
AtmosphericProfilesLibrary = "0.1.7"
4545
ClimaComms = "0.6.8"
46-
ClimaCore = "0.14.35"
46+
ClimaCore = "0.14.36"
4747
ClimaDiagnostics = "0.2.12"
4848
ClimaInterpolations = "0.1.0"
4949
ClimaParams = "0.10.35"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
initial_condition: DYCOMS_RF02
2+
subsidence: DYCOMS
3+
scm_coriolis: DYCOMS_RF02
4+
rad: DYCOMS
5+
surface_setup: DYCOMS_RF02
6+
turbconv: "prognostic_edmfx"
7+
implicit_diffusion: false
8+
approximate_linear_solve_iters: 2
9+
edmfx_upwinding: first_order
10+
edmfx_entr_model: "Generalized"
11+
edmfx_detr_model: "Generalized"
12+
edmfx_sgs_mass_flux: true
13+
edmfx_sgs_diffusive_flux: true
14+
edmfx_nh_pressure: true
15+
edmfx_filter: true
16+
prognostic_tke: true
17+
moist: "nonequil"
18+
cloud_model: "quadrature_sgs"
19+
precip_model: "1M"
20+
call_cloud_diagnostics_per_stage: true
21+
config: "column"
22+
x_elem: 2
23+
y_elem: 2
24+
z_elem: 30
25+
z_max: 1500
26+
z_stretch: false
27+
perturb_initstate: false
28+
dt: 10secs
29+
t_end: 6hours
30+
dt_save_state_to_disk: 10mins
31+
toml: [toml/prognostic_edmfx_1M.toml]
32+
netcdf_interpolation_num_points: [8, 8, 30]
33+
diagnostics:
34+
- short_name: [ts, ta, thetaa, ha, pfull, rhoa, ua, va, wa, hur, hus, cl, clw, cli, hussfc, evspsbl, pr]
35+
period: 10mins
36+
- short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, husraup, hussnup]
37+
period: 10mins
38+
- short_name: [waen, taen, thetaaen, haen, husen, huren, clwen, clien, husraen, hussnen, tke]
39+
period: 10mins
40+
- short_name: [entr, detr, lmix, bgrad, strain, edt, evu]
41+
period: 10mins
42+
- short_name: [husra, hussn]
43+
period: 10mins

post_processing/ci_plots.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,7 @@ EDMFBoxPlots = Union{
14001400
EDMFBoxPlotsWithPrecip = Union{
14011401
Val{:prognostic_edmfx_rico_column},
14021402
Val{:prognostic_edmfx_trmm_column},
1403+
Val{:prognostic_edmfx_dycoms_rf02_column},
14031404
}
14041405
"""
14051406
plot_edmf_vert_profile!(grid_loc, var_group)

src/cache/precomputed_quantities.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ function precomputed_quantities(Y, atmos)
165165
ᶜSqᵢᵖʲs = similar(Y.c, NTuple{n, FT}),
166166
ᶜSqᵣᵖʲs = similar(Y.c, NTuple{n, FT}),
167167
ᶜSqₛᵖʲs = similar(Y.c, NTuple{n, FT}),
168+
ᶜwₗʲs = similar(Y.c, NTuple{n, FT}),
169+
ᶜwᵢʲs = similar(Y.c, NTuple{n, FT}),
170+
ᶜwᵣʲs = similar(Y.c, NTuple{n, FT}),
171+
ᶜwₛʲs = similar(Y.c, NTuple{n, FT}),
172+
ᶜwₜʲs = similar(Y.c, NTuple{n, FT}),
173+
ᶜwₕʲs = similar(Y.c, NTuple{n, FT}),
168174
ᶜSqₗᵖ⁰ = similar(Y.c, FT),
169175
ᶜSqᵢᵖ⁰ = similar(Y.c, FT),
170176
ᶜSqᵣᵖ⁰ = similar(Y.c, FT),

src/cache/prognostic_edmf_precomputed_quantities.jl

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,13 +608,73 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
608608
(; ᶜSqₗᵖ⁰, ᶜSqᵢᵖ⁰, ᶜSqᵣᵖ⁰, ᶜSqₛᵖ⁰, ᶜρ⁰, ᶜts⁰) = p.precomputed
609609
(; ᶜq_tot⁰, ᶜq_liq⁰, ᶜq_ice⁰, ᶜq_rai⁰, ᶜq_sno⁰) = p.precomputed
610610

611+
(; ᶜwₗʲs, ᶜwᵢʲs, ᶜwᵣʲs, ᶜwₛʲs, ᶜwₜʲs, ᶜwₕʲs) = p.precomputed
612+
611613
# TODO - can I re-use them between js and env?
612614
ᶜSᵖ = p.scratch.ᶜtemp_scalar
613615
ᶜSᵖ_snow = p.scratch.ᶜtemp_scalar_2
614616

615617
n = n_mass_flux_subdomains(p.atmos.turbconv_model)
618+
FT = eltype(params)
616619

617620
for j in 1:n
621+
622+
# compute terminal velocity for precipitation
623+
@. ᶜwᵣʲs.:($$j) = CM1.terminal_velocity(
624+
cmp.pr,
625+
cmp.tv.rain,
626+
ᶜρʲs.:($$j),
627+
max(zero(Y.c.ρ), Y.c.sgsʲs.:($$j).q_rai),
628+
)
629+
@. ᶜwₛʲs.:($$j) = CM1.terminal_velocity(
630+
cmp.ps,
631+
cmp.tv.snow,
632+
ᶜρʲs.:($$j),
633+
max(zero(Y.c.ρ), Y.c.sgsʲs.:($$j).q_sno),
634+
)
635+
# compute sedimentation velocity for cloud condensate [m/s]
636+
@. ᶜwₗʲs.:($$j) = CMNe.terminal_velocity(
637+
cmc.liquid,
638+
cmc.Ch2022.rain,
639+
ᶜρʲs.:($$j),
640+
max(zero(Y.c.ρ), Y.c.sgsʲs.:($$j).q_liq),
641+
)
642+
@. ᶜwᵢʲs.:($$j) = CMNe.terminal_velocity(
643+
cmc.ice,
644+
cmc.Ch2022.small_ice,
645+
ᶜρʲs.:($$j),
646+
max(zero(Y.c.ρ), Y.c.sgsʲs.:($$j).q_ice),
647+
)
648+
# compute their contirbutions to energy and total water advection
649+
@. ᶜwₜʲs.:($$j) = ifelse(
650+
Y.c.sgsʲs.:($$j).ρa * Y.c.sgsʲs.:($$j).q_tot > FT(0),
651+
(
652+
ᶜwₗʲs.:($$j) * Y.c.sgsʲs.:($$j).q_liq +
653+
ᶜwᵢʲs.:($$j) * Y.c.sgsʲs.:($$j).q_ice +
654+
ᶜwᵣʲs.:($$j) * Y.c.sgsʲs.:($$j).q_rai +
655+
ᶜwₛʲs.:($$j) * Y.c.sgsʲs.:($$j).q_sno
656+
) / Y.c.sgsʲs.:($$j).ρa / Y.c.sgsʲs.:($$j).q_tot,
657+
FT(0),
658+
)
659+
@. ᶜwₕʲs.:($$j) = ifelse(
660+
Y.c.sgsʲs.:($$j).ρa * abs(Y.c.sgsʲs.:($$j).mse) > FT(0),
661+
(
662+
ᶜwₗʲs.:($$j) *
663+
Y.c.sgsʲs.:($$j).q_liq *
664+
(Iₗ(thp, ᶜtsʲs.:($$j)) + ᶜΦ) +
665+
ᶜwᵢʲs.:($$j) *
666+
Y.c.sgsʲs.:($$j).q_ice *
667+
(Iᵢ(thp, ᶜtsʲs.:($$j)) + ᶜΦ) +
668+
ᶜwᵣʲs.:($$j) *
669+
Y.c.sgsʲs.:($$j).q_rai *
670+
(Iₗ(thp, ᶜtsʲs.:($$j)) + ᶜΦ) +
671+
ᶜwₛʲs.:($$j) *
672+
Y.c.sgsʲs.:($$j).q_sno *
673+
(Iᵢ(thp, ᶜtsʲs.:($$j)) + ᶜΦ)
674+
) / Y.c.sgsʲs.:($$j).ρa / abs(Y.c.sgsʲs.:($$j).mse),
675+
FT(0),
676+
)
677+
618678
# Precipitation sources and sinks from the updrafts
619679
compute_precipitation_sources!(
620680
ᶜSᵖ,

0 commit comments

Comments
 (0)