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

DO NOT MERGE: Add radiatively active convective cloud to RRTMG Radiation #203

31 changes: 23 additions & 8 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module GFS_rrtmg_pre
!>\section rrtmg_pre_gen General Algorithm
subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
ltp, imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, me, ncnd, ntrac, &
num_p3d, npdf3d, xr_cnvcld, &
num_p3d, npdf3d, xr_cnvcld, do_phasepart, &
ncnvcld3d,ntqv, ntcw,ntiw, ntlnc, ntinc, ntrnc, ntsnc, ntccn, top_at_1,&
ntrw, ntsw, ntgl, nthl, ntwa, ntoz, ntsmoke, ntdust, ntcoarsepm, &
ntclamt, nleffr, nieffr, nseffr, lndp_type, kdt, &
Expand All @@ -35,7 +35,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
lmfshal, lcnorm, lmfdeep2, lcrick, 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, sppt_wts, sppt_amp, cnvw_in, cnvc_in, qgrs, aer_nm, dx, &
pert_clds, sppt_wts, sppt_amp, cnvw_in, cnvc_inout, qgrs, aer_nm, dx, &
icloud, iaermdl, iaerflg, con_pi, con_g, con_ttp, con_thgni, si, & !inputs from here and above
coszen, coszdg, effrl_inout, effri_inout, effrs_inout, &
clouds1, clouds2, clouds3, clouds4, clouds5, qci_conv, & !in/out from here and above
Expand All @@ -45,7 +45,8 @@ 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, rrfs_sd, &
aero_dir_fdb, fdb_coef, spp_wts_rad, spp_rad, ico2, ozphys, &
aero_dir_fdb, fdb_coef, spp_wts_rad, spp_rad, ico2, ozphys, &
cld_cnv_lwp, cld_cnv_reliq, cld_cnv_iwp, cld_cnv_reice, &
errmsg, errflg)

use machine, only: kind_phys
Expand All @@ -64,7 +65,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
& adjust_cloudIce, &
& adjust_cloudH2O, &
& adjust_cloudFinal

use module_radiation_cloud_optics, only: cloud_mp_SAMF

use module_radsw_parameters, only: topfsw_type, sfcfsw_type, &
& profsw_type, NBDSW
use module_radlw_parameters, only: topflw_type, sfcflw_type, &
Expand All @@ -83,6 +85,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
make_RainNumber
! For NRL Ozone
use module_ozphys, only: ty_ozphys

implicit none

integer, intent(in) :: im, levs, lm, lmk, lmp, ltp, &
Expand Down Expand Up @@ -129,7 +132,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
uni_cld, effr_in, do_mynnedmf, &
lmfshal, lmfdeep2, pert_clds, lcrick,&
lcnorm, top_at_1, lextop, mraerosol
logical, intent(in) :: rrfs_sd, aero_dir_fdb, xr_cnvcld
logical, intent(in) :: rrfs_sd, aero_dir_fdb, xr_cnvcld, do_phasepart

logical, intent(in) :: nssl_ccn_on, nssl_invertccn
integer, intent(in) :: spp_rad
Expand All @@ -145,9 +148,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, &
tgrs, sfc_wts, &
mg_cld, effrr_in, &
cnvw_in, cnvc_in, &
cnvw_in, &
sppt_wts

real(kind=kind_phys), dimension(:,:), intent(inout) :: cnvc_inout

real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs
real(kind=kind_phys), dimension(:,:,:), intent(inout) :: aer_nm

Expand Down Expand Up @@ -197,6 +201,11 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
clouds8, &
clouds9, &
cldfra
real(kind=kind_phys), dimension(:,:), intent(out) :: &
cld_cnv_lwp, &
cld_cnv_reliq, &
cld_cnv_iwp, &
cld_cnv_reice
real(kind=kind_phys), dimension(:), intent(out) :: cldfra2d
real(kind=kind_phys), dimension(:,:), intent(out) :: cldsa

Expand Down Expand Up @@ -941,7 +950,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
! but it looks like the Zhao-Carr-PDF scheme is not in the CCPP
deltaq(i,k1) = 0.0!Tbd%phy_f3d(i,k,5) !GJF: this variable is not in phy_f3d anymore
cnvw (i,k1) = cnvw_in(i,k)
cnvc (i,k1) = cnvc_in(i,k)
cnvc (i,k1) = cnvc_inout(i,k)
enddo
enddo
elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! all other microphysics with pdfcld = .false. and cnvcld = .true.
Expand Down Expand Up @@ -995,6 +1004,12 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&

! endif ! end_if_ntcw

!> - Call cloud_mp_SAMF() to calculate convective cloud properties.
call cloud_mp_SAMF(.false., .true., IM, LM, tlyr, plvl, plyr, &
qstl, rhly, cnvw_in, con_ttp, con_g, 200., xland, &
do_phasepart, cld_cnv_lwp, cld_cnv_reliq, cld_cnv_iwp, &
cld_cnv_reice, cnvc_inout)

