Skip to content
Merged
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
10 changes: 5 additions & 5 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,11 @@ state real dfi_qh ikjftb dfi_moist 1 - \
rusdf=(bdy_interp:dt) "DFI_QHAIL" "Hail mixing ratio" "kg kg-1"
state real qvold ikj misc 1 - rdu "QVOLD" "Water vapor mixing ratio, old time step" "kg kg-1"
state real rimi ikj misc 1 - irh "RIMI" "riming intensity" "fraction"
state real qnwfa2d ij misc 1 - i014{17}rhdu "QNWFA2D" "Surface aerosol number conc emission" "kg-1 s-1"
state real qnifa2d ij misc 1 - i014{17}rhdu "QNIFA2D" "Surface dust number conc emission" "kg-1 s-1"
state real qnbca2d ij misc 1 - i014{17}rhdu "QNBCA2D" "Surface black carbon number conc emission" "kg-1 s-1"
state real qnocbb2d ij misc 1 - i014{17}rhdu "QNOCBB2D" "Surface organic carbon biomass burning number conc emission" "kg-1 s-1"
state real qnbcbb2d ij misc 1 - i014{17}rhdu "QNBCBB2D" "Surface black carbon biomass burning number conc emission" "kg-1 s-1"
state real qnwfa2d ij misc 1 - i01{17}rhdu "QNWFA2D" "Surface aerosol number conc emission" "kg-1 s-1"
state real qnifa2d ij misc 1 - i01{17}rhdu "QNIFA2D" "Surface dust number conc emission" "kg-1 s-1"
state real qnbca2d ij misc 1 - i01{17}rhdu "QNBCA2D" "Surface black carbon number conc emission" "kg-1 s-1"
state real qnocbb2d ij misc 1 - i01{17}rhdu "QNOCBB2D" "Surface organic carbon biomass burning number conc emission" "kg-1 s-1"
state real qnbcbb2d ij misc 1 - i01{17}rhdu "QNBCBB2D" "Surface black carbon biomass burning number conc emission" "kg-1 s-1"
state real re_cloud ikj misc 1 - r "RE_CLOUD" "Effective radius cloud water" "m"
state real re_ice ikj misc 1 - r "RE_ICE" "Effective radius cloud ice" "m"
state real re_snow ikj misc 1 - r "RE_SNOW" "Effective radius snow" "m"
Expand Down
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ MODULES = \
module_mp_etanew.o \
module_mp_fer_hires.o \
module_mp_thompson.o \
module_fire_emis.o \
module_mp_SBM_polar_radar.o \
module_mp_full_sbm.o \
module_mp_fast_sbm.o \
Expand Down
93 changes: 93 additions & 0 deletions phys/module_fire_emis.F
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
MODULE module_fire_emis

CONTAINS

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Simple smoke aerosol emissions scheme for Thompson-Eidhammer Aerosol-Aware microphysics scheme !
! !
! Implemented by T. W. Juliano (NCAR/RAL) on 4/13/2022 !
! !
! First implementation includes two options: !
! 1. wif_fire_inj = 0 --> Emit smoke aerosols in the lowest model grid cell !
! --> Recommended for LES configuration where dx is sufficiently small !
! to resolve strong vertical velocities that can mix aerosols !
! throughout the BL during convective conditions !
! 2. wif_fire_inj = 1 --> Default option !
! --> Emit smoke aerosols using simple plumerise scheme that evenly !
! distributes throughout the BL column based on PBL height diagnosed !
! by the PBL parameterization !
! --> Recommended for mesoscale simulations where dx is not small enough !
! to explicitly mix aerosols throughout the BL during convective !
! conditions due to relatively weak updrafts !
! !
! Future implementation could include plumerise model by Freitas et al. (2007, ACP), which is !
! currently part of the WRF-Chem codebase !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

SUBROUTINE fire_emis_simple_plumerise(wif_fire_inj, aer_fire_emit_opt, z_at_mass, pblh, &
nwfa, nbca, nocbb2d, nbcbb2d, dt_in, ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, its, ite, jts, jte, kts, kte)

IMPLICIT NONE

INTEGER , INTENT(IN) :: wif_fire_inj, aer_fire_emit_opt
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(IN) :: z_at_mass
REAL, DIMENSION(ims:ime, jms:jme) , INTENT(IN) :: pblh
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: nwfa, nbca
REAL, DIMENSION(ims:ime, jms:jme) , INTENT(IN) :: nocbb2d, nbcbb2d
REAL , INTENT(IN) :: dt_in
INTEGER , INTENT(IN) :: ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
its, ite, jts, jte, kts, kte

! Local
INTEGER :: i, j, k, i_start, i_end, j_start, j_end, k_inj
REAL :: noc_emit, nbc_emit

i_start = its
j_start = jts
i_end = MIN(ite, ide-1)
j_end = MIN(jte, jde-1)

