Skip to content

Commit

Permalink
Add number concentration calculations to YOG code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jatkinson1000 committed Jul 31, 2024
1 parent facd0ce commit c9652e6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/physics/cam/yog_intr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ subroutine yog_tend(ztodt, state, ptend)

! Local variables

integer :: i
integer :: i, k
integer :: nstep
integer :: ixcldice, ixcldliq ! constituent indices for cloud liquid and ice water.
integer :: ixnumice, ixnumliq ! constituent indices for cloud liquid and ice number concentration.
integer :: lchnk ! chunk identifier
integer :: ncol ! number of atmospheric columns

Expand Down Expand Up @@ -226,6 +227,18 @@ subroutine yog_tend(ztodt, state, ptend)
call outfld('YOGDICE ',ptend%q(1,1,ixcldice) ,pcols ,lchnk )
call outfld('YOGDLIQ ',ptend%q(1,1,ixcldliq) ,pcols ,lchnk )
call outfld('YOGPREC ',yog_precsfc ,pcols ,lchnk )

! Update the number concentration tendencies for liquid and ice species
! Values taken to match those in the `clubb_tend_cam()` subroutine
call cnst_get_ind('NUMLIQ', ixnumliq)
call cnst_get_ind('NUMICE', ixnumice)
do k = 1, pver
do i = 1, ncol
ptend%q(i,k,ixnumliq) = 3. * max(0.0, ptend%q(i,k,ixcldliq)) / (4.0*3.14* 8.0e-6**3*997.0)
ptend%q(i,k,ixnumice) = 3. * max(0.0, ptend%q(i,k,ixcldice)) / (4.0*3.14*25.0e-6**3*500.0)
end do
end do

end subroutine yog_tend

!=========================================================================================
Expand Down

0 comments on commit c9652e6

Please sign in to comment.