@@ -519,23 +519,20 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
519519 @assert (p. atmos. moisture_model isa NonEquilMoistModel)
520520
521521 (; params, dt) = p
522- (; ᶜΦ,) = p. core
523522 thp = CAP. thermodynamics_params (params)
524523 cmp = CAP. microphysics_1m_params (params)
525524 cmc = CAP. microphysics_cloud_params (params)
526- (; turbconv_model) = p. atmos
527525
528526 (; ᶜSqₗᵖʲs, ᶜSqᵢᵖʲs, ᶜSqᵣᵖʲs, ᶜSqₛᵖʲs, ᶜρʲs, ᶜtsʲs) = p. precomputed
529527 (; ᶜSqₗᵖ⁰, ᶜSqᵢᵖ⁰, ᶜSqᵣᵖ⁰, ᶜSqₛᵖ⁰, ᶜts⁰) = p. precomputed
530528
531- (; ᶜwₗʲs, ᶜwᵢʲs, ᶜwᵣʲs, ᶜwₛʲs, ᶜwₜʲs, ᶜwₕʲs ) = p. precomputed
529+ (; ᶜwₗʲs, ᶜwᵢʲs, ᶜwᵣʲs, ᶜwₛʲs) = p. precomputed
532530
533531 # TODO - can I re-use them between js and env?
534532 ᶜSᵖ = p. scratch. ᶜtemp_scalar
535533 ᶜSᵖ_snow = p. scratch. ᶜtemp_scalar_2
536534
537535 n = n_mass_flux_subdomains (p. atmos. turbconv_model)
538- FT = eltype (params)
539536
540537 for j in 1 : n
541538
@@ -565,35 +562,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
565562 ᶜρʲs.:($$ j),
566563 max (zero (Y. c. ρ), Y. c. sgsʲs.:($$ j). q_ice),
567564 )
568- # compute their contirbutions to energy and total water advection
569- @. ᶜwₜʲs.:($$ j) = ifelse (
570- Y. c. sgsʲs.:($$ j). ρa * Y. c. sgsʲs.:($$ j). q_tot > FT (0 ),
571- (
572- ᶜwₗʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_liq +
573- ᶜwᵢʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_ice +
574- ᶜwᵣʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_rai +
575- ᶜwₛʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_sno
576- ) / Y. c. sgsʲs.:($$ j). q_tot,
577- FT (0 ),
578- )
579- @. ᶜwₕʲs.:($$ j) = ifelse (
580- Y. c. sgsʲs.:($$ j). ρa * abs (Y. c. sgsʲs.:($$ j). mse) > FT (0 ),
581- (
582- ᶜwₗʲs.:($$ j) *
583- Y. c. sgsʲs.:($$ j). q_liq *
584- (Iₗ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
585- ᶜwᵢʲs.:($$ j) *
586- Y. c. sgsʲs.:($$ j). q_ice *
587- (Iᵢ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
588- ᶜwᵣʲs.:($$ j) *
589- Y. c. sgsʲs.:($$ j). q_rai *
590- (Iₗ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
591- ᶜwₛʲs.:($$ j) *
592- Y. c. sgsʲs.:($$ j). q_sno *
593- (Iᵢ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ)
594- ) / (Y. c. sgsʲs.:($$ j). mse),
595- FT (0 ),
596- )
597565
598566 # Precipitation sources and sinks from the updrafts
599567 compute_precipitation_sources! (
@@ -730,7 +698,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
730698)
731699
732700 (; params, dt) = p
733- (; ᶜΦ,) = p. core
734701 thp = CAP. thermodynamics_params (params)
735702 cm1p = CAP. microphysics_1m_params (p. params)
736703 cm2p = CAP. microphysics_2m_params (p. params)
@@ -749,7 +716,7 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
749716 ) = p. precomputed
750717 (; ᶜSqₗᵖ⁰, ᶜSqᵢᵖ⁰, ᶜSqᵣᵖ⁰, ᶜSqₛᵖ⁰, ᶜSnₗᵖ⁰, ᶜSnᵣᵖ⁰, ᶜts⁰, ᶜu⁰) =
751718 p. precomputed
752- (; ᶜwₗʲs, ᶜwᵢʲs, ᶜwᵣʲs, ᶜwₛʲs, ᶜwₙₗʲs, ᶜwₙᵣʲs, ᶜwₜʲs, ᶜwₕʲs, ᶜuʲs) =
719+ (; ᶜwₗʲs, ᶜwᵢʲs, ᶜwᵣʲs, ᶜwₛʲs, ᶜwₙₗʲs, ᶜwₙᵣʲs, ᶜuʲs) =
753720 p. precomputed
754721
755722 ᶜSᵖ = p. scratch. ᶜtemp_scalar
@@ -776,7 +743,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
776743
777744 # Compute sources
778745 n = n_mass_flux_subdomains (p. atmos. turbconv_model)
779- FT = eltype (params)
780746 for j in 1 : n
781747
782748 # compute terminal velocity for precipitation
@@ -835,35 +801,6 @@ NVTX.@annotate function set_prognostic_edmf_precomputed_quantities_precipitation
835801 ᶜρʲs.:($$ j),
836802 max (zero (Y. c. ρ), Y. c. sgsʲs.:($$ j). q_ice),
837803 )
838- # compute their contirbutions to energy and total water advection
839- @. ᶜwₜʲs.:($$ j) = ifelse (
840- Y. c. sgsʲs.:($$ j). ρa * Y. c. sgsʲs.:($$ j). q_tot > FT (0 ),
841- (
842- ᶜwₗʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_liq +
843- ᶜwᵢʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_ice +
844- ᶜwᵣʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_rai +
845- ᶜwₛʲs.:($$ j) * Y. c. sgsʲs.:($$ j). q_sno
846- ) / Y. c. sgsʲs.:($$ j). q_tot,
847- FT (0 ),
848- )
849- @. ᶜwₕʲs.:($$ j) = ifelse (
850- Y. c. sgsʲs.:($$ j). ρa * abs (Y. c. sgsʲs.:($$ j). mse) > FT (0 ),
851- (
852- ᶜwₗʲs.:($$ j) *
853- Y. c. sgsʲs.:($$ j). q_liq *
854- (Iₗ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
855- ᶜwᵢʲs.:($$ j) *
856- Y. c. sgsʲs.:($$ j). q_ice *
857- (Iᵢ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
858- ᶜwᵣʲs.:($$ j) *
859- Y. c. sgsʲs.:($$ j). q_rai *
860- (Iₗ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ) +
861- ᶜwₛʲs.:($$ j) *
862- Y. c. sgsʲs.:($$ j). q_sno *
863- (Iᵢ (thp, ᶜtsʲs.:($$ j)) + ᶜΦ)
864- ) / (Y. c. sgsʲs.:($$ j). mse),
865- FT (0 ),
866- )
867804
868805 # Precipitation sources and sinks from the updrafts
869806 compute_warm_precipitation_sources_2M! (
0 commit comments