Skip to content

Commit

Permalink
"merge RRFS-SD from the GSL repository to the community repository"
Browse files Browse the repository at this point in the history
  • Loading branch information
haiqinli committed Mar 10, 2023
1 parent 4a75606 commit c9c973a
Show file tree
Hide file tree
Showing 34 changed files with 2,089 additions and 4,929 deletions.
37 changes: 20 additions & 17 deletions physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module GFS_rrtmg_pre
subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
ltp, imfdeepcnv, imfdeepcnv_gf, me, ncnd, ntrac, num_p3d, npdf3d, &
ncnvcld3d,ntqv, ntcw,ntiw, ntlnc, ntinc, ntrnc, ntsnc, ntccn, top_at_1,&
ntrw, ntsw, ntgl, nthl, ntwa, ntoz, &
ntrw, ntsw, ntgl, nthl, ntwa, ntoz, ntsmoke, ntdust, ntcoarsepm, &
ntclamt, nleffr, nieffr, nseffr, lndp_type, kdt, &
ntdu1, ntdu2, ntdu3, ntdu4, ntdu5, ntss1, ntss2, &
ntss3, ntss4, ntss5, ntsu, ntbcb, ntbcl, ntocb, ntocl, ntchm, &
Expand All @@ -41,11 +41,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below
plvl, plyr, tlvl, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4,&
gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, &
gasvmr_ccl4, gasvmr_cfc113, aerodp, clouds6, clouds7, clouds8, &
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, smoke_ext, dust_ext, &
spp_wts_rad, spp_rad, rrfs_smoke_band, ico2, errmsg, errflg)
aero_dir_fdb, spp_wts_rad, spp_rad, ico2, errmsg, errflg)

use machine, only: kind_phys

Expand Down Expand Up @@ -89,6 +88,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
ntcw, ntiw, ntlnc, ntinc, &
ntrnc, ntsnc,ntccn, &
ntrw, ntsw, ntgl, nthl, ntwa, ntoz, &
ntsmoke, ntdust, ntcoarsepm, &
ntclamt, nleffr, nieffr, nseffr, &
lndp_type, &
kdt, imp_physics, &
Expand All @@ -113,7 +113,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
idcor, &
idcor_hogan, &
idcor_oreopoulos, &
rrfs_smoke_band, & ! Band number for rrfs-smoke dust and smoke
ico2 ! Flag for co2 source used in radiation

integer, intent(in) :: ntdu1, ntdu2, ntdu3, ntdu4, ntdu5, ntss1, ntss2, ntss3, &
Expand All @@ -126,7 +125,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
lmfshal, lmfdeep2, pert_clds, lcrick,&
lcnorm, top_at_1, lextop, mraerosol
logical, intent(in) :: aero_dir_fdb
real(kind=kind_phys), dimension(:,:), intent(in) :: smoke_ext, dust_ext

logical, intent(in) :: nssl_ccn_on, nssl_invertccn
integer, intent(in) :: spp_rad
Expand Down Expand Up @@ -187,6 +185,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
gasvmr_ccl4,&
gasvmr_cfc113
real(kind=kind_phys), dimension(:,:), intent(out) :: aerodp
real(kind=kind_phys), dimension(:,:), intent(out) :: ext550
real(kind=kind_phys), dimension(:,:), intent(out) :: clouds6, &
clouds7, &
clouds8, &
Expand Down Expand Up @@ -637,13 +636,27 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
enddo
endif

!>--- add smoke and dust ---
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
enddo
enddo
endif


!> - Call module_radiation_aerosols::setaer() to setup aerosols
!! property profile for radiation.
call setaer (plvl, plyr, prslk1, tvly, rhly, slmsk, & ! --- inputs
tracer1, aer_nm, xlon, xlat, IM, LMK, LMP,&
lsswr, lslwr, iaermdl, iaerflg, top_at_1, con_pi, &
con_rd, con_g, faersw, faerlw, aerodp, errflg, errmsg) ! --- outputs
con_rd, con_g, faersw, faerlw, aerodp, ext550, errflg, errmsg) ! --- outputs

! CCPP
do j = 1,NBDSW
Expand All @@ -657,16 +670,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
enddo
enddo

!> - Add aerosol direct feedback effect by smoke and dust
if(aero_dir_fdb) then ! add smoke/dust extinctions
do k = 1, LMK
do i = 1, IM
! 550nm (~18000/cm)
faersw1(i,k,rrfs_smoke_band) = faersw1(i,k,rrfs_smoke_band) + MIN(4.,smoke_ext(i,k) + dust_ext(i,k))
enddo
enddo
endif

do j = 1,NBDLW
do k = 1, LMK
do i = 1, IM
Expand Down
52 changes: 29 additions & 23 deletions physics/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,27 @@
dimensions = ()
type = integer
intent = in
[ntsmoke]
standard_name = index_for_smoke_in_tracer_concentration_array
long_name = tracer index for smoke
units = index
dimensions = ()
type = integer
intent = in
[ntdust]
standard_name = index_for_dust_in_tracer_concentration_array
long_name = tracer index for dust
units = index
dimensions = ()
type = integer
intent = in
[ntcoarsepm]
standard_name = index_for_coarse_pm_in_tracer_concentration_array
long_name = tracer index for coarse pm
units = index
dimensions = ()
type = integer
intent = in
[iaermdl]
standard_name = control_for_aerosol_radiation_scheme
long_name = control of aerosol scheme in radiation
Expand Down Expand Up @@ -1264,6 +1285,14 @@
type = real
kind = kind_phys
intent = out
[ext550]
standard_name = atmosphere_optical_thickness_3d
long_name = 3d optical extinction for total aerosol species
units = none
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[clouds6]
standard_name = cloud_rain_water_path
long_name = cloud rain water path
Expand Down Expand Up @@ -1437,22 +1466,6 @@
dimensions = ()
type = logical
intent = in
[smoke_ext]
standard_name = extinction_coefficient_in_air_due_to_smoke
long_name = extinction coefficient in air due to smoke
units = various
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[dust_ext]
standard_name = extinction_coefficient_in_air_due_to_dust
long_name = extinction coefficient in air due to dust
units = various
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
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 All @@ -1468,13 +1481,6 @@
dimensions = ()
type = integer
intent = in
[rrfs_smoke_band]
standard_name = index_of_shortwave_band_affected_by_smoke
long_name = rrtmg band number that smoke and dust should affect
units = count
dimensions = ()
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
4 changes: 2 additions & 2 deletions physics/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module cu_gf_deep
real(kind=kind_phys), parameter :: pgcd = 0.1
!
!> aerosol awareness, do not use yet!
integer, parameter :: autoconv=2
integer, parameter :: aeroevap=3
integer, parameter :: autoconv=1 !2
integer, parameter :: aeroevap=1 !3
real(kind=kind_phys), parameter :: scav_factor = 0.5
!> still 16 ensembles for clousres
integer, parameter:: maxens3=16
Expand Down
Loading

0 comments on commit c9c973a

Please sign in to comment.