Skip to content
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
1 change: 1 addition & 0 deletions ccpp/physics_namelists/input_GFS_v17_p8_ugwpv1.nml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
fhswr = 1200.
fhlwr = 1200.
progsigma = .true.
progomega = .false.
betascu = 8.0
betamcu = 1.0
betadcu = 2.0
Expand Down
1 change: 1 addition & 0 deletions scm/etc/tracer_config/tracers_GFS_v17_p8_ugwpv1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
"o3mr","ozone_mixing_ratio","kg kg-1"
"sgs_tke","turbulent_kinetic_energy","m2 s-2"
"sigmab"," prognostic_updraft_area_fraction_in_convection","frac"
"omegab","prognostic_updraft_velocity_in_convection","m s-1"
28 changes: 18 additions & 10 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -949,15 +949,23 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
if (Model%ntke > 0) Interstitial%ntkev = Interstitial%nvdiff

if (Model%ntiw > 0) then
if (Model%ntclamt > 0 .and. Model%ntsigma <= 0) then
Interstitial%nn = Model%ntrac - 2
elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0) then
Interstitial%nn = Model%ntrac - 2
elseif (Model%ntclamt > 0 .and. Model%ntsigma > 0) then
Interstitial%nn = Model%ntrac - 3
else
Interstitial%nn = Model%ntrac - 1
endif
if (Model%ntclamt > 0 .and. Model%ntsigma > 0 .and. Model%ntomega > 0) then
Interstitial%nn = Model%ntrac - 4
elseif (Model%ntclamt > 0 .and. Model%ntsigma > 0 .and. Model%ntomega <= 0) then
Interstitial%nn = Model%ntrac - 3
elseif (Model%ntclamt > 0 .and. Model%ntsigma <= 0 .and. Model%ntomega > 0) then
Interstitial%nn = Model%ntrac - 3
elseif (Model%ntclamt > 0 .and. Model%ntsigma <= 0 .and. Model%ntomega <= 0) then
Interstitial%nn = Model%ntrac - 2
elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0 .and. Model%ntomega > 0) then
Interstitial%nn = Model%ntrac - 3
elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0 .and. Model%ntomega <= 0) then
Interstitial%nn = Model%ntrac - 2
elseif (Model%ntclamt <= 0 .and. Model%ntsigma <= 0 .and. Model%ntomega > 0) then
Interstitial%nn = Model%ntrac - 2
else
Interstitial%nn = Model%ntrac - 1
endif
elseif (Model%ntcw > 0) then
Interstitial%nn = Model%ntrac
else
Expand All @@ -977,7 +985,7 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
n /= Model%nthl .and. n /= Model%nthnc .and. n /= Model%ntgv .and. &
n /= Model%nthv .and. n /= Model%ntccn .and. n /= Model%ntccna .and. &
n /= Model%ntrz .and. n /= Model%ntgz .and. n /= Model%nthz .and. &
n /= Model%ntsigma)
n /= Model%ntsigma .and. n /= Model%ntomega)
Interstitial%otsptflag(n) = ltest
if ( ltest ) then
tracers = tracers + 1
Expand Down
22 changes: 17 additions & 5 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ module GFS_typedefs
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)
logical :: progomega !< flag for prognostic vertical velocity in samf ddepcnv scheme (GFS)
integer :: imfdeepcnv !< flag for mass-flux deep convection scheme
!< 1: July 2010 version of SAS conv scheme
!< current operational version as of 2016
Expand Down Expand Up @@ -1499,6 +1500,7 @@ module GFS_typedefs
integer :: nthz !< tracer index for hail reflectivity
integer :: ntke !< tracer index for kinetic energy
integer :: ntsigma !< tracer index for updraft area fraction
integer :: ntomega !< tracer index for updraft velocity
integer :: nto !< tracer index for oxygen ion
integer :: nto2 !< tracer index for oxygen
integer :: ntwa !< tracer index for water friendly aerosol
Expand Down Expand Up @@ -3772,7 +3774,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme
logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme
logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or Unified conv.
logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or C3
logical :: progomega = .false. !< flag for prognostic updraft velocity in saSAS or C3
integer :: conv_cf_opt = 0 !< option for convection scheme cloud fraction computation
logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF
logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme
Expand Down Expand Up @@ -4168,9 +4171,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, &
ugwp_seq_update, var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
do_myjsfc, do_myjpbl, &
hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, &
betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,&
sigmab_coldstart, &
hwrf_samfdeep, hwrf_samfshal,progsigma,progomega,betascu, &
betamcu, betadcu,h2o_phys, pdfcld, shcnvcw, redrag, &
hybedmf, satmedmf, sigmab_coldstart, &
shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, &
xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, &
isatmedmf, conv_cf_opt, do_deep, jcap, &
Expand Down Expand Up @@ -5040,7 +5043,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%hwrf_samfdeep = hwrf_samfdeep
Model%hwrf_samfshal = hwrf_samfshal

!--prognostic closure - moisture coupling
!--prognostic closure - check
if ((progsigma .and. imfdeepcnv/=2) .and. (progsigma .and. imfdeepcnv/=5)) then
write(*,*) 'Logic error: progsigma requires imfdeepcnv=2 or 5'
error stop
Expand All @@ -5051,6 +5054,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%betadcu = betadcu
Model%sigmab_coldstart = sigmab_coldstart

!--prognostic closure - check
if (progomega .and. imfdeepcnv/=2) then
write(*,*) 'Logic error: progomega requires imfdeepcnv=2'
stop
end if
Model%progomega = progomega

