Skip to content

Commit

Permalink
make aerocom run time configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
mvertens authored and Steve Goldhaber committed Aug 28, 2024
1 parent ba624de commit 0db5173
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 73 deletions.
10 changes: 5 additions & 5 deletions src/aero_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module aero_model
use oslo_aero_share, only: lifeCycleNumberMedianRadius, rhopart, lifeCycleSigma
use oslo_aero_share, only: l_so4_a2, l_bc_n, l_bc_ax
use oslo_aero_share, only: MODE_IDX_BC_NUC, MODE_IDX_BC_EXT_AC
use oslo_aero_control, only: oslo_aero_ctl_readnl
use oslo_aero_control, only: oslo_aero_ctl_readnl, use_aerocom
use oslo_aero_depos, only: oslo_aero_depos_init
use oslo_aero_depos, only: oslo_aero_depos_dry, oslo_aero_depos_wet, oslo_aero_wetdep_init
use oslo_aero_coag, only: initializeCoagulation, coagtend, clcoag
Expand Down Expand Up @@ -153,10 +153,10 @@ subroutine aero_model_init( pbuf2d )
call init_interp_constants() ! table initialization constants
call initopt() ! table initialization
call initlogn() ! table initialization
#ifdef AEROCOM
call initdry() ! table initialization
call initaeropt() ! table initialization
#endif
if (use_aerocom) then
call initdry() ! table initialization
call initaeropt() ! table initialization
end if
call initializeCondensation()
call oslo_aero_ocean_init()
call oslo_aero_depos_init(pbuf2d)
Expand Down
13 changes: 10 additions & 3 deletions src/oslo_aero_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ module oslo_aero_control
integer, parameter :: unset_int = huge(1)
integer, parameter, public :: dir_string_length=256

! Namelist variables:
real(r8) :: volc_fraction_coarse = 0.0_r8 !Fraction of volcanic aerosols in coarse mode
! Public Namelist variables:
logical, public :: use_aerocom = .false. ! If true, turn on aerocom output

! Private Namelist variables:
real(r8) :: volc_fraction_coarse = 0.0_r8 !Fraction of volcanic aerosols in coarse mode
character(len=dir_string_length) :: aerotab_table_dir = unset_str

! DMS/Ocean namelist variables
Expand Down Expand Up @@ -53,7 +56,8 @@ subroutine oslo_aero_ctl_readnl(nlfile)

namelist /oslo_ctl_nl/ volc_fraction_coarse, aerotab_table_dir, dms_source, &
dms_source_type, opom_source, opom_source_type, &
ocean_filename, ocean_filepath, dms_cycle_year, opom_cycle_year
ocean_filename, ocean_filepath, dms_cycle_year, opom_cycle_year, &
use_aerocom
!-----------------------------------------------------------------------------

if (masterproc) then
Expand All @@ -69,6 +73,9 @@ subroutine oslo_aero_ctl_readnl(nlfile)
end if

! Broadcast namelist variables
call mpi_bcast(use_aerocom, 1 , mpi_logical, mstrid, mpicom, ierr)
if (ierr /= mpi_success) call endrun(subname//" mpi_bcast: volc_fraction_coarse")

call mpi_bcast(volc_fraction_coarse, 1 , mpi_real8, mstrid, mpicom, ierr)
if (ierr /= mpi_success) call endrun(subname//" mpi_bcast: volc_fraction_coarse")
call mpi_bcast(aerotab_table_dir, len(aerotab_table_dir) , mpi_character, mstrid, mpicom, ierr)
Expand Down
Loading

0 comments on commit 0db5173

Please sign in to comment.