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

Community Convective Cloud (C3) scheme #657

Merged
merged 7 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@
'physics/physics/cu_gf_driver_pre.F90',
'physics/physics/cu_gf_driver.F90',
'physics/physics/cu_gf_driver_post.F90',
'physics/physics/cu_unified_driver_pre.F90',
'physics/physics/cu_unified_driver.F90',
'physics/physics/cu_unified_driver_post.F90',
'physics/physics/cu_c3_driver_pre.F90',
'physics/physics/cu_c3_driver.F90',
'physics/physics/cu_c3_driver_post.F90',
'physics/physics/hedmf.f',
'physics/physics/moninshoc.f',
'physics/physics/satmedmfvdif.F',
Expand Down
48 changes: 33 additions & 15 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ module GFS_typedefs
integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme
integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD)
integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS)
integer :: imfshalcnv_unified = 5 !< flag for the unified convection scheme
integer :: imfshalcnv_c3 = 5 !< flag for the Community Convective Cloud (C3) scheme
logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF)
logical :: progsigma !< flag for prognostic area fraction in samf ddepcnv scheme (GFS)
integer :: imfdeepcnv !< flag for mass-flux deep convection scheme
Expand All @@ -1160,13 +1160,16 @@ module GFS_typedefs
integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme
integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD)
integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS)
integer :: imfdeepcnv_unified = 5 !< flag for the unified convection scheme
integer :: imfdeepcnv_c3 = 5 !< flag for the Community Convective Cloud (C3) scheme
logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF)
integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme
!< 0: initial version of satmedmf (Nov. 2018)
!< 1: updated version of satmedmf (as of May 2019)
integer :: isatmedmf_vdif = 0 !< flag for initial version of satmedmf (Nov. 2018)
integer :: isatmedmf_vdifq = 1 !< flag for updated version of satmedmf (as of May 2019)
integer :: ichoice = 0 !< flag for closure of C3/GF deep convection
integer :: ichoicem = 13!< flag for closure of C3/GF mid convection
jkbk2004 marked this conversation as resolved.
Show resolved Hide resolved
integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection

integer :: nmtvr !< number of topographic variables such as variance etc
!< used in the GWD parameterization - 10 more added if
Expand Down Expand Up @@ -2686,7 +2689,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%cqs2 = clear_val
Sfcprop%lh = clear_val
end if
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_unified) then
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then
allocate (Sfcprop%maxupmf(IM))
allocate (Sfcprop%conv_act(IM))
allocate (Sfcprop%conv_act_m(IM))
Expand Down Expand Up @@ -3138,7 +3141,7 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%rrfs_hwp = clear_val
endif

if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_unified) then
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then
allocate (Coupling%qci_conv (IM,Model%levs))
Coupling%qci_conv = clear_val
endif
Expand Down Expand Up @@ -3802,6 +3805,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: spp_gwd = 0
logical :: do_spp = .false.

integer :: ichoice = 0 !< flag for closure of C3/GF deep convection
integer :: ichoicem = 13!< flag for closure of C3/GF mid convection
integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection

!-- chem nml variables for RRFS-SD
real(kind=kind_phys) :: dust_alpha = 0.
real(kind=kind_phys) :: dust_gamma = 0.
Expand Down Expand Up @@ -3974,6 +3981,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
wetdep_ls_opt, smoke_forecast, aero_ind_fdb, aero_dir_fdb, &
rrfs_smoke_debug, do_plumerise, plumerisefire_frq, &
addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, &
!--- C3/GF closures
ichoice,ichoicem,ichoice_s, &
!--- (DFI) time ranges with radar-prescribed microphysics tendencies
! and (maybe) convection suppression
fh_dfi_radar, radar_tten_limits, do_cap_suppress, &
Expand Down Expand Up @@ -4090,17 +4099,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
write(*,*) 'NO FLAG: pbl is generic'
endif

if(imfshalcnv == Model%imfshalcnv_gf .or. imfshalcnv == Model%imfshalcnv_unified) then
if(imfshalcnv == Model%imfshalcnv_gf .or. imfshalcnv == Model%imfshalcnv_c3) then
if(me==master) &
write(*,*) 'FLAG: imfshalcnv_gf or imfshalcnv_unified so scnv not generic'
write(*,*) 'FLAG: imfshalcnv_gf or imfshalcnv_c3 so scnv not generic'
Model%flag_for_scnv_generic_tend=.false.
elseif(me==master) then
write(*,*) 'NO FLAG: scnv is generic'
endif

