Skip to content
7 changes: 3 additions & 4 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
! for zhao/moorthi's (imp_phys=99) &
! ferrier's (imp_phys=5) microphysics schemes

if ((num_p3d == 4) .and. (npdf3d == 3)) then ! same as imp_physics = 98
if ((num_p3d == 4) .and. (npdf3d == 3)) then ! same as imp_physics = imp_physics_zhao_carr_pdf
do k=1,lm
k1 = k + kd
do i=1,im
Expand All @@ -872,7 +872,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
cnvc (i,k1) = cnvc_in(i,k)
enddo
enddo
elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! same as imp_physics=99
elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! all other microphysics with pdfcld = .false. and cnvcld = .true.
do k=1,lm
k1 = k + kd
do i=1,im
Expand All @@ -891,7 +891,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
enddo
endif


if (imp_physics == imp_physics_zhao_carr) then
ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK)
endif
Expand Down Expand Up @@ -1020,7 +1019,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, &
ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
ntsw-1,ntgl-1, &
im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, &
cldcov(:,1:LMK), effrl_inout, &
cldcov(:,1:LMK), cnvw, effrl_inout, &
effri_inout, effrs_inout, &
lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
dzb, xlat_d, julian, yearlen, &
Expand Down
44 changes: 25 additions & 19 deletions physics/radiation_clouds.f
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
! !
! 'progcld3' --- zhao/moorthi prognostic cloud + pdfcld!
! inputs: !
! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, cnvw,cnvc, !
! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, !
! xlat,xlon,slmsk, dz, delp, !
! ix, nlay, nlp1, !
! deltaq,sup,kdt,me, !
Expand Down Expand Up @@ -2881,7 +2881,7 @@ subroutine progcld6 &
& xlat,xlon,slmsk,dz,delp, &
& ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, &
& IX, NLAY, NLP1, &
& uni_cld, lmfshal, lmfdeep2, cldcov, &
& uni_cld, lmfshal, lmfdeep2, cldcov, cnvw, &
& re_cloud,re_ice,re_snow, &
& lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
& dzlay, latdeg, julian, yearlen, &
Expand Down Expand Up @@ -2976,7 +2976,7 @@ subroutine progcld6 &

real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
& tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, &
& re_cloud, re_ice, re_snow
& re_cloud, re_ice, re_snow, cnvw
real (kind=kind_phys), dimension(:), intent(inout) :: &
& lwp_ex, iwp_ex, lwp_fc, iwp_fc

Expand Down Expand Up @@ -3010,8 +3010,8 @@ subroutine progcld6 &
integer :: i, k, id, nf

! --- constant values
! real (kind=kind_phys), parameter :: xrc3 = 200.
real (kind=kind_phys), parameter :: xrc3 = 100.
real (kind=kind_phys), parameter :: xrc3 = 200.
! real (kind=kind_phys), parameter :: xrc3 = 100.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need to keep the old value of xrc3 in a comment. From doing git differences of versions, this can be detected pretty easily. Furthermore, this constant is used (I think) in only a single line of code, so is it really needed as a declared variable at all?


!
!===> ... begin here
Expand Down Expand Up @@ -3065,6 +3065,7 @@ subroutine progcld6 &
do k = 1, NLAY
do i = 1, IX
clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw)
& + clw(i,k,ntrw) + cnvw(i,k)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really agree that rain water should be used in a sum of so-called "cloud" species. Rain is not radiatively important to RRTMG anyway. What is being permitted here is the idea that rain contributes to cloud fraction. For what reason? I can describe a scenario with fast moving upper clouds causing snow that falls to a melting layer becoming rain and having zero cloud above it. While you might say this is splitting hairs, as we get to higher and higher resolution that would imply rain with no cloud above still produces a non-zero cloud cover. I am just saying that rain can horizontally separate from the clouds that produced it (in the vertical sense).

enddo
enddo
!> - Find top pressure for each cloud domain for given latitude.
Expand All @@ -3091,8 +3092,9 @@ subroutine progcld6 &
cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k))
cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k))
crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k))
csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * &
& gfac * delp(i,k))
! csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * &

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graupel was removed, thank you. But I still wonder why we need the old line of code commented out rather than eliminated.

! & gfac * delp(i,k))
csp(i,k) = max(0.0, clw(i,k,ntsw) * gfac * delp(i,k))
enddo
enddo

Expand Down Expand Up @@ -3125,27 +3127,31 @@ subroutine progcld6 &
clwmin = 0.0
do k = 1, NLAY-1
do i = 1, IX
clwt = 1.0e-6 * (plyr(i,k)*0.001)
! clwt = 1.0e-6 * (plyr(i,k)*0.001)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment. Do we now need multiple commented out lines when a single scalar value has been changed? I suggest deleting commented lines.

! clwt = 2.0e-6 * (plyr(i,k)*0.001)
clwt = 1.0e-10 * (plyr(i,k)*0.001)

if (clwf(i,k) > clwt) then
onemrh= max( 1.e-10, 1.0-rhly(i,k) )
clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )

if (.not. lmfshal) then
tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0)
tem1 = 2000.0 / tem1
if(rhly(i,k) > 1.) then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make a strong point of caution here. This line is saying that if Relative Humidity is greater than 100%, then we have 100% cloud coverage. Firstly, in water cloud conditions RH is likely to be machine-precision close to 1.0, but not assured. That might mean RH is numerically 0.99* (many digits of 9). I didn't run through the rest of the lines of code, but if cloud water mixing ratio is something like 1.E-3 (kg/kg; that's pretty big), does that assure a cloud fraction = 100%?

Furthermore, what RH function is being used here below T=0C? Is it the RH with respect to ice or some blend of RH-water and RH-ice? My concern here is that when RH-ice is 101% then result is 100% cloudy, but I can assure you that the real atmosphere is not always cloudy in those conditions. It often takes a lot of ice supersaturation to nucleate the ice crystals. So in the circumstance of RH-ice=105% and the explicit microphysics is making no ice (due to reason above), then do you really want to assume 100% cloudy? If this variable rhly is strictly RH-water, then my point is moot.

cldtot(i,k) = 1.
else

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the prev version of progcld6, you removed the test of whether or not lmfshal is true/false, so there is a different calculation of tem1. I am noting it just to be sure that was intended and not skipped by mistake.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope that this was not a result of me resolving the merge conflicts incorrectly. All other merge conflicts I think I got right.

onemrh= max( 1.e-10, 1.0-rhly(i,k) )
clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
!
Comment thread
climbfuji marked this conversation as resolved.
Outdated
tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan
if (lmfdeep2) then
tem1 = xrc3 / tem1
else
tem1 = 100.0 / tem1
endif
endif

value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
tem2 = sqrt( sqrt(rhly(i,k)) )
cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
!
value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
tem2 = sqrt( sqrt(rhly(i,k)) )

cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
endif
else
cldtot(i,k) = 0.0
endif
enddo
enddo
Expand Down