diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 similarity index 52% rename from physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 rename to physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 index 34dc7de86..e1b5211f1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 @@ -1,10 +1,10 @@ -!> \file GFS_rrtmgp_post.F90 +!> \file GFS_radiation_post.F90 !! -!> \defgroup GFS_rrtmgp_post GFS_rrtmgp_post.F90 +!> \defgroup GFS_radiation_post GFS_rrtmgp_post.F90 !! !! \brief RRTMGP post-processing routine. !! -module GFS_rrtmgp_post +module GFS_radiation_post use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type @@ -12,35 +12,32 @@ module GFS_rrtmgp_post use radiation_tools, only: check_error_msg implicit none - public GFS_rrtmgp_post_run + public GFS_radiation_post_run contains ! ######################################################################################## -!>\defgroup gfs_rrtmgp_post_mod GFS RRTMGP Post Module -!> \section arg_table_GFS_rrtmgp_post_run -!! \htmlinclude GFS_rrtmgp_post.html +!>\defgroup gfs_radiation_post_mod GFS Radiation Post Module +!> \section arg_table_GFS_radiation_post_run +!! \htmlinclude GFS_radiation_post.html !! -!! \ingroup GFS_rrtmgp_post +!! \ingroup GFS_radiation_post !! !! \brief The all-sky radiation tendency is computed, the clear-sky tendency is computed !! if requested. !! !! RRTMGP surface and TOA fluxes are copied to fields that persist between radiation/physics !! calls. -!! -!! (optional) Save additional diagnostics. !! -!! \section GFS_rrtmgp_post_run +!! \section GFS_radiation_post_run ! ######################################################################################## - subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, doSWrad, & - do_lw_clrsky_hr, do_sw_clrsky_hr, save_diag, fhlwr, fhswr, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, p_lev, tsfa, coszen, coszdg, & + subroutine GFS_radiation_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, doSWrad, & + do_lw_clrsky_hr, do_sw_clrsky_hr, do_RRTMGP, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, p_lev, tsfa, & fluxlwDOWN_clrsky, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & - fluxswDOWN_clrsky, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & - raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, cldtausw, scmpsw, fluxr, & + fluxswDOWN_clrsky, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, scmpsw, & sfcdlw, sfculw, sfcflw, tsflw, htrlw, htrlwu, topflw, nirbmdi, nirdfdi, visbmdi, & visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, sfcdsw, htrsw, sfcfsw, topfsw, & - htrswc, htrlwc, errmsg, errflg) + htrswc, htrlwc, total_albedo, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -51,22 +48,14 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d iTOA ! Vertical index for TOA level integer, intent(in), dimension(:) :: & idxday ! Index array for daytime points - integer, intent(in), dimension(:,:) :: & - mbota, & ! Vertical indices for low, middle and high cloud tops - mtopa ! ertical indices for low, middle and high cloud bases logical, intent(in) :: & doLWrad, & ! Logical flags for lw radiation calls doSWrad, & ! Logical flags for sw radiation calls do_lw_clrsky_hr, & ! Output clear-sky LW heating-rate? do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? - save_diag ! Output radiation diagnostics? - real(kind_phys), intent(in) :: & - fhlwr, & ! Frequency for LW radiation calls - fhswr ! Frequency for SW radiation calls + do_RRTMGP ! Flag for using RRTMGP scheme real(kind_phys), dimension(:), intent(in) :: & tsfa, & ! Lowest model layer air temperature for radiation (K) - coszen, & ! Cosine(SZA) - coszdg, & ! Cosine(SZA), daytime sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) @@ -81,14 +70,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d fluxswDOWN_allsky, & ! RRTMGP shortwave all-sky flux (W/m2) fluxswUP_clrsky, & ! RRTMGP shortwave clear-sky flux (W/m2) fluxswDOWN_clrsky ! RRTMGP shortwave clear-sky flux (W/m2) - real(kind_phys), intent(in) :: & - raddt ! Radiation time step - real(kind_phys), dimension(:,:), intent(in) :: & - aerodp, & ! Vertical integrated optical depth for various aerosol species - cldsa, & ! Fraction of clouds for low, middle, high, total and BL - cld_frac, & ! Total cloud fraction in each layer - cldtaulw, & ! approx 10.mu band layer cloud optical depth - cldtausw ! approx .55mu band layer cloud optical depth type(cmpfsw_type), dimension(:), intent(in) :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) @@ -98,9 +79,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) - - real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr - ! Outputs (mandatory) real(kind_phys), dimension(:), intent(inout) :: & tsflw, & ! LW sfc air temp during calculation (K) @@ -119,6 +97,8 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d real(kind_phys), dimension(:,:), intent(inout) :: & htrlw, & ! LW all-sky heating rate (K/s) htrsw ! SW all-sky heating rate (K/s) + real(kind_phys), dimension(nCol), intent(inout) :: & + total_albedo ! Total sky albedo at TOA (W/m2) real(kind_phys), dimension(:,:), intent(inout), optional :: & htrlwu ! LW all-sky heating-rate updated in-between radiation calls. type(sfcflw_type), dimension(:), intent(inout) :: & @@ -151,88 +131,56 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d if (.not. (doLWrad .or. doSWrad)) return if (doLWRad) then - ! ####################################################################################### - ! Compute LW heating-rates. - ! ####################################################################################### + if (do_RRTMGP) then + ! ####################################################################################### + ! Compute LW heating-rates. + ! ####################################################################################### - ! Clear-sky heating-rate (optional) - if (do_lw_clrsky_hr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) - fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - htrlwc)) ! OUT - Longwave clear-sky heating rate (K/sec) - endif + ! Clear-sky heating-rate (optional) + if (do_lw_clrsky_hr) then + call check_error_msg('GFS_radiation_post',compute_heating_rate( & + fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) + fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlwc)) ! OUT - Longwave clear-sky heating rate (K/sec) + endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) - fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - htrlw)) ! OUT - Longwave all-sky heating rate (K/sec) + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_radiation_post',compute_heating_rate( & + fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) + fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlw)) ! OUT - Longwave all-sky heating rate (K/sec) - ! ####################################################################################### - ! Save LW outputs. - ! (Copy fluxes from RRTMGP types into model radiation types.) - ! ####################################################################################### - ! TOA fluxes + ! ####################################################################################### + ! Save LW outputs. + ! (Copy fluxes from RRTMGP types into model radiation types.) + ! ####################################################################################### + ! TOA fluxes - topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) - topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) - - ! Surface fluxes - sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) - sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) - sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) - sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - - ! Save surface air temp for diurnal adjustment at model t-steps - tsflw (:) = tsfa(:) - - ! Radiation fluxes for other physics processes - sfcdlw(:) = sfcflw(:)%dnfxc - sfculw(:) = sfcflw(:)%upfxc - - ! Heating-rate at radiation timestep, used for adjustment between radiation calls. - htrlwu = htrlw - - ! ####################################################################################### - ! Save LW diagnostics - ! - For time averaged output quantities (including total-sky and clear-sky SW and LW - ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base - ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in - ! corresponding slots of array fluxr with appropriate time weights. - ! - Collect the fluxr data for wrtsfc - ! ####################################################################################### - if (save_diag) then - do i=1,nCol - ! LW all-sky fluxes - fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up - fluxr(i,19) = fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn - fluxr(i,20) = fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up - ! LW clear-sky fluxes - fluxr(i,28) = fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up - fluxr(i,30) = fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn - fluxr(i,33) = fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up - enddo + topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) + topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for - ! the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, nCol - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - - ! Add optical depth and emissivity output - tem2 = 0. - do k=ibtc,itop - tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel - enddo - fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo + ! Surface fluxes + sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) + sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) + sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) + sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + + ! Save surface air temp for diurnal adjustment at model t-steps + tsflw (:) = tsfa(:) + + ! Radiation fluxes for other physics processes + sfcdlw(:) = sfcflw(:)%dnfxc + sfculw(:) = sfcflw(:)%upfxc + + ! Heating-rate at radiation timestep, used for adjustment between radiation calls. + htrlwu = htrlw endif + +! --- The total sky (with clouds) shortwave albedo + total_albedo = 0.0 + where(topfsw(:)%dnfxc>0) total_albedo(:) = topfsw(:)%upfxc/topfsw(:)%dnfxc endif ! ####################################################################################### ! ####################################################################################### @@ -240,7 +188,7 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d ! ####################################################################################### ! ####################################################################################### ! ####################################################################################### - if (doSWRad) then + if (doSWRad .and. do_RRTMGP) then if (nDay .gt. 0) then ! ################################################################################# ! Compute SW heating-rates @@ -323,73 +271,7 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d sfcdsw(i) = sfcfsw(i)%dnfxc enddo - ! ################################################################################# - ! Save SW diagnostics - ! - For time averaged output quantities (including total-sky and clear-sky SW and LW - ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base - ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in - ! corresponding slots of array fluxr with appropriate time weights. - ! - Collect the fluxr data for wrtsfc - ! ################################################################################# - if (save_diag) then - do i=1,nCol - fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm - if (coszen(i) > 0.) then - ! SW all-sky fluxes - tem0d = fhswr * coszdg(i) / coszen(i) - fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up - fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d - fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! SW uv-b fluxes - fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! SW TOA incoming fluxes - fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn - ! SW SFC flux components - fluxr(i,24) = fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn - fluxr(i,25) = fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn - fluxr(i,26) = fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn - fluxr(i,27) = fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn - ! SW clear-sky fluxes - fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d - fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d - fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d - endif - enddo - - ! Save total and boundary-layer clouds - do i=1,nCol - fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) - fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud - ! is reversed for the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, nCol - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d - fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop) - fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc) - fluxr(i,17-j) = fluxr(i,17-j) + tem0d * p_lev(i,itop) - - ! Add optical depth and emissivity output - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - enddo - fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 - enddo - enddo - endif endif - end subroutine GFS_rrtmgp_post_run -end module GFS_rrtmgp_post + end subroutine GFS_radiation_post_run +end module GFS_radiation_post diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta similarity index 79% rename from physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta rename to physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta index 5d67afcd8..9dad5ff3c 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta @@ -1,5 +1,5 @@ [ccpp-table-properties] - name = GFS_rrtmgp_post + name = GFS_radiation_post type = scheme relative_path = ../../ dependencies = hooks/machine.F,Radiation/radiation_aerosols.f @@ -7,7 +7,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_rrtmgp_post_run + name = GFS_radiation_post_run type = scheme [nCol] standard_name = horizontal_loop_extent @@ -79,45 +79,13 @@ dimensions = () type = logical intent = in -[save_diag] - standard_name = flag_for_diagnostics - long_name = logical flag for storing diagnostics +[do_RRTMGP] + standard_name = flag_for_rrtmgp_radiation_scheme + long_name = flag for RRTMGP scheme units = flag - dimensions = () + dimensions = () type = logical intent = in -[fhlwr] - standard_name = period_of_longwave_radiation_calls - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[fhswr] - standard_name = period_of_shortwave_radiation_calls - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[coszen] - standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[coszdg] - standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in [sfc_alb_nir_dir] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -239,68 +207,6 @@ kind = kind_phys intent = in optional = True -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = in -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_loop_extent,5) - type = real - kind = kind_phys - intent = in -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[cld_frac] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[cldtausw] - standard_name = cloud_optical_depth_layers_at_0p55mu_band - long_name = approx .55mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -308,14 +214,6 @@ dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = mixed - dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) - type = real - kind = kind_phys - intent = inout [sfcdlw] standard_name = surface_downwelling_longwave_flux_on_radiation_timestep long_name = total sky sfc downward lw flux @@ -489,6 +387,14 @@ type = real kind = kind_phys intent = inout +[total_albedo] + standard_name = total_sky_albedo + long_name = total sky albedo at toa + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 deleted file mode 100644 index 76ee18ec2..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 +++ /dev/null @@ -1,214 +0,0 @@ -!>\file GFS_rrtmg_post.F90 -!! This file contains the calculation of time averaged output quantities (including total-sky and -!! clear-sky SW and LW fluxes at TOA and surface; conventional -!! 3-domain cloud amount, cloud top and base pressure, and cloud top -!! temperature; aerosols AOD, etc.), store computed results in -!! corresponding slots of array fluxr with appropriate time weights. - - module GFS_rrtmg_post - contains - -!>\defgroup GFS_rrtmg_post_mod GFS RRTMG Scheme Post -!! This module calculate time averaged output quantities (including total-sky and -!! clear-sky SW and LW fluxes at TOA and surface; conventional -!! 3-domain cloud amount, cloud top and base pressure, and cloud top -!! temperature; aerosols AOD, etc.), store computed results in -!! corresponding slots of array fluxr with appropriate time weights. -!> @{ -!> \section arg_table_GFS_rrtmg_post_run Argument Table -!! \htmlinclude GFS_rrtmg_post_run.html -!! - subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, & - nfxr, nday, lsswr, lslwr, lssav, fhlwr, fhswr, raddt, coszen, & - coszdg, prsi, tgrs, aerodp, cldsa, mtopa, mbota, clouds1, & - cldtaulw, cldtausw, sfcflw, sfcfsw, topflw, topfsw, scmpsw, & - fluxr, total_albedo, errmsg, errflg) - - use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - cmpfsw_type - use module_radlw_parameters, only: topflw_type, sfcflw_type - - implicit none - - ! Interface variables - integer, intent(in) :: im, km, kmp1, lm, ltp, kt, kb, kd, & - nspc1, nfxr, nday - logical, intent(in) :: lsswr, lslwr, lssav - real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr - - real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - - real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi - real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs - - real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa - integer, dimension(im,3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw - real(kind=kind_phys), dimension(im), intent(inout) :: total_albedo - - type(sfcflw_type), dimension(im), intent(in) :: sfcflw - type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw - type(cmpfsw_type), dimension(im), intent(in) :: scmpsw - type(topflw_type), dimension(im), intent(in) :: topflw - type(topfsw_type), dimension(im), intent(in) :: topfsw - - real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, j, k, k1, itop, ibtc - real(kind=kind_phys) :: tem0d, tem1, tem2 - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. (lsswr .or. lslwr)) return - -! - For time averaged output quantities (including total-sky and -! clear-sky SW and LW fluxes at TOA and surface; conventional -! 3-domain cloud amount, cloud top and base pressure, and cloud top -! temperature; aerosols AOD, etc.), store computed results in -! corresponding slots of array fluxr with appropriate time weights. - -! --- ... collect the fluxr data for wrtsfc - - if (lssav) then - if (lsswr) then - do i=1,im -! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm -! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm -! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm -! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm -! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm -! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm - fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm - enddo - endif - -! --- save lw toa and sfc fluxes - if (lslwr) then - do i=1,im -! --- lw total-sky fluxes - fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up - fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn - fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up -! --- lw clear-sky fluxes - fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up - fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn - fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up - enddo - endif - -! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight -! part of sw calling interval, while coszdg= mean cosz over entire interval - if (lsswr) then - do i = 1, IM - if (coszen(i) > 0.) then -! --- sw total-sky fluxes -! ------------------- - tem0d = fhswr * coszdg(i) / coszen(i) - fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up - fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn -! --- sw uv-b fluxes -! -------------- - fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn -! --- sw toa incoming fluxes -! ---------------------- - fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn -! --- sw sfc flux components -! ---------------------- - fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn -! --- sw clear-sky fluxes -! ------------------- - fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up - fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn - endif - enddo - endif - -! --- save total and boundary layer clouds - - if (lsswr .or. lslwr) then - do i=1,im - fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) - fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) - enddo - -! --- save cld frac,toplyr,botlyr and top temp, note that the order -! of h,m,l cloud is reversed for the fluxr output. -! --- save interface pressure (pa) of top/bot - - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d - fluxr(i,11-j) = fluxr(i,11-j) + tem0d * prsi(i,itop+kt) - fluxr(i,14-j) = fluxr(i,14-j) + tem0d * prsi(i,ibtc+kb) - fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) - enddo - enddo - -! Anning adds optical depth and emissivity output - if (lsswr .and. (nday > 0)) then - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel - enddo - fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 - enddo - enddo - endif - - if (lslwr) then - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - tem2 = 0. - do k=ibtc,itop - tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel - enddo - fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo - endif - - endif - - endif ! end_if_lssav - -! --- The total sky (with clouds) shortwave albedo - total_albedo = 0.0 - if (lsswr) then - where(topfsw(:)%dnfxc>0) total_albedo(:) = topfsw(:)%upfxc/topfsw(:)%dnfxc - endif -! - end subroutine GFS_rrtmg_post_run -!> @} - end module GFS_rrtmg_post diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta deleted file mode 100644 index b387c3e33..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta +++ /dev/null @@ -1,285 +0,0 @@ -[ccpp-table-properties] - name = GFS_rrtmg_post - type = scheme - relative_path = ../../ - dependencies = hooks/machine.F - dependencies = Radiation/radiation_aerosols.f,Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_post_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[km] - standard_name = vertical_layer_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in -[kmp1] - standard_name = vertical_interface_dimension - long_name = number of vertical levels plus one - units = count - dimensions = () - type = integer - intent = in -[lm] - standard_name = vertical_dimension_for_radiation - long_name = number of vertical layers for radiation calculation - units = count - dimensions = () - type = integer - intent = in -[ltp] - standard_name = extra_top_layer - long_name = extra top layers - units = count - dimensions = () - type = integer - intent = in -[kt] - standard_name = vertical_index_difference_between_layer_and_upper_bound - long_name = vertical index difference between layer and upper bound - units = index - dimensions = () - type = integer - intent = in -[kb] - standard_name = vertical_index_difference_between_layer_and_lower_bound - long_name = vertical index difference between layer and lower bound - units = index - dimensions = () - type = integer - intent = in -[kd] - standard_name = vertical_index_difference_between_inout_and_local - long_name = vertical index difference between in/out and local - units = index - dimensions = () - type = integer - intent = in -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer - intent = in -[nfxr] - standard_name = number_of_diagnostics_variables_for_radiation - long_name = number of variables stored in the fluxr array - units = count - dimensions = () - type = integer - intent = in -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = in -[lsswr] - standard_name = flag_for_calling_shortwave_radiation - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in -[lslwr] - standard_name = flag_for_calling_longwave_radiation - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in -[lssav] - standard_name = flag_for_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[fhlwr] - standard_name = period_of_longwave_radiation_calls - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[fhswr] - standard_name = period_of_shortwave_radiation_calls - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[coszen] - standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[coszdg] - standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - intent = in -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = in -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_loop_extent,5) - type = real - kind = kind_phys - intent = in -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[clouds1] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[cldtausw] - standard_name = cloud_optical_depth_layers_at_0p55mu_band - long_name = approx .55mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[sfcflw] - standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep - long_name = lw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcflw_type - intent = in -[sfcfsw] - standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcfsw_type - intent = in -[topflw] - standard_name = lw_fluxes_top_atmosphere - long_name = lw radiation fluxes at top - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topflw_type - intent = in -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topfsw_type - intent = in -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_loop_extent) - type = cmpfsw_type - intent = in -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = mixed - dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) - type = real - kind = kind_phys - intent = inout -[total_albedo] - standard_name = total_sky_albedo - long_name = total sky albedo at toa - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f index b42352f32..6729a1c6d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f @@ -87,6 +87,40 @@ module dcyc2t3 ! levs - integer, vertical layer dimension ! ! deltim - real, physics time step in seconds ! ! fhswr - real, Short wave radiation time step in seconds ! +! fhlwr - real, Long wave radiation time step in seconds ! +! lslwr - logical, flag for sw radiation calls ! +! fluxr (im, nfxr) - real, time-accum 2d rad diag fields ! +! topflw (im) - topfsw_type, lw radiation fluxes at toa ! +! sfcflw (im) - sfcflw_type, lw radiation fluxes at sfc ! +! lsswr - logical, flag for lw radiation calls ! +! coszdg - real, Cosine(SZA), daytime ! +! topfsw (im) - topfsw_type, sw radiation fluxes at TOA ! +! sfcfsw (im) - sfcfsw_type, sw radiation fluxes at sfc ! +! scmpsw (im) - cmpfsw_type, special components of sw down fluxes ! +! raddt - real, radiation timestep ! +! cldsa (im,5) - real, frac of clouds in low, mid, high, total, BL ! +! mtopa (im,3) - integer, Vertical indices for low, middle and high ! +! cloud bases ! +! mbota (im,3) - integer, Vertical indices for low, middle and high ! +! cloud tops ! +! cldtausw (im, im+LTP) - real, approx .55mu band layer cloud ! +! optical depth ! +! cldtaulw (im, im+LTP) - real, approx 10 mu band layer cloud ! +! optical depth ! +! tgrs (im,levs) - real, model layer mean temperature ! +! aerodp (im, nspc1) - real, Vertical integrated optical depth for ! +! various aerosol species ! +! nfxr - integer, num variables stored in fluxr array ! +! lm - integer, number vertical layers for rad calc ! +! ltp - integer, extra top layers ! +! nday - integer, daytime points dimension ! +! kb - integer, vertical index diff. b/w layer and lower ! +! bound ! +! kd - integer, vertical index diff. b/w in/out and local ! +! kt - integer, vertical index diff. b/w in/out and upper ! +! bound +! lssav - logical, flag for storing radiation diagnostics ! +! nspc1 - logical, num. species for optical dept plus total ! ! dry - logical, true over land ! ! icy - logical, true over ice ! ! wet - logical, true over water ! @@ -158,6 +192,8 @@ module dcyc2t3 !!- Mar 2019 s. moorthi - modify xmu calculation in a time centered !! way and add more accuracy when physics !! time step is close to radiation time step +!!- Dec 2024 l. reames - move fluxr calculations from *_post +!! routines to dcyc3t3_run !> \section arg_table_dcyc2t3_run Argument Table !! \htmlinclude dcyc2t3_run.html !! @@ -177,6 +213,9 @@ subroutine dcyc2t3_run & & use_LW_jacobian, sfculw, use_med_flux, sfculw_med, & & fluxlwUP_jac, t_lay, p_lay, p_lev, flux2D_lwUP, & & flux2D_lwDOWN,pert_radtend,do_sppt,ca_global,tsfc_radtime, & + & lslwr,fluxr,fhlwr,topflw,sfcflw,lsswr,coszdg,topfsw,sfcfsw,& + & scmpsw,raddt,cldsa,mtopa,mbota,cldtausw,cldtaulw,tgrs, & + & aerodp, nfxr, lm, ltp, nday, kb, kd , kt, lssav, nspc1, & ! & dry, icy, wet, lprnt, ipr, & ! --- input/output: & dtdt,dtdtnp,htrlw, & @@ -189,7 +228,11 @@ subroutine dcyc2t3_run & & ) ! use machine, only : kind_phys - + use module_radsw_parameters, only: topfsw_type, & + & sfcfsw_type, & + & cmpfsw_type + use module_radlw_parameters, only: topflw_type, & + & sfcflw_type implicit none ! ! --- constant parameters: @@ -201,13 +244,13 @@ subroutine dcyc2t3_run & & czlimt = 0.0001_kind_phys ! ~ cos(89.99427) ! --- inputs: - integer, intent(in) :: im, levs + integer, intent(in) :: im, kb, kd, kt, levs, nday, nspc1 ! integer, intent(in) :: ipr ! logical lprnt logical, dimension(:), intent(in) :: dry, icy, wet logical, intent(in) :: use_LW_jacobian, damp_LW_fluxadj, & - & pert_radtend, use_med_flux + & pert_radtend, use_med_flux, lssav logical, intent(in) :: do_sppt,ca_global real(kind=kind_phys), intent(in) :: solhr, slag, cdec, sdec, & & deltim, fhswr, lfnc_k, lfnc_p0 @@ -236,13 +279,34 @@ subroutine dcyc2t3_run & & con_pi, con_sbc real(kind_phys) :: pid12 - + + logical, intent(in) :: lsswr, lslwr + real(kind=kind_phys), intent(in) :: raddt, fhlwr + integer, intent(in) :: lm, ltp, nfxr + real(kind=kind_phys), dimension(im), intent(in) :: coszdg + + real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa + integer, dimension(im,3), intent(in) :: mbota + integer, dimension(im,3), intent(in) :: mtopa + + real(kind=kind_phys), dimension(im,lm+LTP),intent(in) :: cldtausw + real(kind=kind_phys), dimension(im,lm+LTP),intent(in) :: cldtaulw + + real(kind=kind_phys), dimension(im,levs), intent(in) :: tgrs + + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + + real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp ! --- input/output: real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdt real(kind=kind_phys), dimension(:,:), intent(inout), optional :: & & dtdtnp, htrlw - + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr ! --- outputs: real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfcdsw, adjsfcnsw, adjsfcdlw, xmu, xcosz, & @@ -256,9 +320,9 @@ subroutine dcyc2t3_run & integer, intent(out) :: errflg ! --- locals: - integer :: i, k, nstp, nstl, it, istsun(im),iSFC,iTOA + integer :: i, j, k, nstp, nstl, it, istsun(im),iSFC,iTOA,itop,ibtc real(kind=kind_phys) :: cns, coszn, tem1, tem2, anginc, & - & rstl, solang, dT + & rstl, solang, dT, tem0d real(kind=kind_phys), dimension(im,levs+1) :: flxlwup_adj, & & flxlwdn_adj real(kind=kind_phys) :: fluxlwnet_adj,fluxlwnet,dT_sfc, & @@ -289,6 +353,141 @@ subroutine dcyc2t3_run & nstp = max(6, nint(tem1)) nstl = max(1, nint(nstp/tem1)) pid12 = con_pi / hour12 + +! - For time averaged output quantities (including total-sky and +! clear-sky SW and LW fluxes at TOA and surface; conventional +! 3-domain cloud amount, cloud top and base pressure, and cloud top +! temperature; aerosols AOD, etc.), store computed results in +! corresponding slots of array fluxr with appropriate time weights. + +! --- ... collect the fluxr data for wrtsfc + + if (lssav) then + !if (lsswr) then + do i=1,im +! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm +! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm +! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm +! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm +! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm +! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + fluxr(i,34) = aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm + enddo + !endif + +! --- save lw toa and sfc fluxes + !if (lslwr) then + do i=1,im +! --- lw total-sky fluxes + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up +! --- lw clear-sky fluxes + fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up + enddo + !endif + +! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight +! part of sw calling interval, while coszdg= mean cosz over entire interval + !if (lsswr) then + do i = 1, IM + if (coszen(i) > 0.) then +! --- sw total-sky fluxes +! ------------------- + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn +! --- sw uv-b fluxes +! -------------- + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn +! --- sw toa incoming fluxes +! ---------------------- + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn +! --- sw sfc flux components +! ---------------------- + fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn +! --- sw clear-sky fluxes +! ------------------- + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + endif + enddo + !endif + +! --- save total and boundary layer clouds + + !if (lsswr .or. lslwr) then + do i=1,im + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) + enddo + +! --- save cld frac,toplyr,botlyr and top temp, note that the order +! of h,m,l cloud is reversed for the fluxr output. +! --- save interface pressure (pa) of top/bot + + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop+kt) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc+kb) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) + enddo + enddo + +! Anning adds optical depth and emissivity output + !if (lsswr .and. (nday > 0)) then + if (nday > 0) then + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel + enddo + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 + enddo + enddo + endif + + !if (lslwr) then + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + tem2 = 0. + do k=ibtc,itop + tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel + enddo + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo + !endif + + !endif + + endif ! end_if_lssav + + ! ! --- ... sw time-step adjustment for current cosine of zenith angle ! ---------------------------------------------------------- diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta index b2187f0c5..4c0a8e611 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta @@ -135,6 +135,14 @@ type = real kind = kind_phys intent = in +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in [tsflw] standard_name = air_temperature_at_surface_adjacent_layer_on_radiation_timestep long_name = surface (first layer) air temperature saved in longwave radiation call @@ -635,6 +643,196 @@ type = real kind = kind_phys intent = out +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = mixed + dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) + type = real + kind = kind_phys + intent = inout +[fhlwr] + standard_name = period_of_longwave_radiation_calls + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in +[sfcflw] + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in +[coszdg] + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in +[sfcfsw] + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type + intent = in +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_loop_extent) + type = cmpfsw_type + intent = in +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_loop_extent,5) + type = real + kind = kind_phys + intent = in +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = in +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = in +[cldtaulw] + standard_name = cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in +[cldtausw] + standard_name = cloud_optical_depth_layers_at_0p55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in +[nfxr] + standard_name = number_of_diagnostics_variables_for_radiation + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in +[lm] + standard_name = vertical_dimension_for_radiation + long_name = number of vertical layers for radiation calculation + units = count + dimensions = () + type = integer + intent = in +[ltp] + standard_name = extra_top_layer + long_name = extra top layers + units = count + dimensions = () + type = integer + intent = in +[kb] + standard_name = vertical_index_difference_between_layer_and_lower_bound + long_name = vertical index difference between layer and lower bound + units = index + dimensions = () + type = integer + intent = in +[kd] + standard_name = vertical_index_difference_between_inout_and_local + long_name = vertical index difference between in/out and local + units = index + dimensions = () + type = integer + intent = in +[kt] + standard_name = vertical_index_difference_between_layer_and_upper_bound + long_name = vertical index difference between layer and upper bound + units = index + dimensions = () + type = integer + intent = in +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in +[lssav] + standard_name = flag_for_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP