Skip to content

Missing L_qg(k) = .true. line in non-hail-aware Thompson #2250

@sael9740

Description

@sael9740

WRF/phys/module_mp_thompson.F

Lines 3266 to 3303 in f52c197

if (is_hail_aware) then
do k = kts, kte
if ((qg1d(k) + qgten(k)*DT) .gt. R1) then
L_qg(k) = .true.
rg(k) = (qg1d(k) + qgten(k)*DT)*rho(k)
ng(k) = MAX(R2, (ng1d(k) + ngten(k)*DT)*rho(k))
rb(k) = MAX(rg(k)/rho(k)/rho_g(NRHG), qb1d(k) + qbten(k)*DT)
rb(k) = MIN(rg(k)/rho(k)/rho_g(1), rb(k))
idx_bg(k) = MAX(1,MIN(NINT(rg(k)/rho(k)/rb(k) *0.01)+1,NRHG))
else
rg(k) = R1
ng(k) = R2
rb(k) = R1/rho(k)/rho_g(NRHG)
idx_bg(k) = idx_bg1
L_qg(k) = .false.
endif
enddo
else
do k = kte, kts, -1
idx_bg(k) = idx_bg1
enddo
do k = kte, kts, -1
if ((qg1d(k) + qgten(k)*DT) .gt. R1) then
rg(k) = (qg1d(k) + qgten(k)*DT)*rho(k)
ygra1 = alog10(max(1.E-9, rg(k)))
zans1 = 3.0 + 2./7.*(ygra1+8.)
zans1 = MAX(2., MIN(zans1, 6.))
N0_exp = 10.**(zans1)
lam_exp = (N0_exp*am_g(idx_bg(k))*cgg(1,1)/rg(k))**oge1
lamg = lam_exp * (cgg(3,1)*ogg2*ogg1)**obmg
ng(k) = cgg(2,1)*ogg3*rg(k)*lamg**bm_g / am_g(idx_bg(k))
rb(k) = rg(k)/rho(k)/rho_g(idx_bg(k))
else
rg(k) = R1
ng(k) = R2
rb(k) = R1/rho(k)/rho_g(NRHG)
L_qg(k) = .false.
endif

I was browsing this code and noticed we don't have a L_qg(k) = .true. line for the non-hail aware condition. I'm not sure how impactful this is but it looks like a bug to me just from a software standpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions