Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/core_atmosphere/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ set(ATMOSPHERE_CORE_PHYSICS_SMOKE_SOURCES
seas_data_mod.F90
seas_ngac_mod.F90
ssalt_mod.F90
module_anthro_emissions.F90
)
list(TRANSFORM ATMOSPHERE_CORE_PHYSICS_SMOKE_SOURCES PREPEND physics/physics_noaa/SMOKE/)

Expand Down
177 changes: 159 additions & 18 deletions src/core_atmosphere/physics/mpas_atmphys_driver_smoke.F

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions src/core_atmosphere/physics/mpas_atmphys_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module mpas_atmphys_init
use mpas_atmphys_driver_radiation_sw,only: init_radiation_sw
use mpas_atmphys_driver_sfclayer,only: init_sfclayer
use mpas_atmphys_vars,only: f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_nifa,f_nwfa,f_nbca, &
f_smoke_fine,f_dust_fine,f_dust_coarse
f_smoke_fine,f_dust_fine,f_dust_coarse,f_unspc_fine

use mpas_atmphys_landuse
use mpas_atmphys_o3climatology
Expand Down Expand Up @@ -256,7 +256,7 @@ subroutine physics_init(dminfo,stream_manager,clock,configs,mesh,diag,tend,state
!initialization of logical flags for cloud mixing ratios and number concentrations, and aerosols
!number concentrations from the Thompson cloud microphysics:
call init_physics_flags(state,f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_nifa,f_nwfa,f_nbca, &
f_smoke_fine,f_dust_fine,f_dust_coarse)
f_smoke_fine,f_dust_fine,f_dust_coarse,f_unspc_fine)

!initialization of counters i_rainc and i_rainnc. i_rainc and i_rainnc track the number of
!times the accumulated convective (rainc) and grid-scale (rainnc) rain exceed the prescribed
Expand Down Expand Up @@ -478,7 +478,7 @@ end subroutine physics_init

!=================================================================================================================
subroutine init_physics_flags(state,f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_nifa,f_nwfa,f_nbca, &
f_smoke_fine,f_dust_fine,f_dust_coarse)
f_smoke_fine,f_dust_fine,f_dust_coarse,f_unspc_fine)
!=================================================================================================================

