Skip to content
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

Radiation Improvements for prototype 8 #871

Merged
merged 41 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
68f97b1
Potential bug fix for RRTMGP GP flux coupling.
dustinswales Jan 24, 2022
0ea0fd0
Code update for radiation_clouds.f and GFS_rrtmg_pre.F90 GFS_cloud_di…
Qingfu-Liu Feb 14, 2022
242dcc9
updated the radiation code based on review's suggestions
Qingfu-Liu Feb 22, 2022
c6faeb1
updated radiation_cloud_overlap.F90 based on Mike's comment
Qingfu-Liu Feb 22, 2022
6e6acb9
Initial commit
dustinswales Feb 25, 2022
f46396f
Add explict treatment of convective cloud to RRTMGP.
dustinswales Feb 25, 2022
dcbad0a
Some cleanup and bug fixes from previous commit. working now with Tho…
dustinswales Feb 25, 2022
7fee2d6
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into gpsw…
dustinswales Feb 28, 2022
45f3e83
Merge branch 'feature/codeupdate2' of https://github.com/Qingfu-Liu/c…
dustinswales Mar 2, 2022
5830a82
RRTMGP coupling to Thompson MP (Sundqvist 1989)
dustinswales Mar 3, 2022
bcbea32
Housekeeping
dustinswales Mar 3, 2022
dec5bbd
Initial implementation of explicit coupling of convective (GF/SAMF) a…
dustinswales Mar 4, 2022
63fb052
Added new cloud-optics for MYNN-EDMF clouds
dustinswales Mar 4, 2022
fb7003b
Added MYNN-EDMF optical properties to RRTMGP RTE
dustinswales Mar 5, 2022
6327749
Removed RRTMG cloud-optics option in RRTMGP.
dustinswales Mar 7, 2022
4a4d159
Bug fix
dustinswales Mar 7, 2022
be960f0
Added switches for sgs clouds in GP.
dustinswales Mar 8, 2022
ac173e2
Replaced cld_mynn_ naming convention with cld_pbl_
dustinswales Mar 9, 2022
475b1be
Fixed inconsistency between G/GP in Thompson MP.
dustinswales Mar 9, 2022
182b2c6
Housekeeping, combine loops.
dustinswales Mar 9, 2022
646c65b
Some more cleanup of cloud-fraction...
dustinswales Mar 9, 2022
3206fa9
Changes from code review.
dustinswales Mar 10, 2022
ba5b1f8
Bug from previous commit
dustinswales Mar 10, 2022
71ab24d
resolve the code conflicts
Qingfu-Liu Mar 11, 2022
8e21c40
Merge branch 'feature/codeupdate2' of https://github.com/Qingfu-Liu/c…
dustinswales Mar 11, 2022
d89d738
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into enha…
dustinswales Mar 11, 2022
d3ff8f6
SPP bugfix from Jeff Beck
grantfirl Mar 11, 2022
defde63
Merge pull request #17 from grantfirl/enhanced_GP2cld_coupling_tight_gjf
dustinswales Mar 11, 2022
a6e960d
Revert change from previous commits (sampling of different cloud types).
dustinswales Mar 15, 2022
f2d46db
Changed arguments to implied shape.
dustinswales Mar 21, 2022
152048e
Merge branch 'gpswflx_issue' into enhanced_GP2cld_coupling_tight
dustinswales Mar 21, 2022
ec19fbe
Pulled in SW coupling fix for RRTMGP. Share SW_rad_pre between RRTMG …
dustinswales Mar 21, 2022
acc802a
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into enha…
dustinswales Mar 22, 2022
8e6580e
Syntax error
dustinswales Mar 22, 2022
4d9e2b3
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into enha…
dustinswales Apr 4, 2022
2617af6
Cleanup suggestions from PR.
dustinswales Apr 4, 2022
0148905
Revert "Cleanup suggestions from PR."
dustinswales Apr 5, 2022
2cf6a38
Cleanup
dustinswales Apr 5, 2022
4407989
Added bounding to temperature at layer-interface used by RRTMGP.
dustinswales Apr 6, 2022
d0a2dd8
Reorder loop
dustinswales Apr 6, 2022
77aa061
Combined gp sw and lw aerosol routines. Modest speedup (~4%)
dustinswales Apr 6, 2022
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
135 changes: 37 additions & 98 deletions physics/GFS_cloud_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,51 @@ end subroutine GFS_cloud_diagnostics_init
!! \section arg_table_GFS_cloud_diagnostics_run
!! \htmlinclude GFS_cloud_diagnostics_run.html
!!
subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_lay, &
subroutine GFS_cloud_diagnostics_run(nCol, nLev, iovr_rand, iovr_maxrand, iovr_max, &
iovr_dcorr, iovr_exp, iovr_exprand, lsswr, lslwr, lat, de_lgth, p_lay, &
cld_frac, p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, con_pi, &
mtopa, mbota, cldsa, errmsg, errflg)
implicit none

