diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index f6e683bff..af28f2239 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -751,6 +751,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ntsw-1,ntgl-1, & im, lmk, lmp, Model%uni_cld, & Model%lmfshal,Model%lmfdeep2, & + Coupling%qci_conv, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 53e26fb46..b70d7f0f5 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -75,6 +75,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & pbl,ud_mf,dd_mf,dt_mf,cnvw_moist,cnvc,imfshalcnv, & nwfa,con_rd,gq0,ntinc,ntlnc,imp_physics,imp_physics_thompson, & + qci_conv, & errmsg,errflg) !------------------------------------------------------------- implicit none @@ -100,6 +101,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & real(kind=kind_phys), dimension( ix , km ), intent(in ) :: forcet,forceqv_spechum,w,phil real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: qci_conv real(kind=kind_phys), dimension( ix ) :: rand_mom,rand_vmas real(kind=kind_phys), dimension( ix,4 ) :: rand_clos real(kind=kind_phys), dimension( ix , km, 11 ) :: gdc,gdc2 @@ -751,6 +753,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & gdc(i,k,1)= max(0.,tun_rad_shall(i)*cupclws(i,k)*cutens(i)) ! my mod gdc2(i,k,1)=max(0.,tun_rad_deep(i)*(cupclwm(i,k)*cutenm(i)+cupclw(i,k)*cuten(i))) + qci_conv(i,k)=gdc2(i,k,1) gdc(i,k,2)=(outt(i,k))*86400. gdc(i,k,3)=(outtm(i,k))*86400. gdc(i,k,4)=(outts(i,k))*86400. @@ -876,6 +879,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & ! ! Scale dry mixing ratios for water wapor and cloud water to specific humidy / moist mixing ratios ! + qv_spechum = qv/(1.0_kind_phys+qv) cnvw_moist = cnvw/(1.0_kind_phys+qv) ! diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d3687a352..3966c1eba 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -417,6 +417,15 @@ type = integer intent = in optional = F +[qci_conv] + standard_name = convective_cloud_condesate_after_rainout + long_name = convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/module_MYNNrad_pre.F90 b/physics/module_MYNNrad_pre.F90 deleted file mode 100644 index 858abebee..000000000 --- a/physics/module_MYNNrad_pre.F90 +++ /dev/null @@ -1,125 +0,0 @@ -!> \file module_MYNNrad_pre.F90 -!! Contains the preliminary (interstitial) work to the call to the radiation schemes: -!! 1) Backs up the original qc & qi -!! 2) Adds the subgrid clouds mixing ratio and cloud fraction to the original qc, qi and cloud fraction coming from the microphysics scheme. - - MODULE mynnrad_pre - - contains - - subroutine mynnrad_pre_init () - end subroutine mynnrad_pre_init - - subroutine mynnrad_pre_finalize () - end subroutine mynnrad_pre_finalize - -!>\defgroup gsd_mynnrad_pre GSD mynnrad_pre_run Module -!>\ingroup gsd_mynn_edmf -!! This interstitial code adds the subgrid clouds to the resolved-scale clouds if there is no resolved-scale clouds in that particular grid box. -#if 0 -!> \section arg_table_mynnrad_pre_run Argument Table -!! \htmlinclude mynnrad_pre_run.html -!! -#endif -! -! cloud array description: ! -! clouds(:,:,1) - layer total cloud fraction ! -! clouds(:,:,2) - layer cloud liq water path ! -! clouds(:,:,3) - mean effective radius for liquid cloud ! -! clouds(:,:,4) - layer cloud ice water path ! -! clouds(:,:,5) - mean effective radius for ice cloud ! -! -!###=================================================================== -SUBROUTINE mynnrad_pre_run( & - & ix,im,levs, & - & qc, qi, T3D, & - & qc_save, qi_save, & - & qc_bl,cldfra_bl, & - & delp,clouds1,clouds2,clouds3, & - & clouds4,clouds5,slmsk, & - & errmsg, errflg ) - -! should be moved to inside the mynn: - use machine , only : kind_phys - ! DH* TODO - input argument, not constant - use physcons, only : con_g - -!------------------------------------------------------------------- - implicit none -!------------------------------------------------------------------- - ! Interface variables - real (kind=kind_phys), parameter :: gfac=1.0e5/con_g - integer, intent(in) :: ix, im, levs - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & - & clouds1,clouds2,clouds3,clouds4,clouds5 - real(kind=kind_phys), dimension(im,levs), intent(out) :: qc_save, qi_save - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, cldfra_bl - ! DH* TODO add intent() information for delp,clouds1,clouds2,clouds3,clouds4,clouds5 - real(kind=kind_phys), dimension(im), intent(in) :: slmsk - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! Local variables - integer :: i, k - real :: Tc, iwc - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - !write(0,*)"==============================================" - !write(0,*)"in mynn rad pre" - - ! Add subgrid cloud information: - do k = 1, levs - do i = 1, im - - qc_save(i,k) = qc(i,k) - qi_save(i,k) = qi(i,k) - clouds1(i,k)=CLDFRA_BL(i,k) - - IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. CLDFRA_BL(i,k)>0.001) THEN - !Partition the BL clouds into water & ice according to a linear - !approximation of Hobbs et al. (1974). This allows us to only use - !one 3D array for both cloud water & ice. -! Wice = 1. - MIN(1., MAX(0., (t(i,k)-254.)/15.)) -! Wh2o = 1. - Wice - !clouds1(i,k)=MAX(clouds1(i,k),CLDFRA_BL(i,k)) - !clouds1(i,k)=MAX(0.0,MIN(1.0,clouds1(i,k))) - qc(i,k) = QC_BL(i,k)*(MIN(1., MAX(0., (T3D(i,k)-254.)/15.)))*CLDFRA_BL(i,k) - qi(i,k) = QC_BL(i,k)*(1. - MIN(1., MAX(0., (T3D(i,k)-254.)/15.)))*CLDFRA_BL(i,k) - - Tc = T3D(i,k) - 273.15 - !iwc = qi(i,k)*1.0e6*rho(i,k) - - IF (nint(slmsk(i)) == 1) then !land - IF(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) - IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) - ELSE - !eff radius cloud water (microns), from Miles et al. - IF(qc(i,k)>1.E-8)clouds3(i,k)=9.6 - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) - IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) - !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) - ENDIF - - !water and ice paths - clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) - clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) - - ENDIF - - enddo - enddo - - !print*,"===Finished adding subgrid clouds to the resolved-scale clouds" - !print*,"qc_save:",qc_save(1,1)," qi_save:",qi_save(1,1) - - END SUBROUTINE mynnrad_pre_run - -!###================================================================= - -END MODULE mynnrad_pre diff --git a/physics/module_MYNNrad_post.F90 b/physics/module_SGSCloud_RadPost.F90 similarity index 67% rename from physics/module_MYNNrad_post.F90 rename to physics/module_SGSCloud_RadPost.F90 index 7acd2e406..810c3bcd3 100644 --- a/physics/module_MYNNrad_post.F90 +++ b/physics/module_SGSCloud_RadPost.F90 @@ -1,27 +1,28 @@ -!> \file module_MYNNrad_post.F90 +!> \file module_SGSCloud_RadPost.F90 !! Contains the post (interstitial) work after the call to the radiation schemes: !! 1) Restores the original qc & qi - MODULE mynnrad_post + MODULE sgscloud_radpost contains - subroutine mynnrad_post_init () - end subroutine mynnrad_post_init + subroutine sgscloud_radpost_init () + end subroutine sgscloud_radpost_init - subroutine mynnrad_post_finalize () - end subroutine mynnrad_post_finalize + subroutine sgscloud_radpost_finalize () + end subroutine sgscloud_radpost_finalize -!>\defgroup gsd_mynnrad_post GSD mynnrad_post_run Module +!>\defgroup sgscloud_radpost GSD sgscloud_radpost_run Module !>\ingroup gsd_mynn_edmf !! This interstitial code restores the original resolved-scale clouds (qc and qi). #if 0 -!! \section arg_table_mynnrad_post_run Argument Table -!! \htmlinclude mynnrad_post_run.html +!! \section arg_table_sgscloud_radpost_run Argument Table +!! \htmlinclude sgscloud_radpost_run.html !! #endif -SUBROUTINE mynnrad_post_run( & +SUBROUTINE sgscloud_radpost_run( & & ix,im,levs, & + & flag_init,flag_restart, & & qc,qi, & & qc_save, qi_save, & & errmsg, errflg ) @@ -34,6 +35,7 @@ SUBROUTINE mynnrad_post_run( & !------------------------------------------------------------------- integer, intent(in) :: ix, im, levs + logical, intent(in) :: flag_init, flag_restart real(kind=kind_phys), dimension(im,levs), intent(out) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save character(len=*), intent(out) :: errmsg @@ -48,6 +50,11 @@ SUBROUTINE mynnrad_post_run( & !write(0,*)"==============================================" !write(0,*)"in mynn rad post" + if (flag_init .and. (.not. flag_restart)) then + !write (0,*) 'Skip MYNNrad_post flag_init = ', flag_init + return + endif + ! Add subgrid cloud information: do k = 1, levs do i = 1, im @@ -61,8 +68,8 @@ SUBROUTINE mynnrad_post_run( & ! print*,"===Finished restoring the resolved-scale clouds" ! print*,"qc_save:",qc_save(1,1)," qc:",qc(1,1) - END SUBROUTINE mynnrad_post_run + END SUBROUTINE sgscloud_radpost_run !###================================================================= -END MODULE mynnrad_post +END MODULE sgscloud_radpost diff --git a/physics/module_MYNNrad_post.meta b/physics/module_SGSCloud_RadPost.meta similarity index 83% rename from physics/module_MYNNrad_post.meta rename to physics/module_SGSCloud_RadPost.meta index b09abe01e..0318aa231 100644 --- a/physics/module_MYNNrad_post.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -1,5 +1,5 @@ [ccpp-arg-table] - name = mynnrad_post_run + name = sgscloud_radpost_run type = scheme [ix] standard_name = horizontal_dimension @@ -25,6 +25,22 @@ type = integer intent = in optional = F +[flag_init] + standard_name = flag_for_first_time_step + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [qc] standard_name = cloud_condensed_water_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 new file mode 100644 index 000000000..d92ef42ce --- /dev/null +++ b/physics/module_SGSCloud_RadPre.F90 @@ -0,0 +1,205 @@ +!>\file module_SGSCloud_RadPre.F90 +!! Contains the preliminary (interstitial) work to the call to the radiation schemes: +!! 1) Backs up the original qc & qi +!! 2) Adds the partioning of convective condensate into liqice/ice for effective radii +!! 3) Adds the subgrid clouds mixing ratio and cloud fraction to the original qc, qi and cloud fraction coming from the microphysics scheme. +!! 4) Recompute the diagnostic high, mid, low, total and bl clouds to be consistent with radiation + + MODULE sgscloud_radpre + + contains + + subroutine sgscloud_radpre_init () + end subroutine sgscloud_radpre_init + + subroutine sgscloud_radpre_finalize () + end subroutine sgscloud_radpre_finalize + +!> \defgroup sgsrad_group GSD sgscloud_radpre_run Module +!> \ingroup sgscloud_radpre +!! This interstitial code adds the subgrid clouds to the resolved-scale clouds if there is no resolved-scale clouds in that particular grid box. +!> \section arg_table_sgscloud_radpre_run Argument Table +!! \htmlinclude sgscloud_radpre_run.html +!! +!! +!! cloud array description: ! +!! clouds(:,:,1) - layer total cloud fraction ! +!! clouds(:,:,2) - layer cloud liq water path ! +!! clouds(:,:,3) - mean effective radius for liquid cloud ! +!! clouds(:,:,4) - layer cloud ice water path ! +!! clouds(:,:,5) - mean effective radius for ice cloud ! +!! +!>\section sgscloud_radpre GSD SGS Scheme General Algorithm +!> @{ +SUBROUTINE sgscloud_radpre_run( & + & ix,im,levs, & + & flag_init,flag_restart, & + & qc, qi, T3D, & + & qr, qs, & + & qci_conv, & + & imfdeepcnv, & + & qc_save, qi_save, & + & qc_bl,cldfra_bl, & + & delp,clouds1,clouds2,clouds3, & + & clouds4,clouds5,slmsk, & + & nlay, plyr, xlat, dz,de_lgth, & + & cldsa,mtopa,mbota, & + & errmsg, errflg ) + +! should be moved to inside the mynn: + use machine , only : kind_phys + ! DH* TODO - input argument, not constant + use physcons, only : con_g, con_pi + use module_radiation_clouds, only : gethml + +!------------------------------------------------------------------- + implicit none +!------------------------------------------------------------------- + ! Interface variables + real (kind=kind_phys), parameter :: gfac=1.0e5/con_g + integer, intent(in) :: ix, im, levs, imfdeepcnv, nlay + logical, intent(in) :: flag_init, flag_restart + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qci_conv + real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp + real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + & clouds1,clouds2,clouds3,clouds4,clouds5 + real(kind=kind_phys), dimension(im,levs), intent(out) :: qc_save, qi_save + real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, cldfra_bl + ! DH* TODO add intent() information for delp,clouds1,clouds2,clouds3,clouds4,clouds5 + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth + real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz + real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa + integer, dimension(im,3), intent(out) :: mbota, mtopa + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + ! pressure limits of cloud domain interfaces (low,mid,high) in mb (0.1kPa) + real (kind=kind_phys) :: ptop1(im,3+1) !< pressure limits of cloud domain interfaces + real (kind=kind_phys) :: ptopc(3+1,2 ) !< pressure limits of cloud domain interfaces + !! (low, mid, high) in mb (0.1kPa) + data ptopc / 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 / + real(kind=kind_phys), dimension(im,nlay) :: cldcnv + real(kind=kind_phys), dimension(im) :: rxlat + real (kind=kind_phys):: Tc, iwc, tem1 + integer :: i, k, id + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + !write(0,*)"==============================================" + !write(0,*)"in mynn rad pre" + + if (flag_init .and. (.not. flag_restart)) then + !write (0,*) 'Skip MYNNrad_pre flag_init = ', flag_init + return + endif + ! Back-up microphysics cloud information: + do k = 1, levs + do i = 1, im + qc_save(i,k) = qc(i,k) + qi_save(i,k) = qi(i,k) + end do + end do + ! add convective clouds + IF (imfdeepcnv == 3) THEN + do k = 1, levs + do i = 1, im + IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8) THEN + !Partition the convective clouds into water & ice according to a linear + qc(i,k) = qci_conv(i,k)*(MIN(1., MAX(0., (T3D(i,k)-244.)/25.))) + qi(i,k) = qci_conv(i,k)*(1. - MIN(1., MAX(0., (T3D(i,k)-244.)/25.))) + + Tc = T3D(i,k) - 273.15 + + IF (nint(slmsk(i)) == 1) then !land + IF(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ELSE + !eff radius cloud water (microns), from Miles et al. + IF(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ENDIF + ENDIF + enddo + enddo + ENDIF + + ! add boundary layer clouds + do k = 1, levs + do i = 1, im + + IF( qr(i,k) > 1.0e-7 .OR. qs(i,k) > 1.0e-7)THEN + !Keep Xu-RandalL clouds fraction - do not overwrite + ELSE + clouds1(i,k) = CLDFRA_BL(i,k) + ENDIF + + IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. CLDFRA_BL(i,k)>0.001) THEN + !Partition the BL clouds into water & ice according to a linear + !approximation of Hobbs et al. (1974). This allows us to only use + !one 3D array for both cloud water & ice. +! Wice = 1. - MIN(1., MAX(0., (t(i,k)-254.)/15.)) +! Wh2o = 1. - Wice + !clouds1(i,k)=MAX(clouds1(i,k),CLDFRA_BL(i,k)) + !clouds1(i,k)=MAX(0.0,MIN(1.0,clouds1(i,k))) + qc(i,k) = QC_BL(i,k)*(MIN(1., MAX(0., (T3D(i,k)-244.)/25.)))*CLDFRA_BL(i,k) + qi(i,k) = QC_BL(i,k)*(1. - MIN(1., MAX(0., (T3D(i,k)-244.)/25.)))*CLDFRA_BL(i,k) + + Tc = T3D(i,k) - 273.15 + !iwc = qi(i,k)*1.0e6*rho(i,k) + + IF (nint(slmsk(i)) == 1) then !land + IF(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ELSE + !eff radius cloud water (microns), from Miles et al. + IF(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) + !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) + ENDIF + !calculate water and ice paths for additional BL clouds + clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) + clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) + ENDIF + enddo + enddo + +!> - Compute SFC/low/middle/high cloud top pressure for each cloud domain for given latitude. + + do i =1, im + rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range +! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range + enddo + + do id = 1, 4 + tem1 = ptopc(id,2) - ptopc(id,1) + do i =1, im + ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) + enddo + enddo + + cldcnv = 0. + +!> - Recompute the diagnostic high, mid, low, total and bl cloud fraction + call gethml & +! --- inputs: + & ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, im, nlay, & +! --- outputs: + & 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) + + END SUBROUTINE sgscloud_radpre_run + +!###================================================================= + +END MODULE sgscloud_radpre diff --git a/physics/module_MYNNrad_pre.meta b/physics/module_SGSCloud_RadPre.meta similarity index 55% rename from physics/module_MYNNrad_pre.meta rename to physics/module_SGSCloud_RadPre.meta index 617ee3f31..9da20d07b 100644 --- a/physics/module_MYNNrad_pre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -1,5 +1,15 @@ [ccpp-arg-table] - name = mynnrad_pre_run + name = sgscloud_radpre_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = sgscloud_radpre_finalize + type = scheme + +######################################################################## +[ccpp-arg-table] + name = sgscloud_radpre_run type = scheme [ix] standard_name = horizontal_dimension @@ -25,6 +35,22 @@ type = integer intent = in optional = F +[flag_init] + standard_name = flag_for_first_time_step + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [qc] standard_name = cloud_condensed_water_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) @@ -52,6 +78,41 @@ kind = kind_phys intent = in optional = F +[qr] + standard_name = rain_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of rain water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of snow water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qci_conv] + standard_name = convective_cloud_condesate_after_rainout + long_name = convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [qc_save] standard_name = cloud_condensed_water_mixing_ratio_save long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme @@ -151,6 +212,75 @@ kind = kind_phys intent = in optional = F +[nlay] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = number of vertical layers for radiation + units = count + dimensions = () + type = integer + intent = in + optional = F +[plyr] + standard_name = air_pressure_at_layer_for_radiation_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = grid latitude in radians + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dz] + standard_name = layer_thickness_for_radiation + long_name = layer thickness on radiation levels + units = km + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle,high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = out + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + 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 1c5605ae3..bfa995f61 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -243,7 +243,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o + & cld_init, progcld5, progcld4o, gethml ! ================= @@ -2340,7 +2340,8 @@ subroutine progcld5 & & xlat,xlon,slmsk,dz,delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & & IX, NLAY, NLP1, & - & uni_cld, lmfshal, lmfdeep2, cldcov, & + & uni_cld, lmfshal, lmfdeep2, qci_conv, cldcov, & +! & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2435,6 +2436,7 @@ subroutine progcld5 & & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw + real (kind=kind_phys), dimension(:,:), intent(in) :: qci_conv real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk @@ -2511,7 +2513,9 @@ subroutine progcld5 & do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) & + & + qci_conv(i,k) +! clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) enddo enddo !> - Find top pressure for each cloud domain for given latitude.