Skip to content

Commit 17eb977

Browse files
committed
Add number concentration calculations to YOG code.
1 parent facd0ce commit 17eb977

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/physics/cam/yog_intr.F90

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ subroutine yog_tend(ztodt, state, ptend)
182182

183183
! Local variables
184184

185-
integer :: i
185+
integer :: i, k
186186
integer :: nstep
187187
integer :: ixcldice, ixcldliq ! constituent indices for cloud liquid and ice water.
188188
integer :: lchnk ! chunk identifier
@@ -226,6 +226,18 @@ subroutine yog_tend(ztodt, state, ptend)
226226
call outfld('YOGDICE ',ptend%q(1,1,ixcldice) ,pcols ,lchnk )
227227
call outfld('YOGDLIQ ',ptend%q(1,1,ixcldliq) ,pcols ,lchnk )
228228
call outfld('YOGPREC ',yog_precsfc ,pcols ,lchnk )
229+
230+
! Update the number concentration tendencies for liquid and ice species
231+
! Values taken to match those in the `clubb_tend_cam()` subroutine
232+
call cnst_get_ind('NUMLIQ', ixnumliq)
233+
call cnst_get_ind('NUMICE', ixnumice)
234+
do k = 1, pver
235+
do i = 1, ncol
236+
ptend_loc%q(i,k,ixnumliq) = 3. * max(0.0, ptend%q(i,k,ixcldliq)) / (4.0*3.14* 8.0e-6**3*997.0)
237+
ptend_loc%q(i,k,ixnumice) = 3. * max(0.0, ptend%q(i,k,ixcldice)) / (4.0*3.14*25.0e-6**3*500.0)
238+
end do
239+
end do
240+
229241
end subroutine yog_tend
230242

231243
!=========================================================================================

0 commit comments

Comments
 (0)