Skip to content

Commit

Permalink
Add nml options to scale convective cloud properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed May 2, 2024
1 parent 5b8e001 commit dba9fd4
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 19 deletions.
16 changes: 10 additions & 6 deletions physics/Radiation/RRTMG/radlw_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,9 @@ subroutine rrtmg_lw_run &
& cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, &
& cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, &
& cld_od, &
& add_cnvcld, cnvcld_lwp, cnvcld_reliq, cnvcld_iwp, &
& cnvcld_reice, errmsg, errflg &
& add_cnvcld, scale_ccld_cndste, scale_ccld_optics, &
& cnvcld_lwp, cnvcld_reliq, cnvcld_iwp, cnvcld_reice, &
& errmsg, errflg &
& )

! ==================== defination of variables ==================== !
Expand Down Expand Up @@ -613,7 +614,8 @@ subroutine rrtmg_lw_run &
iovr_maxrand, iovr_max
integer, intent(in) :: icseed(npts)

logical, intent(in) :: lprnt, inc_minor_gas, add_cnvcld
logical, intent(in) :: lprnt, inc_minor_gas, add_cnvcld, &
& scale_ccld_cndste, scale_ccld_optics

real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, &
& tlvl
Expand Down Expand Up @@ -1092,7 +1094,8 @@ subroutine rrtmg_lw_run &
call cldprop &
! --- inputs:
& ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, &
& add_cnvcld, cda5, cda6, cda7, cda8, &
& add_cnvcld, scale_ccld_cndste, scale_ccld_optics, &
& cda5, cda6, cda7, cda8, &
& nlay, nlp1, ipseed(iplon), dz, delgth, iovr, alph, &
& ilwcliq, ilwcice, isubclw, &
! --- outputs:
Expand Down Expand Up @@ -1542,7 +1545,8 @@ end subroutine rlwinit
!!\section gen_cldprop cldprop General Algorithm
subroutine cldprop &
& ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs
& add_cnvcld, cnv_cliqp, cnv_reliq, cnv_cicep, cnv_reice, &
& add_cnvcld, scale_ccld_cndste, scale_ccld_optics, &
& cnv_cliqp, cnv_reliq, cnv_cicep, cnv_reice, &
& nlay, nlp1, ipseed, dz, de_lgth, iovr, alpha, ilwcliq, &
& ilwcice, isubclw, cldfmc, taucld & ! --- outputs
& )
Expand Down Expand Up @@ -1652,7 +1656,7 @@ subroutine cldprop &
integer, intent(in) :: nlay, nlp1, ipseed, iovr, ilwcliq, ilwcice,&
isubclw

logical, intent(in) :: add_cnvcld
logical, intent(in) :: add_cnvcld, scale_ccld_cndste, scale_ccld_optics
real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac
real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, &
& reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz, &
Expand Down
14 changes: 14 additions & 0 deletions physics/Radiation/RRTMG/radlw_main.meta
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,20 @@
dimensions = ()
type = logical
intent = in
[scale_ccld_cndste]
standard_name = flag_to_scale_convective_condensate_in_radiation_by_convective_updraft_fraction
long_name = flag to scale convective condensate see by radiation using the convective updraft fraction
units = flag
dimensions = ()
type = logical
intent = in
[scale_ccld_optics]
standard_name = flag_to_scale_convective_cloud_optics_by_convective_updraft_fraction
long_name = flag to scale convective cloud optics see by radiation using the convective updraft fraction
units = flag
dimensions = ()
type = logical
intent = in
[cnvcld_lwp]
standard_name = convective_cloud_liquid_water_path
long_name = layer convective cloud liquid water path
Expand Down
29 changes: 16 additions & 13 deletions physics/Radiation/RRTMG/radsw_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,9 @@ subroutine rrtmg_sw_run &
& HSW0,HSWB,FLXPRF,FDNCMP, & ! --- optional
& cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, &
& cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, &
& cld_od, cld_ssa, cld_asy, add_cnvcld, cnvcld_lwp, &
& cnvcld_reliq, cnvcld_iwp, cnvcld_reice, errmsg, errflg &
& cld_od, cld_ssa, cld_asy, add_cnvcld, scale_ccld_cndste, &
& scale_ccld_optics, cnvcld_lwp, cnvcld_reliq, cnvcld_iwp, &
& cnvcld_reice, errmsg, errflg &
& )

