Skip to content

Commit

Permalink
Merge pull request #103 from CliMA/yc/fix_buoy_extrap
Browse files Browse the repository at this point in the history
set qt and h in extrap buoyancy to clear values
  • Loading branch information
charleskawczynski committed Aug 10, 2021
2 parents 0d51c51 + d089c31 commit f810cfd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/EDMF_Updrafts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ function buoyancy(
extrap::Bool,
)

qt = 0.0
h = 0.0
grid = self.Gr
kc_surf = kc_surface(grid)

Expand Down Expand Up @@ -395,8 +393,8 @@ function buoyancy(
UpdVar.B.values[i, k] = buoyancy_c(self.Ref.rho0_half[k], rho)
UpdVar.RH.values[i, k] = relative_humidity_c(self.Ref.p0_half[k], qt, qt - qv, 0.0, t)
elseif UpdVar.Area.values[i, k - 1] > 0.0 && k > kc_surf
# TODO: report bug:
# qt and h were not defined here before the function call.
qt = UpdVar.QT.values[i,k-1]
h = UpdVar.H.values[i,k-1]
sa = eos(self.Ref.p0_half[k], qt, h)
qt -= sa.ql
qv = qt
Expand Down

0 comments on commit f810cfd

Please sign in to comment.