23 subroutine gfs_rrtmgp_cloud_overlap_run(nCol, nLev, yearlen, doSWrad, doLWrad, &
24 julian, lat, deltaZc, con_pi, con_g, con_rd, con_epsq, &
25 dcorr_con, idcor, iovr, iovr_dcorr, iovr_exp, iovr_exprand, idcor_con, &
26 idcor_hogan, idcor_oreopoulos, cld_frac, cld_cnv_frac, iovr_convcld, top_at_1, &
27 imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_samf, de_lgth, cloud_overlap_param, &
28 cnv_cloud_overlap_param, precip_overlap_param, errmsg, errflg)
32 integer,
intent(in) :: &
33 ncol, & !< Number of horizontal grid points
34 nlev, & !< Number of vertical layers
35 yearlen, & !< Length of current year (365/366) WTF?
39 iovr, & !< Choice of cloud-overlap method
40 iovr_convcld, & !< Choice of convective cloud-overlap method
41 iovr_dcorr, & !< Flag for decorrelation-length cloud overlap method
42 iovr_exp, & !< Flag for exponential cloud overlap method
43 iovr_exprand, & !< Flag for exponential-random cloud overlap method
44 idcor, & !< Choice of method for decorrelation length computation
45 idcor_con, & !< Flag for decorrelation-length. Use constant value
46 idcor_hogan, & !< Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647)
48 logical,
intent(in) :: &
49 top_at_1, & !< Vertical ordering flag
50 doswrad, & !< Call SW radiation?
52 real(kind_phys),
intent(in) :: &
53 julian, & !< Julian day
54 con_pi, & !< Physical constant: pi
55 con_g, & !< Physical constant: gravitational constant
56 con_rd, & !< Physical constant: gas-constant for dry air
57 con_epsq, & !< Physical constant: Minimum value for specific humidity
59 real(kind_phys),
dimension(:),
intent(in) :: &
61 real(kind_phys),
dimension(:,:),
intent(in) :: &
63 real(kind_phys),
dimension(:,:),
intent(in),
optional :: &
65 real(kind_phys),
dimension(:,:),
intent(in),
optional :: &
69 real(kind_phys),
dimension(:),
intent(out) :: &
71 real(kind_phys),
dimension(:,:),
intent(out),
optional :: &
72 cloud_overlap_param, & !< Cloud-overlap parameter
73 cnv_cloud_overlap_param,& !< Convective cloud-overlap parameter
75 character(len=*),
intent(out) :: &
77 integer,
intent(out) :: &
87 if (.not. (doswrad .or. dolwrad))
return
93 if (idcor == idcor_hogan)
then
96 if (idcor == idcor_oreopoulos)
then
97 call cmp_dcorr_lgth(ncol, lat*(180._kind_phys/con_pi), julian, yearlen, de_lgth)
99 if (idcor == idcor_con)
then
100 de_lgth(:) = dcorr_con
106 if (iovr == iovr_dcorr .or. iovr == iovr_exp .or. iovr == iovr_exprand)
then
107 call get_alpha_exper(ncol, nlev, iovr, iovr_exprand, deltazc*0.001, de_lgth, cld_frac, cloud_overlap_param)
109 cloud_overlap_param(:,:) = 0.
115 if (imfdeepcnv == imfdeepcnv_samf .or. imfdeepcnv == imfdeepcnv_gf)
then
116 if (iovr_convcld == iovr_dcorr .or. iovr_convcld == iovr_exp .or. iovr_convcld == iovr_exprand)
then
117 call get_alpha_exper(ncol, nlev, iovr_convcld, iovr_exprand, deltazc*0.001, de_lgth, cld_cnv_frac, cnv_cloud_overlap_param)
119 cnv_cloud_overlap_param(:,:) = 0.
126 precip_overlap_param = cloud_overlap_param