diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 8b930d370..c92512698 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -734,49 +734,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cldcov = 0.0 endif - - ! DJS2019: START Hack - ! Compute layer cloud fraction. - clwmin = 0.0 - cldcov(:,:) = 0.0 - if (.not. Model%lmfshal) then - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - ! DJS2019: END - - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 2a5743159..b742f8543 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -120,11 +120,11 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & ! ####################################################################################### top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) if (top_at_1) then - iSFC = Model%levs + iSFC = Model%levs+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs + iTOA = Model%levs+1 endif ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 95d404283..c6acacaaa 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -99,6 +99,7 @@ end subroutine GFS_rrtmgp_pre_init !! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | !! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | !! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | out | F | !! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | @@ -114,7 +115,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT - faersw, cldsa, mtopa, mbota, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) + faersw, cldsa, mtopa, mbota, de_lgth, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -161,7 +162,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys), dimension(ncol,Model%levr),intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -180,15 +181,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL + real(kind_phys), dimension(ncol), intent(out) :: & + de_lgth ! real(kind_phys), dimension(ncol,NSPC1), intent(out) :: & aerodp ! Vertical integrated optical depth for various aerosol species ! Local variables - integer :: i, j, k, iCol, iBand, iSFC, iTOA, iLay + integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs - real(kind_phys), dimension(ncol) :: de_lgth real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& deltaP, o3_lay @@ -239,10 +241,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo ! Guard against case when model uppermost model layer higher than rrtmgp allows. - where(p_lev(1:nCol,iTOA+1) .lt. lw_gas_props%get_press_min()) + where(p_lev(1:nCol,iTOA+1) .lt. sw_gas_props%get_press_min()) ! Set to RRTMGP min(pressure/temperature) - p_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_press_min(),dim=1,ncopies=ncol) - t_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_temp_min(),dim=1,ncopies=ncol) + p_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_press_min(),dim=1,ncopies=ncol) + t_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_temp_min(),dim=1,ncopies=ncol) ! Recompute layer pressure/temperature. p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) @@ -468,7 +470,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate integer :: i,k - real(kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 real(kind_phys), parameter :: xrc3 = 100. real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov @@ -571,50 +572,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cldcov = 0.0 endif - ! ####################################################################################### - ! This is a hack to get the first-column in a file to contain a cloud. - ! ####################################################################################### - ! DJS2019: START - ! Compute layer cloud fraction. - clwmin = 0.0 - cldcov(:,:) = 0.0 - if (.not. Model%lmfshal) then - do k = 1, Model%levs - do i = 1, NCOL - clwt = 1.0e-6 * (p_lay(i,k)*0.1) - if (cld_condensate(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-relhum(i,k) ) - clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) - tem1 = min(max(sqrt(sqrt(onemrh*qs_lay(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(relhum(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, Model%levs - do i = 1, NCOL - clwt = 1.0e-6 * (p_lay(i,k)*0.1) - if (cld_condensate(i,k,1) .gt. 0) then - onemrh= max( 1.e-10, 1.0-relhum(i,k) ) - clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) - tem1 = min(max((onemrh*qs_lay(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(relhum(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - ! DJS2019: END - ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 565925864..a1a4dd7d8 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -149,51 +149,51 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & ! Initialize outputs hswc(:,:) = 0. topflx_sw = topfsw_type ( 0., 0., 0. ) - sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) + ! sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) if (l_clrskysw_hr) then hsw0(:,:) = 0. endif if (l_fluxessw2D) then flxprf_sw = profsw_type ( 0., 0., 0., 0. ) endif - if (l_sfcfluxessw1D) then - scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif + !if (l_sfcfluxessw1D) then + ! scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + !endif if (Model%lsswr .and. nDay .gt. 0) then ! Clear-sky heating-rate (optional) if (l_clrskysw_HR) then call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_clrsky, & - fluxswDOWN_clrsky, & + fluxswUP_clrsky(idxday,:), & + fluxswDOWN_clrsky(idxday,:), & p_lev(idxday,1:Model%levs+1), & thetaTendClrSky)) hsw0(idxday,:)=thetaTendClrSky endif ! All-sky heating-rate (mandatory) call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_allsky, & - fluxswDOWN_allsky, & + fluxswUP_allsky(idxday,:), & + fluxswDOWN_allsky(idxday,:), & p_lev(idxday,1:Model%levs+1), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) - topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) - topflx_sw%dnfxc = fluxswDOWN_allsky(:,iTOA) - sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) - sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) - sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) - sfcflx_sw%dnfx0 = fluxswDOWN_clrsky(:,iSFC) + topflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) + topflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) + topflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) + sfcflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) + sfcflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) + sfcflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) + sfcflx_sw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) ! Optional output if(l_fluxessw2D) then - flxprf_sw%upfxc = fluxswUP_allsky - flxprf_sw%dnfxc = fluxswDOWN_allsky - flxprf_sw%upfx0 = fluxswUP_clrsky - flxprf_sw%dnfx0 = fluxswDOWN_clrsky + flxprf_sw(idxday,:)%upfxc = fluxswUP_allsky(idxday,:) + flxprf_sw(idxday,:)%dnfxc = fluxswDOWN_allsky(idxday,:) + flxprf_sw(idxday,:)%upfx0 = fluxswUP_clrsky(idxday,:) + flxprf_sw(idxday,:)%dnfx0 = fluxswDOWN_clrsky(idxday,:) endif endif diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 01a40b8ad..00603e315 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -354,9 +354,6 @@ module rrtmg_lw ! ================ subroutine rrtmg_lw_init () - open(59,file='rrtmg_aux_dump.txt',status='unknown') - open(60,file='rrtmg_aux_tautot.txt',status='unknown') - open(61,file='rrtmg_aux_taucld.txt',status='unknown') end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS radlw Main @@ -1289,28 +1286,14 @@ subroutine rrtmg_lw_run & endif endif ! if_ivflip - write(59,*) "#" - write(60,*) "#" - do j=1,nLay - write(59,"(9F10.3)") plyr(1,j),tlyr(1,j),cld_lwp(1,j), & - & cld_iwp(1,j), cld_cf(1,j), sum(totuclfl(j-1:j))/2., & - & sum(totdclfl(j-1:j))/2., sum(totuflux(j-1:j))/2., & - & sum(totdflux(j-1:j))/2. - write(60,*) tautot(:,j) - write(61,*) taucld(:,j) - enddo - enddo lab_do_iplon - + enddo lab_do_iplon !................................... end subroutine rrtmg_lw_run !----------------------------------- !> @} subroutine rrtmg_lw_finalize () - close(59) - close(60) - close(61) end subroutine rrtmg_lw_finalize @@ -1742,7 +1725,6 @@ subroutine cldprop & do ib = 1, nbands tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) & & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) - enddo endif ! end if_ilwcliq_block endif ! end if_cldliq_block @@ -1802,7 +1784,7 @@ subroutine cldprop & endif ! end if_cldice_block do ib = 1, nbands - taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw + taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw enddo endif lab_if_cld diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index d4b280032..7ff57039e 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -2069,11 +2069,11 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld asy_cld ! In-cloud asymmetry parameter (1) ! Local variables - integer :: iCol, iLay, iBand, index, ia, istr + integer :: iCol, iLay, iBand, index, ia real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp,asyw,ssaw,za1,za2 real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & - tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & + tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, asycoliq, & forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq ! Initialize @@ -2098,7 +2098,7 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld asy_ice(:) = 0._kind_phys asy_rain(:) = 0._kind_phys asy_snow(:) = 0._kind_phys - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + if (cld_frac(iCol,iLay) .gt. 1.e-12_kind_phys) then ! ########################################################################### ! Rain clouds ! ########################################################################### @@ -2231,20 +2231,20 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld ! ########################################################################### ! Compute total cloud radiative properties (tau, omega, and g) ! ########################################################################### - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + if (cld_frac(iCol,iLay) .gt. 1.e-12_kind_phys) then do iBand = 1,nBandsSW ! Sum up radiative properties by type. - tau_cld(iCol,iLay,iBand) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow - ssa_cld(iCol,iLay,iBand) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) - asy_cld(iCol,iLay,iBand) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) + tau_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow) + ssa_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand)) + asy_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand)) ! Delta-scale - asyw = asy_cld(iCol,iLay,iBand)/max(0._kind_phys, ssa_cld(iCol,iLay,iBand)) + asyw = asy_cld(iCol,iLay,iBand)/max(1.e-12_kind_phys, ssa_cld(iCol,iLay,iBand)) ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) za1 = asyw * asyw za2 = ssaw * za1 tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) - asy_cld(iCol,iLay,iBand) = (asyw - za2/ssaw)/(1-za2/ssaw) + asy_cld(iCol,iLay,iBand) = asyw/(1+asyw) enddo ! Loop over SW bands endif ! END sum cloudy properties ! diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 486bbb8cb..847981430 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -120,12 +120,12 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(nday,Model%levs+1),target :: & - fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky + fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 - integer :: iGas + integer :: iGas,iSFC,iTOA type(ty_optical_props_2str) :: & optical_props_cloud_daylit, & ! RRTMGP DDT: longwave cloud radiative properties optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties @@ -141,6 +141,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Vertical ordering? top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs+1 + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs+1 + endif ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hsw0) @@ -180,10 +187,11 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxSW_up_allsky - flux_allsky%flux_dn => fluxSW_dn_allsky - flux_clrsky%flux_up => fluxSW_up_clrsky - flux_clrsky%flux_dn => fluxSW_dn_clrsky + flux_allsky%flux_up => fluxSW_up_allsky + flux_allsky%flux_dn => fluxSW_dn_allsky + flux_allsky%flux_dn_dir => fluxSW_dn_dir_allsky + flux_clrsky%flux_up => fluxSW_up_clrsky + flux_clrsky%flux_dn => fluxSW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then flux_allsky%bnd_flux_up => fluxSWBB_up_allsky @@ -220,7 +228,7 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Store fluxes fluxUP_allsky(idxday,:) = flux_allsky%flux_up fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn - + scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(:,iSFC) endif end subroutine rrtmgp_sw_rte_run