! Emit fire aerosols at surface (recommended for LES configuration)
if (wif_fire_inj .eq. 0) then
do j = j_start, j_end
do i = i_start, i_end
nwfa(i,kts,j) = nwfa(i,kts,j) + nocbb2d(i,j)*dt_in
if (aer_fire_emit_opt .eq. 2) then
nbca(i,kts,j) = nbca(i,kts,j) + nbcbb2d(i,j)*dt_in
end if
end do
end do
! Distribute fire aerosols evenly through PBL (recommended for mesoscale simulations)
else if (wif_fire_inj .eq. 1) then
do j = j_start, j_end
do i = i_start, i_end
! Find k index for PBL top
k_inj = kts
do while (z_at_mass(i,k_inj,j) .lt. pblh(i,j))
k_inj = k_inj + 1
end do
! Compute num of OC aerosols to emit per grid cell
noc_emit = (nocbb2d(i,j)*dt_in)/k_inj
! Compute num of BC aerosols to emit per grid cell
if (aer_fire_emit_opt .eq. 2) then
nbc_emit = (nbcbb2d(i,j)*dt_in)/k_inj
end if
! Emit aerosols
do k = kts, k_inj
nwfa(i,k,j) = nwfa(i,k,j) + noc_emit
if (aer_fire_emit_opt .eq. 2) then
nbca(i,k,j) = nbca(i,k,j) + nbc_emit
end if
end do
end do
end do
! Option does not exist
else
call wrf_error_fatal('option wif_fire_inj = ', wif_fire_inj, ' does not exist. Please set =0 or =1')
end if

END SUBROUTINE fire_emis_simple_plumerise

END MODULE module_fire_emis
23 changes: 17 additions & 6 deletions phys/module_microphysics_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ SUBROUTINE microphysics_driver( &
USE module_domain, ONLY : HISTORY_ALARM, Is_alarm_tstep
USE module_irrigation

USE module_fire_emis

!----------------------------------------------------------------------
! This driver calls subroutines for the microphys.
!
Expand All @@ -260,7 +262,14 @@ SUBROUTINE microphysics_driver( &
! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop)
! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier)
! * etampnew - what's in the operational 4-km High-Resolution Window Runs
! Goddard 4-ice scheme (2016)
! Thompson (2008)
! Milbrandt and Yau (2005)
! Morrison (2009)
! CAM
! SBU-YLin (2011)
! WRF Double-Moment 5-class
! WRF Double-Moment 6-class

