Skip to content

Commit

Permalink
Merge pull request #971 from grantfirl/ufs-dev-PR2
Browse files Browse the repository at this point in the history
UFS/dev PR#2 (Coupling Merra2 aerosol climatology and GOCART forecasted aerosol with Thompson microphysics)
  • Loading branch information
dustinswales authored Oct 7, 2022
2 parents 1c70416 + 013844a commit 2550352
Show file tree
Hide file tree
Showing 14 changed files with 288 additions and 69 deletions.
8 changes: 5 additions & 3 deletions physics/GFS_PBL_generic_common.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module GFS_PBL_generic_common
contains

subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
Expand All @@ -23,7 +23,7 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_zhao_carr,imp_physics_nssl
logical, intent(in ) :: ltaerosol, nssl_hail_on, nssl_ccn_on
logical, intent(in ) :: ltaerosol, mraerosol, nssl_hail_on, nssl_ccn_on
integer, intent(out) :: kk
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
Expand All @@ -38,6 +38,8 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
! Thompson
if(ltaerosol) then
kk = 12
else if(mraerosol) then
kk = 10
else
kk = 9
endif
Expand Down Expand Up @@ -70,4 +72,4 @@ subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &

end subroutine set_aerosol_tracer_index

end module GFS_PBL_generic_common
end module GFS_PBL_generic_common
21 changes: 18 additions & 3 deletions physics/GFS_PBL_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev,nqrimef, &
trans_aero, ntchs, ntchm, ntccn, nthl, nthnc, ntgv, nthv, &
imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, &
imp_physics_fer_hires, imp_physics_nssl, nssl_ccn_on, ltaerosol, nssl_hail_on, &
imp_physics_fer_hires, imp_physics_nssl, nssl_ccn_on, ltaerosol, mraerosol, nssl_hail_on, &
cplflx, cplaqm, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, &
shinhong, do_ysu, dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, &
dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dtend, dtidx, index_of_temperature, index_of_x_wind, index_of_y_wind, &
Expand All @@ -36,7 +36,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl
logical, intent(in) :: nssl_ccn_on, nssl_hail_on
logical, intent(in) :: ltaerosol, cplflx, cplaqm, cplchm, lssav, ldiag3d, lsidea, use_med_flux
logical, intent(in) :: ltaerosol, cplflx, cplaqm, cplchm, lssav, ldiag3d, lsidea, use_med_flux, mraerosol
logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu

logical, intent(in) :: flag_for_pbl_generic_tend
Expand Down Expand Up @@ -104,7 +104,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
if (trans_aero) then
! Set kk if chemistry-aerosol tracers are diffused
call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
Expand Down Expand Up @@ -165,6 +165,21 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
dqdt(i,k,ntia) = dvdftra(i,k,12)
enddo
enddo
else if(mraerosol) then
do k=1,levs
do i=1,im
dqdt(i,k,ntqv) = dvdftra(i,k,1)
dqdt(i,k,ntcw) = dvdftra(i,k,2)
dqdt(i,k,ntiw) = dvdftra(i,k,3)
dqdt(i,k,ntrw) = dvdftra(i,k,4)
dqdt(i,k,ntsw) = dvdftra(i,k,5)
dqdt(i,k,ntgl) = dvdftra(i,k,6)
dqdt(i,k,ntlnc) = dvdftra(i,k,7)
dqdt(i,k,ntinc) = dvdftra(i,k,8)
dqdt(i,k,ntrnc) = dvdftra(i,k,9)
dqdt(i,k,ntoz) = dvdftra(i,k,10)
enddo
enddo
else
do k=1,levs
do i=1,im
Expand Down
7 changes: 7 additions & 0 deletions physics/GFS_PBL_generic_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@
dimensions = ()
type = logical
intent = in
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
units = flag
dimensions = ()
type = logical
intent = in
[nssl_ccn_on]
standard_name = nssl_ccn_on
long_name = CCN activation flag in NSSL micro
Expand Down
26 changes: 21 additions & 5 deletions physics/GFS_PBL_generic_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, &
ntccn, nthl, nthnc, ntgv, nthv, &
imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, &
imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, imp_physics_nssl, &
ltaerosol, nssl_ccn_on, nssl_hail_on, &
imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, imp_physics_nssl, &
ltaerosol, mraerosol, nssl_ccn_on, nssl_hail_on, &
hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, &
flag_for_pbl_generic_tend, ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg)

