Skip to content

Commit

Permalink
Merge pull request #1386 from CliMA/ck/hoist_a_up
Browse files Browse the repository at this point in the history
Hoist aux_up in compute_updraft_top
  • Loading branch information
charleskawczynski authored Feb 15, 2024
2 parents 80e8db8 + fa649f2 commit 9d18d79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/EDMF_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ end

function compute_updraft_top(grid::Grid{FT}, state::State, i::Int)::FT where {FT}
aux_up = center_aux_updrafts(state)
return z_findlast_center(k -> aux_up[i].area[k] > 1e-3, grid)
a_up = aux_up[i].area
return z_findlast_center(k -> a_up[k] > 1e-3, grid)
end

function compute_plume_scale_height(grid::Grid, state::State, H_up_min::FT, i::Int)::FT where {FT}
Expand Down
3 changes: 2 additions & 1 deletion src/closures/entr_detr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ function compute_phys_entr_detr!(
# compute ∇m at cell centers
a_up = aux_up[i].area
w_up = aux_up_f[i].w
Π_groups = aux_up[i].Π_groups
w_en = aux_en_f.w
w_gm = prog_gm_f.w
@. w_up_c = Ic(w_up)
Expand Down Expand Up @@ -334,7 +335,7 @@ function compute_phys_entr_detr!(
Π = non_dimensional_groups(εδ_closure, εδ_model_vars)
@assert length(Π) == n_Π_groups(edmf)
for Π_i in 1:length(entrainment_Π_subset(edmf))
aux_up[i].Π_groups[Π_i][k] = Π[Π_i]
Π_groups[Π_i][k] = Π[Π_i]
end

# update fractional and turbulent entr/detr
Expand Down

0 comments on commit 9d18d79

Please sign in to comment.