if(imfdeepcnv == Model%imfdeepcnv_gf .or. imfdeepcnv == Model%imfdeepcnv_unified) then
if(imfdeepcnv == Model%imfdeepcnv_gf .or. imfdeepcnv == Model%imfdeepcnv_c3) then
if(me==master) &
write(*,*) 'FLAG: imfdeepcnv_gf or imfdeepcnv_unified so dcnv not generic'
write(*,*) 'FLAG: imfdeepcnv_gf or imfdeepcnv_c3 so dcnv not generic'
Model%flag_for_dcnv_generic_tend=.false.
elseif(me==master) then
write(*,*) 'NO FLAG: dcnv is generic'
Expand Down Expand Up @@ -4207,6 +4216,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

Model%fire_aux_data_levels = 10

Model%ichoice_s = ichoice_s
Model%ichoicem = ichoicem
Model%ichoice = ichoice

!--- integrated dynamics through earth's atmosphere
Model%lsidea = lsidea
if (Model%lsidea) then
Expand Down Expand Up @@ -5655,7 +5668,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
print *,' Grell-Freitas scale & aerosol-aware mass-flux deep conv scheme'
elseif(Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke) then
print *,' New Tiedtke cumulus scheme'
elseif(Model%imfdeepcnv == Model%imfdeepcnv_unified) then
elseif(Model%imfdeepcnv == Model%imfdeepcnv_c3) then
print *,' New unified cumulus convection scheme'
endif
endif
Expand Down Expand Up @@ -5700,7 +5713,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
print *,' Grell-Freitas scale- & aerosol-aware mass-flux shallow conv scheme (2013)'
elseif (Model%imfshalcnv == Model%imfshalcnv_ntiedtke) then
print *,' New Tiedtke cumulus scheme'
elseif (Model%imfshalcnv == Model%imfshalcnv_unified) then
elseif (Model%imfshalcnv == Model%imfshalcnv_c3) then
print *,' New unified cumulus scheme'
else
print *,' unknown mass-flux scheme in use - defaulting to no shallow convection'
Expand Down Expand Up @@ -5948,7 +5961,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
endif

if(Model%ras .or. Model%cscnv) Model%cnvcld = .false.
if(Model%do_shoc .or. Model%pdfcld .or. Model%do_mynnedmf .or. Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_unified) Model%cnvcld = .false.
if(Model%do_shoc .or. Model%pdfcld .or. Model%do_mynnedmf .or. Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) Model%cnvcld = .false.
if(Model%cnvcld) Model%ncnvcld3d = 1

!--- get cnvwind index in phy_f2d; last entry in phy_f2d array
Expand Down Expand Up @@ -6014,7 +6027,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%lmfdeep2 = (Model%imfdeepcnv == Model%imfdeepcnv_samf &
.or. Model%imfdeepcnv == Model%imfdeepcnv_gf &
.or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke &
.or. Model%imfdeepcnv == Model%imfdeepcnv_unified)
.or. Model%imfdeepcnv == Model%imfdeepcnv_c3)
!--- END CODE FROM GLOOPR

!--- BEGIN CODE FROM GLOOPB
Expand Down Expand Up @@ -6269,6 +6282,11 @@ subroutine control_print(Model)
print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg
print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg
print *, ' use_med_flux : ', Model%use_med_flux
if(Model%imfdeepcnv == Model%imfdeepcnv_gf .or.Model%imfdeepcnv == Model%imfdeepcnv_c3) then
print*,'ichoice_s : ', Model%ichoice_s
print*,'ichoicem : ', Model%ichoicem
print*,'ichoice : ', Model%ichoice
endif
if(model%rrfs_sd) then
print *, ' '
print *, 'smoke parameters'
Expand Down Expand Up @@ -6953,7 +6971,7 @@ subroutine tbd_create (Tbd, IM, Model)
allocate (Tbd%hpbl (IM))
Tbd%hpbl = clear_val

if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_samf .or. Model%imfshalcnv == Model%imfshalcnv_samf .or. Model%imfdeepcnv == Model%imfdeepcnv_unified .or. Model%imfshalcnv == Model%imfshalcnv_unified) then
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_samf .or. Model%imfshalcnv == Model%imfshalcnv_samf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3 .or. Model%imfshalcnv == Model%imfshalcnv_c3) then
allocate(Tbd%prevsq(IM, Model%levs))
Tbd%prevsq = clear_val
endif
Expand All @@ -6963,7 +6981,7 @@ subroutine tbd_create (Tbd, IM, Model)
Tbd%ud_mf = zero
endif