Expand All @@ -33,7 +33,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
logical, intent(in) :: trans_aero, ldiag3d, qdiag3d, lssav
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: ltaerosol, hybedmf, do_shoc, satmedmf, flag_for_pbl_generic_tend
logical, intent(in) :: ltaerosol, hybedmf, do_shoc, satmedmf, flag_for_pbl_generic_tend, mraerosol
integer, intent(in) :: imp_physics_nssl
logical, intent(in) :: nssl_hail_on, nssl_ccn_on

Expand Down Expand Up @@ -108,6 +108,22 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
enddo
enddo
rtg_ozone_index = 10
elseif(mraerosol) then
do k=1,levs
do i=1,im
vdftra(i,k,1) = qgrs(i,k,ntqv)
vdftra(i,k,2) = qgrs(i,k,ntcw)
vdftra(i,k,3) = qgrs(i,k,ntiw)
vdftra(i,k,4) = qgrs(i,k,ntrw)
vdftra(i,k,5) = qgrs(i,k,ntsw)
vdftra(i,k,6) = qgrs(i,k,ntgl)
vdftra(i,k,7) = qgrs(i,k,ntlnc)
vdftra(i,k,8) = qgrs(i,k,ntinc)
vdftra(i,k,9) = qgrs(i,k,ntrnc)
vdftra(i,k,10) = qgrs(i,k,ntoz)
enddo
enddo
rtg_ozone_index = 10
else
do k=1,levs
do i=1,im
Expand Down Expand Up @@ -242,7 +258,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,
!
if (trans_aero) then
call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
imp_physics_thompson, ltaerosol, &
imp_physics_thompson, ltaerosol,mraerosol, &
imp_physics_mg, ntgl, imp_physics_gfdl, &
imp_physics_zhao_carr, imp_physics_nssl,&
nssl_hail_on, nssl_ccn_on, kk, &
Expand Down Expand Up @@ -297,4 +313,4 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, rtg_ozone_index,

end subroutine GFS_PBL_generic_pre_run

end module GFS_PBL_generic_pre
end module GFS_PBL_generic_pre
9 changes: 8 additions & 1 deletion physics/GFS_PBL_generic_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@
dimensions = ()
type = logical
intent = in
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
units = flag
dimensions = ()
type = logical
intent = in
[nssl_ccn_on]
standard_name = nssl_ccn_on
long_name = CCN activation flag in NSSL micro
Expand Down Expand Up @@ -429,4 +436,4 @@
units = 1
dimensions = ()
type = integer
intent = out
intent = out
10 changes: 5 additions & 5 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, lextop, ltp, &
imp_physics_fer_hires, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, &
iovr_exp, iovr_exprand, idcor_con, idcor_hogan, idcor_oreopoulos, &
julian, yearlen, lndp_var_list, lsswr, lslwr, &
ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, &
ltaerosol, mraerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, &
lmfdeep2, fhswr, fhlwr, solhr, sup, con_eps, epsm1, fvirt, &
rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, &
prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, pert_clds, &
Expand Down Expand Up @@ -121,8 +121,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, lextop, ltp, &
character(len=3), dimension(:), intent(in) :: lndp_var_list

logical, intent(in) :: lextop, lsswr, lslwr, ltaerosol, lgfdlmprad, &
uni_cld, effr_in, do_mynnedmf, &
lmfshal, lmfdeep2, pert_clds
uni_cld, effr_in, do_mynnedmf, &
lmfshal, lmfdeep2, pert_clds, mraerosol
logical, intent(in) :: aero_dir_fdb
real(kind=kind_phys), dimension(:,:), intent(in) :: smoke_ext, dust_ext