! Inputs
integer, intent(in) :: &
nCol, & ! Number of horizontal grid-points
nLev ! Number of vertical-layers
integer, intent(in) :: &
nCol, & ! Number of horizontal grid-points
nLev ! Number of vertical-layers
integer, intent(in) :: &
iovr_rand, & ! Flag for random cloud overlap method
iovr_maxrand, & ! Flag for maximum-random cloud overlap method
iovr_max, & ! Flag for maximum cloud overlap method
iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method
iovr_exp, & ! Flag for exponential cloud overlap method
iovr_exprand ! Flag for exponential-random cloud overlap method
logical, intent(in) :: &
lsswr, & ! Call SW radiation?
lslwr ! Call LW radiation
real(kind_phys), intent(in) :: &
con_pi ! Physical constant: pi
real(kind_phys), dimension(:), intent(in) :: &
lat, & ! Latitude
de_lgth ! Decorrelation length
lsswr, & ! Call SW radiation?
lslwr ! Call LW radiation
real(kind_phys), intent(in) :: &
con_pi ! Physical constant: pi
real(kind_phys), dimension(:), intent(in) :: &
lat, & ! Latitude
de_lgth ! Decorrelation length
real(kind_phys), dimension(:,:), intent(in) :: &
p_lay, & ! Pressure at model-layer
cld_frac ! Total cloud fraction
p_lay, & ! Pressure at model-layer
cld_frac ! Total cloud fraction
real(kind_phys), dimension(:,:), intent(in) :: &
p_lev ! Pressure at model interfaces
p_lev ! Pressure at model interfaces
real(kind_phys), dimension(:,:), intent(in) :: &
deltaZ, & ! Layer thickness (km)
cloud_overlap_param, & ! Cloud-overlap parameter
precip_overlap_param ! Precipitation overlap parameter
deltaZ, & ! Layer thickness (km)
dustinswales marked this conversation as resolved.
Show resolved Hide resolved
cloud_overlap_param, & ! Cloud-overlap parameter
precip_overlap_param ! Precipitation overlap parameter

! Outputs
character(len=*), intent(out) :: &
errmsg ! Error message
integer, intent(out) :: &
errflg ! Error flag
integer,dimension(:,:),intent(out) :: &
mbota, & ! Vertical indices for cloud tops
mtopa ! Vertical indices for cloud bases
real(kind_phys), dimension(:,:), intent(out) :: &
cldsa ! Fraction of clouds for low, middle, high, total and BL
character(len=*), intent(out) :: &
errmsg ! Error message
integer, intent(out) :: &
errflg ! Error flag
integer,dimension(:,:),intent(out) :: &
mbota, & ! Vertical indices for cloud tops
mtopa ! Vertical indices for cloud bases
real(kind_phys),dimension(:,:), intent(out) :: &
cldsa ! Fraction of clouds for low, middle, high, total and BL

! Local variables
integer i,id,iCol,iLay,icld
Expand Down Expand Up @@ -106,7 +114,8 @@ subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_l
! defined by ptopc. The cloud overlapping method is defined by control flag 'iovr', which may
! be different for lw and sw radiation programs.
call gethml(p_lay/100., ptop1, cld_frac, cldcnv, deltaZ, de_lgth, cloud_overlap_param,&
dustinswales marked this conversation as resolved.
Show resolved Hide resolved
nCol, nLev, cldsa, mtopa, mbota)
nCol, nLev, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, &
iovr_exprand, cldsa, mtopa, mbota)

