Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
branch = main
[submodule "ccpp-physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
#url = https://github.com/NCAR/ccpp-physics
#branch = main
url = https://github.com/grantfirl/ccpp-physics
branch = ufs-dev-PR122
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
11 changes: 6 additions & 5 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -995,11 +995,12 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
tracers = 2
do n=2,Model%ntrac
ltest = ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. &
n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. &
n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. &
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%ntsigma)
n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. &
n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. &
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)
Interstitial%otsptflag(n) = ltest
if ( ltest ) then
tracers = tracers + 1
Expand Down
65 changes: 57 additions & 8 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ module GFS_typedefs
logical :: nssl_hail_on !< NSSL flag to activate the hail category
logical :: nssl_ccn_on !< NSSL flag to activate the CCN category
logical :: nssl_invertccn !< NSSL flag to treat CCN as activated (true) or unactivated (false)
logical :: nssl_3moment !< NSSL flag to turn on 3-moment for rain/graupel/hail

!--- Thompson's microphysical parameters
logical :: ltaerosol !< flag for aerosol version
Expand Down Expand Up @@ -1185,6 +1186,9 @@ module GFS_typedefs
integer :: seed0 !< random seed for radiation

real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme
real(kind=kind_phys) :: betascu !< Tuning parameter for prog. closure shallow clouds
real(kind=kind_phys) :: betamcu !< Tuning parameter for prog. closure midlevel clouds
real(kind=kind_phys) :: betadcu !< Tuning parameter for prog. closure deep clouds

!--- MYNN parameters/switches
logical :: do_mynnedmf
Expand Down Expand Up @@ -1420,6 +1424,9 @@ module GFS_typedefs
integer :: ntccna !< tracer index for activated CCN
integer :: ntgv !< tracer index for graupel particle volume
integer :: nthv !< tracer index for hail particle volume
integer :: ntrz !< tracer index for rain reflectivity
integer :: ntgz !< tracer index for graupel reflectivity
integer :: nthz !< tracer index for hail reflectivity
integer :: ntke !< tracer index for kinetic energy
integer :: ntsigma !< tracer index for updraft area fraction
integer :: nto !< tracer index for oxygen ion
Expand Down Expand Up @@ -3058,7 +3065,6 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%psurfi_cpl = clear_val
endif

!--prognostic closure - moisture coupling
if(Model%progsigma)then
allocate(Coupling%dqdt_qmicro (IM,Model%levs))
Coupling%dqdt_qmicro = clear_val
Expand Down Expand Up @@ -3419,6 +3425,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: nssl_hail_on = .false. !< NSSL flag to activate the hail category
logical :: nssl_ccn_on = .true. !< NSSL flag to activate the CCN category
logical :: nssl_invertccn = .true. !< NSSL flag to treat CCN as activated (true) or unactivated (false)
logical :: nssl_3moment = .false. !< NSSL flag to turn on 3-moment for rain/graupel/hail

!--- Thompson microphysical parameters
logical :: ltaerosol = .false. !< flag for aerosol version
Expand Down Expand Up @@ -3614,6 +3621,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys) :: var_ric = 1.0
real(kind=kind_phys) :: coef_ric_l = 0.16
real(kind=kind_phys) :: coef_ric_s = 0.25
!Prognostic convective closure
real(kind=kind_phys) :: betascu = 8.0 !< Tuning parameter for prog. closure shallow clouds
real(kind=kind_phys) :: betamcu = 1.0 !< Tuning parameter for prog. closure midlevel clouds
real(kind=kind_phys) :: betadcu = 2.0 !< Tuning parameter for prog. closure deep clouds
! *DH
logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme
logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme
Expand Down Expand Up @@ -3855,7 +3866,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- aerosol scavenging factors
integer, parameter :: max_scav_factors = 183
character(len=40) :: fscav_aero(max_scav_factors)
character(len=40) :: fscav_aero(max_scav_factors) = ''

real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /)
integer :: itime
Expand Down Expand Up @@ -3907,8 +3918,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
ext_diag_thompson, dt_inner, lgfdlmprad, &
sedi_semi, decfl, &
nssl_cccn, nssl_alphah, nssl_alphahl, &
nssl_alphar, nssl_ehw0, nssl_ehlw0, &
nssl_invertccn, nssl_hail_on, nssl_ccn_on, &
nssl_alphar, nssl_ehw0, nssl_ehlw0, &
nssl_invertccn, nssl_hail_on, nssl_ccn_on, nssl_3moment, &
!--- max hourly
avg_max_length, &
!--- land/surface model control
Expand Down Expand Up @@ -3945,9 +3956,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, &
h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, &
shinhong, do_ysu, acm, dspheat, lheatstrg, lseaspray, cnvcld,&
hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, &
betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,&
shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, &
random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, &
do_deep, jcap, &
cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, &
Expand Down Expand Up @@ -4566,6 +4577,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%nssl_hail_on = nssl_hail_on
Model%nssl_ccn_on = nssl_ccn_on
Model%nssl_invertccn = nssl_invertccn
Model%nssl_3moment = nssl_3moment