if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_unified) then
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then
allocate(Tbd%forcet(IM, Model%levs))
allocate(Tbd%forceq(IM, Model%levs))
allocate(Tbd%forcet(IM, Model%levs))
Expand All @@ -6973,7 +6991,7 @@ subroutine tbd_create (Tbd, IM, Model)
Tbd%prevst = clear_val
end if

if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_unified) then
if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then
allocate(Tbd%cactiv(IM))
allocate(Tbd%cactiv_m(IM))
allocate(Tbd%aod_gf(IM))
Expand Down
50 changes: 34 additions & 16 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1089,15 +1089,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[conv_act_m]
standard_name = consecutive_calls_for_grell_freitas_mid_level_convection
long_name = Memory counter for GF midlevel
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[hice]
standard_name = sea_ice_thickness
long_name = sea ice thickness
Expand Down Expand Up @@ -3029,7 +3029,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[pfi_lsan]
standard_name = ice_flux_due_to_large_scale_precipitation
long_name = instantaneous 3D flux of ice from nonconvective precipitation
Expand Down Expand Up @@ -5191,9 +5191,9 @@
units = flag
dimensions = ()
type = integer
[imfshalcnv_unified]
standard_name = identifier_for_unified_shallow_convection
long_name = flag for Unified shallow convection scheme
[imfshalcnv_c3]
standard_name = identifier_for_c3_shallow_convection
long_name = flag for C3 shallow convection scheme
units = flag
dimensions = ()
type = integer
Expand Down Expand Up @@ -5227,9 +5227,9 @@
units = flag
dimensions = ()
type = integer
[imfdeepcnv_unified]
standard_name = identifier_for_unified_deep_convection
long_name = flag for Unified deep convection scheme
[imfdeepcnv_c3]
standard_name = identifier_for_c3_deep_convection
long_name = flag for C3 deep convection scheme
units = flag
dimensions = ()
type = integer
Expand All @@ -5239,6 +5239,24 @@
units = flag
dimensions = ()
type = integer
[ichoice]
standard_name = identifier_for_c3_or_gf_deep_convection_closure
long_name = flag for C3 or GF deep convection closure
units = flag
dimensions = ()
type = integer
[ichoicem]
standard_name = identifier_for_c3_or_gf_mid_convection_closure
long_name = flag for C3 or GF mid convection closure
units = flag
dimensions = ()
type = integer
[ichoice_s]
standard_name = identifier_for_c3_or_gf_shallow_convection_closure
long_name = flag for C3 or GF shallow convection closure
units = flag
dimensions = ()
type = integer
[hwrf_samfdeep]
standard_name = flag_for_hurricane_specific_code_in_scale_aware_mass_flux_deep_convection
long_name = flag for hwrf samfdeepcnv scheme
Expand Down Expand Up @@ -7440,7 +7458,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[imap]
standard_name = map_of_block_column_number_to_global_i_index
long_name = map of local index ix to global index i for this block
Expand Down Expand Up @@ -7664,45 +7682,45 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
[forceq]
standard_name = tendendy_of_specific_humidity_due_to_nonphysics
long_name = moisture tendency due to dynamics only
units = kg kg-1 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
[prevst]
standard_name = air_temperature_on_previous_timestep
long_name = temperature from previous time step
units = K
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection)
[prevsq]
standard_name = specific_humidity_on_previous_timestep
long_name = moisture from previous time step
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection .or. control_for_deep_convection_scheme == identifer_for_scale_aware_mass_flux_deep_convection .or. control_for_shallow_convection_scheme == identifier_for_scale_aware_mass_flux_shallow_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection .or. control_for_deep_convection_scheme == identifier_for_new_tiedtke_deep_convection .or. control_for_deep_convection_scheme == identifer_for_scale_aware_mass_flux_deep_convection .or. control_for_shallow_convection_scheme == identifier_for_scale_aware_mass_flux_shallow_convection)
[cactiv]
standard_name = counter_for_grell_freitas_convection
long_name = convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[cactiv_m]
standard_name = counter_for_grell_freitas_mid_level_convection
long_name = mid-level convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_unified_deep_convection)
active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection)
[CLDFRA_BL]
standard_name = subgrid_scale_cloud_area_fraction_in_atmosphere_layer
long_name = subgrid cloud fraction from PBL scheme
Expand Down
Loading