! ==================== defination of variables ==================== !
Expand Down Expand Up @@ -693,7 +694,7 @@ subroutine rrtmg_sw_run &
integer, dimension(:), intent(in) :: idxday, icseed

logical, intent(in) :: lprnt, lsswr, inc_minor_gas, top_at_1
logical, intent(in) :: add_cnvcld
logical, intent(in) :: add_cnvcld, scale_ccld_cndste, scale_ccld_optics

real (kind=kind_phys), dimension(:,:), intent(in) :: &
& plvl, tlvl
Expand Down Expand Up @@ -1145,7 +1146,8 @@ subroutine rrtmg_sw_run &
call cldprop &
! --- inputs:
& ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, &
& add_cnvcld, cdat5, cdat6, cdat7, cdat8, &
& add_cnvcld, scale_ccld_cndste, scale_ccld_optics, cdat5, &
& cdat6, cdat7, cdat8, &
& zcf1, nlay, ipseed(j1), dz, delgth, alph, iswcliq, iswcice,&
& isubcsw, iovr, &
! --- outputs:
Expand Down Expand Up @@ -1579,7 +1581,8 @@ end subroutine rswinit
!!\section General_cldprop cldprop General Algorithm
subroutine cldprop &
& ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs
& add_cnvcld, cnv_cliqp, cnv_reliq, cnv_cicep, cnv_reice, &
& add_cnvcld, scale_ccld_cndste, scale_ccld_optics, &
& cnv_cliqp, cnv_reliq, cnv_cicep, cnv_reice, &
& cf1, nlay, ipseed, dz, delgth, alpha, iswcliq, iswcice, &
& isubcsw, iovr, taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output
& )
Expand Down Expand Up @@ -1669,7 +1672,7 @@ subroutine cldprop &
! --- inputs:
integer, intent(in) :: nlay, ipseed, iswcliq, iswcice, isubcsw, &
iovr
logical, intent(in) :: add_cnvcld
logical, intent(in) :: add_cnvcld, scale_ccld_cndste, scale_ccld_optics
real (kind=kind_phys), intent(in) :: cf1, delgth