!--- Thompson MP parameters
Model%ltaerosol = ltaerosol
Expand Down Expand Up @@ -4774,11 +4786,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%hwrf_samfdeep = hwrf_samfdeep
Model%hwrf_samfshal = hwrf_samfshal

!--prognostic closure - moisture coupling
if ((progsigma .and. imfdeepcnv/=2) .and. (progsigma .and. imfdeepcnv/=5)) then
write(*,*) 'Logic error: progsigma requires imfdeepcnv=2 or 5'
stop
end if
Model%progsigma = progsigma
Model%betascu = betascu
Model%betamcu = betamcu
Model%betadcu = betadcu

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.'
Expand Down Expand Up @@ -5068,6 +5084,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ntccna = get_tracer_index(Model%tracer_names, 'ccna_nc', Model%me, Model%master, Model%debug)
Model%ntgv = get_tracer_index(Model%tracer_names, 'graupel_vol',Model%me, Model%master, Model%debug)
Model%nthv = get_tracer_index(Model%tracer_names, 'hail_vol', Model%me, Model%master, Model%debug)
Model%ntrz = get_tracer_index(Model%tracer_names, 'rain_ref', Model%me, Model%master, Model%debug)
Model%ntgz = get_tracer_index(Model%tracer_names, 'graupel_ref',Model%me, Model%master, Model%debug)
Model%nthz = get_tracer_index(Model%tracer_names, 'hail_ref', Model%me, Model%master, Model%debug)
Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke', Model%me, Model%master, Model%debug)
Model%ntsigma = get_tracer_index(Model%tracer_names, 'sigmab', Model%me, Model%master, Model%debug)
Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug)
Expand Down Expand Up @@ -5249,6 +5268,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
call label_dtend_tracer(Model,100+Model%ntccn,'ccn_nc','CCN number concentration','kg-1 s-1')
call label_dtend_tracer(Model,100+Model%ntgv,'graupel_vol','graupel volume','m3 kg-1 s-1')
call label_dtend_tracer(Model,100+Model%nthv,'hail_vol','hail volume','m3 kg-1 s-1')
call label_dtend_tracer(Model,100+Model%ntrz,'rain_ref','rain reflectivity','m3 kg-1 s-1')
call label_dtend_tracer(Model,100+Model%ntgz,'graupel_ref','graupel reflectivity','m3 kg-1 s-1')
call label_dtend_tracer(Model,100+Model%nthz,'hail_ref','hail reflectivity','m3 kg-1 s-1')
call label_dtend_tracer(Model,100+Model%ntke,'sgs_tke','turbulent kinetic energy','J s-1')
call label_dtend_tracer(Model,100+Model%nqrimef,'q_rimef','mass weighted rime factor','kg-1 s-1')
call label_dtend_tracer(Model,100+Model%ntwa,'liq_aero','number concentration of water-friendly aerosols','kg-1 s-1')
Expand Down Expand Up @@ -5317,7 +5339,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
itrac /= Model%ntrw .and. itrac /= Model%ntsw .and. itrac /= Model%ntrnc .and. &
itrac /= Model%ntsnc .and. itrac /= Model%ntgl .and. itrac /= Model%ntgnc .and. &
itrac /= Model%nthl .and. itrac /= Model%nthnc .and. itrac /= Model%nthv .and. &
itrac /= Model%ntgv ) then
itrac /= Model%ntgv .and. itrac /= Model%ntrz .and. itrac /= Model%ntgz .and. &
itrac /= Model%nthz ) then
call fill_dtidx(Model,dtend_select,100+itrac,Model%index_of_process_scnv,have_scnv)
call fill_dtidx(Model,dtend_select,100+itrac,Model%index_of_process_dcnv,have_dcnv)
else if(Model%ntchs<=0 .or. itrac<Model%ntchs) then
Expand Down Expand Up @@ -5450,6 +5473,24 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
write(*,*) 'NSSL micro: CCN is ON'
ENDIF
ENDIF

! add checks for nssl_3moment
IF ( ( Model%nssl_3moment ) ) THEN
IF ( Model%ntrz < 1 ) THEN
write(*,*) 'NSSL micro: 3-moment is ON, but rain_ref tracer is missing'
stop
ENDIF
IF ( Model%ntgz < 1 ) THEN
write(*,*) 'NSSL micro: 3-moment is ON, but graupel_ref tracer is missing'
stop
ENDIF
IF ( nssl_hail_on ) THEN
IF ( Model%nthz < 1 ) THEN
write(*,*) 'NSSL micro: 3-moment is ON, but hail_ref tracer is missing'
stop
ENDIF
ENDIF
ENDIF