Expand Down Expand Up @@ -722,7 +722,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, lextop, ltp, &
enddo
enddo
! for Thompson MP - prepare variables for calc_effr
if_thompson: if (imp_physics == imp_physics_thompson .and. ltaerosol) then
if_thompson: if (imp_physics == imp_physics_thompson .and. (ltaerosol .or. mraerosol)) then
do k=1,LMK
do i=1,IM
qvs = qlyr(i,k)
Expand Down Expand Up @@ -866,7 +866,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, lextop, ltp, &
! Update number concentration, consistent with sub-grid clouds (GF, MYNN) or without (all others)
do k=1,lm
do i=1,im
if (ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then
if ((ltaerosol .or. mraerosol) .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then
nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)*rho(i,k)) * orho(i,k)
endif
if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then
Expand Down
7 changes: 7 additions & 0 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,13 @@
dimensions = ()
type = logical
intent = in
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
units = flag
dimensions = ()
type = logical
intent = in
[lgfdlmprad]
standard_name = flag_for_GFDL_microphysics_radiation_interaction
long_name = flag for GFDL microphysics-radiation interaction
Expand Down
14 changes: 10 additions & 4 deletions physics/GFS_rrtmgp_cloud_mp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module GFS_rrtmgp_cloud_mp
subroutine GFS_rrtmgp_cloud_mp_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, &
i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, i_cldliq_nc, i_cldice_nc, i_twa, kdt, &
imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_samf, doSWrad, doLWrad, effr_in, lmfshal, &
ltaerosol, icloud, imp_physics, imp_physics_thompson, imp_physics_gfdl, &
ltaerosol,mraerosol, icloud, imp_physics, imp_physics_thompson, imp_physics_gfdl, &
lgfdlmprad, do_mynnedmf, uni_cld, lmfdeep2, p_lev, p_lay, t_lay, qs_lay, q_lay, &
relhum, lsmask, xlon, xlat, dx, tv_lay, effrin_cldliq, effrin_cldice, &
effrin_cldrain, effrin_cldsnow, tracer, cnv_mixratio, cld_cnv_frac, qci_conv, &
Expand Down Expand Up @@ -86,6 +86,7 @@ subroutine GFS_rrtmgp_cloud_mp_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldic
effr_in, & ! Provide hydrometeor radii from macrophysics?
lmfshal, & ! Flag for mass-flux shallow convection scheme used by Xu-Randall
ltaerosol, & ! Flag for aerosol option
mraerosol, & ! Flag for aerosol option
lgfdlmprad, & ! Flag for GFDLMP radiation interaction
do_mynnedmf, & ! Flag to activate MYNN-EDMF
uni_cld, & ! Flag for unified cloud scheme
Expand Down Expand Up @@ -253,7 +254,7 @@ subroutine GFS_rrtmgp_cloud_mp_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldic
! Update particle size using modified mixing-ratios from Thompson.
call cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice_nc, &
i_cldliq_nc, i_twa, q_lay, p_lay, t_lay, tracer, con_eps, con_rd, ltaerosol,&
effrin_cldliq, effrin_cldice, effrin_cldsnow)
mraerosol, effrin_cldliq, effrin_cldice, effrin_cldsnow)
cld_reliq = effrin_cldliq
cld_reice = effrin_cldice
cld_resnow = effrin_cldsnow
Expand Down Expand Up @@ -819,13 +820,13 @@ function cld_frac_XuRandall(p_lay, qs_lay, relhum, cld_mr, alpha)
!! \section cmp_reff_Thompson_gen General Algorithm
subroutine cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice_nc, &
i_cldliq_nc, i_twa, q_lay, p_lay, t_lay, tracer, con_eps, con_rd, ltaerosol, &
effrin_cldliq, effrin_cldice, effrin_cldsnow)
mraerosol, effrin_cldliq, effrin_cldice, effrin_cldsnow)
implicit none

! Inputs
integer, intent(in) :: nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice_nc, &
i_cldliq_nc, i_twa
logical, intent(in) :: ltaerosol
logical, intent(in) :: ltaerosol, mraerosol
real(kind_phys), intent(in) :: con_eps,con_rd
real(kind_phys), dimension(:,:),intent(in) :: q_lay, p_lay, t_lay
real(kind_phys), dimension(:,:,:),intent(in) :: tracer
Expand Down Expand Up @@ -856,6 +857,11 @@ subroutine cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice
if (qc_mp(iCol,iLay) > 1.e-12 .and. nc_mp(iCol,iLay) < 100.) then
nc_mp(iCol,iLay) = make_DropletNumber(qc_mp(iCol,iLay)*rho, nwfa(iCol,iLay)*rho) * orho
endif
elseif (mraerosol) then
nc_mp(iCol,iLay) = tracer(iCol,iLay,i_cldliq_nc) / (1.-q_lay(iCol,iLay))
if (qc_mp(iCol,iLay) > 1.e-12 .and. nc_mp(iCol,iLay) < 100.) then
nc_mp(iCol,iLay) = make_DropletNumber(qc_mp(iCol,iLay)*rho, nwfa(iCol,iLay)*rho) * orho
endif
else
nc_mp(iCol,iLay) = nt_c*orho
endif
Expand Down
7 changes: 7 additions & 0 deletions physics/GFS_rrtmgp_cloud_mp.meta
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@
dimensions = ()
type = logical
intent = in
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
units = flag
dimensions = ()
type = logical
intent = in
[imfdeepcnv]
standard_name = control_for_deep_convection_scheme
long_name = flag for mass-flux deep convection scheme
Expand Down
Loading

0 comments on commit 2550352

Please sign in to comment.