Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion GEOS_RadiationShared/RRTMGP_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ esma_set_this (OVERRIDE RRTMGP)

# These are from RRTMGP
set (RRTMGP_SRCS
rte-frontend/mo_rte_kind.F90
rte-frontend/mo_rte_config.F90
rte-frontend/mo_rte_util_array_validation.F90
rte-kernels/mo_rte_kind.F90
rte-kernels/mo_rte_util_array.F90
rte-kernels/mo_rte_solver_kernels.F90
rte-kernels/mo_optical_props_kernels.F90
Expand All @@ -19,6 +19,7 @@ set (RRTMGP_SRCS
gas-optics/mo_gas_concentrations.F90
gas-optics/mo_gas_optics.F90
rrtmgp-kernels/mo_gas_optics_rrtmgp_kernels.F90
rrtmgp-kernels/mo_cloud_optics_rrtmgp_kernels.F90
rrtmgp-frontend/mo_gas_optics_rrtmgp.F90
rrtmgp-frontend/mo_cloud_optics_rrtmgp.F90
extensions/mo_compute_bc.F90
Expand Down
23 changes: 8 additions & 15 deletions GEOSirrad_GridComp/GEOS_IrradGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
use mo_fluxes_byband, only: ty_fluxes_byband
use mo_rte_lw, only: rte_lw
use mo_load_coefficients, only: load_and_init
use mo_load_cloud_coefficients, only: load_cld_lutcoeff, load_cld_padecoeff
use mo_load_cloud_coefficients, only: load_cld_lutcoeff

! used to avoid a reshaped copy of some arrays in RRTMGP blocking
! (Tom Clune's suggestion)
Expand Down Expand Up @@ -1658,7 +1658,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
class(ty_optical_props_arry), allocatable :: clean_optical_props, dirty_optical_props

! RRTMGP locals
logical :: top_at_1, u2s, partial_block, gen_mro, cond_inhomo
logical :: u2s, partial_block, gen_mro, cond_inhomo
logical :: need_dirty_optical_props, need_cloud_optical_props
logical :: export_clrnoa, export_clrsky, export_allnoa, export_allsky
logical :: calc_clrnoa, calc_clrsky, calc_allnoa, calc_allsky
Expand Down Expand Up @@ -2251,11 +2251,6 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
p_lev = real(reshape(PLE ,(/ncol,LM+1/)), kind=wp)
cf_wp = real(reshape(FCLD,(/ncol,LM /)), kind=wp)

! RRTMGP's rte_lw takes a vertical ordering flag
! (no need to flip columns as with RRTMG)
top_at_1 = p_lay(1, 1) < p_lay(1, LM)
_ASSERT(top_at_1, 'unexpected vertical ordering')

! layer pressure thicknesses used for cloud water path calculations
! (do before any KLUGE to top pressure so optical paths wont be affected)
! (also better to use these unKLUGED pressure intervals in t_lev calculation)
Expand Down Expand Up @@ -2537,8 +2532,6 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
call MAPL_TimerOn(MAPL,"---RRTMGP_IO_CLOUDS",__RC__)
if (trim(cloud_optics_type)=='LUT') then
call load_cld_lutcoeff (cloud_optics, cloud_optics_file)
elseif (trim(cloud_optics_type)=='PADE') then
call load_cld_padecoeff(cloud_optics, cloud_optics_file)
else
TEST_('unknown cloud_optics_type: '//trim(cloud_optics_file))
end if
Expand Down Expand Up @@ -3040,7 +3033,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_clrnoa%flux_up_Jac => dfupdts_clrnoa(colS:colE,:)
error_msg = rte_lw( &
clean_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_clrnoa, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
end if
Expand Down Expand Up @@ -3085,7 +3078,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_byband_allnoa%bnd_flux_up_Jac => bnd_dfupdts_allnoa(colS:colE,:,:)
error_msg = rte_lw( &
clean_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_byband_allnoa, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
else
Expand All @@ -3095,7 +3088,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_allnoa%flux_up_Jac => dfupdts_allnoa(colS:colE,:)
error_msg = rte_lw( &
clean_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_allnoa, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
endif
Expand All @@ -3117,7 +3110,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_clrsky%flux_up_Jac => dfupdts_clrsky(colS:colE,:)
error_msg = rte_lw( &
dirty_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_clrsky, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
end if
Expand All @@ -3138,7 +3131,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_byband_allsky%bnd_flux_up_Jac => bnd_dfupdts_allsky(colS:colE,:,:)
error_msg = rte_lw( &
dirty_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_byband_allsky, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
else
Expand All @@ -3147,7 +3140,7 @@ subroutine LW_Driver(IM,JM,LM,LATS,LONS,RC)
fluxes_allsky%flux_up_Jac => dfupdts_allsky(colS:colE,:)
error_msg = rte_lw( &
dirty_optical_props, &
top_at_1, sources, emis_sfc(:,colS:colE), &
sources, emis_sfc(:,colS:colE), &
fluxes_allsky, n_gauss_angles=nga, use_2stream=u2s)
TEST_(error_msg)
end if
Expand Down
Loading
Loading