IF ( Model%ntgl < 1 .or. Model%ntgv < 1 .or. Model%ntgnc < 1 .or. &
Model%ntsw < 1 .or. Model%ntsnc < 1 .or. &
Expand Down Expand Up @@ -6757,6 +6798,11 @@ subroutine control_print(Model)
print *, ' do_spp : ', Model%do_spp
print *, ' n_var_spp : ', Model%n_var_spp
print *, ' '
print *, 'convection'
print *, 'betascu : ', Model%betascu
print *, 'betamcu : ', Model%betamcu
print *, 'betadcu : ', Model%betadcu
print *, ' '
print *, 'cellular automata'
print *, ' nca : ', Model%nca
print *, ' ncells : ', Model%ncells
Expand Down Expand Up @@ -6804,6 +6850,9 @@ subroutine control_print(Model)
print *, ' ntccna : ', Model%ntccna
print *, ' ntgv : ', Model%ntgv
print *, ' nthv : ', Model%nthv
print *, ' ntrz : ', Model%ntrz
print *, ' ntgz : ', Model%ntgz
print *, ' nthz : ', Model%nthz
print *, ' ntke : ', Model%ntke
print *, ' ntsigma : ', Model%ntsigma
print *, ' nto : ', Model%nto
Expand Down
93 changes: 93 additions & 0 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,30 @@
type = real
kind = kind_phys
active = (index_of_mass_number_concentration_of_hail_in_tracer_concentration_array > 0)
[qgrs(:,:,index_of_reflectivity_of_rain_in_tracer_concentration_array)]
standard_name = reflectivity_of_rain_in_air
long_name = reflectivity of rain
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (index_of_reflectivity_of_rain_in_tracer_concentration_array > 0)
[qgrs(:,:,index_of_reflectivity_of_graupel_in_tracer_concentration_array)]
standard_name = reflectivity_of_graupel_in_air
long_name = reflectivity of graupel
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (index_of_reflectivity_of_graupel_in_tracer_concentration_array > 0)
[qgrs(:,:,index_of_reflectivity_of_hail_in_tracer_concentration_array)]
standard_name = reflectivity_of_hail_in_air
long_name = reflectivity of hail
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (index_of_reflectivity_of_hail_in_tracer_concentration_array > 0)
[qgrs(:,:,index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)]
standard_name = cloud_condensation_nuclei_number_concentration
long_name = number concentration of cloud condensation nuclei
Expand Down Expand Up @@ -568,6 +592,30 @@
type = real
kind = kind_phys
active = ( index_of_hail_volume_in_tracer_concentration_array > 0 )
[gq0(:,:,index_of_reflectivity_of_rain_in_tracer_concentration_array)]
standard_name = reflectivity_of_rain_of_new_state
long_name = reflectivity of rain updated by physics
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = ( index_of_reflectivity_of_rain_in_tracer_concentration_array > 0 )
[gq0(:,:,index_of_reflectivity_of_graupel_in_tracer_concentration_array)]
standard_name = reflectivity_of_graupel_of_new_state
long_name = reflectivity of graupel updated by physics
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = ( index_of_reflectivity_of_graupel_in_tracer_concentration_array > 0 )
[gq0(:,:,index_of_reflectivity_of_hail_in_tracer_concentration_array)]
standard_name = reflectivity_of_hail_of_new_state
long_name = reflectivity of hail updated by physics
units = m6 kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = ( index_of_reflectivity_of_hail_in_tracer_concentration_array > 0 )
[gq0(:,:,index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array)]
standard_name = cloud_area_fraction_in_atmosphere_layer_of_new_state
long_name = cloud fraction updated by physics
Expand Down Expand Up @@ -4326,6 +4374,12 @@
units = flag
dimensions = ()
type = logical
[nssl_3moment]
standard_name = nssl_3moment
long_name = 3-moment activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
[tf]
standard_name = all_ice_cloud_threshold_temperature
long_name = threshold temperature below which all cloud is ice
Expand Down Expand Up @@ -5259,6 +5313,27 @@
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
units = none
dimensions = ()
type = real
kind = kind_phys
[betamcu]
standard_name = tuning_param_for_midlevel_cu
long_name = tuning param for midlevel cu in case prognostic closure is used
units = none
dimensions = ()
type = real
kind = kind_phys
[betadcu]
standard_name = tuning_param_for_deep_cu
long_name = tuning param for deep cu in case prognostic closure is used
units = none
dimensions = ()
type = real
kind = kind_phys
[isatmedmf]
standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL
long_name = choice of scale-aware TKE moist EDMF PBL scheme
Expand Down Expand Up @@ -6151,6 +6226,24 @@
units = index
dimensions = ()
type = integer
[ntrz]
standard_name = index_of_reflectivity_of_rain_in_tracer_concentration_array
long_name = tracer index for rain reflectivity
units = index
dimensions = ()
type = integer
[ntgz]
standard_name = index_of_reflectivity_of_graupel_in_tracer_concentration_array
long_name = tracer index for graupel reflectivity
units = index
dimensions = ()
type = integer
[nthz]
standard_name = index_of_reflectivity_of_hail_in_tracer_concentration_array
long_name = tracer index for hail reflectivity
units = index
dimensions = ()
type = integer
[ntke]
standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array
long_name = tracer index for turbulent kinetic energy
Expand Down