Skip to content

Commit

Permalink
Merge remote-tracking branch 'haiqin/ufs/dev-rrfs-sd' into ufs/dev-rr…
Browse files Browse the repository at this point in the history
…fs-sd
  • Loading branch information
SamuelTrahanNOAA committed Mar 24, 2023
2 parents 37ee5ec + a1fe46d commit 3c68ae9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 26 deletions.
16 changes: 9 additions & 7 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
gasvmr_ccl4, gasvmr_cfc113, aerodp,ext550, clouds6, clouds7, clouds8, &
clouds9, cldsa, cldfra, cldfra2d, lwp_ex,iwp_ex, lwp_fc,iwp_fc, &
faersw1, faersw2, faersw3, faerlw1, faerlw2, faerlw3, alpha, &
aero_dir_fdb, spp_wts_rad, spp_rad, ico2, errmsg, errflg)
aero_dir_fdb, fdb_coef, spp_wts_rad, spp_rad, ico2, errmsg, errflg)

use machine, only: kind_phys

Expand Down Expand Up @@ -155,6 +155,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
clouds2, clouds3, &
clouds4, clouds5
real(kind=kind_phys), dimension(:,:), intent(in) :: qci_conv
real(kind=kind_phys), dimension(:), intent(in) :: fdb_coef
real(kind=kind_phys), dimension(:), intent(out) :: lwp_ex,iwp_ex, &
lwp_fc,iwp_fc

Expand Down Expand Up @@ -640,12 +641,13 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
if (aero_dir_fdb) then
do k=1,lmk
do i=1,im
aer_nm(i,k,1 )=aer_nm(i,k,1 )+qgrs(i,k,ntdust)*0.33*1.e-9 ! dust bin1
aer_nm(i,k,2 )=aer_nm(i,k,2 )+(qgrs(i,k,ntdust)*0.67+qgrs(i,k,ntcoarsepm)*0.02)*1.e-9
aer_nm(i,k,3 )=aer_nm(i,k,3 )+qgrs(i,k,ntcoarsepm)*0.13*1.e-9 ! dust bin3
aer_nm(i,k,4 )=aer_nm(i,k,4 )+qgrs(i,k,ntcoarsepm)*0.85*1.e-9 ! dust bin4
aer_nm(i,k,12)=aer_nm(i,k,12)+qgrs(i,k,ntsmoke)*1.e-9*0.05 !Smoke BC
aer_nm(i,k,14)=aer_nm(i,k,14)+qgrs(i,k,ntsmoke)*1.e-9*0.95 !Smoke OA, we may need to revise later for OA vs. OC
aer_nm(i,k,1 )=aer_nm(i,k,1 )+ qgrs(i,k,ntdust)*fdb_coef(1)*1.e-9 ! dust bin1
aer_nm(i,k,2 )=aer_nm(i,k,2 )+(qgrs(i,k,ntdust)*fdb_coef(2) &
+qgrs(i,k,ntcoarsepm)*fdb_coef(3))*1.e-9 ! dust bin2
aer_nm(i,k,3 )=aer_nm(i,k,3 )+qgrs(i,k,ntcoarsepm)*fdb_coef(4)*1.e-9 ! dust bin3
aer_nm(i,k,4 )=aer_nm(i,k,4 )+qgrs(i,k,ntcoarsepm)*fdb_coef(5)*1.e-9 ! dust bin4
aer_nm(i,k,12)=aer_nm(i,k,12)+qgrs(i,k,ntsmoke)*fdb_coef(6)*1.e-9 ! Smoke BC
aer_nm(i,k,14)=aer_nm(i,k,14)+qgrs(i,k,ntsmoke)*fdb_coef(7)*1.e-9 ! Smoke OA
enddo
enddo
endif
Expand Down
12 changes: 10 additions & 2 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@
type = integer
intent = in
[ntcoarsepm]
standard_name = index_for_coarse_pm_in_tracer_concentration_array
long_name = tracer index for coarse pm
standard_name = index_for_coarse_particulate_matter_in_tracer_concentration_array
long_name = tracer index for coarse particulate matter
units = index
dimensions = ()
type = integer
Expand Down Expand Up @@ -1466,6 +1466,14 @@
dimensions = ()
type = logical
intent = in
[fdb_coef]
standard_name = smoke_dust_direct_fdb_coef
long_name = smoke dust direct feedback coefficents
units = none
dimensions = (7)
type = real
kind = kind_phys
intent = in
[spp_wts_rad]
standard_name = spp_weights_for_radiation_scheme
long_name = spp weights for radiation scheme
Expand Down
4 changes: 2 additions & 2 deletions physics/smoke_dust/rrfs_smoke_postpbl.meta
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
type = integer
intent = in
[ntcoarsepm]
standard_name = index_for_coarse_pm_in_tracer_concentration_array
long_name = tracer index for coarse pm
standard_name = index_for_coarse_particulate_matter_in_tracer_concentration_array
long_name = tracer index for coarse particulate matter
units = index
dimensions = ()
type = integer
Expand Down
18 changes: 9 additions & 9 deletions physics/smoke_dust/rrfs_smoke_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ module rrfs_smoke_wrapper
subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, &
u10m, v10m, ustar, rlat, rlon, tskin, pb2d, t2m, dpt2m, &
pr3d, ph3d,phl3d, prl3d, tk3d, us3d, vs3d, spechum, w, &
nsoil, smc, vegtype, soiltyp, sigmaf, dswsfc, zorl,snow, &
julian, idat, rain_cpl, rainc_cpl, exch, hf2d, g, pi, con_cp, con_rd, &
nsoil, smc, vegtype, soiltyp, sigmaf, dswsfc, zorl, snow, julian, &
idat, rain_cpl, rainc_cpl, exch, hf2d, g, pi, con_cp, con_rd, con_fv, &
dust12m_in, emi_in, smoke_RRFS, ntrac, qgrs, gq0, chem3d, tile_num, &
ntsmoke, ntdust, ntcoarsepm, imp_physics, imp_physics_thompson, &
nwfa, nifa, emanoc, emdust, emseas, &
Expand All @@ -60,7 +60,7 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate,