!> - Call ppfbet() to perturb cld cover.
if (pert_clds) then
do i=1,im
Expand Down
45 changes: 42 additions & 3 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
relative_path = ../../
dependencies = tools/funcphys.f90,hooks/machine.F
dependencies = MP/Thompson/module_mp_thompson.F90,MP/Thompson/module_mp_thompson_make_number_concentrations.F90
dependencies = Radiation/RRTMG/radcons.f90,Radiation/radiation_aerosols.f
dependencies = Radiation/RRTMG/radcons.f90,Radiation/radiation_aerosols.f,Radiation/radiation_cloud_optics.F90
dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_clouds.f,Radiation/radiation_gases.f
dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f,Radiation/radiation_cloud_overlap.F90
dependencies = SFC_Models/Land/Noah/surface_perturbation.F90
Expand Down Expand Up @@ -63,6 +63,13 @@
dimensions = ()
type = logical
intent = in
[do_phasepart]
standard_name = flag_for_phase_partitioning_in_radiatively_active_convective_cloud
long_name = flag for partitioning the convective condensate into liquid and ice phase using temperature
units = flag
dimensions = ()
type = logical
intent = in
[ltp]
standard_name = extra_top_layer
long_name = extra top layer for radiation
Expand Down Expand Up @@ -957,14 +964,14 @@
type = real
kind = kind_phys
intent = in
[cnvc_in]
[cnvc_inout]
standard_name = convective_cloud_area_fraction
long_name = convective cloud cover in the phy_f3d array
units = frac
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
intent = inout
[qgrs]
standard_name = tracer_concentration
long_name = model layer mean tracer concentration
Expand Down Expand Up @@ -1351,6 +1358,38 @@
type = real
kind = kind_phys
intent = out
[cld_cnv_lwp]
standard_name = convective_cloud_liquid_water_path
long_name = layer convective cloud liquid water path
units = g m-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[cld_cnv_iwp]
standard_name = convective_cloud_ice_water_path
long_name = layer convective cloud ice water path
units = g m-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[cld_cnv_reliq]
standard_name = mean_effective_radius_for_liquid_convective_cloud
long_name = mean effective radius for liquid convective cloud
units = um
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[cld_cnv_reice]
standard_name = mean_effective_radius_for_ice_convective_cloud
long_name = mean effective radius for ice convective cloud
units = um
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
[cldsa]
standard_name = cloud_area_fraction_for_radiation
long_name = fraction of clouds for low, middle,high, total and BL
Expand Down
77 changes: 7 additions & 70 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module GFS_rrtmgp_cloud_mp
use machine, only: kind_phys
use radiation_tools, only: check_error_msg
use module_radiation_clouds, only: progcld_thompson
use module_radiation_cloud_overlap, only: cloud_mp_SAMF
use rrtmgp_lw_cloud_optics, only: &
radliq_lwr => radliq_lwrLW, radliq_upr => radliq_uprLW,&
radice_lwr => radice_lwrLW, radice_upr => radice_uprLW
Expand All @@ -20,15 +21,16 @@ module GFS_rrtmgp_cloud_mp
real (kind_phys), parameter :: &
cld_limit_lower = 0.001, &
cld_limit_ovcst = 1.0 - 1.0e-8, &
reliq_def = 10.0 , & ! Default liq radius to 10 micron (used when effr_in=F)
reice_def = 50.0, & ! Default ice radius to 50 micron (used when effr_in=F)
reliq_def = 10.0 , & ! Default liq radius, in stratiform cloud, to 10 micron (used when effr_in=F)
reice_def = 50.0, & ! Default ice radius, in stratiform cloud, to 50 micron (used when effr_in=F)
reliqcnv_def = 10.0 , & ! Default liq radius, in convective cloud, to 10 micron (used when effr_in=F)
reicecnv_def = 50.0, & ! Default ice radius, in convective cloud, to 50 micron (used when effr_in=F)
rerain_def = 1000.0, & ! Default rain radius to 1000 micron (used when effr_in=F)
resnow_def = 250.0, & ! Default snow radius to 250 micron (used when effr_in=F)
reice_min = 10.0, & ! Minimum ice size allowed by GFDL MP scheme
reice_max = 150.0 ! Maximum ice size allowed by GFDL MP scheme

public GFS_rrtmgp_cloud_mp_init, GFS_rrtmgp_cloud_mp_run, GFS_rrtmgp_cloud_mp_finalize

contains

