From a60979041fd91fe4b942332d1e6efb1c009f44fe Mon Sep 17 00:00:00 2001 From: Michael Iacono Date: Fri, 17 Jul 2020 22:52:12 +0000 Subject: [PATCH 1/3] Update for new RRTMG cloud overlap methods EXP and ER --- physics/GFS_rrtmg_pre.F90 | 132 +++++++---- physics/GFS_rrtmg_pre.meta | 9 + physics/physcons.F90 | 3 + physics/physparam.f | 8 + physics/radiation_clouds.f | 468 ++++++++++++++++++++++++++++++++++--- physics/radlw_main.f | 145 ++++++++++-- physics/radlw_main.meta | 9 + physics/radsw_main.f | 150 ++++++++++-- physics/radsw_main.meta | 9 + 9 files changed, 811 insertions(+), 122 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index d0826eb17..e4e8c10b0 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -33,7 +33,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input faerlw1, faerlw2, faerlw3, aerodp, & clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + mtopa, mbota, de_lgth, alpha, alb1d, errmsg, errflg) use machine, only: kind_phys use GFS_typedefs, only: GFS_statein_type, & @@ -146,6 +146,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: alpha real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d character(len=*), intent(out) :: errmsg @@ -156,14 +157,14 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb - real(kind=kind_phys) :: es, qs, delt, tem0d + real(kind=kind_phys) :: es, qs, delt, tem0d, pfac real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & - cldcov, deltaq, cnvc, cnvw, & + dzb, hzb, cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs, rho, orho ! for Thompson MP real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & @@ -171,7 +172,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input qi_mp, qs_mp, nc_mp, ni_mp, nwfa real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 @@ -432,6 +433,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! --- ... level height and layer thickness (km) +! dz: Layer thickness between layer boundaries +! dzb: Layer thickness between layer centers (lowest is from surface to lowest layer center) +! hz: Height of each level (i.e. layer boundary) +! hzb: Height of each layer center tem0d = 0.001 * rog do i = 1, IM @@ -439,10 +444,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) enddo -! hz(i,LMP) = 0.0 -! do k = LMK, 1, -1 -! hz(i,k) = hz(i,k+1) + dz(i,k) -! enddo + hz(i,LMP) = 0.0 + do k = LMK, 1, -1 + hz(i,k) = hz(i,k+1) + dz(i,k) + enddo + + do k = LMK, 1, -1 + pfac = (tem2db(i,k+1) - tem2da(i,k)) / (tem2db(i,k+1) - tem2db(i,k)) + hzb(i,k) = hz(i,k+1) + pfac * (hz(i,k) - hz(i,k+1)) + enddo + + do k = LMK-1, 1, -1 + dzb(i,k) = hzb(i,k) - hzb(i,k+1) + enddo + dzb(i,LMK) = hzb(i,LMK) - hz(i,LMP) enddo else ! input data from sfc to toa @@ -483,6 +498,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! --- ... level height and layer thickness (km) +! dz: Layer thickness between layer boundaries +! dzb: Layer thickness between layer centers (lowest is from surface to lowest layer center) +! hz: Height of each level (i.e. layer boundary) +! hzb: Height of each layer center tem0d = 0.001 * rog do i = 1, IM @@ -490,10 +509,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) enddo -! hz(i,1) = 0.0 -! do k = 1, LMP -! hz(i,k+1) = hz(i,k) + dz(i,k) -! enddo + hz(i,1) = 0.0 + do k = 1, LMK + hz(i,k+1) = hz(i,k) + dz(i,k) + enddo + + do k = 1, LMK + pfac = (tem2db(i,k) - tem2da(i,k)) / (tem2db(i,k) - tem2db(i,k+1)) + hzb(i,k) = hz(i,k) + pfac * (hz(i,k+1) - hz(i,k)) + enddo + + do k = 2, LMK + dzb(i,k) = hzb(i,k) - hzb(i,k-1) + enddo + dzb(i,1) = hzb(i,1) - hz(i,1) enddo endif ! end_if_ivflip @@ -815,19 +844,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! or unified cloud and/or with MG microphysics if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else - call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & - Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & - Model%uni_cld, Model%lmfshal, & - Model%lmfdeep2, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & + Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & + Model%uni_cld, Model%lmfshal, & + Model%lmfdeep2, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs endif elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld @@ -837,7 +868,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw, cnvc, Grid%xlat, Grid%xlon, & Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & Model%sup, Model%kdt, me, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs elseif (Model%imp_physics == 11) then ! GFDL cloud scheme @@ -847,21 +879,24 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(1:IM,1:LMK,1), cnvw, cnvc, & Grid%xlat, Grid%xlon, Sfcprop%slmsk, & cldcov, dz, delp, im, lmk, lmp, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & ! dz, delp, & ! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& ! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & ! im, lmk, lmp, & -! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs +! dzb, Grid%xlat_d, Model%julian, Model%yearlen, & +! clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs endif elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then @@ -871,15 +906,16 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds,cldsa,mtopa,mbota, de_lgth, alpha) ! --- outputs elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP @@ -900,19 +936,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, clouds(:,1:LMK,1), & effrl, effri, effrr, effrs, Model%effr_in , & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else ! MYNN PBL or GF convective are not used - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds,cldsa,mtopa,mbota, de_lgth, alpha) ! --- outputs endif ! MYNN PBL or GF endif ! end if_imp_physics diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index a06e718a5..b46272605 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -554,6 +554,15 @@ kind = kind_phys intent = out optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F [alb1d] standard_name = surface_albedo_perturbation long_name = surface albedo perturbation diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 5fb993ac3..8fbdc9930 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -137,6 +137,9 @@ module physcons real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) +! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 + real(kind=kind_phys),parameter:: decorr_con = 2.50_kind_phys + !........................................! end module physcons ! !========================================! diff --git a/physics/physparam.f b/physics/physparam.f index 795cb4fab..c71b62e5b 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -234,6 +234,8 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_SW in run scripts integer, save :: iovrsw = 1 !> cloud overlapping control flag for LW @@ -241,8 +243,14 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_LW in run scripts integer, save :: iovrlw = 1 +!!\n Decorrelation length type for iovrlw/iovrsw = 4 or 5 +!!\n =0:use constant decorrelation length defined by decorr_con (in module physcons) +!!\n =1:use day-of-year and latitude-varying decorrelation length + integer, save :: idcor = 1 !> sub-column cloud approx flag in SW radiation !!\n =0:no McICA approximation in SW radiation diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5b4aa54ab..9b0f34ef7 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -25,16 +25,18 @@ ! IX, NLAY, NLP1, ! ! uni_cld, lmfshal, lmfdeep2, cldcov, ! ! effrl,effri,effrr,effrs,effr_in, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld2' --- ferrier prognostic cloud microphysics ! ! inputs: ! ! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, ! ! xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, ! ! IX, NLAY, NLP1, lmfshal, lmfdeep2, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld3' --- zhao/moorthi prognostic cloud + pdfcld! ! inputs: ! @@ -42,16 +44,18 @@ ! xlat,xlon,slmsk, dz, delp, ! ! ix, nlay, nlp1, ! ! deltaq,sup,kdt,me, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld4' --- gfdl-lin cloud microphysics ! ! inputs: ! ! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, ! ! xlat,xlon,slmsk, dz, delp, ! ! ix, nlay, nlp1, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld4o' --- inactive ! ! ! @@ -63,16 +67,18 @@ ! ix, nlay, nlp1, ! ! uni_cld, lmfshal, lmfdeep2, cldcov, ! ! re_cloud,re_ice,re_snow, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progclduni' --- for unified clouds with MG microphys! ! inputs: ! ! (plyr,plvl,tlyr,tvly,ccnd,ncnd, ! ! xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, ! ! effrl,effri,effrr,effrs,effr_in, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! internal accessable only subroutines: ! ! 'gethml' --- get diagnostic hi, mid, low clouds ! @@ -154,6 +160,10 @@ ! 'diagcld1' for diagnostic cloud scheme, added new cloud ! ! overlapping method of de-correlation length, and optimized ! ! the code structure. ! +! jul 2020, m.j. iacono - added rrtmg/mcica cloud overlap options ! +! exponential and exponential-random. each method can use ! +! either a constant or a latitude-varying and day-of-year ! +! varying decorrelation length selected with parameter "idcor". ! ! ! !!!!! ========================================================== !!!!! !!!!! end descriptions !!!!! @@ -181,6 +191,10 @@ !! Cloud overlapping method (namelist control parameter - \b IOVR_LW, \b IOVR_SW) !!\n IOVR=0: randomly overlapping vertical cloud layers !!\n IOVR=1: maximum-random overlapping vertical cloud layers +!!\n IOVR=2: maximum overlapping vertical cloud layers +!!\n IOVR=3: decorrelation length overlapping vertical cloud layers +!!\n IOVR=4: exponential overlapping vertical cloud layers +!!\n IOVR=5: exponential-random overlapping vertical cloud layers !! !! Sub-grid cloud approximation (namelist control parameter - \b ISUBC_LW=2, \b ISUBC_SW=2) !!\n ISUBC=0: grid averaged quantities, without sub-grid cloud approximation @@ -243,7 +257,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o, gethml + & cld_init, progcld5, progcld4o, gethml, get_alpha ! ================= @@ -302,6 +316,8 @@ subroutine cld_init & ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! ! =3: decorrelation-length overlap (mcica only) ! +! =4: exponential cloud overlap (AER; mcica only) ! +! =5: exponential-random overlap (AER; mcica only) ! ! ivflip : control flag for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -417,6 +433,10 @@ end subroutine cld_init !!\param effrr effective radius for rain water !!\param effrs effective radius for snow water !!\param effr_in logical, if .true. use input effective radii +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -430,7 +450,8 @@ end subroutine cld_init !!\param clds (IX,5), fraction of clouds for low, mid, hi, tot, bl !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases -!!\param de_lgth (IX), clouds decorrelation length (km) +!!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld1 progcld1 General Algorithm !> @{ subroutine progcld1 & @@ -438,7 +459,8 @@ subroutine progcld1 & & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & effrl,effri,effrr,effrs,effr_in, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -485,6 +507,10 @@ subroutine progcld1 & ! lmfshal : logical - true for mass flux shallow convection ! ! lmfdeep2 : logical - true for mass flux deep convection ! ! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -502,6 +528,7 @@ subroutine progcld1 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -527,16 +554,21 @@ subroutine progcld1 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldcov, delp, dz, & - & effrl, effri, effrr, effrs + & effrl, effri, effrr, effrs, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -804,6 +836,16 @@ subroutine progcld1 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. The three cloud domain boundaries are defined by @@ -811,7 +853,7 @@ subroutine progcld1 & !! 'iovr', which may be different for lw and sw radiation programs. call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -850,6 +892,10 @@ end subroutine progcld1 !!\param NLAY,NLP1 vertical layer/level dimensions !!\param lmfshal flag for mass-flux shallow convection scheme in the cloud fraction calculation !!\param lmfdeep2 flag for mass-flux deep convection scheme in the cloud fraction calculation +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -864,13 +910,15 @@ end subroutine progcld1 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld2 progcld2 General Algorithm !> @{ subroutine progcld2 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & & IX, NLAY, NLP1, lmfshal, lmfdeep2, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -917,6 +965,10 @@ subroutine progcld2 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -934,6 +986,7 @@ subroutine progcld2 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! external module variables: ! ! ivflip : control flag of vertical index direction ! @@ -964,17 +1017,22 @@ subroutine progcld2 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, f_ice, f_rain, r_rime, & - & dz, delp + & dz, delp, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk real (kind=kind_phys), dimension(:), intent(in) :: flgmin + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1250,6 +1308,16 @@ subroutine progcld2 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml(), to compute low, mid, high, total, and boundary !! layer cloud fractions and clouds top/bottom layer indices for low, !! mid, and high clouds. @@ -1259,7 +1327,7 @@ subroutine progcld2 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -1298,6 +1366,10 @@ end subroutine progcld2 !!\param sup supersaturation !!\param kdt !!\param me print control flag +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (ix,nlay,nf_clds), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path (g/m**2) @@ -1312,6 +1384,7 @@ end subroutine progcld2 !!\param mtop (ix,3), vertical indices for low, mid, hi cloud tops !!\param mbot (ix,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (ix), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld3 progcld3 General Algorithm !! @{ subroutine progcld3 & @@ -1319,7 +1392,8 @@ subroutine progcld3 & & xlat,xlon,slmsk, dz, delp, & & ix, nlay, nlp1, & & deltaq,sup,kdt,me, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -1366,6 +1440,10 @@ subroutine progcld3 & ! cnvc (ix,nlay) : layer convective cloud cover ! ! deltaq(ix,nlay) : half total water distribution width ! ! sup : supersaturation ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! @@ -1384,6 +1462,7 @@ subroutine progcld3 & ! mtop (ix,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (ix,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -1404,7 +1483,7 @@ subroutine progcld3 & integer, intent(in) :: ix, nlay, nlp1,kdt real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp + & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp, dzlay ! & tlyr, tvly, qlyr, qstl, rhly, clw, cnvw, cnvc ! real (kind=kind_phys), dimension(:,:), intent(in) :: deltaq real (kind=kind_phys), dimension(:,:) :: deltaq, cnvw, cnvc @@ -1416,11 +1495,16 @@ subroutine progcld3 & & slmsk integer :: me + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1647,6 +1731,16 @@ subroutine progcld3 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> -# Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -1657,7 +1751,7 @@ subroutine progcld3 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & ix,nlay, & ! --- outputs: & clds, mtop, mbot & @@ -1696,6 +1790,10 @@ end subroutine progcld3 !!\param ix horizontal dimension !!\param nlay vertical layer dimension !!\param nlp1 vertical level dimension +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (ix,nlay,nf_clds), cloud profiles !!\n clouds(:,:,1) - layer total cloud fraction !!\n clouds(:,:,2) - layer cloud liquid water path (\f$g m^{-2}\f$) @@ -1710,13 +1808,15 @@ end subroutine progcld3 !!\param mtop vertical indices for low, mid, hi cloud tops !!\param mbot vertical indices for low, mid, hi cloud bases !!\param de_lgth clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4 progcld4 General Algorithm !! @{ subroutine progcld4 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs: & xlat,xlon,slmsk,cldtot, dz, delp, & & IX, NLAY, NLP1, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -1761,6 +1861,10 @@ subroutine progcld4 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -1778,6 +1882,7 @@ subroutine progcld4 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -1800,16 +1905,21 @@ subroutine progcld4 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldtot, cnvw, cnvc, & - & delp, dz + & delp, dz, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1984,6 +2094,16 @@ subroutine progcld4 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + ! --- compute low, mid, high, total, and boundary layer cloud fractions ! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud @@ -1992,7 +2112,7 @@ subroutine progcld4 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2036,6 +2156,10 @@ end subroutine progcld4 !>\param ix horizontal dimension !>\param nlay vertical layer dimension !>\param nlp1 vertical level dimension +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !>\param clouds (ix,nlay,nf_clds), cloud profiles !!\n clouds(:,:,1) - layer totoal cloud fraction !!\n clouds(:,:,2) - layer cloud liquid water path (\f$g m^{-2}\f$) @@ -2050,6 +2174,7 @@ end subroutine progcld4 !>\param mtop (ix,3), vertical indices for low, mid, hi cloud tops !>\param mbot (ix,3), vertical indices for low, mid, hi cloud bases !>\param de_lgth clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4o progcld4o General Algorithm !! @{ subroutine progcld4o & @@ -2057,7 +2182,8 @@ subroutine progcld4o & & xlat,xlon,slmsk, dz, delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl,ntclamt, & & IX, NLAY, NLP1, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2101,6 +2227,10 @@ subroutine progcld4o & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2118,6 +2248,7 @@ subroutine progcld4o & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2141,18 +2272,23 @@ subroutine progcld4o & & ntclamt real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, delp, dz + & tlyr, tvly, qlyr, qstl, rhly, delp, dz, dzlay real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -2312,6 +2448,16 @@ subroutine progcld4o & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low, mid, high, total, and boundary layer cloud fractions !! and clouds top/bottom layer indices for low, mid, and high clouds. !! The three cloud domain boundaries are defined by ptopc. The cloud @@ -2320,7 +2466,7 @@ subroutine progcld4o & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2345,7 +2491,8 @@ subroutine progcld5 & & IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2392,6 +2539,10 @@ subroutine progcld5 & ! lmfshal : logical - true for mass flux shallow convection ! ! lmfdeep2 : logical - true for mass flux deep convection ! ! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2409,6 +2560,7 @@ subroutine progcld5 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2434,7 +2586,7 @@ subroutine progcld5 & logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & + & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, & & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw @@ -2442,11 +2594,16 @@ subroutine progcld5 & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -2659,6 +2816,16 @@ subroutine progcld5 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -2670,7 +2837,7 @@ subroutine progcld5 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2706,6 +2873,10 @@ end subroutine progcld5 !!\param effrr (IX,NLAY), effective radius for rain water !!\param effrs (IX,NLAY), effective radius for snow water !!\param effr_in logical - if .true. use input effective radii +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -2720,13 +2891,15 @@ end subroutine progcld5 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progclduni progclduni General Algorithm !> @{ subroutine progclduni & & ( plyr,plvl,tlyr,tvly,ccnd,ncnd, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, & & effrl,effri,effrr,effrs,effr_in, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2774,6 +2947,10 @@ subroutine progclduni & ! effr_in : logical - if .true. use input effective radii ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2791,6 +2968,7 @@ subroutine progclduni & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2815,11 +2993,16 @@ subroutine progclduni & real (kind=kind_phys), dimension(:,:,:), intent(in) :: ccnd real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr,& - & tlyr, tvly, cldtot, effrl, effri, effrr, effrs, dz, delp + & tlyr, tvly, cldtot, effrl, effri, effrr, effrs, dz, delp, & + & dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -2827,6 +3010,8 @@ subroutine progclduni & real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha + integer, dimension(:,:), intent(out) :: mtop,mbot ! --- local variables: @@ -3026,6 +3211,16 @@ subroutine progclduni & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -3037,7 +3232,7 @@ subroutine progclduni & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -3064,6 +3259,7 @@ end subroutine progclduni !> \param cldcnv (IX,NLAY), convective cloud (for diagnostic scheme only) !> \param dz (IX,NLAY), layer thickness (km) !> \param de_lgth (IX), clouds decorrelation length (km) +!> \param alpha (IX,NLAY), alpha decorrelation parameter !> \param IX horizontal dimension !> \param NLAY vertical layer dimensions !> \param clds (IX,5), fraction of clouds for low, mid, hi, tot, bl @@ -3073,7 +3269,7 @@ end subroutine progclduni !>\section detail Detailed Algorithm !! @{ subroutine gethml & - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & ! --- inputs: & IX, NLAY, & & clds, mtop, mbot & ! --- outputs: & ) @@ -3105,6 +3301,7 @@ subroutine gethml & ! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! ! dz (ix,nlay) : layer thickness (km) ! ! de_lgth(ix) : clouds vertical de-correlation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! IX : horizontal dimention ! ! NLAY : vertical layer dimensions ! ! ! @@ -3124,6 +3321,8 @@ subroutine gethml & ! =1 max/ran overlapping clouds ! ! =2 maximum overlapping ( for mcica only ) ! ! =3 decorr-length ovlp ( for mcica only ) ! +! =4: exponential cloud overlap (AER; mcica only) ! +! =5: exponential-random overlap (AER; mcica only) ! ! ! ! ==================== end of description ===================== ! ! @@ -3135,6 +3334,7 @@ subroutine gethml & real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & & cldtot, cldcnv, dz real (kind=kind_phys), dimension(:), intent(in) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(in) :: alpha ! --- outputs real (kind=kind_phys), dimension(:,:), intent(out) :: clds @@ -3270,6 +3470,33 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud enddo + elseif ( iovr == 4 .or. iovr == 5 ) then ! exponential overlap (iovr=4), or + ! exponential-random (iovr=5); + ! distinction defined by alpha + + do k = kstr, kend, kinc + do i = 1, ix + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + cl2(i) = alpha(i,k) * min(cl2(i), (1.0 - ccur)) & ! maximum part + & + (1.0 - alpha(i,k)) * (cl2(i) * (1.0 - ccur)) ! random part + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + endif + enddo + + if (k == llyr) then + do i = 1, ix + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, ix + clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud + enddo + endif ! end_if_iovr ! --- high, mid, low clouds, where cl1, cl2 are cloud fractions @@ -3452,6 +3679,187 @@ end subroutine gethml !----------------------------------- !! @} +!> \ingroup module_radiation_clouds +!! This program derives the exponential transition, alpha, from maximum to +!! random overlap needed to define the fractional cloud vertical correlation +!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) +!! cloud overlap options for RRTMG. For exponential, the transition from +!! maximum to random with distance through model layers occurs without regard +!! to the configuration of clear and cloudy layers. For the ER method, each +!! block of adjacent cloudy layers is treated with a separate transition from +!! maximum to random, and blocks of cloudy layers separated by one or more +!! clear layers are correlated randomly. +!> /param nlon : number of model longitude points +!> /param nlay : vertical layer dimension +!> /param dzlay(nlon,nlay) : distance between the center of model layers +!> /param iovrlp : cloud overlap method +!> : 0 = random +!> : 1 = maximum-random +!> : 2 = maximum +!> : 3 = decorrelation (NOAA/Hou) +!> : 4 = exponential (AER) +!> : 5 = exponential-random (AER) +!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) +!> /param juldat : day of the year (fractional julian day) +!> /param yearlen : current length of the year (365/366 days) +!> /param cldf(nlon,nlay) : cloud fraction +!> /param idcor : decorrelation length method +!> : 0 = constant value (AER; decorr_con) +!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) +!> /param decorr_con : decorrelation length constant +!! +!>\section detail Detailed Algorithm +!! @{ + subroutine get_alpha & +! --- inputs: + & (nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cldf, & +! --- outputs: + & alpha & + & ) + +! =================================================================== ! +! ! +! abstract: Derives the exponential transition, alpha, from maximum to ! +! random overlap needed to define the fractional cloud vertical ! +! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! +! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! +! exponential, the transition from maximum to random with distance ! +! through model layers occurs without regard to the configuration of ! +! clear and cloudy layers. For the ER method, each block of adjacent ! +! cloudy layers is treated with a separate transition from maximum to ! +! random, and blocks of cloudy layers separated by one or more ! +! clear layers are correlated randomly. ! +! ! +! usage: call get_alpha ! +! ! +! subprograms called: none ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! author: m.j. iacono (AER) for use with the RRTMG radiation code ! +! ! +! ==================== definition of variables ==================== ! +! ! +! Input variables: ! +! nlon : number of model longitude points ! +! nlay : vertical layer dimension ! +! dzlay(nlon,nlay) : distance between the center of model layers ! +! iovrlp : cloud overlap method ! +! : 0 = random ! +! : 1 = maximum-random ! +! : 2 = maximum ! +! : 3 = decorrelation (NOAA/Hou) ! +! : 4 = exponential (AER) ! +! : 5 = exponential-random (AER) ! +! latdeg(nlon) : latitude (in degrees 90 -> -90) ! +! juldat : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! +! cldf(nlon,nlay) : cloud fraction ! +! ! +! output variables: ! +! alpha(nlon,nlay) : alpha exponential transition parameter for ! +! : cloud vertical correlation ! +! ! +! external module variables: (in physcons) ! +! decorr_con : decorrelation length constant (km) ! +! ! +! external module variables: (in physparam) ! +! idcor : control flag for decorrelation length method ! +! =0: constant decorrelation length (decorr_con) ! +! =1: latitude and day-of-year varying decorrelation! +! length (AER; Oreopoulos, et al., 2012) ! +! ! +! ==================== end of description ===================== ! +! + use physcons, only: decorr_con + use physparam, only: idcor + + implicit none + +! Input + integer, intent(in) :: nlon, nlay + integer, intent(in) :: iovrlp + integer, intent(in) :: yearlen + real(kind=kind_phys), dimension(:,:), intent(in) :: dzlay + real(kind=kind_phys), dimension(:,:), intent(in) :: cldf + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: juldat + +! Output + real(kind=kind_phys), dimension(:,:), intent(out):: alpha + +! Local + integer :: i, k + real(kind=kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) + +! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) +! Used when idcor = 1 + real(kind=kind_phys), parameter :: am1 = 1.4315_kind_phys + real(kind=kind_phys), parameter :: am2 = 2.1219_kind_phys + real(kind=kind_phys), parameter :: am4 = -25.584_kind_phys + real(kind=kind_phys), parameter :: amr = 7.0_kind_phys + real(kind=kind_phys) :: am3 + + real(kind=kind_phys), parameter :: zero = 0.0d0 + real(kind=kind_phys), parameter :: one = 1.0d0 + +! +!===> ... begin here +! +! If exponential or exponential-random cloud overlap is used: +! derive day-of-year and latitude-varying decorrelation lendth if requested; +! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 + do i = 1, nlon + if (iovrlp == 4 .or. iovrlp == 5) then + if (idcor .eq. 1) then + if (juldat .gt. 181._kind_phys) then + am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) + & / yearlen + else + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) + & / yearlen + endif +! For latitude in degrees, decorr_len in km + decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 + & / am4**2) + else + decorr_len(i) = decorr_con + endif + endif + enddo + +! For atmospheric data defined from surface to toa; define alpha from surface to toa +! Exponential cloud overlap + if (iovrlp == 4) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + enddo + enddo + endif +! Exponential-random cloud overlap + if (iovrlp == 5) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then + alpha(i,k) = zero + endif + enddo + enddo + endif + + return + + end subroutine get_alpha +!----------------------------------- +!! @} ! !........................................! end module module_radiation_clouds ! diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 7b029f8b0..cdcb91b48 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -6,7 +6,7 @@ !!!!! lw-rrtm3 radiation package description !!!!! !!!!! ============================================================== !!!!! ! ! -! this package includes ncep's modifications of the rrtm-lw radiation ! +! this package includes ncep's modifications of the rrtmg-lw radiation ! ! code from aer inc. ! ! ! ! the lw-rrtm3 package includes these parts: ! @@ -39,7 +39,7 @@ ! inputs: ! ! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! ! clouds,icseed,aerosols,sfemis,sfgtmp, ! -! dzlyr,delpin,de_lgth, ! +! dzlyr,delpin,de_lgth,alpha, ! ! npts, nlay, nlp1, lprnt, ! ! outputs: ! ! hlwc,topflx,sfcflx,cldtau, ! @@ -93,17 +93,38 @@ ! ! !==========================================================================! ! ! -! the original aer's program declarations: ! +! the original aer program declarations: ! ! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! | -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). | -! This software may be used, copied, or redistributed as long as it is | -! not sold and this copyright notice is reproduced on each copy made. | -! This model is provided as is without any express or implied warranties. | -! (http://www.rtweb.aer.com/) | -! | -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! Copyright (c) 2002-2020, Atmospheric & Environmental Research, Inc. (AER) ! +! All rights reserved. ! +! ! +! Redistribution and use in source and binary forms, with or without ! +! modification, are permitted provided that the following conditions are met: ! +! * Redistributions of source code must retain the above copyright ! +! notice, this list of conditions and the following disclaimer. ! +! * Redistributions in binary form must reproduce the above copyright ! +! notice, this list of conditions and the following disclaimer in the ! +! documentation and/or other materials provided with the distribution. ! +! * Neither the name of Atmospheric & Environmental Research, Inc., nor ! +! the names of its contributors may be used to endorse or promote products ! +! derived from this software without specific prior written permission. ! +! ! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ! +! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! +! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! +! ARE DISCLAIMED. IN NO EVENT SHALL ATMOSPHERIC & ENVIRONMENTAL RESEARCH, INC.,! +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ! +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ! +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ! +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF ! +! THE POSSIBILITY OF SUCH DAMAGE. ! +! (http://www.rtweb.aer.com/) ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ************************************************************************ ! ! ! @@ -136,8 +157,14 @@ ! ************************************************************************ ! ! ! ! references: ! -! (rrtm_lw/rrtmg_lw): ! -! clough, s.A., m.w. shephard, e.j. mlawer, j.s. delamere, ! +! (rrtmg_lw/rrtm_lw): ! +! iacono, m.j., j.s. delamere, e.j. mlawer, m.w. shepard, ! +! s.a. clough, and w.d collins, radiative forcing by long-lived ! +! greenhouse gases: calculations with the aer radiative transfer ! +! models, j, geophys. res., 113, d13103, doi:10.1029/2008jd009944, ! +! 2008. ! +! ! +! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! ! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! ! atmospheric radiative transfer modeling: a summary of the aer ! ! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! @@ -234,12 +261,21 @@ ! jun 2018, h-m lin/y-t hou -- added new option of cloud overlap ! ! method 'de-correlation-length' for mcica application ! ! ! +! ************************************************************************ ! +! ! +! additional aer revision history: ! +! jul 2020, m.j. iacono -- added new mcica cloud overlap options ! +! exponential and exponential-random. each method can ! +! use either a constant or a latitude-varying and ! +! day-of-year varying decorrelation length selected ! +! with parameter "idcor". ! +! ! !!!!! ============================================================== !!!!! !!!!! end descriptions !!!!! !!!!! ============================================================== !!!!! !> This module contains the CCPP-compliant NCEP's modifications of the -!! rrtm-lw radiation code from aer inc. +!! rrtmg-lw radiation code from aer inc. module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & @@ -360,7 +396,7 @@ end subroutine rrtmg_lw_init !! \brief This module includes NCEP's modifications of the RRTMG-LW radiation !! code from AER. !! -!! The RRTM-LW package includes three files: +!! The RRTMG-LW package includes three files: !! - radlw_param.f, which contains: !! - module_radlw_parameters: band parameters set up !! - radlw_datatb.f, which contains modules: @@ -389,7 +425,7 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, & + & dzlyr,delpin,de_lgth,alpha, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional @@ -444,6 +480,7 @@ subroutine rrtmg_lw_run & ! dzlyr(npts,nlay) : layer thickness (km) ! ! delpin(npts,nlay): layer pressure thickness (mb) ! ! de_lgth(npts) : cloud decorrelation length (km) ! +! alpha(npts,nlay) : EXP/ER cloud overlap decorrelation parameter ! ! npts : total number of horizontal points ! ! nlay, nlp1 : total number of vertical layers, levels ! ! lprnt : cntl flag for diagnostic print out ! @@ -492,6 +529,8 @@ subroutine rrtmg_lw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (used for isubclw>0 only) ! ! =3: decorrelation-length overlap (for isubclw>0 only) ! +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! ivflip - control flag for vertical index direction ! ! =0: vertical index from toa to surface ! ! =1: vertical index from surface to toa ! @@ -589,6 +628,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & & sfgtmp, de_lgth + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa @@ -650,6 +690,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys) :: tem0, tem1, tem2, pwvcm, summol, stemp, & & delgth + real (kind=kind_phys), dimension(nlay) :: alph integer, dimension(npts) :: ipseed integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor @@ -756,6 +797,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k1) tz(k) = tlvl(iplon,k1) dz(k) = dzlyr(iplon,k1) + if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation !> -# Set absorber amount for h2o, co2, and o3. @@ -868,6 +910,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k) tz(k) = tlvl(iplon,k+1) dz(k) = dzlyr(iplon,k) + if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1017,7 +1060,7 @@ subroutine rrtmg_lw_run & call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth, & + & nlay, nlp1, ipseed(iplon), dz, delgth, alph, & ! --- outputs: & cldfmc, taucld & & ) @@ -1344,7 +1387,7 @@ subroutine rlwinit & ! !===> ... begin here ! - if ( iovrlw<0 .or. iovrlw>3 ) then + if ( iovrlw<0 .or. iovrlw>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVRLW=',iovrlw,' in RLWINIT !!' stop @@ -1486,13 +1529,14 @@ end subroutine rlwinit !!\param ipseed permutation seed for generating random numbers (isubclw>0) !!\param dz layer thickness (km) !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param cldfmc cloud fraction for each sub-column !!\param taucld cloud optical depth for bands (non-mcica) !!\section gen_cldprop cldprop General Algorithm !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, & + & nlay, nlp1, ipseed, dz, de_lgth, alpha, & & cldfmc, taucld & ! --- outputs & ) @@ -1528,6 +1572,7 @@ subroutine cldprop & ! ! ! dz - real, layer thickness (km) nlay ! ! de_lgth- real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! nlay - integer, number of vertical layers 1 ! ! nlp1 - integer, number of vertical levels 1 ! ! ipseed- permutation seed for generating random numbers (isubclw>0) ! @@ -1598,6 +1643,7 @@ subroutine cldprop & real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(ngptlw,nlay),intent(out):: cldfmc @@ -1772,7 +1818,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, de_lgth, & + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- output: & lcloudy & & ) @@ -1802,11 +1848,12 @@ end subroutine cldprop !!\param ipseed permute seed for random num generator !!\param dz layer thickness !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param lcloudy sub-colum cloud profile flag array !!\section mcica_subcol_gen mcica_subcol General Algorithm !! @{ subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -1821,6 +1868,7 @@ subroutine mcica_subcol & ! for lw and sw, use values differ by the number of g-pts. ! ! dz - real, layer thickness (km) nlay ! ! de_lgth - real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! output variables: ! ! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay! @@ -1838,6 +1886,7 @@ subroutine mcica_subcol & real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: logical, dimension(ngptlw,nlay), intent(out) :: lcloudy @@ -1997,6 +2046,58 @@ subroutine mcica_subcol & enddo enddo + case( 4:5 ) ! exponential and exponential-random cloud overlap + +! --- Use previously derived decorrelation parameter, alpha, to specify +! the exponenential transition of cloud correlation in the vertical column. +! +! For exponential cloud overlap, the correlation is applied across layers +! without regard to the configuration of clear and cloudy layers. + +! For exponential-random cloud overlap, a new exponential transition is +! performed within each group of adjacent cloudy layers and blocks of +! cloudy layers with clear layers between them are correlated randomly. +! +! NOTE: The code below is identical for case (4) and (5) because the +! distinction in the vertical correlation between EXP and ER is already +! built into the specification of alpha (in subroutine get_alpha). + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + +! --- then working upward from the surface: +! if a random number (from an independent set: cdfun2) is smaller than +! alpha, then use the previous layer's number, otherwise use a new random +! number (keep the originally assigned one in cdfunc for that layer). + + do k = 2, nlay + k1 = k - 1 + do n = 1, ngptlw + if ( cdfun2(n,k) < alpha(k) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + end select !> -# Generate subcolumns for homogeneous clouds. diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index e91fc10df..4e371e7c5 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,6 +207,15 @@ kind = kind_phys intent = in optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension diff --git a/physics/radsw_main.f b/physics/radsw_main.f index b10541fb7..d285a8901 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -6,7 +6,7 @@ ! sw-rrtm3 radiation package description !!!!! ! ============================================================== !!!!! ! ! -! this package includes ncep's modifications of the rrtm-sw radiation ! +! this package includes ncep's modifications of the rrtmg-sw radiation ! ! code from aer inc. ! ! ! ! the sw-rrtm3 package includes these parts: ! @@ -38,7 +38,7 @@ ! inputs: ! ! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! ! clouds,icseed,aerosols,sfcalb, ! -! dzlyr,delpin,de_lgth, ! +! dzlyr,delpin,de_lgth,alpha, ! ! cosz,solcon,NDAY,idxday, ! ! npts, nlay, nlp1, lprnt, ! ! outputs: ! @@ -104,17 +104,38 @@ ! ! !==========================================================================! ! ! -! the original program declarations: ! +! the original aer program declarations: ! ! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! ! -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). ! -! This software may be used, copied, or redistributed as long as it is ! -! not sold and this copyright notice is reproduced on each copy made. ! -! This model is provided as is without any express or implied warranties. ! -! (http://www.rtweb.aer.com/) ! -! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! Copyright (c) 2002-2020, Atmospheric & Environmental Research, Inc. (AER) ! +! All rights reserved. ! +! ! +! Redistribution and use in source and binary forms, with or without ! +! modification, are permitted provided that the following conditions are met: ! +! * Redistributions of source code must retain the above copyright ! +! notice, this list of conditions and the following disclaimer. ! +! * Redistributions in binary form must reproduce the above copyright ! +! notice, this list of conditions and the following disclaimer in the ! +! documentation and/or other materials provided with the distribution. ! +! * Neither the name of Atmospheric & Environmental Research, Inc., nor ! +! the names of its contributors may be used to endorse or promote products ! +! derived from this software without specific prior written permission. ! +! ! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ! +! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! +! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! +! ARE DISCLAIMED. IN NO EVENT SHALL ATMOSPHERIC & ENVIRONMENTAL RESEARCH, INC.,! +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ! +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ! +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ! +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF ! +! THE POSSIBILITY OF SUCH DAMAGE. ! +! (http://www.rtweb.aer.com/) ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ************************************************************************ ! ! ! @@ -144,7 +165,13 @@ ! ************************************************************************ ! ! ! ! references: ! -! (rrtm_sw/rrtmg_sw): ! +! (rrtmg_sw/rrtm_sw): ! +! iacono, m.j., j.s. delamere, e.j. mlawer, m.w. shepard, ! +! s.a. clough, and w.d collins, radiative forcing by long-lived ! +! greenhouse gases: calculations with the aer radiative transfer ! +! models, j, geophys. res., 113, d13103, doi:10.1029/2008jd009944, ! +! 2008. ! +! ! ! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! ! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! ! atmospheric radiative transfer modeling: a summary of the aer ! @@ -189,7 +216,7 @@ ! ! ! ncep modifications history log: ! ! ! -! sep 2003, yu-tai hou -- received aer's rrtm-sw gcm version ! +! sep 2003, yu-tai hou -- received aer's rrtmg-sw gcm version! ! code (v224) ! ! nov 2003, yu-tai hou -- corrected errors in direct/diffuse ! ! surface alabedo components. ! @@ -260,12 +287,21 @@ ! scheme. (used if iswcliq=2); added new option of ! ! cloud overlap method 'de-correlation-length'. ! ! ! +! ************************************************************************ ! +! ! +! additional aer revision history: ! +! jul 2020, m.j. iacono -- added new mcica cloud overlap options ! +! exponential and exponential-random. each method can ! +! use either a constant or a latitude-varying and ! +! day-of-year varying decorrelation length selected ! +! with parameter "idcor". ! +! ! !!!!! ============================================================== !!!!! !!!!! end descriptions !!!!! !!!!! ============================================================== !!!!! -!> This module contains the CCPP-compliant NCEP's modifications of the rrtm-sw radiation -!! code from aer inc. +!> This module contains the CCPP-compliant NCEP's modifications of the +!! rrtmg-sw radiation code from aer inc. module rrtmg_sw ! use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & @@ -422,7 +458,7 @@ end subroutine rrtmg_sw_init !! | 29 | 820-2600 |H2O |CO2 |CO2 |H2O | !!\tableofcontents !! -!! The RRTM-SW package includes three files: +!! The RRTMG-SW package includes three files: !! - radsw_param.f, which contains: !! - module_radsw_parameters: specifies major parameters of the spectral !! bands and defines the construct structures of derived-type variables @@ -467,7 +503,7 @@ subroutine rrtmg_sw_run & & icseed, aeraod, aerssa, aerasy, & & sfcalb_nir_dir, sfcalb_nir_dif, & & sfcalb_uvis_dir, sfcalb_uvis_dif, & - & dzlyr,delpin,de_lgth, & + & dzlyr,delpin,de_lgth,alpha, & & cosz,solcon,NDAY,idxday, & & npts, nlay, nlp1, lprnt, & & cld_cf, lsswr, & @@ -528,6 +564,7 @@ subroutine rrtmg_sw_run & ! dzlyr(npts,nlay) : layer thickness in km ! ! delpin(npts,nlay): layer pressure thickness (mb) ! ! de_lgth(npts) : clouds decorrelation length (km) ! +! alpha(npts,nlay) : EXP/ER cloud overlap decorrelation parameter ! ! cosz (npts) : cosine of solar zenith angle ! ! solcon : solar constant (w/m**2) ! ! NDAY : num of daytime points ! @@ -595,6 +632,8 @@ subroutine rrtmg_sw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: decorrelation-length overlap clouds ! +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! ivflip - control flg for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -691,6 +730,7 @@ subroutine rrtmg_sw_run & real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc @@ -740,6 +780,7 @@ subroutine rrtmg_sw_run & real (kind=kind_phys) :: cosz1, sntz1, tem0, tem1, tem2, s0fac, & & ssolar, zcf0, zcf1, ftoau0, ftoauc, ftoadc, & & fsfcu0, fsfcuc, fsfcd0, fsfcdc, suvbfc, suvbf0, delgth + real (kind=kind_phys), dimension(nlay) :: alph ! --- column amount of absorbing gases: ! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co @@ -869,6 +910,8 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,kk) delp (k) = delpin(j1,kk) dz (k) = dzlyr (j1,kk) + if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation + !> -# Set absorber and gas column amount, convert from volume mixing !! ratio to molec/cm2 based on coldry (scaled to 1.0e-20) !! - colamt(nlay,maxgas):column amounts of absorbing gases 1 to @@ -958,6 +1001,7 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,k) delp (k) = delpin(j1,k) dz (k) = dzlyr (j1,k) + if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1080,7 +1124,7 @@ subroutine rrtmg_sw_run & call cldprop & ! --- inputs: & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & - & zcf1, nlay, ipseed(j1), dz, delgth, & + & zcf1, nlay, ipseed(j1), dz, delgth, alph, & ! --- outputs: & taucw, ssacw, asycw, cldfrc, cldfmc & & ) @@ -1409,7 +1453,7 @@ subroutine rswinit & ! !===> ... begin here ! - if ( iovrsw<0 .or. iovrsw>3 ) then + if ( iovrsw<0 .or. iovrsw>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVRSW=',iovrsw,' in RSWINIT !!' stop @@ -1530,6 +1574,7 @@ end subroutine rswinit !! (isubcsw>0) !!\param dz layer thickness (km) !!\param delgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param taucw cloud optical depth, w/o delta scaled !!\param ssacw weighted cloud single scattering albedo !! (ssa = ssacw / taucw) @@ -1542,7 +1587,7 @@ end subroutine rswinit !----------------------------------- subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & cf1, nlay, ipseed, dz, delgth, & + & cf1, nlay, ipseed, dz, delgth, alpha, & & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output & ) @@ -1581,6 +1626,7 @@ subroutine cldprop & ! ipseed- permutation seed for generating random numbers (isubcsw>0) ! ! dz - real, layer thickness (km) nlay ! ! delgth- real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! outputs: ! ! taucw - real, cloud optical depth, w/o delta scaled nlay*nbdsw ! @@ -1633,6 +1679,7 @@ subroutine cldprop & real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, cfrac, dz + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & @@ -1885,7 +1932,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, delgth, & + & ( cldf, nlay, ipseed, dz, delgth, alpha, & ! --- outputs: & lcloudy & & ) @@ -1920,12 +1967,13 @@ end subroutine cldprop !!\param ipseed permute seed for random num generator !!\param dz layer thickness (km) !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param lcloudy sub-colum cloud profile flag array !!\section mcica_sw_gen mcica_subcol General Algorithm !> @{ ! ---------------------------------- subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -1940,6 +1988,7 @@ subroutine mcica_subcol & ! for lw and sw, use values differ by the number of g-pts. ! ! dz - real, layer thickness (km) nlay ! ! de_lgth-real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! output variables: ! ! lcloudy - logical, sub-colum cloud profile flag array nlay*ngptsw! @@ -1950,6 +1999,8 @@ subroutine mcica_subcol & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: cloud decorrelation-length overlap method ! +! =4: exponential cloud overlap method (AER) ! +! =5: exponential-random cloud overlap method (AER) ! ! ! ! ===================== end of definitions ==================== ! @@ -1960,6 +2011,7 @@ subroutine mcica_subcol & real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: logical, dimension(nlay,ngptsw), intent(out):: lcloudy @@ -2115,6 +2167,58 @@ subroutine mcica_subcol & enddo enddo + case( 4:5 ) ! exponential and exponential-random cloud overlap + +! --- Use previously derived decorrelation parameter, alpha, to specify +! the exponenential transition of cloud correlation in the vertical column. +! +! For exponential cloud overlap, the correlation is applied across layers +! without regard to the configuration of clear and cloudy layers. + +! For exponential-random cloud overlap, a new exponential transition is +! performed within each group of adjacent cloudy layers and blocks of +! cloudy layers with clear layers between them are correlated randomly. +! +! NOTE: The code below is identical for case (4) and (5) because the +! distinction in the vertical correlation between EXP and ER is already +! built into the specification of alpha (in subroutine get_alpha). + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(k,n) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfun2(k,n) = rand2d(k1) + enddo + enddo + +! --- then working upward from the surface: +! if a random number (from an independent set: cdfun2) is smaller than +! alpha, then use the previous layer's number, otherwise use a new random +! number (keep the originally assigned one in cdfunc for that layer). + + do n = 1, ngptsw + do k = 2, nlay + k1 = k - 1 + if ( cdfun2(k,n) < alpha(k) ) then + cdfunc(k,n) = cdfunc(k1,n) + endif + enddo + enddo + end select !> -# Generate subcolumns for homogeneous clouds. diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index c8074cf47..37ce0d30c 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -234,6 +234,15 @@ kind = kind_phys intent = in optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F [cosz] standard_name = cosine_of_zenith_angle long_name = cosine of the solar zenit angle From 4c5224a91fa1cef8cf4a4f5950678f04ad729a40 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 11 Aug 2020 14:02:27 -0600 Subject: [PATCH 2/3] Add dummy call to get_alpha_exp to physics/module_SGSCloud_RadPre.F90, merge get_alpha from RRTMG with get_alpha_exp from RRTMGP --- physics/GFS_rrtmgp_zhaocarr_pre.F90 | 2 +- physics/module_SGSCloud_RadPre.F90 | 34 ++++++++++++++++++++++++++--- physics/module_SGSCloud_RadPre.meta | 8 +++++++ physics/radiation_clouds.f | 30 ++++++++++++------------- physics/radlw_main.f | 2 +- physics/radsw_main.f | 2 +- 6 files changed, 57 insertions(+), 21 deletions(-) diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index ac9fb7446..35b404b45 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -6,7 +6,7 @@ module GFS_rrtmgp_zhaocarr_pre use machine, only: kind_phys use rrtmgp_aux, only: check_error_msg use funcphys, only: fpvs - use module_radiation_clouds, only: get_alpha_dcorr + use module_radiation_clouds, only: get_alpha_dcorr ! Zhao-Carr MP parameters. real(kind_phys), parameter :: & diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 5a1a2744f..23bc29b11 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -49,6 +49,7 @@ subroutine sgscloud_radpre_run( & nlay, plyr, xlat, dz,de_lgth, & cldsa,mtopa,mbota, & imp_physics, imp_physics_gfdl,& + iovr, & errmsg, errflg ) ! should be moved to inside the mynn: @@ -81,6 +82,7 @@ subroutine sgscloud_radpre_run( & real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa integer, dimension(im,3), intent(inout) :: mbota, mtopa + integer, intent(in) :: iovr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables @@ -93,6 +95,9 @@ subroutine sgscloud_radpre_run( & real(kind=kind_phys), dimension(im) :: rxlat real (kind=kind_phys):: Tc, iwc integer :: i, k, id + ! DH* 20200723 - see comment at the end of this routine around 'gethml' + real(kind=kind_phys), dimension(im,nlay) :: alpha_dummy + ! *DH ! PARAMETERS FOR RANDALL AND XU (1996) CLOUD FRACTION REAL, PARAMETER :: coef_p = 0.25, coef_gamm = 0.49, coef_alph = 100. @@ -123,7 +128,7 @@ subroutine sgscloud_radpre_run( & if (h2oliq > clwt) then onemrh= max( 1.e-10, 1.0-rhgrid ) - tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan tem1 = 100.0 / tem1 value = max( min( tem1*(h2oliq-clwt), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhgrid) ) @@ -304,12 +309,35 @@ subroutine sgscloud_radpre_run( & cldcnv = 0. +! DH* 20200723 +! iovr == 4 or 5 requires alpha, which is computed in GFS_rrmtg_pre, +! which comes after sgscloud_radpre. Computing alpha here requires +! a lot more input variables and computations (dzlay etc.), and +! recomputing it in GFS_rrmtg_pre is a waste of time. Workaround: +! pass a dummy array initialized to zero to gethml for other values of iovr. + if ( iovr == 4 .or. iovr == 5 ) then + errmsg = 'Logic error in sgscloud_radpre: iovr==4 or 5 not implemented' + errflg = 1 + return + end if +!! Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options +! if ( iovr == 4 .or. iovr == 5 ) then +! call get_alpha_exp & +!! --- inputs: +! (im, nlay, dzlay, iovr, latdeg, julian, yearlen, clouds1, & +!! --- outputs: +! alpha & +! ) +! endif + alpha_dummy = 0.0 +! *DH 2020723 + !> - Recompute the diagnostic high, mid, low, total and bl cloud fraction call gethml & ! --- inputs: - ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, im, nlay, & + ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, alpha_dummy, & ! --- outputs: - cldsa, mtopa, mbota) + im, nlay, cldsa, mtopa, mbota) !print*,"===Finished adding subgrid clouds to the resolved-scale clouds" !print*,"qc_save:",qc_save(1,1)," qi_save:",qi_save(1,1) diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 2658e8638..857ab884b 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -341,6 +341,14 @@ type = integer intent = in optional = F +[iovr] + standard_name = flag_for_max_random_overlap_clouds_for_radiation + long_name = max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5e9aa465e..828db4ed0 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -837,9 +837,9 @@ subroutine progcld1 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -1309,9 +1309,9 @@ subroutine progcld2 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -1732,9 +1732,9 @@ subroutine progcld3 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2095,9 +2095,9 @@ subroutine progcld4 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2449,9 +2449,9 @@ subroutine progcld4o & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2817,9 +2817,9 @@ subroutine progcld5 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -3212,9 +3212,9 @@ subroutine progclduni & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -3761,7 +3761,7 @@ subroutine get_alpha_exp & ! random, and blocks of cloudy layers separated by one or more ! ! clear layers are correlated randomly. ! ! ! -! usage: call get_alpha ! +! usage: call get_alpha_exp ! ! ! ! subprograms called: none ! ! ! diff --git a/physics/radlw_main.f b/physics/radlw_main.f index cdcb91b48..f470ad109 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -2060,7 +2060,7 @@ subroutine mcica_subcol & ! ! NOTE: The code below is identical for case (4) and (5) because the ! distinction in the vertical correlation between EXP and ER is already -! built into the specification of alpha (in subroutine get_alpha). +! built into the specification of alpha (in subroutine get_alpha_exp). ! --- setup 2 sets of random numbers diff --git a/physics/radsw_main.f b/physics/radsw_main.f index d285a8901..3b975313b 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -2181,7 +2181,7 @@ subroutine mcica_subcol & ! ! NOTE: The code below is identical for case (4) and (5) because the ! distinction in the vertical correlation between EXP and ER is already -! built into the specification of alpha (in subroutine get_alpha). +! built into the specification of alpha (in subroutine get_alpha_exp). ! --- setup 2 sets of random numbers From a8d1b6bc4aa989baba622025add3b6f47e694bdb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 23 Sep 2020 11:20:21 -0600 Subject: [PATCH 3/3] Update standard names for flags/controls of cloud overlap methods --- physics/GFS_rrtmg_setup.meta | 4 ++-- physics/GFS_rrtmgp_setup.meta | 4 ++-- physics/module_SGSCloud_RadPre.meta | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8377807d8..fec7e32d0 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -113,7 +113,7 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation long_name = sw: max-random overlap clouds units = flag dimensions = () @@ -121,7 +121,7 @@ intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + standard_name = flag_for_cloud_overlap_method_for_longwave_radiation long_name = lw: max-random overlap clouds units = flag dimensions = () diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 430226dbc..45e9d65a2 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -161,7 +161,7 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation long_name = sw: max-random overlap clouds units = flag dimensions = () @@ -169,7 +169,7 @@ intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + standard_name = flag_for_cloud_overlap_method_for_longwave_radiation long_name = lw: max-random overlap clouds units = flag dimensions = () diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 94c9e78e9..f7db379d7 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -338,7 +338,7 @@ intent = in optional = F [iovr] - standard_name = flag_for_max_random_overlap_clouds_for_radiation + standard_name = flag_for_cloud_overlap_method_for_radiation long_name = max-random overlap clouds units = flag dimensions = ()