integer, intent(in) :: im,kte,kme,ktau,nsoil,tile_num,jdate(8),idat(8)
integer, intent(in) :: ntrac, ntsmoke, ntdust, ntcoarsepm, ndvel
real(kind_phys),intent(in) :: dt, julian, g, pi, con_cp, con_rd
real(kind_phys),intent(in) :: dt, julian, g, pi, con_cp, con_rd, con_fv
logical, intent(in) :: aero_ind_fdb_in,dbg_opt_in
integer, intent(in) :: smoke_forecast_in

Expand Down Expand Up @@ -228,7 +228,7 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate,

!>- get ready for chemistry run
call rrfs_smoke_prep( &
current_month, current_hour, gmt, &
current_month, current_hour, gmt, con_rd, con_fv, &
u10m,v10m,ustar,land,garea,rlat,rlon,tskin, &
pr3d,ph3d,phl3d,tk3d,prl3d,us3d,vs3d,spechum,exch,w, &
nsoil,smc,vegtype,soiltyp,sigmaf,dswsfc,zorl, &
Expand Down Expand Up @@ -418,8 +418,8 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate,
do k=kts,kte
do i=its,ite
gq0(i,k,ntsmoke ) = min(5000.,max(epsilc,chem(i,k,1,p_smoke )))
gq0(i,k,ntdust ) = min(100.,max(epsilc,chem(i,k,1,p_dust_1)))
gq0(i,k,ntcoarsepm)= min(1000.,max(epsilc,chem(i,k,1,p_coarse_pm)))
gq0(i,k,ntdust ) = min(200.,max(epsilc,chem(i,k,1,p_dust_1)))
gq0(i,k,ntcoarsepm)= min(5000.,max(epsilc,chem(i,k,1,p_coarse_pm)))
enddo
enddo

Expand Down Expand Up @@ -482,7 +482,7 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate,
end subroutine rrfs_smoke_wrapper_run

subroutine rrfs_smoke_prep( &
current_month,current_hour,gmt, &
current_month,current_hour,gmt,con_rd,con_fv, &
u10m,v10m,ustar,land,garea,rlat,rlon,ts2d, &
pr3d,ph3d,phl3d,tk3d,prl3d,us3d,vs3d,spechum,exch,w, &
nsoil,smc,vegtype,soiltyp,sigmaf,dswsfc,zorl, &
Expand Down Expand Up @@ -510,7 +510,7 @@ subroutine rrfs_smoke_prep( &
integer, intent(in) :: nsoil
integer, dimension(ims:ime), intent(in) :: land, vegtype, soiltyp
integer, intent(in) :: ntrac
real(kind=kind_phys), intent(in) :: g, pi, gmt
real(kind=kind_phys), intent(in) :: g, pi, gmt, con_rd, con_fv
real(kind=kind_phys), dimension(ims:ime), intent(in) :: &
u10m, v10m, ustar, garea, rlat, rlon, ts2d, sigmaf, dswsfc, &
zorl, snow_cpl, pb2d, hf2d
Expand Down Expand Up @@ -671,7 +671,7 @@ subroutine rrfs_smoke_prep( &
p_phy(i,k,j)=prl3d(i,kkp)
u_phy(i,k,j)=us3d(i,kkp)
v_phy(i,k,j)=vs3d(i,kkp)
rho_phy(i,k,j)=p_phy(i,k,j)/(287.04*t_phy(i,k,j)*(1.+.608*spechum(i,kkp)))
rho_phy(i,k,j)=p_phy(i,k,j)/(con_rd*t_phy(i,k,j)*(1.+con_fv*spechum(i,kkp)))
rri(i,k,j)=1./rho_phy(i,k,j)
vvel(i,k,j)=-w(i,kkp)*rri(i,k,j)/g
moist(i,k,j,:)=0.
Expand Down
20 changes: 14 additions & 6 deletions physics/smoke_dust/rrfs_smoke_wrapper.meta
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,14 @@
type = real
kind = kind_phys
intent = in
[con_fv]
standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one
long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor)
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[dust12m_in]
standard_name = fengsha_dust12m_input
long_name = fengsha dust input
Expand Down Expand Up @@ -426,8 +434,8 @@
type = integer
intent = in
[ntcoarsepm]
standard_name = index_for_coarse_pm_in_tracer_concentration_array
long_name = tracer index for coarse pm
standard_name = index_for_coarse_particulate_matter_in_tracer_concentration_array
long_name = tracer index for coarse particulate matter
units = index
dimensions = ()
type = integer
Expand Down Expand Up @@ -463,8 +471,8 @@
kind = kind_phys
intent = inout
[emanoc]
standard_name = emission_of_anoc_for_thompson_mp
long_name = emission of anoc for thompson mp
standard_name = emission_of_anothropogenic_for_mp_indir_fdb
long_name = emission of anothropogenic for mp indirect feedabck
units = ug m-2 s-1
dimensions = (horizontal_loop_extent)
type = real
Expand All @@ -479,8 +487,8 @@
kind = kind_phys
intent = inout
[emseas]
standard_name = emission_of_seas_for_smoke
long_name = emission of seas for smoke
standard_name = emission_of_sea_salt_for_mp_indir_fdb
long_name = emission of sea salt for mp indirect feedabck
units = ug m-2 s-1
dimensions = (horizontal_loop_extent)
type = real
Expand Down

0 comments on commit 3c68ae9

Please sign in to comment.