Skip to content
7 changes: 6 additions & 1 deletion ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: spp_wts_mp (:,:) => null() ! spp-mp-perts
real (kind=kind_phys), pointer :: spp_wts_gwd (:,:) => null() ! spp-gwd-perts
real (kind=kind_phys), pointer :: spp_wts_rad (:,:) => null() ! spp-rad-perts
real (kind=kind_phys), pointer :: spp_wts_cu_deep (:,:) => null() ! spp-cu-deep-perts

!--- aerosol surface emissions for Thompson microphysics
real (kind=kind_phys), pointer :: nwfa2d (:) => null() !< instantaneous water-friendly sfc aerosol source
Expand Down Expand Up @@ -1370,8 +1371,9 @@ module GFS_typedefs
integer :: spp_mp
integer :: spp_rad
integer :: spp_gwd
integer :: spp_cu_deep
integer :: n_var_spp
character(len=3) , pointer :: spp_var_list(:)
character(len=10) , pointer :: spp_var_list(:)
real(kind=kind_phys), pointer :: spp_prt_list(:)
real(kind=kind_phys), pointer :: spp_stddev_cutoff(:)

Expand Down Expand Up @@ -3121,6 +3123,8 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%spp_wts_gwd = clear_val
allocate (Coupling%spp_wts_rad (IM,Model%levs))
Coupling%spp_wts_rad = clear_val
allocate (Coupling%spp_wts_cu_deep (IM,Model%levs))
Coupling%spp_wts_cu_deep = clear_val
endif

!--- needed for Thompson's aerosol option
Expand Down Expand Up @@ -3817,6 +3821,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: spp_mp = 0
integer :: spp_rad = 0
integer :: spp_gwd = 0
integer :: spp_cu_deep = 0
logical :: do_spp = .false.

integer :: ichoice = 0 !< flag for closure of C3/GF deep convection
Expand Down
16 changes: 15 additions & 1 deletion ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2938,6 +2938,14 @@
type = real
kind = kind_phys
active = (do_stochastically_perturbed_parameterizations)
[spp_wts_cu_deep]
standard_name = spp_weights_for_cu_deep_scheme
long_name = spp weights for cu deep scheme
units = 1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (do_stochastically_perturbed_parameterizations)
[sfc_wts]
standard_name = surface_stochastic_weights_from_coupled_process
long_name = weights for stochastic surface physics perturbation
Expand Down Expand Up @@ -5859,7 +5867,7 @@
units = none
dimensions = (number_of_perturbed_spp_schemes)
type = character
kind = len=3
kind = len=10
active = (do_stochastically_perturbed_parameterizations)
[spp_pbl]
standard_name = control_for_pbl_spp_perturbations
Expand Down Expand Up @@ -5891,6 +5899,12 @@
units = count
dimensions = ()
type = integer
[spp_cu_deep]
standard_name = control_for_deep_convection_spp_perturbations
long_name = control for deep convection spp perturbations
units = count
dimensions = ()
type = integer
[ntrac]
standard_name = number_of_tracers
long_name = number of tracers
Expand Down
13 changes: 13 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,19 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
enddo
endif

if (Model%do_spp) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'spp_wts_cu_deep'
ExtDiag(idx)%desc = 'spp cu deep perturbation wts'
ExtDiag(idx)%unit = 'm/s'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Coupling(nb)%spp_wts_cu_deep(:,:)
enddo
endif

if (Model%lndp_type /= 0) then
idx = idx + 1
ExtDiag(idx)%axes = 3
Expand Down
6 changes: 6 additions & 0 deletions stochastic_physics/stochastic_physics_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
GFS_Control%spp_rad = 1
case('gwd')
GFS_Control%spp_gwd = 1
case('cu_deep')
GFS_Control%spp_cu_deep = 1
end select
end do
end if
Expand Down Expand Up @@ -257,6 +259,10 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
do nb=1,Atm_block%nblks
GFS_Data(nb)%Coupling%spp_wts_rad(:,:) = spp_wts(nb,1:GFS_Control%blksz(nb),:,n)
end do
case('cu_deep')
do nb=1,Atm_block%nblks
GFS_Data(nb)%Coupling%spp_wts_cu_deep(:,:) = spp_wts(nb,1:GFS_Control%blksz(nb),:,n)
end do
end select
end do
end if
Expand Down