-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d6fcea
commit 4fc3fd1
Showing
4 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### | ||
### tmp sgs u3 filter | ||
### | ||
function filter_sgs_u3_tendency!(Yₜ, Y, p, t, colidx) | ||
# set the sgs momentum tendency to the grid mean momentum tendency | ||
# if updraft area <= 0 | ||
if p.atmos.turbconv_model isa EDMFX | ||
FT = eltype(Y) | ||
n = n_mass_flux_subdomains(p.atmos.turbconv_model) | ||
for j in 1:n | ||
@. Yₜ.f.sgsʲs.:($$j).u₃[colidx] = ifelse( | ||
ᶠinterp(Y.c.sgsʲs.:($$j).ρa[colidx] / p.ᶜρʲs.:($$j)[colidx]) <= FT(0), | ||
Yₜ.f.u₃[colidx], | ||
Yₜ.f.sgsʲs.:($$j).u₃[colidx], | ||
) | ||
end | ||
end | ||
return nothing | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters