@@ -82,6 +82,22 @@ function vertical_transport(ᶜρ, ᶠu³, ᶜχ, dt, ::Val{:first_order})
8282 ᶠJ = Fields. local_geometry_field (axes (ᶠu³)). J
8383 return @. lazy (- (ᶜadvdivᵥ (ᶠinterp (ᶜρ * ᶜJ) / ᶠJ * ᶠupwind1 (ᶠu³, ᶜχ))))
8484end
85+ vertical_transport (ᶜρ, ᶠu³, ᶜχ, dt, :: Val{:first_order_kid} ) =
86+ vertical_transport (ᶜρ, ᶠu³, ᶜχ, dt, Val (:first_order )) # transport e.g. ρe_tot as usual
87+ function vertical_transport_kid (ᶜρ, ᶠu³, ᶜχ, dt, t)
88+ FT = eltype (ᶜρ)
89+ ᶜJ = Fields. local_geometry_field (axes (ᶜρ)). J
90+ ᶠJ = Fields. local_geometry_field (axes (ᶠu³)). J
91+ ρ_sfc = FT (1.1650101 ) # TODO : Get from initial conditions or state
92+ q_tot_sfc = FT (0.014778325 ) # TODO : Get from initial conditions or state
93+ u₃_sfc = ShipwayHill2012VelocityProfile {FT} ()(FT (0 ), t)
94+
95+ bottom_bc = Geometry. WVector (ρ_sfc * q_tot_sfc * u₃_sfc)
96+ ᶜadvdivᵥ_kid = Operators. DivergenceF2C (
97+ bottom = Operators. SetValue (bottom_bc), top = Operators. Extrapolate (),
98+ )
99+ return @. lazy (- (ᶜadvdivᵥ_kid (ᶠinterp (ᶜρ * ᶜJ) / ᶠJ * ᶠupwind1 (ᶠu³, ᶜχ))))
100+ end
85101@static if pkgversion (ClimaCore) ≥ v " 0.14.22"
86102 function vertical_transport (ᶜρ, ᶠu³, ᶜχ, dt, :: Val{:vanleer_limiter} )
87103 ᶜJ = Fields. local_geometry_field (axes (ᶜρ)). J
@@ -131,6 +147,9 @@ function implicit_vertical_advection_tendency!(Yₜ, Y, p, t)
131147 if ! (moisture_model isa DryModel)
132148 ᶜq_tot = @. lazy (specific (Y. c. ρq_tot, Y. c. ρ))
133149 vtt = vertical_transport (Y. c. ρ, ᶠu³, ᶜq_tot, dt, Val (:none ))
150+ if p. atmos. numerics. energy_q_tot_upwinding == Val (:first_order_kid )
151+ vtt = NullBroadcasted () # Turn off implicit energy q_tot advection
152+ end
134153 @. Yₜ. c. ρq_tot += vtt
135154 end
136155
0 commit comments