Skip to content

Commit

Permalink
RRTMG: add initialization of cloud ice in profiles for radiation
Browse files Browse the repository at this point in the history
by Stephan de Roode. Seems to have been forgotten in last merge.
  • Loading branch information
fjansson committed Nov 3, 2023
1 parent f0ebf18 commit dbcfcb1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/modradrrtmg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ subroutine radrrtmg

lwu(2:i1,j,1:k1) = lwUp_slice (1:imax,1:k1)
lwd(2:i1,j,1:k1) = -lwDown_slice(1:imax,1:k1)
if (.not. rad_longw) then !we get LW at surface identically to how it is done in sunray subroutine
if (.not. rad_longw) then !we get LW at surface identically to how it is done in sunray subroutine
do i=2,i1
lwd(i,j,1) = -0.8 * boltz * thl0(i,j,1) ** 4.
lwu(i,j,1) = 1.0 * boltz * tskin(i,j) ** 4.
Expand All @@ -208,7 +208,7 @@ subroutine radrrtmg
swdir(2:i1,j,1:k1) = -swDownDir_slice(1:imax,1:k1)
swdif(2:i1,j,1:k1) = -swDownDif_slice(1:imax,1:k1)
lwc (2:i1,j,1:k1) = LWP_slice (1:imax,1:k1)

lwuca(2:i1,j,1:k1) = lwUpCS_slice (1:imax,1:k1)
lwdca(2:i1,j,1:k1) = -lwDownCS_slice(1:imax,1:k1)
swuca(2:i1,j,1:k1) = swUpCS_slice (1:imax,1:k1)
Expand Down Expand Up @@ -594,7 +594,7 @@ subroutine setupSlicesFromProfiles(j,npatch_start, &
! JvdDussen, 24-6-2010 !
! ============================================================================!

use modglobal, only: imax,jmax,kmax,i1,k1,grav,kind_rb,rlv,cp,Rd,pref0
use modglobal, only: imax,jmax,kmax,i1,k1,grav,kind_rb,rlv,cp,Rd,pref0,tup,tdn
use modfields, only: thl0,ql0,qt0,exnf
use modsurfdata, only: tskin,ps
use modmicrodata, only : Nc_0,sig_g
Expand Down Expand Up @@ -651,9 +651,12 @@ subroutine setupSlicesFromProfiles(j,npatch_start, &
tg_slice (im) = tskin(i,j) * exners ! Note: tskin = thlskin...

do k=1,kmax
qv_slice (im,k) = max(qt0(i,j,k) - ql0(i,j,k),1e-18) !avoid RRTMG reading negative initial values
qcl_slice (im,k) = ql0(i,j,k)
qci_slice (im,k) = 0.
qv_slice (im,k) = max(qt0(i,j,k) - ql0(i,j,k),1e-18) !avoid RRTMG reading negative initial values

ilratio = max(0.,min(1.,(tabs_slice(im,k)-tdn)/(tup-tdn)))! cloud water vs cloud ice partitioning
qcl_slice (im,k) = ql0(i,j,k) * ilratio
qci_slice (im,k) = ql0(i,j,k) * (1-ilratio)

o3_slice (im,k) = o3snd(npatch_start) ! o3 constant below domain top (if usero3!)

h2ovmr (im,k) = mwdry/mwh2o * qv_slice(im, k)
Expand Down

0 comments on commit dbcfcb1

Please sign in to comment.