real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, &
Expand Down Expand Up @@ -1908,7 +1911,7 @@ subroutine cldprop &
! #####################################################################################
lab_if_cnvcld : if (add_cnvcld .and. cnv_cliqp(k)+cnv_cicep(k) > 0._kind_phys) then
! Calculation of absorption coefficients due to convective water clouds.
if ( cnv_cliqp <= f_zero ) then
if ( cnv_cliqp(k) <= f_zero ) then
do ib = nblow, nbhgh
tauliq(ib) = f_zero
ssaliq(ib) = f_zero
Expand All @@ -1924,7 +1927,7 @@ subroutine cldprop &
extcoliq = max(f_zero, extliq1(index,ib) + fint*(extliq1(index+1,ib)-extliq1(index,ib)) )
ssacoliq = max(f_zero, min(f_one, ssaliq1(index,ib) + fint*(ssaliq1(index+1,ib)-ssaliq1(index,ib)) ))
asycoliq = max(f_zero, min(f_one, asyliq1(index,ib) + fint*(asyliq1(index+1,ib)-asyliq1(index,ib)) ))
tauliq(ib) = cnv_cliqp * extcoliq
tauliq(ib) = cnv_cliqp(k) * extcoliq
ssaliq(ib) = tauliq(ib) * ssacoliq
asyliq(ib) = ssaliq(ib) * asycoliq
enddo
Expand All @@ -1933,14 +1936,14 @@ subroutine cldprop &
extcoliq = max(f_zero, extliq2(index,ib) + fint*(extliq2(index+1,ib)-extliq2(index,ib)) )
ssacoliq = max(f_zero, min(f_one, ssaliq2(index,ib) + fint*(ssaliq2(index+1,ib)-ssaliq2(index,ib)) ))
asycoliq = max(f_zero, min(f_one, asyliq2(index,ib) + fint*(asyliq2(index+1,ib)-asyliq2(index,ib)) ))
tauliq(ib) = cnv_cliqp * extcoliq
tauliq(ib) = cnv_cliqp(k) * extcoliq
ssaliq(ib) = tauliq(ib) * ssacoliq
asyliq(ib) = ssaliq(ib) * asycoliq
enddo
endif ! end if_iswcliq_block
endif ! end if_cldliq_block
! Calculation of absorption coefficients due to ice clouds.
if ( cnv_cicep <= f_zero ) then
if ( cnv_cicep(k) <= f_zero ) then
do ib = nblow, nbhgh
tauice(ib) = f_zero
ssaice(ib) = f_zero
Expand All @@ -1956,7 +1959,7 @@ subroutine cldprop &
extcoice = max(f_zero, abari(ia)+bbari(ia)/refice )
ssacoice = max(f_zero, min(f_one, f_one-cbari(ia)-dbari(ia)*refice ))
asycoice = max(f_zero, min(f_one, ebari(ia)+fbari(ia)*refice ))
tauice(ib) = cnv_cicep * extcoice
tauice(ib) = cnv_cicep(k) * extcoice
ssaice(ib) = tauice(ib) * ssacoice
asyice(ib) = ssaice(ib) * asycoice
enddo
Expand All @@ -1970,7 +1973,7 @@ subroutine cldprop &
extcoice = max(f_zero, extice2(index,ib) + fint*(extice2(index+1,ib)-extice2(index,ib)) )
ssacoice = max(f_zero, min(f_one, ssaice2(index,ib) + fint*(ssaice2(index+1,ib)-ssaice2(index,ib)) ))
asycoice = max(f_zero, min(f_one, asyice2(index,ib) + fint*(asyice2(index+1,ib)-asyice2(index,ib)) ))
tauice(ib) = cnv_cicep * extcoice
tauice(ib) = cnv_cicep(k) * extcoice
ssaice(ib) = tauice(ib) * ssacoice
asyice(ib) = ssaice(ib) * asycoice
enddo
Expand All @@ -1985,7 +1988,7 @@ subroutine cldprop &
extcoice = max(f_zero, extice3(index,ib) + fint*(extice3(index+1,ib)-extice3(index,ib)) )
ssacoice = max(f_zero, min(f_one, ssaice3(index,ib) + fint*(ssaice3(index+1,ib)-ssaice3(index,ib)) ))
asycoice = max(f_zero, min(f_one, asyice3(index,ib) + fint*(asyice3(index+1,ib)-asyice3(index,ib)) ))
tauice(ib) = cnv_cicep * extcoice
tauice(ib) = cnv_cicep(k) * extcoice
ssaice(ib) = tauice(ib) * ssacoice
asyice(ib) = ssaice(ib) * asycoice
enddo
Expand Down
14 changes: 14 additions & 0 deletions physics/Radiation/RRTMG/radsw_main.meta
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,20 @@
dimensions = ()
type = logical
intent = in
[scale_ccld_cndste]
standard_name = flag_to_scale_convective_condensate_in_radiation_by_convective_updraft_fraction
long_name = flag to scale convective condensate see by radiation using the convective updraft fraction
units = flag
dimensions = ()
type = logical
intent = in
[scale_ccld_optics]
standard_name = flag_to_scale_convective_cloud_optics_by_convective_updraft_fraction
long_name = flag to scale convective cloud optics see by radiation using the convective updraft fraction
units = flag
dimensions = ()
type = logical
intent = in
[cnvcld_lwp]
standard_name = convective_cloud_liquid_water_path
long_name = layer convective cloud liquid water path
Expand Down

0 comments on commit dba9fd4

Please sign in to comment.