Skip to content

Commit 4a98fb2

Browse files
committed
fix
1 parent e14d7dd commit 4a98fb2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/cache/precipitation_precomputed_quantities.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ function set_precipitation_surface_fluxes!(
458458
microphysics_model::Union{Microphysics1Moment, Microphysics2Moment},
459459
)
460460
(; surface_rain_flux, surface_snow_flux) = p.precomputed
461-
(; col_integrated_precip_energy_tendency,) = p.conservation_check
462-
(; ᶜwᵣ, ᶜwₛ, ᶜwₗ, ᶜwᵢ) = p.precomputed
461+
(; col_integrated_precip_energy_tendency) = p.conservation_check
462+
(; ᶜwᵣ, ᶜwₛ, ᶜwₗ, ᶜwᵢ, ᶜwₕhₜ) = p.precomputed
463463
ᶜJ = Fields.local_geometry_field(Y.c).J
464464
ᶠJ = Fields.local_geometry_field(Y.f).J
465465
sfc_J = Fields.level(ᶠJ, Fields.half)
@@ -495,8 +495,11 @@ function set_precipitation_surface_fluxes!(
495495
sfc_wₛ = Fields.Field(Fields.field_values(Fields.level(ᶜwₛ, 1)), sfc_space)
496496
sfc_wₗ = Fields.Field(Fields.field_values(Fields.level(ᶜwₗ, 1)), sfc_space)
497497
sfc_wᵢ = Fields.Field(Fields.field_values(Fields.level(ᶜwᵢ, 1)), sfc_space)
498+
sfc_wₕhₜ = Fields.Field(Fields.field_values(Fields.level(ᶜwₕhₜ.components.data.:1, 1)), sfc_space)
498499

499500
@. surface_rain_flux = sfc_ρ * (sfc_qᵣ * (-sfc_wᵣ) + sfc_qₗ * (-sfc_wₗ))
500501
@. surface_snow_flux = sfc_ρ * (sfc_qₛ * (-sfc_wₛ) + sfc_qᵢ * (-sfc_wᵢ))
502+
@. col_integrated_precip_energy_tendency = sfc_ρ * (-sfc_wₕhₜ)
503+
501504
return nothing
502505
end

src/prognostic_equations/surface_temp.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ function surface_temp_tendency!(Yₜ, Y, p, t, slab::SlabOceanSST)
7878
end
7979

8080
# 2. Turbulent surface energy fluxes (sensible + latent heat) from surface to atmosphere
81-
if !isnothing(p.atmos.vertical_diffusion) ||
82-
!isnothing(p.atmos.turbconv_model)
81+
if !(p.atmos.disable_surface_flux_tendency)
8382
turb_e_flux_sfc_to_atm =
8483
Geometry.WVector.(
8584
p.precomputed.sfc_conditions.ρ_flux_h_tot
@@ -119,8 +118,7 @@ function surface_temp_tendency!(Yₜ, Y, p, t, slab::SlabOceanSST)
119118
# --- WATER BALANCE (if moisture is active) ---
120119
if !(p.atmos.moisture_model isa DryModel)
121120
# 1. Turbulent surface water fluxes (evaporation/condensation)
122-
if !isnothing(p.atmos.vertical_diffusion) ||
123-
!isnothing(p.atmos.turbconv_model)
121+
if !(p.atmos.disable_surface_flux_tendency)
124122
sfc_turb_w_flux =
125123
Geometry.WVector.(
126124
p.precomputed.sfc_conditions.ρ_flux_q_tot

0 commit comments

Comments
 (0)