Skip to content

Commit a6cd08b

Browse files
committed
shift USE statements into subroutine scope when possible
1 parent e6d5bdf commit a6cd08b

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/chemistry/aerosol/bulk_aerosol_properties_mod.F90

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ module bulk_aerosol_properties_mod
77
use cam_abortutils, only: endrun
88
use string_utils, only : to_lower
99

10-
use aerosol_properties_mod, only: aerosol_properties, aero_name_len
10+
use aerosol_properties_mod, only: aerosol_properties
1111

12-
use radiative_aerosol, only: rad_aer_get_info, rad_aer_get_props, &
13-
rad_aer_bulk_physprop_id
12+
use radiative_aerosol, only: rad_aer_get_info, rad_aer_get_props
1413
use shr_infnan_mod, only: nan => shr_infnan_nan, assignment(=)
1514

1615
implicit none
@@ -225,6 +224,8 @@ end subroutine get
225224
! returns the physprop ID for a given bin (aerosol) index
226225
!------------------------------------------------------------------------
227226
integer function physprop_id(self, bin_ndx)
227+
use radiative_aerosol, only: rad_aer_bulk_physprop_id
228+
228229
class(bulk_aerosol_properties), intent(in) :: self
229230
integer, intent(in) :: bin_ndx
230231

@@ -425,6 +426,8 @@ end function min_mass_mean_rad
425426
! returns name for a given aerosol bin
426427
!------------------------------------------------------------------------------
427428
function bin_name(self, bin_ndx) result(name)
429+
use aerosol_properties_mod, only: aero_name_len
430+
428431
class(bulk_aerosol_properties), intent(in) :: self
429432
integer, intent(in) :: bin_ndx ! bin number
430433

src/chemistry/aerosol/modal_aerosol_properties_mod.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ module modal_aerosol_properties_mod
22
use shr_kind_mod, only: r8 => shr_kind_r8
33
use physconst, only: pi
44
use aerosol_properties_mod, only: aerosol_properties, aero_name_len
5-
use radiative_aerosol, only: rad_aer_get_info, rad_aer_get_mode_props, rad_aer_get_props, &
6-
rad_aer_mode_physprop_id
5+
use radiative_aerosol, only: rad_aer_get_info, rad_aer_get_mode_props, rad_aer_get_props
76

87
implicit none
98

@@ -454,6 +453,8 @@ end subroutine get
454453
! returns the physprop ID for a given bin (mode) index
455454
!------------------------------------------------------------------------
456455
integer function physprop_id(self, bin_ndx)
456+
use radiative_aerosol, only: rad_aer_mode_physprop_id
457+
457458
class(modal_aerosol_properties), intent(in) :: self
458459
integer, intent(in) :: bin_ndx
459460

src/chemistry/aerosol/modal_aerosol_state_mod.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module modal_aerosol_state_mod
1010
use physics_buffer, only: physics_buffer_desc, pbuf_get_field, pbuf_get_index
1111
use physics_types, only: physics_state
1212
!REMOVECAM_END
13-
use aerosol_properties_mod, only: aerosol_properties, aero_name_len
13+
use aerosol_properties_mod, only: aerosol_properties
1414
use physconst, only: rhoh2o
1515
use cam_abortutils, only: endrun
1616

@@ -215,6 +215,8 @@ end subroutine get_states
215215
! return aerosol bin size weights for a given bin
216216
!------------------------------------------------------------------------------
217217
subroutine icenuc_size_wght_arr(self, bin_ndx, ncol, nlev, species_type, use_preexisting_ice, wght)
218+
use aerosol_properties_mod, only: aero_name_len
219+
218220
class(modal_aerosol_state), intent(in) :: self
219221
integer, intent(in) :: bin_ndx ! bin number
220222
integer, intent(in) :: ncol ! number of columns

0 commit comments

Comments
 (0)