diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index b423e4d22..769478e6d 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -29,8 +29,8 @@ end subroutine GFS_rrtmgp_lw_post_init !! subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& - raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, hlwc, topflx_lw, & - sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) + raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & + flxprf_lw, hlw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -68,24 +68,26 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei real(kind_phys), dimension(im,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtaulw ! approx 10.mu band layer cloud optical depth + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & + hlwc ! Longwave all-sky heating-rate (K/sec) ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & - hlwc ! Longwave all-sky heating-rate (K/sec) - type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_lw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_lw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) +! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & +! hlwc ! Longwave all-sky heating-rate (K/sec) +! type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! topflx_lw ! radiation fluxes at top, components: +! ! upfxc - total sky upward flux at top (w/m2) +! ! upfx0 - clear sky upward flux at top (w/m2) +! type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! sfcflx_lw ! radiation fluxes at sfc, components: +! ! upfxc - total sky upward flux at sfc (w/m2) +! ! upfx0 - clear sky upward flux at sfc (w/m2) +! ! dnfxc - total sky downward flux at sfc (w/m2) +! ! dnfx0 - clear sky downward flux at sfc (w/m2) ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & @@ -145,12 +147,12 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_lw%upfxc = fluxlwUP_allsky(:,iTOA) - topflx_lw%upfx0 = fluxlwUP_clrsky(:,iTOA) - sfcflx_lw%upfxc = fluxlwUP_allsky(:,iSFC) - sfcflx_lw%upfx0 = fluxlwUP_clrsky(:,iSFC) - sfcflx_lw%dnfxc = fluxlwDOWN_allsky(:,iSFC) - sfcflx_lw%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + Diag%topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) + Diag%topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) + Radtend%sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) + Radtend%sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) + Radtend%sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) + Radtend%sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) ! Optional outputs if(l_fluxeslw2d) then @@ -194,13 +196,13 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei if (Model%lslwr) then do i=1,im ! LW all-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up + Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn + Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up ! LW clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up + Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn + Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up enddo do i=1,im diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c159b9ae9..3eb1e0953 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -172,31 +172,6 @@ kind = kind_phys intent = in optional = F -[hlwc] - standard_name = RRTMGP_lw_heating_rate_all_sky - long_name = RRTMGP longwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[topflx_lw] - standard_name = lw_fluxes_top_atmosphere - long_name = longwave total sky fluxes at the top of the atm - units = W m-2 - dimensions = (horizontal_dimension) - type = topflw_type - intent = inout - optional = F -[sfcflx_lw] - standard_name = lw_fluxes_sfc - long_name = longwave total sky fluxes at the Earth surface - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcflw_type - intent = inout - optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index deddc7013..e78301585 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -9,6 +9,7 @@ module GFS_rrtmgp_lw_pre GFS_sfcprop_type, & ! Surface fields GFS_grid_type, & ! Grid and interpolation related data GFS_statein_type, & ! + GFS_Interstitial_type, & ! GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity @@ -31,7 +32,7 @@ end subroutine GFS_rrtmgp_lw_pre_init !! \htmlinclude GFS_rrtmgp_lw_pre.html !! subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, errmsg, errflg) + tv_lay, relhum, tracer, lw_gas_props, Radtend, Interstitial, aerosolslw, aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -58,6 +59,8 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Outputs type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_interstitial_type), intent(inout) :: & + Interstitial real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& aerosolslw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & @@ -97,7 +100,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, & Radtend%semis) do iBand=1,lw_gas_props%get_nband() - Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + Interstitial%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo ! ####################################################################################### @@ -105,7 +108,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & - .false., Model%lslwr, aerosolssw2, aerosolslw, aerodp) + .true., Model%lslwr, aerosolssw2, aerosolslw, aerodp) end subroutine GFS_rrtmgp_lw_pre_run diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta index e7954f4ec..2ea7c6e54 100644 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = inout + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index a501b196b..c38b8b99a 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -232,15 +232,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, do iLay=iSFC+1,iTOA t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo - t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& - (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) + t_lev(iCol,iTOA+1) = t_lay(iCol,iTOA) + !t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& + ! (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) enddo ! Guard against case when model uppermost model layer higher than rrtmgp allows. where(p_lev(1:nCol,iTOA+1) .lt. rrtmgp_minP) ! Set to RRTMGP min(pressure/temperature) p_lev(1:nCol,iTOA+1) = spread(rrtmgp_minP, dim=1,ncopies=ncol) - t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, dim=1,ncopies=ncol) +! t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, 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)) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index ed272f530..56d063641 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -7,7 +7,8 @@ module GFS_rrtmgp_sw_post GFS_grid_type, & GFS_radtend_type, & GFS_diag_type, & - GFS_statein_type + GFS_statein_type, & + GFS_interstitial_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type ! RRTMGP DDT's @@ -27,14 +28,16 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein, & + subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, Statein, & scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky,& fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, & - cldtausw, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, errmsg, errflg) + cldtausw, flxprf_sw, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_Interstitial_type), intent(in) :: & + Interstitial type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data type(GFS_coupling_type), intent(inout) :: & @@ -71,24 +74,26 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein real(kind_phys), dimension(im,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtausw ! approx .55mu band layer cloud optical depth + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & + hswc ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & - hswc ! Shortwave all-sky heating-rate (K/sec) - type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_sw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_sw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) +! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & +! hswc ! Shortwave all-sky heating-rate (K/sec) +! type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! topflx_sw ! radiation fluxes at top, components: +! ! upfxc - total sky upward flux at top (w/m2) +! ! upfx0 - clear sky upward flux at top (w/m2) +! type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! sfcflx_sw ! radiation fluxes at sfc, components: +! ! upfxc - total sky upward flux at sfc (w/m2) +! ! upfx0 - clear sky upward flux at sfc (w/m2) +! ! dnfxc - total sky downward flux at sfc (w/m2) +! ! dnfx0 - clear sky downward flux at sfc (w/m2) ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & @@ -127,18 +132,19 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! ####################################################################################### 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 + ! ####################################################################################### ! Compute SW heating-rates ! ####################################################################################### - ! Initialize outputs - hswc(:,:) = 0. - topflx_sw = topfsw_type ( 0., 0., 0. ) + ! Initialize + hswc = 0 + Diag%topfsw = topfsw_type ( 0., 0., 0. ) ! sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) if (l_clrskysw_hr) then hsw0(:,:) = 0. @@ -170,13 +176,13 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - 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) + Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) + Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) + Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) + Radtend%sfcfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) ! Optional output if(l_fluxessw2D) then @@ -211,10 +217,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein Coupling%visbmdi(i) = scmpsw(i)%visbm Coupling%visdfdi(i) = scmpsw(i)%visdf - Coupling%nirbmui(i) = scmpsw(i)%nirbm * Radtend%sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * Radtend%sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * Radtend%sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * Radtend%sfc_alb_uvvis_dif(1,i) + Coupling%nirbmui(i) = scmpsw(i)%nirbm * Interstitial%sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * Interstitial%sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * Interstitial%sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * Interstitial%sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block Radtend%htrsw(:,:) = 0.0 @@ -266,23 +272,23 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein if (Radtend%coszen(i) > 0.) then ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + fluxswUP_allsky( idxday(i),iTOA) * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + fluxswUP_allsky( idxday(i),iSFC) * tem0d ! total sky sfc sw up + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + fluxswDOWN_allsky(idxday(i),iSFC) * tem0d ! total sky sfc sw dn ! SW uv-b fluxes Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + Diag%fluxr(i,23) = Diag%fluxr(i,23) + fluxswDOWN_allsky(idxday(i),iTOA) * tem0d ! top sw dn ! SW SFC flux components Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + Diag%fluxr(i,29) = Diag%fluxr(i,29) + fluxswUP_clrsky( idxday(i),iTOA) * tem0d ! clear sky top sw up + Diag%fluxr(i,31) = Diag%fluxr(i,31) + fluxswUP_clrsky( idxday(i),iSFC) * tem0d ! clear sky sfc sw up + Diag%fluxr(i,32) = Diag%fluxr(i,32) + fluxswDOWN_clrsky(idxday(i),iSFC) * tem0d ! clear sky sfc sw dn endif enddo diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 83f1deaad..bff311cb7 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type @@ -195,31 +203,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[hswc] - standard_name = RRTMGP_sw_heating_rate_all_sky - long_name = RRTMGP shortwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F - intent = out -[topflx_sw] - standard_name = sw_fluxes_top_atmosphere - long_name = shortwave total sky fluxes at the top of the atm - units = W m-2 - dimensions = (horizontal_dimension) - type = topfsw_type - intent = inout - optional = F -[sfcflx_sw] - standard_name = sw_fluxes_sfc - long_name = shortwave total sky fluxes at the Earth surface - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = inout - optional = F [flxprf_sw] standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 1bbf0d3f1..6c30a288e 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -10,7 +10,8 @@ module GFS_rrtmgp_sw_pre GFS_grid_type, & ! Grid and interpolation related data GFS_coupling_type, & ! GFS_statein_type, & ! - GFS_radtend_type ! Radiation tendencies needed in physics + GFS_radtend_type, & ! Radiation tendencies needed in physics + GFS_interstitial_type use module_radiation_astronomy,only: & coszmn ! Function to compute cos(SZA) use module_radiation_surface, only: & @@ -37,13 +38,15 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, & + subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ncol, p_lay, & p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & Coupling, aerosolssw, aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_Interstitial_type),intent(inout) :: & + Interstitial type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & @@ -154,10 +157,10 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() - Radtend%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - Radtend%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - Radtend%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - Radtend%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + Interstitial%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + Interstitial%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + Interstitial%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + Interstitial%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo ! ####################################################################################### @@ -165,7 +168,7 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, .false., aerosolssw2, aerosolslw, aerodp) + Model%lsswr, .true., aerosolssw2, aerosolslw, aerodp) ! Store aerosol optical properties ! SW. diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 05a76151b..91c6a8670 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = inout + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index 004a3fb90..e27a008bf 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_lw_clrallsky_driver use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_Interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,7 +27,7 @@ end subroutine rrtmgp_lw_clrallsky_driver_init !! \section arg_table_rrtmgp_lw_clrallsky_driver_run !! \htmlinclude rrtmgp_lw_clrallsky_driver.html !! - subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay,& + subroutine rrtmgp_lw_clrallsky_driver_run(Model, Interstitial, ncol, lw_gas_props, p_lay, t_lay,& p_lev, skt, gas_concentrations, lw_optical_props_clouds, lw_optical_props_aerosol, & lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, & hlwb, errmsg, errflg) @@ -35,8 +35,8 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ ! Inputs type(GFS_control_type), intent(in) :: & Model - type(GFS_radtend_type), intent(in) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_Interstitial_type), intent(in) :: & + Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs), intent(in) :: & @@ -109,7 +109,7 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ t_lay, & ! IN - temperature at layer interfaes (K) p_lev, & ! IN - pressure at layer centers (Pa) skt, & ! IN - skin temperature (K) - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band lw_optical_props_clouds, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta index c72d2b11f..eea012c87 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ b/physics/rrtmgp_lw_clrallsky_driver.meta @@ -9,12 +9,12 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type + type = GFS_interstitial_type intent = in optional = F [ncol] diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 3ae94dea1..9e1387ed8 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -1,6 +1,6 @@ module rrtmgp_lw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs @@ -21,7 +21,7 @@ module rrtmgp_lw_gas_optics !! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & + subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & ipsdlw0, errmsg, errflg) use netcdf @@ -32,8 +32,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend ! DDT containing FV3-GFS radiation tendencies integer,intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -376,37 +374,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - !allocate(temp_log_array1(nminor_absorber_intervals_lower)) - !where(minor_scales_with_density_lower) - ! temp_log_array1 = 1 - !elsewhere - ! temp_log_array1 = 0 - !end where - !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array2(nminor_absorber_intervals_lower)) - !where(scale_by_complement_lower) - ! temp_log_array2 = 1 - !elsewhere - ! temp_log_array2 = 0 - !end where - !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array3(nminor_absorber_intervals_upper)) - !where(minor_scales_with_density_upper) - ! temp_log_array3 = 1 - !elsewhere - ! temp_log_array3 = 0 - !end where - !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array4(nminor_absorber_intervals_upper)) - !where(scale_by_complement_upper) - ! temp_log_array4 = 1 - !elsewhere - ! temp_log_array4 = 0 - !end where - !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data @@ -441,15 +408,13 @@ end subroutine rrtmgp_lw_gas_optics_init !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay,& + subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_lay,& t_lev, skt, gas_concentrations, lslwr, lw_optical_props_clrsky, sources, & errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme @@ -496,7 +461,7 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! Radtend%toa_src_lw)) ! OUT - + ! Interstitial%toa_src_lw)) ! OUT - ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 027fa7e58..ee15ca3bf 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -87,14 +79,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index ce2ef93fd..30d7cbf06 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_lw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type + use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,15 +27,15 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html !! - subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & + subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p_lay, t_lay, p_lev, & skt, sources, lw_optical_props_clrsky, lw_optical_props_clouds, lw_optical_props_aerosol, lslwr,& fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_Interstitial_type), intent(in) :: & + Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_statein_type), intent(in) :: & Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & @@ -117,7 +117,7 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky)) ! Store fluxes fluxlwUP_clrsky = flux_clrsky%flux_up @@ -131,7 +131,7 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky)) ! Store fluxes fluxlwUP_allsky = flux_allsky%flux_up diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 25beee51d..d60ed545b 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -9,12 +9,12 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type + type = GFS_interstitial_type intent = in optional = F [Statein] diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index df45c1a6b..3e7b94640 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_sw_clrallsky_driver use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -29,13 +29,14 @@ end subroutine rrtmgp_sw_clrallsky_driver_init !! \section arg_table_rrtmgp_sw_clrallsky_driver_run !! \htmlinclude rrtmgp_sw_clrallsky_driver.html !! - subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay,& + subroutine rrtmgp_sw_clrallsky_driver_run(Model, Interstitial, Radtend, ncol, sw_gas_props, p_lay, t_lay,& p_lev, gas_concentrations,sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, & nday, idxday, hsw0, hswb, scmpsw, & fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: Model + type(GFS_interstitial_type), intent(in) :: Interstitial type(GFS_radtend_type), intent(in) :: Radtend integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints @@ -156,8 +157,8 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) sw_optical_props_clouds_daylit, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta index 888179efd..092bdb417 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ b/physics/rrtmgp_sw_clrallsky_driver.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 049ab03d4..022661016 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,6 +1,6 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -18,7 +18,7 @@ module rrtmgp_sw_gas_optics !! \section arg_table_rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & + subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, & ipsdsw0, errmsg, errflg) use netcdf #ifdef MPI @@ -28,8 +28,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend integer,intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -373,37 +371,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - !allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) - !where(minor_scales_with_density_lower_sw) - ! temp_log_array1 = 1 - !elsewhere - ! temp_log_array1 = 0 - !end where - !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) - !where(scale_by_complement_lower_sw) - ! temp_log_array2 = 1 - !elsewhere - ! temp_log_array2 = 0 - !end where - !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) - !where(minor_scales_with_density_upper_sw) - ! temp_log_array3 = 1 - !elsewhere - ! temp_log_array3 = 0 - !end where - !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - !! - !allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) - !where(scale_by_complement_upper_sw) - ! temp_log_array4 = 1 - !elsewhere - ! temp_log_array4 = 0 - !end where - !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data @@ -440,14 +407,14 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & + subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & gas_concentrations, lsswr, sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend + type(GFS_Interstitial_type),intent(inout) :: & + Interstitial type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing spectral information for RRTMGP SW radiation scheme @@ -489,7 +456,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p t_lay, & ! gas_concentrations, & ! sw_optical_props_clrsky, & ! - Radtend%toa_src_sw)) ! + Interstitial%toa_src_sw)) ! ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& @@ -498,7 +465,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! Radtend%toa_src_sw & ! OUT - + ! Interstitial%toa_src_sw & ! OUT - ! mu0 = Radtend%coszen)) end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index b18f1490b..b509b267a 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -87,13 +79,13 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type - intent = in + type = GFS_interstitial_type + intent = inout optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 56d846845..29e9fa4de 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_sw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type, GFS_interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -29,7 +29,7 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & + subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & p_lev, gas_concentrations, sw_optical_props_clrsky, sw_optical_props_clouds, & sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, & fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) @@ -37,6 +37,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Inputs type(GFS_control_type), intent(in) :: & Model + type(GFS_interstitial_type), intent(in) :: & + Interstitial type(GFS_radtend_type), intent(in) :: & Radtend type(GFS_statein_type), intent(in) :: & @@ -178,9 +180,9 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up @@ -193,14 +195,17 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_allsky(idxday,:) = flux_allsky%flux_up fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn - scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(:,iSFC) + if ( l_scmpsw ) then + scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dir(iSFC,idxday) + scmpsw(idxday)%nirdf = flux_allsky%flux_dn(idxday,iSFC) - flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dif(iSFC,idxday) + endif endif end subroutine rrtmgp_sw_rte_run diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 1e320ce0a..c1c098400 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type