@@ -16,7 +16,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_environment!(
1616 ᶠuₕ³,
1717 t,
1818)
19- @assert ! (p. atmos. moisture_model isa DryModel)
2019
2120 thermo_params = CAP. thermodynamics_params (p. params)
2221 (; turbconv_model) = p. atmos
@@ -64,8 +63,7 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_draft!(
6463 ᶠuₕ³,
6564 t,
6665)
67- (; moisture_model, turbconv_model) = p. atmos
68- @assert ! (moisture_model isa DryModel)
66+ (; moisture_model, turbconv_model, microphysics_model) = p. atmos
6967
7068 n = n_mass_flux_subdomains (turbconv_model)
7169 thermo_params = CAP. thermodynamics_params (p. params)
@@ -83,9 +81,9 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_draft!(
8381 ᶜρʲ = ᶜρʲs.:($ j)
8482 ᶜmseʲ = Y. c. sgsʲs.:($ j). mse
8583 ᶜq_totʲ = Y. c. sgsʲs.:($ j). q_tot
86- if p . atmos . moisture_model isa NonEquilMoistModel && (
87- p . atmos . microphysics_model isa Microphysics1Moment ||
88- p . atmos . microphysics_model isa Microphysics2Moment
84+ if moisture_model isa NonEquilMoistModel && (
85+ microphysics_model isa Microphysics1Moment ||
86+ microphysics_model isa Microphysics2Moment
8987 )
9088 ᶜq_liqʲ = Y. c. sgsʲs.:($ j). q_liq
9189 ᶜq_iceʲ = Y. c. sgsʲs.:($ j). q_ice
@@ -95,9 +93,9 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_draft!(
9593
9694 set_velocity_quantities! (ᶜuʲ, ᶠu³ʲ, ᶜKʲ, ᶠu₃ʲ, Y. c. uₕ, ᶠuₕ³)
9795 @. ᶠKᵥʲ = (adjoint (CT3 (ᶠu₃ʲ)) * ᶠu₃ʲ) / 2
98- if p . atmos . moisture_model isa NonEquilMoistModel && (
99- p . atmos . microphysics_model isa Microphysics1Moment ||
100- p . atmos . microphysics_model isa Microphysics2Moment
96+ if moisture_model isa NonEquilMoistModel && (
97+ microphysics_model isa Microphysics1Moment ||
98+ microphysics_model isa Microphysics2Moment
10199 )
102100 @. ᶜtsʲ = TD. PhaseNonEquil_phq (
103101 thermo_params,
@@ -127,8 +125,7 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_bottom_bc!(
127125 p,
128126 t,
129127)
130- (; moisture_model, turbconv_model) = p. atmos
131- @assert ! (moisture_model isa DryModel)
128+ (; moisture_model, turbconv_model, microphysics_model) = p. atmos
132129
133130 FT = Spaces. undertype (axes (Y. c))
134131 n = n_mass_flux_subdomains (turbconv_model)
@@ -143,9 +140,9 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_bottom_bc!(
143140 ᶜtsʲ = ᶜtsʲs.:($ j)
144141 ᶜmseʲ = Y. c. sgsʲs.:($ j). mse
145142 ᶜq_totʲ = Y. c. sgsʲs.:($ j). q_tot
146- if p . atmos . moisture_model isa NonEquilMoistModel && (
147- p . atmos . microphysics_model isa Microphysics1Moment ||
148- p . atmos . microphysics_model isa Microphysics2Moment
143+ if moisture_model isa NonEquilMoistModel && (
144+ microphysics_model isa Microphysics1Moment ||
145+ microphysics_model isa Microphysics2Moment
149146 )
150147 ᶜq_liqʲ = Y. c. sgsʲs.:($ j). q_liq
151148 ᶜq_iceʲ = Y. c. sgsʲs.:($ j). q_ice
@@ -224,9 +221,9 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_bottom_bc!(
224221 # Then overwrite the prognostic variables at first inetrior point.
225222 ᶜΦ_int_val = Fields. field_values (Fields. level (ᶜΦ, 1 ))
226223 ᶜtsʲ_int_val = Fields. field_values (Fields. level (ᶜtsʲ, 1 ))
227- if p . atmos . moisture_model isa NonEquilMoistModel && (
228- p . atmos . microphysics_model isa Microphysics1Moment ||
229- p . atmos . microphysics_model isa Microphysics2Moment
224+ if moisture_model isa NonEquilMoistModel && (
225+ microphysics_model isa Microphysics1Moment ||
226+ microphysics_model isa Microphysics2Moment
230227 )
231228 ᶜq_liqʲ_int_val = Fields. field_values (Fields. level (ᶜq_liqʲ, 1 ))
232229 ᶜq_iceʲ_int_val = Fields. field_values (Fields. level (ᶜq_iceʲ, 1 ))
@@ -273,8 +270,7 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_implicit_clos
273270 t,
274271)
275272
276- (; moisture_model, turbconv_model) = p. atmos
277- @assert ! (moisture_model isa DryModel)
273+ (; turbconv_model) = p. atmos
278274
279275 (; params) = p
280276 n = n_mass_flux_subdomains (turbconv_model)
@@ -313,7 +309,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_explicit_clos
313309)
314310
315311 (; moisture_model, turbconv_model) = p. atmos
316- @assert ! (moisture_model isa DryModel)
317312
318313 (; params) = p
319314 (; dt) = p
@@ -485,7 +480,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
485480 p,
486481 :: Microphysics0Moment ,
487482)
488- @assert ! (p. atmos. moisture_model isa DryModel)
489483
490484 (; params, dt) = p
491485 thp = CAP. thermodynamics_params (params)
@@ -513,7 +507,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
513507 p,
514508 :: Microphysics1Moment ,
515509)
516- @assert (p. atmos. moisture_model isa NonEquilMoistModel)
517510
518511 (; params, dt) = p
519512 thp = CAP. thermodynamics_params (params)
0 commit comments