Skip to content

Commit

Permalink
Merge pull request #714 from rmontuoro/hotfix/aerosol-convective-tran…
Browse files Browse the repository at this point in the history
…sport

Fix aerosol deep convective transport (SAMF) and aerosol scavenging (RAS)
  • Loading branch information
climbfuji authored Aug 13, 2021
2 parents aaa4792 + 890da66 commit 55e0814
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
5 changes: 3 additions & 2 deletions physics/rascnv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,9 @@ subroutine rascnv_run(IM, k, itc, ntc, ntr, dt, dtf &
!
fscav_ = -999.0_kp ! By default no scavenging
if (itc > 0 .and. ntc > 0) then
if (ntr >= itc + ntc - 3) then
fscav_(itc:ntc) = fscav
n = itc + ntc - 1
if (n <= ntr + 2) then
fscav_(itc:n) = fscav
else
errmsg = 'Error in rascnv_run: test ntr >= itc + ntc - 3 FAILED'
errflg = 1
Expand Down
6 changes: 3 additions & 3 deletions physics/rascnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@
intent = in
optional = F
[itc]
standard_name = number_of_aerosol_tracers_for_convection
long_name = number of aerosol tracers transported/scavenged by convection
units = count
standard_name = index_of_first_chemical_tracer_for_convection
long_name = index of first chemical tracer transported/scavenged by convection
units = index
dimensions = ()
type = integer
intent = in
Expand Down
8 changes: 4 additions & 4 deletions physics/samfaerosols.F
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module samfcnv_aerosols
contains

subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& xlamde, xlamdd, cnvflg, jmin, kb, kmax, kbcon, ktcon, fscav,
& xlamde, xlamdd, cnvflg, jmin, kb, kmax, kd94, ktcon, fscav,
& edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp,
& qtr, qaero)

Expand All @@ -25,7 +25,7 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& xlamde, xlamdd
logical, dimension(im), intent(in) :: cnvflg
integer, dimension(im), intent(in) :: jmin,
& kb, kmax, kbcon, ktcon
& kb, kmax, kd94, ktcon
real(kind=kind_phys), dimension(im), intent(in) :: edto,
& xlamd, xmb
real(kind=kind_phys), dimension(ntc), intent(in) :: fscav
Expand Down Expand Up @@ -195,7 +195,7 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
do i = 1, im
if (cnvflg(i) .and. (k < jmin(i))) then
dz = zi(i,kp1) - zi(i,k)
if (k >= kbcon(i)) then
if (k >= kd94(i)) then
tem = xlamde * dz
tem1 = half * xlamdd * dz
else
Expand Down Expand Up @@ -264,7 +264,7 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
tem = half * (xlamue(i,k) + xlamue(i,kk))
tem1 = half * (xlamud(i,k) + xlamud(i,kk))

if (k <= kbcon(i)) then
if (k <= kd94(i)) then
ptem = xlamde
ptem1 = xlamd(i) + xlamdd
else
Expand Down
2 changes: 1 addition & 1 deletion physics/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,7 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, &
if (do_aerosols)
& call samfdeepcnv_aerosols(im, im, km, itc, ntc, ntr, delt,
& xlamde, xlamdd, cnvflg, jmin, kb, kmax, kbcon, ktcon, fscav,
& xlamde, xlamdd, cnvflg, jmin, kb, kmax, kd94, ktcon, fscav,
& edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp,
& qtr, qaero)
Expand Down
6 changes: 3 additions & 3 deletions physics/samfdeepcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
intent = in
optional = F
[itc]
standard_name = number_of_aerosol_tracers_for_convection
long_name = number of aerosol tracers transported/scavenged by convection
units = count
standard_name = index_of_first_chemical_tracer_for_convection
long_name = index of first chemical tracer transported/scavenged by convection
units = index
dimensions = ()
type = integer
intent = in
Expand Down
6 changes: 3 additions & 3 deletions physics/samfshalcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
intent = in
optional = F
[itc]
standard_name = number_of_aerosol_tracers_for_convection
long_name = number of aerosol tracers transported/scavenged by convection
units = count
standard_name = index_of_first_chemical_tracer_for_convection
long_name = index of first chemical tracer transported/scavenged by convection
units = index
dimensions = ()
type = integer
intent = in
Expand Down

0 comments on commit 55e0814

Please sign in to comment.