end subroutine GFS_cloud_diagnostics_run

Expand All @@ -116,76 +125,6 @@ subroutine GFS_cloud_diagnostics_finalize()
end subroutine GFS_cloud_diagnostics_finalize

! ######################################################################################
! Initialization routine for High/Mid/Low cloud diagnostics.
! Subroutine hml_cloud_diagnostics_initialize is removed (refer to GFS_rrtmgp_setup.F90)
! ######################################################################################
subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, &
imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, &
imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, nLev, &
mpi_rank, sigmainit, errflg)
implicit none
! Inputs
integer, intent(in) :: &
imp_physics, & ! Flag for MP scheme
imp_physics_fer_hires, & ! Flag for fer-hires scheme
imp_physics_gfdl, & ! Flag for gfdl scheme
imp_physics_thompson, & ! Flag for thompsonscheme
imp_physics_wsm6, & ! Flag for wsm6 scheme
imp_physics_zhao_carr, & ! Flag for zhao-carr scheme
imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme
imp_physics_mg ! Flag for MG scheme
integer, intent(in) :: &
nLev, & ! Number of vertical-layers
mpi_rank
real(kind_phys), dimension(:), intent(in) :: &
sigmainit
! Outputs
integer, intent(out) :: &
errflg

! Local variables
integer :: iLay, kl

! Initialize error flag
errflg = 0

if (mpi_rank == 0) print *, VTAGCLD !print out version tag

if ( icldflg == 0 ) then
print *,' - Diagnostic Cloud Method has been discontinued'
errflg = 1
else
if (mpi_rank == 0) then
print *,' - Using Prognostic Cloud Method'
if (imp_physics == imp_physics_zhao_carr) then
print *,' --- Zhao/Carr/Sundqvist microphysics'
elseif (imp_physics == imp_physics_zhao_carr_pdf) then
print *,' --- zhao/carr/sundqvist + pdf cloud'
elseif (imp_physics == imp_physics_gfdl) then
print *,' --- GFDL Lin cloud microphysics'
elseif (imp_physics == imp_physics_thompson) then
print *,' --- Thompson cloud microphysics'
elseif (imp_physics == imp_physics_wsm6) then
print *,' --- WSM6 cloud microphysics'
elseif (imp_physics == imp_physics_mg) then
print *,' --- MG cloud microphysics'
elseif (imp_physics == imp_physics_fer_hires) then
print *,' --- Ferrier-Aligo cloud microphysics'
else
print *,' !!! ERROR in cloud microphysc specification!!!', &
' imp_physics (NP3D) =',imp_physics
errflg = 1
endif
endif
endif

! Compute the top of BL cld (llyr), which is the topmost non cld(low) layer for
! stratiform (at or above lowest 0.1 of the atmosphere).
lab_do_k0 : do iLay = nLev, 2, -1
kl = iLay
if (sigmainit(iLay) < 0.9e0) exit lab_do_k0
enddo lab_do_k0
llyr = kl

return
end subroutine hml_cloud_diagnostics_initialize
end module GFS_cloud_diagnostics
42 changes: 42 additions & 0 deletions physics/GFS_cloud_diagnostics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,48 @@
dimensions = ()
type = integer
intent = in
[iovr_rand]
standard_name = flag_for_random_cloud_overlap_method
long_name = choice of random cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[iovr_maxrand]
standard_name = flag_for_maximum_random_cloud_overlap_method
long_name = choice of maximum-random cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[iovr_max]
standard_name = flag_for_maximum_cloud_overlap_method
long_name = choice of maximum cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[iovr_dcorr]
standard_name = flag_for_decorrelation_length_cloud_overlap_method
long_name = choice of decorrelation-length cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[iovr_exp]
standard_name = flag_for_exponential_cloud_overlap_method
long_name = choice of exponential cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[iovr_exprand]
standard_name = flag_for_exponential_random_cloud_overlap_method
long_name = choice of exponential-random cloud overlap method
units = flag
dimensions = ()
type = integer
intent = in
[lsswr]
standard_name = flag_for_calling_shortwave_radiation
long_name = logical flags for sw radiation calls
Expand Down
Loading