!----------------------------------------------------------------------
IMPLICIT NONE
Expand Down Expand Up @@ -1055,18 +1064,12 @@ SUBROUTINE microphysics_driver( &
NWFA2D=qnwfa2d, &
NIFA2D=qnifa2d, &
NBCA2D=qnbca2d, &
NOCBB2D=qnocbb2d, &
NBCBB2D=qnbcbb2d, &
aer_init_opt=config_flags%aer_init_opt, &
wif_input_opt=config_flags%wif_input_opt, &
aer_fire_emit_opt=config_flags%aer_fire_emit_opt, &
wif_fire_inj=config_flags%wif_fire_inj, &
TH=th, &
PII=pi_phy, &
P=p, &
W=w, &
PBLH=PBLH, &
z_at_mass=z_at_mass, &
DZ=dz8w, &
DT_IN=dt, &
ITIMESTEP=itimestep, &
Expand Down Expand Up @@ -1108,6 +1111,14 @@ SUBROUTINE microphysics_driver( &
deallocate (qni_tmp)
end if

IF (config_flags%aer_fire_emit_opt.gt.0) then
CALL wrf_debug ( 200 , ' call fire_emis_simple_plumerise' )
CALL fire_emis_simple_plumerise (config_flags%wif_fire_inj, config_flags%aer_fire_emit_opt &
,z_at_mass, pblh, qnwfa_curr, qnbca_curr &
,qnocbb2d, qnbcbb2d, dt, ids, ide, jds, jde, kds, kde &
,ims, ime, jms, jme, kms, kme, its, ite, jts, jte, kts, kte )
ENDIF

ELSE
CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
ENDIF
Expand Down
43 changes: 5 additions & 38 deletions phys/module_mp_thompson.F
Original file line number Diff line number Diff line change
Expand Up @@ -1022,11 +1022,8 @@ END SUBROUTINE thompson_init
!+---+-----------------------------------------------------------------+
SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
nwfa, nifa, nbca, nwfa2d, nifa2d, nbca2d, &
nocbb2d, nbcbb2d, &
aer_init_opt, wif_input_opt, &
aer_fire_emit_opt, wif_fire_inj, &
th, pii, p, w, z_at_mass, dz, &
dt_in, itimestep, PBLH, &
th, pii, p, w, dz, dt_in, itimestep, &
RAINNC, RAINNCV, &
SNOWNC, SNOWNCV, &
GRAUPELNC, GRAUPELNCV, SR, &
Expand All @@ -1051,7 +1048,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
nc, nwfa, nifa, nbca
REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d, nifa2d, &
nbca2d, nocbb2d, nbcbb2d
nbca2d
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &
re_cloud, re_ice, re_snow
INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
Expand All @@ -1061,10 +1058,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
#endif
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(IN):: &
pii, p, w, dz
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(IN):: &
z_at_mass
REAL, OPTIONAL, DIMENSION(ims:ime, jms:jme), INTENT(IN):: &
PBLH
REAL, DIMENSION(ims:ime, jms:jme), INTENT(INOUT):: &
RAINNC, RAINNCV, SR
REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(INOUT):: &
Expand All @@ -1073,8 +1066,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
refl_10cm
REAL, INTENT(IN):: dt_in
INTEGER, INTENT(IN):: itimestep
INTEGER, OPTIONAL, INTENT(IN):: &
aer_init_opt, wif_input_opt, aer_fire_emit_opt, wif_fire_inj
INTEGER, OPTIONAL, INTENT(IN):: aer_init_opt, wif_input_opt
#if ( WRF_CHEM == 1 )
LOGICAL, INTENT(in) :: wetscav_on
#endif
Expand All @@ -1092,8 +1084,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
REAL, DIMENSION(its:ite, jts:jte):: pcp_ra, pcp_sn, pcp_gr, pcp_ic
REAL:: dt, pptrain, pptsnow, pptgraul, pptice
REAL:: qc_max, qr_max, qs_max, qi_max, qg_max, ni_max, nr_max
REAL:: nwfa1, noc_emit, nbc_emit
INTEGER:: i, j, k, k_inj
REAL:: nwfa1
INTEGER:: i, j, k
INTEGER:: imax_qc,imax_qr,imax_qi,imax_qs,imax_qg,imax_ni,imax_nr
INTEGER:: jmax_qc,jmax_qr,jmax_qi,jmax_qs,jmax_qg,jmax_ni,jmax_nr
INTEGER:: kmax_qc,kmax_qr,kmax_qi,kmax_qs,kmax_qg,kmax_ni,kmax_nr
Expand Down Expand Up @@ -1255,31 +1247,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
else
nbca1d(kts) = 0.0
endif

!..Add organic carbon (OC) and black carbon (BC) biomass burning emissions
if (aer_fire_emit_opt .gt. 0) then
if (wif_fire_inj .eq. 1) then ! distribute aerosol through PBL
k_inj = kts
do while (z_at_mass(i,k_inj,j) .lt. PBLH(i,j))
k_inj = k_inj + 1
end do
noc_emit = (nocbb2d(i,j)*dt_in)/k_inj ! num oc aer per grid cell
if (aer_fire_emit_opt .eq. 2) then
nbc_emit = (nbcbb2d(i,j)*dt_in)/k_inj ! num bc aer per grid cell
end if
do k = kts, k_inj
nwfa1d(k) = nwfa1d(k) + noc_emit
if (aer_fire_emit_opt .eq. 2) then
nbca1d(k) = nbca1d(k) + nbc_emit
end if
end do
else ! emit at sfc
nwfa1d(kts) = nwfa1d(kts) + nocbb2d(i,j)*dt_in
if (aer_fire_emit_opt .eq. 2) then
nbca1d(kts) = nbca1d(kts) + nbcbb2d(i,j)*dt_in
end if
endif
end if
!..
!..END AEROSOL EMISSIONS
!..
Expand Down
15 changes: 15 additions & 0 deletions share/module_check_a_mundo.F
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,21 @@ END FUNCTION bep_bem_ngr_u
END IF
END DO

!-----------------------------------------------------------------------
! Check if qna_update=0 when aer_init_opt>0 for Thompson-MP-Aero (mp_physics=28)
!-----------------------------------------------------------------------
DO i = 1, model_config_rec % max_dom
IF ( model_config_rec%mp_physics(i) .EQ. THOMPSONAERO ) THEN
IF ( model_config_rec%aer_init_opt .GT. 0 .and. model_config_rec%qna_update .EQ. 0 ) THEN
wrf_err_message = '--- ERROR: Time-varying sfc aerosol emissions not set for mp_physics=28 '
CALL wrf_debug ( 0, TRIM( wrf_err_message ) )
wrf_err_message = '--- ERROR: Please set qna_update=1 and control through auxinput17 options '
CALL wrf_debug ( 0, TRIM( wrf_err_message ) )
count_fatal_error = count_fatal_error + 1
END IF
END IF
END DO

!-----------------------------------------------------------------------
! Set aer_fire_emit_opt for Thompson-MP-Aero (mp_physics=28)
!-----------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions test/em_real/examples.namelist
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ Note, this is not a namelist.input file. Find what interests you, and cut and pa
&physics
sst_update = 1,

** Using qna_update option (add these to namelist records &time_control and
&physics respectively):

&time_control
auxinput17_inname = "wrfqnainp_d<domain>"
auxinput17_interval = 360, 360, 360,
io_form_auxinput17 = 2

&physics
qna_update = 1,

** Using Noah-MP option (Use sf_surface_physics option = 4, and add
&noah_mp namelist record)

Expand Down