!input arguments:
Expand All @@ -487,12 +487,12 @@ subroutine init_physics_flags(state,f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_n
!output arguments:
logical,intent(out):: f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz
logical,intent(out):: f_nc,f_ni,f_nifa,f_nwfa,f_nbca
logical,intent(out):: f_smoke_fine,f_dust_fine,f_dust_coarse
logical,intent(out):: f_smoke_fine,f_dust_fine,f_dust_coarse,f_unspc_fine

!local pointers:
integer,pointer:: index_qc,index_qr,index_qi,index_qs,index_qg
integer,pointer:: index_nc,index_ni,index_nifa,index_nwfa
integer,pointer:: index_smoke_fine,index_dust_fine,index_dust_coarse
integer,pointer:: index_smoke_fine,index_dust_fine,index_dust_coarse,index_unspc_fine

!-----------------------------------------------------------------------------------------------------------------

Expand All @@ -506,6 +506,7 @@ subroutine init_physics_flags(state,f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_n
f_smoke_fine = .false.
f_dust_fine = .false.
f_dust_coarse = .false.
f_unspc_fine = .false.
call mpas_pool_get_dimension(state,'index_qc',index_qc)
call mpas_pool_get_dimension(state,'index_qr',index_qr)
call mpas_pool_get_dimension(state,'index_qi',index_qi)
Expand All @@ -514,15 +515,17 @@ subroutine init_physics_flags(state,f_qc,f_qr,f_qi,f_qs,f_qg,f_qoz,f_nc,f_ni,f_n
call mpas_pool_get_dimension(state,'index_smoke_fine',index_smoke_fine)
call mpas_pool_get_dimension(state,'index_dust_fine',index_dust_fine)
call mpas_pool_get_dimension(state,'index_dust_coarse',index_dust_coarse)
call mpas_pool_get_dimension(state,'index_unspc_fine',index_unspc_fine)

if(index_qc .gt. -1) f_qc = .true.
if(index_qr .gt. -1) f_qr = .true.
if(index_qi .gt. -1) f_qi = .true.
if(index_qs .gt. -1) f_qs = .true.
if(index_qg .gt. -1) f_qg = .true.
if(index_smoke_fine .gt. -1) f_smoke_fine = .true.
if(index_smoke_fine .gt. -1) f_smoke_fine = .true.
if(index_dust_fine .gt. -1) f_dust_fine = .true.
if(index_dust_coarse .gt. -1) f_dust_coarse = .true.
if(index_unspc_fine .gt. -1) f_unspc_fine = .true.

!initializes the logical assigned to number concentrations:
f_nc = .false.
Expand Down
19 changes: 14 additions & 5 deletions src/core_atmosphere/physics/mpas_atmphys_manager.F
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ subroutine physics_run_init(configs,mesh,state,emission_input,diag_physics,clock
config_radt_lw_scheme, &
config_radt_sw_scheme, &
config_smoke_scheme, &
config_dust_scheme
config_dust_scheme, &
config_anthro_scheme

character(len=StrKIND),pointer:: config_conv_interval, &
config_pbl_interval, &
Expand All @@ -417,9 +418,9 @@ subroutine physics_run_init(configs,mesh,state,emission_input,diag_physics,clock
integer,pointer:: nMonths
integer,pointer:: nAerosols,nAerLevels,nOznLevels
integer,pointer:: nCellsSolve,nSoilLevels,nVertLevels,nlcat,nscat
integer,pointer:: nChem,nkanthro,nkwildfire,nkbiogenic,nkvolcanic
integer,pointer:: n_e_bb_in
integer,pointer:: n_e_bb_out,n_e_dust_out
integer,pointer:: nChem,nkanthro,nkwildfire,nkbiogenic,nkvolcanic,nkreswoodcomb
integer,pointer:: n_e_bb_in,n_e_ant_in
integer,pointer:: n_e_bb_out,n_e_dust_out,n_e_ant_out

real(kind=RKIND):: dt

Expand Down Expand Up @@ -451,6 +452,7 @@ subroutine physics_run_init(configs,mesh,state,emission_input,diag_physics,clock
call mpas_pool_get_config(configs,'config_microp_re' ,config_microp_re )
call mpas_pool_get_config(configs,'config_smoke_scheme' ,config_smoke_scheme )
call mpas_pool_get_config(configs,'config_dust_scheme' ,config_dust_scheme )
call mpas_pool_get_config(configs,'config_anthro_scheme' ,config_anthro_scheme )

call mpas_get_timeInterval(mpas_get_clock_timestep(clock, ierr), dt=dt)

Expand All @@ -471,11 +473,14 @@ subroutine physics_run_init(configs,mesh,state,emission_input,diag_physics,clock
call mpas_pool_get_dimension(mesh,'nkwildfire' ,nkwildfire )
call mpas_pool_get_dimension(mesh,'nkbiogenic' ,nkbiogenic )
call mpas_pool_get_dimension(mesh,'nkvolcanic' ,nkvolcanic )
call mpas_pool_get_dimension(mesh,'nkreswoodcomb',nkreswoodcomb )

call mpas_pool_get_dimension(diag_physics, 'num_e_bb_out',n_e_bb_out )
call mpas_pool_get_dimension(diag_physics, 'num_e_dust_out',n_e_dust_out)
call mpas_pool_get_dimension(diag_physics, 'num_e_ant_out',n_e_ant_out)

call mpas_pool_get_dimension(emission_input,'num_e_bb_in',n_e_bb_in )
call mpas_pool_get_dimension(emission_input,'num_e_ant_in',n_e_ant_in )

!initialization of gmt, julian day, and alarms:

Expand Down Expand Up @@ -709,13 +714,17 @@ subroutine physics_run_init(configs,mesh,state,emission_input,diag_physics,clock
kwildfire = nkwildfire
kbiogenic = nkbiogenic
kvolcanic = nkvolcanic
kreswoodcomb= nkreswoodcomb

num_e_bb_in = n_e_bb_in
num_e_ant_in = n_e_ant_in

num_e_bb_out = n_e_bb_out
num_e_dust_out= n_e_dust_out
num_e_ant_out = n_e_ant_out

if(config_smoke_scheme .ne. 'off' .or. config_dust_scheme .ne. 'off') then
if(config_smoke_scheme .ne. 'off' .or. config_dust_scheme .ne. 'off' &
.or. config_anthro_scheme .ne. 'off') then
Comment thread
haiqinli marked this conversation as resolved.
Outdated
do_chemistry = .true.
else
do_chemistry = .false.
Expand Down
51 changes: 0 additions & 51 deletions src/core_atmosphere/physics/mpas_atmphys_packages.F
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
character(len=StrKIND),pointer:: config_convection_scheme
character(len=StrKIND),pointer:: config_pbl_scheme
character(len=StrKIND),pointer:: config_lsm_scheme
character(len=StrKIND),pointer:: config_smoke_scheme
character(len=StrKIND),pointer:: config_dust_scheme
logical,pointer:: config_tempo_hailaware, config_tempo_aerosolaware
logical,pointer:: mp_kessler_in,mp_thompson_in,mp_thompson_aers_in,mp_wsm6_in,mp_nssl2m_in,nssl3m_in
logical,pointer:: mp_tempo_in, tempo_hailaware_in, tempo_aerosolaware_in
logical,pointer:: cu_grell_freitas_in,cu_grell_freitas_li_in,cu_kain_fritsch_in,cu_ntiedtke_in
logical,pointer:: bl_mynn_in,bl_mynnedmf_in,bl_ysu_in,bl_myj_in
logical,pointer:: lsm_noah_in,lsm_ruc_in
logical,pointer:: sf_noahmp_in
logical,pointer:: mpas_smoke_in,mpas_dust_in

integer :: ierr

Expand Down Expand Up @@ -300,54 +297,6 @@ function atmphys_setup_packages(configs,streamInfo,packages,iocontext) result(ie
call mpas_log_write(' sf_noahmp_in = $l', logicArgs=(/sf_noahmp_in/))
call mpas_log_write('')

!--- initialization of packages for parameterizations of smoke:

call mpas_pool_get_config(configs,'config_smoke_scheme', config_smoke_scheme)

nullify(mpas_smoke_in)
call mpas_pool_get_package(packages,'mpas_smoke_inActive', mpas_smoke_in)

if(.not.associated(mpas_smoke_in)) then
call mpas_log_write('================================================================================',messageType=MPAS_LOG_ERR)
call mpas_log_write('* Error while setting up packages for smoke options in atmosphere core.', messageType=MPAS_LOG_ERR)
call mpas_log_write('================================================================================',messageType=MPAS_LOG_ERR)
ierr = 1
return
endif

mpas_smoke_in = .false.

if(config_smoke_scheme.ne.'off') then
mpas_smoke_in = .true.
endif

call mpas_log_write(' mpas_smoke_in = $l', logicArgs=(/mpas_smoke_in/))
call mpas_log_write('')

!--- initialization of packages for parameterizations of dust:

call mpas_pool_get_config(configs,'config_dust_scheme', config_dust_scheme)

nullify(mpas_dust_in)
call mpas_pool_get_package(packages,'mpas_dust_inActive', mpas_dust_in)

if(.not.associated(mpas_dust_in)) then
call mpas_log_write('================================================================================',messageType=MPAS_LOG_ERR)
call mpas_log_write('* Error while setting up packages for dust options in atmosphere core.', messageType=MPAS_LOG_ERR)
call mpas_log_write('================================================================================',messageType=MPAS_LOG_ERR)
ierr = 1
return
endif

mpas_dust_in = .false.

if(config_dust_scheme.ne.'off') then
mpas_dust_in = .true.
endif

call mpas_log_write(' mpas_dust_in = $l', logicArgs=(/mpas_dust_in/))
call mpas_log_write('')

end function atmphys_setup_packages

!=================================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/core_atmosphere/physics/mpas_atmphys_vars.F
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module mpas_atmphys_vars
integer,public:: num_months !number of months [-]

integer,public:: num_chem !Temporary workaround for defining dimensions holding chem data
integer,public:: kanthro,kbiogenic,kwildfire,kvolcanic!Number of vertical levels in input emission data
integer,public:: kanthro,kbiogenic,kwildfire,kvolcanic,kreswoodcomb!Number of vertical levels in input emission data
logical:: do_chemistry !controls call to smoke, dust and other chemical processes

integer,public:: num_e_ant_in,num_e_bb_in,num_e_bio_in,num_e_vol_in
Expand Down
Loading
Loading