Skip to content

Commit

Permalink
Fix computation of vgrav tables
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusuMET committed Oct 16, 2023
1 parent 60f11e8 commit 5c58ba4
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/common/vgravtables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ subroutine vgravtables
select case(drydep_scheme)
case (DRYDEP_SCHEME_EMEP,DRYDEP_SCHEME_ZHANG,DRYDEP_SCHEME_EMERSON)
! expected kg/m3
rho_part = def_comp(m)%densitygcm3 / 1000.0
rho_part = def_comp(m)%densitygcm3 * 1e3
! expected m
diam_part = 2 * def_comp(m)%radiusmym / 1e6

do ip=1,numpresvg
! Expecting pascal
p = max(1.0, pbasevg + ip*pincrvg) / 100.0
p = max(1.0, pbasevg + ip*pincrvg) * 100.0
do it=1,numtempvg
t = tbasevg + it*tincrvg
roa = p / (real(t, kind=real64) * R)
Expand Down Expand Up @@ -113,6 +113,22 @@ subroutine vgravtables
end do
end do
end select

block
use snapdebug, only: iulog, idebug
if (idebug == 1) then
write(iulog,*) "VGRAV PRINTOUT START COMPONENT ", n
write(iulog,*) "p t vg"
do it=1,size(vgtable,1)
do ip=1,size(vgtable,2)
t = tbasevg + it*tincrvg
p = pbasevg + ip*pincrvg
write(iulog,'(F7.1 F7.1,F14.6)') p, t, vgtable(it,ip,n)
end do
end do
write(iulog,*) "VGRAV PRINTOUT END"
endif
end block
end do do_comp
end subroutine vgravtables

Expand Down

0 comments on commit 5c58ba4

Please sign in to comment.