!>\defgroup gfs_rrtmgp_cloud_mp_mod GFS RRTMGP Cloud MP Module
Expand Down Expand Up @@ -250,8 +252,8 @@ subroutine GFS_rrtmgp_cloud_mp_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldic
! SAMF scale & aerosol-aware mass-flux convective clouds?
if (imfdeepcnv == imfdeepcnv_samf) then
alpha0 = 200.
call cloud_mp_SAMF(nCol, nLev, t_lay, p_lev, p_lay, qs_lay, relhum, &
cnv_mixratio, con_ttp, con_g, alpha0, &
call cloud_mp_SAMF(.false., .false., nCol, nLev, t_lay, p_lev, p_lay, qs_lay, &
relhum, cnv_mixratio, con_ttp, con_g, alpha0, lsmask, .true., &
cld_cnv_lwp, cld_cnv_reliq, cld_cnv_iwp, cld_cnv_reice, cld_cnv_frac)
endif

Expand Down Expand Up @@ -462,71 +464,6 @@ subroutine cloud_mp_MYNN(nCol, nLev, lsmask, t_lay, p_lev, p_lay, qs_lay, relhum
enddo
end subroutine cloud_mp_MYNN


!> \ingroup GFS_rrtmgp_cloud_mp
!! Compute cloud radiative properties for SAMF convective cloud scheme.
!!
!! - The total-cloud convective mixing-ratio is partitioned by phase into liquid/ice
!! cloud properties. LWP and IWP are computed.
!!
!! - The liquid and ice cloud effective particle sizes are assigned reference values.
!!
!! - The convective cloud-fraction is computed using Xu-Randall (1996).
!! (DJS asks: Does the SAMF scheme produce a cloud-fraction?)
!!
!! \section cloud_mp_SAMF_gen General Algorithm
subroutine cloud_mp_SAMF(nCol, nLev, t_lay, p_lev, p_lay, qs_lay, relhum, &
cnv_mixratio, con_ttp, con_g, alpha0, cld_cnv_lwp, cld_cnv_reliq, cld_cnv_iwp, &
cld_cnv_reice, cld_cnv_frac)
implicit none

! Inputs
integer, intent(in) :: &
nCol, & ! Number of horizontal grid points
nLev ! Number of vertical layers
real(kind_phys), intent(in) :: &
con_g, & ! Physical constant: gravity (m s-2)
con_ttp, & ! Triple point temperature of water (K)
alpha0 !
real(kind_phys), dimension(:,:),intent(in) :: &
t_lay, & ! Temperature at layer-centers (K)
p_lev, & ! Pressure at layer-interfaces (Pa)
p_lay, & ! Presure at layer-centers (Pa)
qs_lay, & ! Specific-humidity at layer-centers (kg/kg)
relhum, & ! Relative-humidity (1)
cnv_mixratio ! Convective cloud mixing-ratio (kg/kg)
! Outputs
real(kind_phys), dimension(:,:),intent(inout) :: &
cld_cnv_lwp, & ! Convective cloud liquid water path
cld_cnv_reliq, & ! Convective cloud liquid effective radius
cld_cnv_iwp, & ! Convective cloud ice water path
cld_cnv_reice, & ! Convective cloud ice effecive radius
cld_cnv_frac ! Convective cloud-fraction
! Local
integer :: iCol, iLay
real(kind_phys) :: tem0, tem1, deltaP, clwc

tem0 = 1.0e5/con_g
do iLay = 1, nLev
do iCol = 1, nCol
if (cnv_mixratio(iCol,iLay) > 0._kind_phys) then
tem1 = min(1.0, max(0.0, (con_ttp-t_lay(iCol,iLay))*0.05))
deltaP = abs(p_lev(iCol,iLay+1)-p_lev(iCol,iLay))*0.01
clwc = max(0.0, cnv_mixratio(iCol,iLay)) * tem0 * deltaP
cld_cnv_iwp(iCol,iLay) = clwc * tem1
cld_cnv_lwp(iCol,iLay) = clwc - cld_cnv_iwp(iCol,iLay)
cld_cnv_reliq(iCol,iLay) = reliq_def
cld_cnv_reice(iCol,iLay) = reice_def

! Xu-Randall (1996) cloud-fraction.
cld_cnv_frac(iCol,iLay) = cld_frac_XuRandall(p_lay(iCol,iLay), &
qs_lay(iCol,iLay), relhum(iCol,iLay), cnv_mixratio(iCol,iLay), alpha0)
endif
enddo
enddo

end subroutine cloud_mp_SAMF

!> \ingroup GFS_rrtmgp_cloud_mp
!! This routine computes the cloud radiative properties for a "unified cloud".
!! - "unified cloud" implies that the cloud-fraction is PROVIDED.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
relative_path = ../../
dependencies = hooks/machine.F
dependencies = Radiation/radiation_tools.F90,Radiation/radiation_clouds.f,Radiation/RRTMGP/rrtmgp_lw_cloud_optics.F90
dependencies = Radiation/radiation_cloud_optics.F90
dependencies = MP/Thompson/module_mp_thompson_make_number_concentrations.F90,MP/Thompson/module_mp_thompson.F90

########################################################################
Expand Down
Loading
Loading