Skip to content

Commit 16e94f3

Browse files
committed
clean up unused code
1 parent fb6bb4d commit 16e94f3

2 files changed

Lines changed: 8 additions & 57 deletions

File tree

src/physics/rrtmgp/radiation.F90

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ end function radiation_do
413413
subroutine radiation_init(pbuf2d)
414414
use rrtmgp_pre, only: rrtmgp_pre_init
415415
use rrtmgp_inputs_setup, only: rrtmgp_inputs_setup_init
416-
use rrtmgp_inputs_cam, only: rrtmgp_inputs_cam_init
417416
use rrtmgp_cloud_optics_setup, only: rrtmgp_cloud_optics_setup_init
418417
use rrtmgp_sw_solar_var_setup, only: rrtmgp_sw_solar_var_setup_init
419418
use solar_irrad_data, only: do_spctrl_scaling, has_spectrum
@@ -484,10 +483,6 @@ subroutine radiation_init(pbuf2d)
484483
call endrun(sub//': '//errmsg)
485484
end if
486485

487-
! Set up CAM-side RRTMGP inputs - will go away once SW radiation is CCPPized
488-
call rrtmgp_inputs_cam_init(ktopcam, ktoprad, idx_sw_diag, idx_nir_diag, idx_uv_diag, idx_sw_cloudsim, idx_lw_diag, &
489-
idx_lw_cloudsim)
490-
491486
! Set radconstants module-level index variables that we're setting in CCPP-ized scheme now
492487
call radconstants_init(idx_sw_diag, idx_nir_diag, idx_uv_diag, idx_lw_diag)
493488

@@ -1282,8 +1277,7 @@ subroutine radiation_tend( &
12821277
! Set SW aerosol optical properties in the aer_sw object.
12831278
! This call made even when no daylight columns because it does some
12841279
! diagnostic aerosol output.
1285-
call rrtmgp_set_aer_sw( &
1286-
icall, state, pbuf, nday, idxday, nnite, idxnite, aer_sw)
1280+
call rrtmgp_set_aer_sw(ktopcam, ktoprad, icall, state, pbuf, nday, idxday, nnite, idxnite, aer_sw)
12871281

12881282
if (nday > 0) then
12891283

@@ -1360,7 +1354,7 @@ subroutine radiation_tend( &
13601354
end if
13611355

13621356
! Set LW aerosol optical properties in the aer_lw object.
1363-
call rrtmgp_set_aer_lw(icall, state, pbuf, aer_lw)
1357+
call rrtmgp_set_aer_lw(ktopcam, ktoprad, icall, state, pbuf, aer_lw)
13641358

13651359
! Call the main rrtmgp_lw driver
13661360
call rrtmgp_lw_rte_run(dolw, dolw, .false., .false., .false., &

src/physics/rrtmgp/rrtmgp_inputs_cam.F90

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@ module rrtmgp_inputs_cam
5353
! This value is to match the arbitrary small value used in RRTMG to decide
5454
! when a quantity is effectively zero.
5555
real(r8), parameter :: tiny = 1.0e-80_r8
56-
real(r8) :: sw_low_bounds(nswbands)
57-
real(r8) :: sw_high_bounds(nswbands)
58-
integer :: ktopcam
59-
integer :: ktoprad
60-
integer :: idx_sw_diag
61-
integer :: idx_nir_diag
62-
integer :: idx_uv_diag
63-
integer :: idx_sw_cloudsim
64-
integer :: idx_lw_diag
65-
integer :: idx_lw_cloudsim
6656

6757
! Mapping from RRTMG shortwave bands to RRTMGP. Currently needed to continue using
6858
! the SW optics datasets from RRTMG (even thought there is a slight mismatch in the
@@ -74,43 +64,6 @@ module rrtmgp_inputs_cam
7464
contains
7565
!==================================================================================================
7666

77-
!==================================================================================================
78-
subroutine rrtmgp_inputs_cam_init(ktcam, ktrad, idx_sw_diag_in, idx_nir_diag_in, idx_uv_diag_in, &
79-
idx_sw_cloudsim_in, idx_lw_diag_in, idx_lw_cloudsim_in)
80-
81-
! Note that this routine must be called after the calls to set_wavenumber_bands which set
82-
! the sw/lw band boundaries in the radconstants module.
83-
84-
integer, intent(in) :: ktcam
85-
integer, intent(in) :: ktrad
86-
integer, intent(in) :: idx_sw_diag_in
87-
integer, intent(in) :: idx_nir_diag_in
88-
integer, intent(in) :: idx_uv_diag_in
89-
integer, intent(in) :: idx_sw_cloudsim_in
90-
integer, intent(in) :: idx_lw_diag_in
91-
integer, intent(in) :: idx_lw_cloudsim_in
92-
character(len=512) :: errmsg
93-
integer :: errflg
94-
95-
ktopcam = ktcam
96-
ktoprad = ktrad
97-
idx_sw_diag = idx_sw_diag_in
98-
idx_nir_diag = idx_nir_diag_in
99-
idx_uv_diag = idx_uv_diag_in
100-
idx_sw_cloudsim = idx_sw_cloudsim_in
101-
idx_lw_diag = idx_lw_diag_in
102-
idx_lw_cloudsim = idx_lw_cloudsim_in
103-
104-
! Initialize the module data containing the SW band boundaries.
105-
call get_sw_spectral_boundaries_ccpp(sw_low_bounds, sw_high_bounds, 'cm^-1', errmsg, errflg)
106-
if (errflg /= 0) then
107-
call endrun('rrtmgp_inputs_cam_init: error during get_sw_spectral_boundaries_ccpp - message: '//errmsg)
108-
end if
109-
110-
end subroutine rrtmgp_inputs_cam_init
111-
112-
!=========================================================================================
113-
11467
subroutine rrtmgp_get_gas_mmrs(icall, state, pbuf, nlay, gas_mmrs)
11568

11669
! Retrieve mass mixing ratios for radiatively active gases from rad_constituents
@@ -137,11 +90,13 @@ end subroutine rrtmgp_get_gas_mmrs
13790

13891
!==================================================================================================
13992

140-
subroutine rrtmgp_set_aer_lw(icall, state, pbuf, aer_lw)
93+
subroutine rrtmgp_set_aer_lw(ktopcam, ktoprad, icall, state, pbuf, aer_lw)
14194

14295
! Load LW aerosol optical properties into the RRTMGP object.
14396

14497
! Arguments
98+
integer, intent(in) :: ktopcam
99+
integer, intent(in) :: ktoprad
145100
integer, intent(in) :: icall
146101
type(physics_state), target, intent(in) :: state
147102
type(physics_buffer_desc), pointer :: pbuf(:)
@@ -178,11 +133,13 @@ end subroutine rrtmgp_set_aer_lw
178133
!==================================================================================================
179134

180135
subroutine rrtmgp_set_aer_sw( &
181-
icall, state, pbuf, nday, idxday, nnite, idxnite, aer_sw)
136+
ktopcam, ktoprad, icall, state, pbuf, nday, idxday, nnite, idxnite, aer_sw)
182137

183138
! Load SW aerosol optical properties into the RRTMGP object.
184139

185140
! Arguments
141+
integer, intent(in) :: ktopcam
142+
integer, intent(in) :: ktoprad
186143
integer, intent(in) :: icall
187144
type(physics_state), target, intent(in) :: state
188145
type(physics_buffer_desc), pointer :: pbuf(:)

0 commit comments

Comments
 (0)