-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added coupling of GOCART aerosols with the RRTMG scheme and the Thompson scheme #910
Changes from 9 commits
f699e87
a02422c
90ea616
eff5874
8392cec
3f657c1
fcc7873
d70b205
a9a79d6
bad4fd8
2a14232
3dc1d5f
4d30259
1daf13c
af1e2c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ module GFS_phys_time_vary | |
!--- variables needed for calculating 'sncovr' | ||
use namelist_soilveg, only: salp_data, snupx | ||
use set_soilveg_mod, only: set_soilveg | ||
use physparam, only : iaermdl | ||
|
||
! --- needed for Noah MP init | ||
use noahmp_tables, only: laim_table,saim_table,sla_table, & | ||
|
@@ -67,7 +68,8 @@ module GFS_phys_time_vary | |
!>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm | ||
!! @{ | ||
subroutine GFS_phys_time_vary_init ( & | ||
me, master, ntoz, h2o_phys, iaerclm, iccn, iflip, im, nx, ny, idate, xlat_d, xlon_d, & | ||
me, master, ntoz, h2o_phys, iaerclm, iccn, iflip, im, levs, & | ||
nx, ny, idate, xlat_d, xlon_d, & | ||
jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, & | ||
jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & | ||
jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, & | ||
|
@@ -85,7 +87,7 @@ subroutine GFS_phys_time_vary_init ( | |
implicit none | ||
|
||
! Interface variables | ||
integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny | ||
integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs | ||
logical, intent(in) :: h2o_phys, iaerclm, lsm_cold_start | ||
integer, intent(in) :: idate(:) | ||
real(kind_phys), intent(in) :: fhour | ||
|
@@ -96,7 +98,7 @@ subroutine GFS_phys_time_vary_init ( | |
real(kind_phys), intent(in) :: ozpl(:,:,:), h2opl(:,:,:) | ||
integer, intent(inout) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:) | ||
real(kind_phys), intent(inout) :: ddy_aer(:), ddx_aer(:) | ||
real(kind_phys), intent(in) :: aer_nm(:,:,:) | ||
real(kind_phys), intent(out) :: aer_nm(:,:,:) | ||
integer, intent(inout) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) | ||
real(kind_phys), intent(inout) :: ddy_ci(:), ddx_ci(:) | ||
integer, intent(inout) :: imap(:), jmap(:) | ||
|
@@ -196,12 +198,12 @@ subroutine GFS_phys_time_vary_init ( | |
jamax=-999 | ||
|
||
!$OMP parallel num_threads(nthrds) default(none) & | ||
!$OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,idate) & | ||
!$OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,levs,idate) & | ||
!$OMP shared (xlat_d,xlon_d,imap,jmap,errmsg,errflg) & | ||
!$OMP shared (levozp,oz_coeff,oz_pres,ozpl) & | ||
!$OMP shared (levh2o,h2o_coeff,h2o_pres,h2opl) & | ||
!$OMP shared (iamin, iamax, jamin, jamax) & | ||
!$OMP shared (iaerclm,ntrcaer,aer_nm,iflip,iccn) & | ||
!$OMP shared (iaerclm,iaermdl,ntrcaer,aer_nm,iflip,iccn) & | ||
!$OMP shared (jindx1_o3,jindx2_o3,ddy_o3,jindx1_h,jindx2_h,ddy_h) & | ||
!$OMP shared (jindx1_aer,jindx2_aer,ddy_aer,iindx1_aer,iindx2_aer,ddx_aer) & | ||
!$OMP shared (jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci,ddx_ci) & | ||
|
@@ -253,28 +255,22 @@ subroutine GFS_phys_time_vary_init ( | |
end if | ||
|
||
!$OMP section | ||
!> - Call read_aerdata() to read aerosol climatology | ||
!> - Call read_aerdata() to read aerosol climatology, Anning added coupled | ||
!> added coupled gocart and radiation option to initializing aer_nm | ||
if (iaerclm) then | ||
! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 | ||
! and used to allocate aer_nm matches the value defined in aerclm_def | ||
if (size(aer_nm, dim=3).ne.ntrcaerm) then | ||
write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & | ||
"ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & | ||
ntrcaerm, " /= ", size(aer_nm, dim=3) | ||
errflg = 1 | ||
else | ||
! Update the value of ntrcaer in aerclm_def with the value defined | ||
! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. | ||
! If iaerclm is .true., then ntrcaer == ntrcaerm | ||
ntrcaer = size(aer_nm, dim=3) | ||
! Read aerosol climatology | ||
call read_aerdata (me,master,iflip,idate,errmsg,errflg) | ||
endif | ||
ntrcaer = ntrcaerm | ||
call read_aerdata (me,master,iflip,idate,errmsg,errflg) | ||
else if(iaermdl ==2 ) then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default iaermdl hardwired in physparam is 0, i.e.,seasonal global OPAC aerosol, climatology. Did you consider using iaermdl as a namelist control variable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like coupled gocart is not initialized since iaerclm=.false. and iaermdl =0 by current config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. iaermdl is controlled by namelist option iaer. |
||
do ix=1,ntrcaerm | ||
do j=1,levs | ||
do i=1,im | ||
aer_nm(i,j,ix) = 1.e-20_kind_phys | ||
end do | ||
end do | ||
end do | ||
ntrcaer = ntrcaerm | ||
else | ||
! Update the value of ntrcaer in aerclm_def with the value defined | ||
! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. | ||
! If iaerclm is .false., then ntrcaer == 1 | ||
ntrcaer = size(aer_nm, dim=3) | ||
ntrcaer = 1 | ||
endif | ||
|
||
!$OMP section | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,13 @@ | |
dimensions = () | ||
type = integer | ||
intent = in | ||
[levs] | ||
standard_name = vertical_layer_dimension | ||
long_name = number of vertical levels | ||
units = count | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[nx] | ||
standard_name = number_of_points_in_x_direction_for_this_MPI_rank | ||
long_name = number of points in x direction for this MPI rank | ||
|
@@ -215,13 +222,13 @@ | |
kind = kind_phys | ||
intent = inout | ||
[aer_nm] | ||
standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology | ||
long_name = GOCART aerosol climatology number concentration | ||
units = kg-1 | ||
standard_name = mass_mixing_ratio_of_aerosol_from_gocart_or_merra2 | ||
long_name = mass mixing ratio of aerosol from gocart or merra2 | ||
units = kg kg-1 | ||
dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) | ||
type = real | ||
kind = kind_phys | ||
intent = in | ||
intent = out | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder to change intent to inout if this variable is not unconditionally initialized in the subroutine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed it to out. |
||
[jindx1_ci] | ||
standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation | ||
long_name = interpolation low index for ice and cloud condensation nuclei in the y direction | ||
|
@@ -1211,9 +1218,9 @@ | |
kind = kind_phys | ||
intent = in | ||
[aer_nm] | ||
standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology | ||
long_name = GOCART aerosol climatology number concentration | ||
units = kg-1 | ||
standard_name = mass_mixing_ratio_of_aerosol_from_gocart_or_merra2 | ||
long_name = mass mixing ratio of aerosol from gocart or merra2 | ||
units = kg kg-1 | ||
dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) | ||
type = real | ||
kind = kind_phys | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |
ntqv, ntcw,ntiw, ntlnc, ntinc, ntrnc, ntsnc, ntccn, & | ||
ntrw, ntsw, ntgl, nthl, ntwa, ntoz, & | ||
ntclamt, nleffr, nieffr, nseffr, lndp_type, kdt, & | ||
ntdu1, ntdu2, ntdu3, ntdu4, ntdu5, ntss1, ntss2, & | ||
ntss3, ntss4, ntss5, ntsu, ntbcb, ntbcl, ntocb, ntocl, ntchm, & | ||
imp_physics,imp_physics_nssl, nssl_ccn_on, nssl_invertccn, & | ||
imp_physics_thompson, imp_physics_gfdl, imp_physics_zhao_carr, & | ||
imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, & | ||
|
@@ -78,7 +80,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |
make_IceNumber, & | ||
make_DropletNumber, & | ||
make_RainNumber | ||
|
||
use physparam, only : iaermdl | ||
implicit none | ||
|
||
integer, intent(in) :: im, levs, lm, lmk, lmp, n_var_lndp, & | ||
|
@@ -112,6 +114,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |
idcor_oreopoulos, & | ||
rrfs_smoke_band ! Band number for rrfs-smoke dust and smoke | ||
|
||
integer, intent(in) :: ntdu1, ntdu2, ntdu3, ntdu4, ntdu5, ntss1, ntss2, ntss3, & | ||
ntss4, ntss5, ntsu, ntbcb, ntbcl, ntocb, ntocl, ntchm | ||
|
||
character(len=3), dimension(:), intent(in) :: lndp_var_list | ||
|
||
logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & | ||
|
@@ -137,7 +142,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |
cnvw_in, cnvc_in, & | ||
sppt_wts | ||
|
||
real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm | ||
real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs | ||
real(kind=kind_phys), dimension(:,:,:), intent(inout) :: aer_nm | ||
|
||
real(kind=kind_phys), dimension(:), intent(inout) :: coszen, coszdg | ||
|
||
|
@@ -603,6 +609,29 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |
|
||
!check print *,' in grrad : calling setaer ' | ||
|
||
if (ntchm>0 .and. iaermdl==2) then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change needs to be added to RRTMGP. |
||
do k=1,levs | ||
do i=1,im | ||
aer_nm(i,k,1) = qgrs(i,k,ntdu1)*1.e-9_kind_phys | ||
aer_nm(i,k,2) = qgrs(i,k,ntdu2)*1.e-9_kind_phys | ||
aer_nm(i,k,3) = qgrs(i,k,ntdu3)*1.e-9_kind_phys | ||
aer_nm(i,k,4) = qgrs(i,k,ntdu4)*1.e-9_kind_phys | ||
aer_nm(i,k,5) = qgrs(i,k,ntdu5)*1.e-9_kind_phys | ||
aer_nm(i,k,6) = qgrs(i,k,ntss1)*1.e-9_kind_phys | ||
aer_nm(i,k,7) = qgrs(i,k,ntss2)*1.e-9_kind_phys | ||
aer_nm(i,k,8) = qgrs(i,k,ntss3)*1.e-9_kind_phys | ||
aer_nm(i,k,9) = qgrs(i,k,ntss4)*1.e-9_kind_phys | ||
aer_nm(i,k,10) = qgrs(i,k,ntss5)*1.e-9_kind_phys | ||
aer_nm(i,k,11) = qgrs(i,k,ntsu)*1.e-9_kind_phys | ||
aer_nm(i,k,12) = qgrs(i,k,ntbcb)*1.e-9_kind_phys | ||
aer_nm(i,k,13) = qgrs(i,k,ntbcl)*1.e-9_kind_phys | ||
aer_nm(i,k,14) = qgrs(i,k,ntocb)*1.e-9_kind_phys | ||
aer_nm(i,k,15) = qgrs(i,k,ntocl)*1.e-9_kind_phys | ||
enddo | ||
enddo | ||
endif | ||
|
||
|
||
call setaer (plvl, plyr, prslk1, tvly, rhly, slmsk, & ! --- inputs | ||
tracer1, aer_nm, xlon, xlat, IM, LMK, LMP,& | ||
lsswr,lslwr, & | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,6 +261,118 @@ | |
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntdu1] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
standard_name = index_for_dust_bin1 | ||
long_name = index for dust bin1 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntdu2] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the rest of these below |
||
standard_name = index_for_dust_bin2 | ||
long_name = index for dust bin2 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntdu3] | ||
standard_name = index_for_dust_bin3 | ||
long_name = index for dust bin3 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntdu4] | ||
standard_name = index_for_dust_bin4 | ||
long_name = index for dust bin4 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntdu5] | ||
standard_name = index_for_dust_bin5 | ||
long_name = index for dust bin5 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntss1] | ||
standard_name = index_for_seasalt_bin1 | ||
long_name = index for seasalt bin1 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntss2] | ||
standard_name = index_for_seasalt_bin2 | ||
long_name = index for seasalt bin2 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntss3] | ||
standard_name = index_for_seasalt_bin3 | ||
long_name = index for seasalt bin3 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntss4] | ||
standard_name = index_for_seasalt_bin4 | ||
long_name = index for seasalt bin4 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntss5] | ||
standard_name = index_for_seasalt_bin5 | ||
long_name = index for seasalt bin5 | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntsu] | ||
standard_name = index_for_sulfate | ||
long_name = index for sulfate | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntbcb] | ||
standard_name = index_for_bcphobic | ||
long_name = index for bcphobic | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntbcl] | ||
standard_name = index_for_bcphilic | ||
long_name = index for bcphilic | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntocb] | ||
standard_name = index_for_ocphobic | ||
long_name = index for ocphobic | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntocl] | ||
standard_name = index_for_ocphilic | ||
long_name = index for ocphilic | ||
units = index | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[ntchm] | ||
standard_name = number_of_chemical_tracers | ||
long_name = number of chemical tracers | ||
units = count | ||
dimensions = () | ||
type = integer | ||
intent = in | ||
[imp_physics] | ||
standard_name = control_for_microphysics_scheme | ||
long_name = choice of microphysics scheme | ||
|
@@ -713,13 +825,13 @@ | |
kind = kind_phys | ||
intent = in | ||
[aer_nm] | ||
standard_name = mass_number_concentration_of_aerosol_from_gocart_climatology | ||
long_name = GOCART aerosol climatology number concentration | ||
units = kg-1 | ||
standard_name = mass_mixing_ratio_of_aerosol_from_gocart_or_merra2 | ||
long_name = mass mixing ratio of aerosol from gocart or merra2 | ||
units = kg kg-1 | ||
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_aerosol_tracers_MG) | ||
type = real | ||
kind = kind_phys | ||
intent = in | ||
intent = inout | ||
[dx] | ||
standard_name = characteristic_grid_lengthscale | ||
long_name = relative dx for the grid cell | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is aer_nm initialized in this subroutine unconditionally? If not, the intent should be inout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChunxiZhang-NOAA Since this is on your fork, could you please change this intent to inout here and in the metadata if you agree with Anning and I?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed intent of aer_nm to out. Only initialized this variable with 1.e-20 conditionally in this subroutine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best practice is inout. For now, out seems work too.