11module GFS_typedefs
22
3+ use mpi_f08
34 use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec
45
56 use module_radsw_parameters, only: topfsw_type, sfcfsw_type
@@ -85,7 +86,7 @@ module GFS_typedefs
8586 type GFS_init_type
8687 integer :: me ! < my MPI-rank
8788 integer :: master ! < master MPI-rank
88- integer :: fcst_mpi_comm ! < forecast tasks mpi communicator
89+ type (MPI_Comm) :: fcst_mpi_comm ! < forecast tasks mpi communicator
8990 integer :: fcst_ntasks ! < total number of forecast tasks
9091 integer :: tile_num ! < tile number for this MPI rank
9192 integer :: isc ! < starting i-index for this MPI-domain
@@ -693,7 +694,7 @@ module GFS_typedefs
693694
694695 integer :: me ! < MPI rank designator
695696 integer :: master ! < MPI rank of master atmosphere processor
696- integer :: communicator ! < MPI communicator
697+ type (MPI_Comm) :: communicator ! < MPI communicator
697698 integer :: ntasks ! < MPI size in communicator
698699 integer :: nthreads ! < OpenMP threads available for physics
699700 integer :: nlunit ! < unit for namelist
@@ -1153,6 +1154,7 @@ module GFS_typedefs
11531154 logical :: lheatstrg ! < flag for canopy heat storage parameterization
11541155 logical :: lseaspray ! < flag for sea spray parameterization
11551156 logical :: cnvcld
1157+ logical :: xr_cnvcld ! < flag for adding suspended convective clouds to Xu-Randall cloud fraction
11561158 logical :: random_clds ! < flag controls whether clouds are random
11571159 logical :: shal_cnv ! < flag for calling shallow convection
11581160 logical :: do_deep ! < whether to do deep convection
@@ -2582,7 +2584,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
25822584 allocate (Sfcprop% iceprv (IM))
25832585 allocate (Sfcprop% snowprv (IM))
25842586 allocate (Sfcprop% graupelprv(IM))
2585-
25862587 Sfcprop% iceprv = clear_val
25872588 Sfcprop% snowprv = clear_val
25882589 Sfcprop% graupelprv = clear_val
@@ -3297,7 +3298,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
32973298 real (kind= kind_phys), dimension (:), intent (in ) :: bk
32983299 logical , intent (in ) :: restart
32993300 logical , intent (in ) :: hydrostatic
3300- integer , intent (in ) :: communicator
3301+ type (MPI_Comm), intent (in ) :: communicator
33013302 integer , intent (in ) :: ntasks
33023303 integer , intent (in ) :: nthreads
33033304
@@ -3307,9 +3308,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
33073308 integer :: seed0
33083309 logical :: exists
33093310 real (kind= kind_phys) :: tem
3310- real (kind= kind_phys) :: rinc(5 )
3311- real (kind= kind_sngl_prec) :: rinc4(5 )
3312- real (kind= kind_dbl_prec) :: rinc8(5 )
3311+ real (kind= kind_dbl_prec) :: rinc(5 )
33133312 real (kind= kind_phys) :: wrk(1 )
33143313 real (kind= kind_phys), parameter :: con_hr = 3600 .
33153314
@@ -3673,6 +3672,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
36733672 logical :: lheatstrg = .false. ! < flag for canopy heat storage parameterization
36743673 logical :: lseaspray = .false. ! < flag for sea spray parameterization
36753674 logical :: cnvcld = .false.
3675+ logical :: xr_cnvcld = .true. ! < flag for including suspended convective clouds in Xu-Randall cloud fraction
36763676 logical :: random_clds = .false. ! < flag controls whether clouds are random
36773677 logical :: shal_cnv = .false. ! < flag for calling shallow convection
36783678 integer :: imfshalcnv = 1 ! < flag for mass-flux shallow convection scheme
@@ -3979,7 +3979,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
39793979
39803980 real (kind= kind_phys) :: radar_tten_limits(2 ) = (/ limit_unspecified, limit_unspecified / )
39813981 integer :: itime
3982- integer :: w3kindreal,w3kindint
39833982
39843983!- -- END NAMELIST VARIABLES
39853984
@@ -4069,8 +4068,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
40694068 hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, &
40704069 betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,&
40714070 shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, &
4072- random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf , &
4073- do_deep, jcap, &
4071+ xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, &
4072+ isatmedmf, do_deep, jcap, &
40744073 cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, &
40754074 dlqf, rbcr, shoc_parm, psauras, prauras, wminras, &
40764075 do_sppt, do_shum, do_skeb, &
@@ -4949,6 +4948,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
49494948 Model% lheatstrg = lheatstrg
49504949 Model% lseaspray = lseaspray
49514950 Model% cnvcld = cnvcld
4951+ Model% xr_cnvcld = xr_cnvcld
49524952 Model% random_clds = random_clds
49534953 Model% shal_cnv = shal_cnv
49544954 Model% imfshalcnv = imfshalcnv
@@ -5664,19 +5664,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
56645664 Model% cdec = - 9999 .
56655665 Model% clstp = - 9999
56665666 rinc(1 :5 ) = 0
5667- call w3kind(w3kindreal,w3kindint)
5668- if (w3kindreal == 8 ) then
5669- rinc8(1 :5 ) = 0
5670- call w3difdat(jdat,idat,4 ,rinc8)
5671- rinc = rinc8
5672- else if (w3kindreal == 4 ) then
5673- rinc4(1 :5 ) = 0
5674- call w3difdat(jdat,idat,4 ,rinc4)
5675- rinc = rinc4
5676- else
5677- write (0 ,* )' FATAL ERROR: Invalid w3kindreal'
5678- call abort
5679- endif
5667+ call w3difdat(jdat,idat,4 ,rinc)
56805668 Model% phour = rinc(4 )/ con_hr
56815669 Model% fhour = (rinc(4 ) + Model% dtp)/ con_hr
56825670 Model% zhour = mod (Model% phour,Model% fhzero)
@@ -6251,7 +6239,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
62516239 ' do_shoc=' , Model% do_shoc, ' nshoc3d=' , Model% nshoc_3d, &
62526240 ' nshoc_2d=' , Model% nshoc_2d, ' shoc_cld=' , Model% shoc_cld, &
62536241 ' nkbfshoc=' , Model% nkbfshoc, ' nahdshoc=' , Model% nahdshoc, &
6254- ' nscfshoc=' , Model% nscfshoc, &
6242+ ' nscfshoc=' , Model% nscfshoc, ' xr_cnvcld= ' ,Model % xr_cnvcld, &
62556243 ' uni_cld=' , Model% uni_cld, &
62566244 ' ntot3d=' , Model% ntot3d, ' ntot2d=' , Model% ntot2d, &
62576245 ' shocaftcnv=' ,Model% shocaftcnv,' indcld=' , Model% indcld, &
@@ -6474,7 +6462,7 @@ subroutine control_print(Model)
64746462 print * , ' basic control parameters'
64756463 print * , ' me : ' , Model% me
64766464 print * , ' master : ' , Model% master
6477- print * , ' communicator : ' , Model% communicator
6465+ print * , ' communicator : ' , Model% communicator% mpi_val
64786466 print * , ' nlunit : ' , Model% nlunit
64796467 print * , ' fn_nml : ' , trim (Model% fn_nml)
64806468 print * , ' fhzero : ' , Model% fhzero
@@ -7192,7 +7180,6 @@ subroutine tbd_create (Tbd, IM, Model)
71927180 allocate (Tbd% h2opl (IM,levh2o,h2o_coeff))
71937181 Tbd% h2opl = clear_val
71947182 Tbd% ozpl = clear_val
7195-
71967183
71977184!- -- ccn and in needs
71987185 ! DH* allocate only for MG? *DH
0 commit comments