if (oz_phys .and. oz_phys_2015) then
write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.'
error stop
Expand Down Expand Up @@ -5339,6 +5349,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%nthz = get_tracer_index(Model%tracer_names, 'hail_ref')
Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke')
Model%ntsigma = get_tracer_index(Model%tracer_names, 'sigmab')
Model%ntomega = get_tracer_index(Model%tracer_names, 'omegab')
Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef')
Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero')
Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero')
Expand Down Expand Up @@ -7137,6 +7148,7 @@ subroutine control_print(Model)
print *, ' nthz : ', Model%nthz
print *, ' ntke : ', Model%ntke
print *, ' ntsigma : ', Model%ntsigma
print *, ' ntomega : ', Model%ntomega
print *, ' nto : ', Model%nto
print *, ' nto2 : ', Model%nto2
print *, ' ntwa : ', Model%ntwa
Expand Down
29 changes: 28 additions & 1 deletion scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,14 @@
type = real
kind = kind_phys
active = (index_of_updraft_area_fraction_in_tracer_concentration_array > 0 )
[qgrs(:,:,index_of_updraft_velocity_in_tracer_concentration_array)]
standard_name = prognostic_updraft_velocity_in_convection
long_name = convective updraft velocity
units = frac
dimensions = (horizontal_dimension,vertical_layer_dimension)
type = real
kind = kind_phys
active = (index_of_updraft_velocity_in_tracer_concentration_array > 0 )
[qgrs(:,:,index_for_smoke_in_tracer_concentration_array)]
standard_name = smoke_tracer_concentration
long_name = concentration of smoke
Expand Down Expand Up @@ -631,7 +639,14 @@
type = real
kind = kind_phys
active = ( index_of_updraft_area_fraction_in_tracer_concentration_array > 0 )

[gq0(:,:,index_of_updraft_velocity_in_tracer_concentration_array)]
standard_name = updraft_velocity_updated_by_physics
long_name = convective updraft area fraction updated by physics
units = frac
dimensions = (horizontal_dimension,vertical_layer_dimension)
type = real
kind = kind_phys
active = ( index_of_updraft_velocity_in_tracer_concentration_array > 0 )
########################################################################
[ccpp-table-properties]
name = GFS_sfcprop_type
Expand Down Expand Up @@ -5674,6 +5689,12 @@
units = flag
dimensions = ()
type = logical
[progomega]
standard_name = do_prognostic_updraft_velocity
long_name = do_prognostic_updraft_velocity
units = flag
dimensions = ()
type = logical
[betascu]
standard_name = tuning_param_for_shallow_cu
long_name = tuning param for shallow cu in case prognostic closure is used
Expand Down Expand Up @@ -6642,6 +6663,12 @@
units = index
dimensions = ()
type = integer
[ntomega]
standard_name = index_of_updraft_velocity_in_tracer_concentration_array
long_name = tracer index of updraft_velocity
units = index
dimensions = ()
type = integer
[nqrimef]
standard_name = index_of_mass_weighted_rime_factor_in_tracer_concentration_array
long_name = tracer index for mass weighted rime factor
Expand Down
6 changes: 6 additions & 0 deletions scm/src/scm_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ subroutine output_init_state(ncid, time_inst_id, hor_dim_id, vert_dim_id, vert_d
if (scm_state%sigmab_index > 0) then
call NetCDF_def_var(ncid, 'sigmab', NF90_FLOAT, "updraft area fraction at lowest model layer", "frac", dummy_id, (/ hor_dim_id, time_inst_id /))
end if
if (scm_state%omegab_index > 0) then
call NetCDF_def_var(ncid, 'omegab', NF90_FLOAT, "prognostic convective updraft velocity", "m s-1", dummy_id, (/ hor_dim_id, vert_dim_id, time_inst_id /))
end if

end subroutine output_init_state

Expand Down Expand Up @@ -505,6 +508,9 @@ subroutine output_append_state(ncid, scm_state, physics)
if (scm_state%sigmab_index > 0) then
call NetCDF_put_var(ncid, "sigmab", scm_state%state_tracer(:,1,scm_state%sigmab_index,1), scm_state%itt_out)
endif
if (scm_state%omegab_index > 0) then
call NetCDF_put_var(ncid, "omegab", scm_state%state_tracer(:,:,scm_state%omegab_index,1), scm_state%itt_out)
endif
if (physics%model%do_mynnedmf) then
call NetCDF_put_var(ncid, "qc", scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) + &
scm_state%state_tracer(:,:,scm_state%cloud_ice_index,1) + &
Expand Down
2 changes: 2 additions & 0 deletions scm/src/scm_type_defs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module scm_type_defs
integer :: hail_volume_index !< index for hail volume in the tracer array
integer :: tke_index !< index for TKE in the tracer array
integer :: sigmab_index !< index for prognostic updraft area fraction in convection
integer :: omegab_index !< index for prognostic convective updraft velocity
integer :: ccn_index !< index for CCN in the tracer array
integer :: water_friendly_aerosol_index !< index for water-friendly aerosols in the tracer array
integer :: ice_friendly_aerosol_index !< index for ice-friendly aerosols in the tracer array
Expand Down Expand Up @@ -496,6 +497,7 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti
scm_state%hail_volume_index = get_tracer_index(scm_state%tracer_names,"hail_vol")
scm_state%tke_index = get_tracer_index(scm_state%tracer_names,"sgs_tke")
scm_state%sigmab_index = get_tracer_index(scm_state%tracer_names,"sigmab")
scm_state%omegab_index = get_tracer_index(scm_state%tracer_names,"omegab")
scm_state%ccn_index = get_tracer_index(scm_state%tracer_names,"ccn_nc")
scm_state%water_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"liq_aero")
scm_state%ice_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"ice_aero")
Expand Down