Skip to content

Commit

Permalink
[Production/RRFS.v1] MYNN PBL, Smoke and subgrid cloud fraction updat…
Browse files Browse the repository at this point in the history
…es RRFS.v1 (#802)

* "point to the mynn pbl, HAILCAST diagnostic updates; allocate rho_dry to zero size when not in use"
* "point to the smoke updates for RRFS.v1, and update input for smoke"
* "merge fv3atm PR #801 from Jili (clouds fix)"
* "point to hashes ufs-community/ccpp-physics@85fabc0 and NOAA-EMC/GFDL_atmos_cubed_sphere@fab198c"
  • Loading branch information
haiqinli authored Mar 19, 2024
1 parent 1b079e9 commit f9a1759
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 17 deletions.
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
25 changes: 22 additions & 3 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: max_fplume (:) => null() !< maximum plume rise level
real (kind=kind_phys), pointer :: uspdavg (:) => null() !< BL average wind speed
real (kind=kind_phys), pointer :: hpbl_thetav (:) => null() !< BL depth parcel method
real (kind=kind_phys), pointer :: rho_dry (:,:) => null() !< dry air density 3D array
!--- hourly fire potential index
real (kind=kind_phys), pointer :: rrfs_hwp (:) => null() !< hourly fire potential index
real (kind=kind_phys), pointer :: rrfs_hwp_ave (:) => null() !< *Average* hourly fire potential index
Expand Down Expand Up @@ -1197,6 +1198,9 @@ module GFS_typedefs
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
integer :: conv_cf_opt !< option for convection scheme cloud fraction computation
!< 0: Chaboureau-Bechtold
!< 1: Xu-Randall

integer :: nmtvr !< number of topographic variables such as variance etc
!< used in the GWD parameterization - 10 more added if
Expand Down Expand Up @@ -1534,6 +1538,7 @@ module GFS_typedefs
real(kind=kind_phys) :: dust_alpha !< alpha parameter for fengsha dust scheme
real(kind=kind_phys) :: dust_gamma !< gamma parameter for fengsha dust scheme
real(kind=kind_phys) :: wetdep_ls_alpha !< alpha parameter for wet deposition
real(kind=kind_phys) :: plume_alpha !< alpha parameter for plumerise scheme
integer :: ebb_dcycle !< 1:retro; 2:forecast of fire emission
integer :: seas_opt
integer :: dust_opt
Expand All @@ -1547,6 +1552,7 @@ module GFS_typedefs
integer :: plumerisefire_frq
integer :: n_dbg_lines
integer :: smoke_forecast
logical :: add_fire_moist_flux ! Flag to add moisture fluxes based on PM2.5 emissions
logical :: aero_ind_fdb ! WFA/IFA indirect
logical :: aero_dir_fdb ! smoke/dust direct
logical :: rrfs_smoke_debug
Expand Down Expand Up @@ -2354,7 +2360,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%hprime (IM,Model%nmtvr))
allocate (Sfcprop%dust12m_in (IM,12,5))
allocate (Sfcprop%smoke_RRFS(IM,24,2))
allocate (Sfcprop%smoke2d_RRFS(IM,4))
allocate (Sfcprop%smoke2d_RRFS(IM,5))
allocate (Sfcprop%emi_in (IM,1))
allocate(Sfcprop%albdirvis_lnd (IM))
allocate(Sfcprop%albdirnir_lnd (IM))
Expand Down Expand Up @@ -3503,6 +3509,7 @@ subroutine coupling_create (Coupling, IM, Model)
allocate (Coupling%min_fplume(IM))
allocate (Coupling%max_fplume(IM))
allocate (Coupling%uspdavg(IM))
allocate (Coupling%rho_dry (IM,Model%levs))
allocate (Coupling%hpbl_thetav(IM))
allocate (Coupling%rrfs_hwp (IM))
allocate (Coupling%rrfs_hwp_ave (IM))
Expand All @@ -3515,6 +3522,7 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%min_fplume = clear_val
Coupling%max_fplume = clear_val
Coupling%uspdavg = clear_val
Coupling%rho_dry = clear_val
Coupling%hpbl_thetav = clear_val
Coupling%rrfs_hwp = clear_val
Coupling%rrfs_hwp_ave = clear_val
Expand All @@ -3528,6 +3536,7 @@ subroutine coupling_create (Coupling, IM, Model)
allocate (Coupling%min_fplume(0))
allocate (Coupling%max_fplume(0))
allocate (Coupling%uspdavg(0))
allocate (Coupling%rho_dry (0,0))
allocate (Coupling%hpbl_thetav(0))
allocate (Coupling%rrfs_hwp (0))
allocate (Coupling%rrfs_hwp_ave (0))
Expand Down Expand Up @@ -3992,6 +4001,7 @@ 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.
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
! DH* TODO - move to MYNN namelist section
Expand Down Expand Up @@ -4220,6 +4230,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys) :: dust_alpha = 0.
real(kind=kind_phys) :: dust_gamma = 0.
real(kind=kind_phys) :: wetdep_ls_alpha = 0.5
real(kind=kind_phys) :: plume_alpha = 0.05
integer :: dust_moist_opt = 1 ! fecan :1 else shao
integer :: ebb_dcycle = 1 ! 1:retro; 2:forecast
integer :: seas_opt = 2
Expand All @@ -4230,10 +4241,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: extended_sd_diags = .false.
integer :: wetdep_ls_opt = 1
logical :: do_plumerise = .false.
logical :: add_fire_moist_flux = .false.
integer :: addsmoke_flag = 1
integer :: plumerisefire_frq = 60
integer :: n_dbg_lines = 3
integer :: smoke_forecast = 0 ! RRFS-sd read in ebb_smoke
integer :: smoke_forecast = 2 ! RRFS-sd read in ebb_smoke
logical :: aero_ind_fdb = .false. ! RRFS-sd wfa/ifa emission
logical :: aero_dir_fdb = .false. ! RRFS-sd smoke/dust radiation feedback
logical :: rrfs_smoke_debug = .false. ! RRFS-sd plumerise debug
Expand Down Expand Up @@ -4349,7 +4361,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
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, &
conv_cf_opt, do_deep, jcap, &
cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, &
dlqf, rbcr, shoc_parm, psauras, prauras, wminras, &
do_sppt, do_shum, do_skeb, &
Expand Down Expand Up @@ -4405,6 +4417,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
rrfs_smoke_debug, do_plumerise, plumerisefire_frq, &
addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, &
do_smoke_transport,smoke_conv_wet_coef,n_dbg_lines, &
add_fire_moist_flux, plume_alpha, &
!--- C3/GF closures
ichoice,ichoicem,ichoice_s, &
!--- (DFI) time ranges with radar-prescribed microphysics tendencies
Expand Down Expand Up @@ -4633,6 +4646,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%dust_alpha = dust_alpha
Model%dust_gamma = dust_gamma
Model%wetdep_ls_alpha = wetdep_ls_alpha
Model%plume_alpha = plume_alpha
Model%ebb_dcycle = ebb_dcycle
Model%seas_opt = seas_opt
Model%dust_opt = dust_opt
Expand All @@ -4645,6 +4659,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%n_dbg_lines = n_dbg_lines
Model%plumerisefire_frq = plumerisefire_frq
Model%addsmoke_flag = addsmoke_flag
Model%add_fire_moist_flux = add_fire_moist_flux
Model%smoke_forecast = smoke_forecast
Model%aero_ind_fdb = aero_ind_fdb
Model%aero_dir_fdb = aero_dir_fdb
Expand Down Expand Up @@ -5190,6 +5205,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%imfdeepcnv = imfdeepcnv
Model%isatmedmf = isatmedmf
Model%do_deep = do_deep
Model%conv_cf_opt = conv_cf_opt
Model%nmtvr = nmtvr
Model%jcap = jcap
Model%flgmin = flgmin
Expand Down Expand Up @@ -6779,6 +6795,7 @@ subroutine control_print(Model)
print *, 'dust_alpha : ',Model%dust_alpha
print *, 'dust_gamma : ',Model%dust_gamma
print *, 'wetdep_ls_alpha : ',Model%wetdep_ls_alpha
print *, 'plume_alpha : ',Model%plume_alpha
print *, 'ebb_dcycle : ',Model%ebb_dcycle
print *, 'seas_opt : ',Model%seas_opt
print *, 'dust_opt : ',Model%dust_opt
Expand All @@ -6789,6 +6806,7 @@ subroutine control_print(Model)
print *, 'wetdep_ls_opt : ',Model%wetdep_ls_opt
print *, 'do_plumerise : ',Model%do_plumerise
print *, 'plumerisefire_frq: ',Model%plumerisefire_frq
print *, 'add_fire_moist_flux: ',Model%add_fire_moist_flux
print *, 'addsmoke_flag : ',Model%addsmoke_flag
print *, 'smoke_forecast : ',Model%smoke_forecast
print *, 'aero_ind_fdb : ',Model%aero_ind_fdb
Expand Down Expand Up @@ -7066,6 +7084,7 @@ subroutine control_print(Model)
print *, ' imfshalcnv : ', Model%imfshalcnv
print *, ' imfdeepcnv : ', Model%imfdeepcnv
print *, ' do_deep : ', Model%do_deep
print *, ' conv_cf_opt : ', Model%conv_cf_opt
print *, ' nmtvr : ', Model%nmtvr
print *, ' jcap : ', Model%jcap
print *, ' cs_parm : ', Model%cs_parm
Expand Down
30 changes: 29 additions & 1 deletion ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@
standard_name = emission_smoke_prvd_RRFS
long_name = emission fire RRFS daily
units = various
dimensions = (horizontal_loop_extent,4)
dimensions = (horizontal_loop_extent,5)
type = real
kind = kind_phys
active = (do_smoke_coupling)
Expand Down Expand Up @@ -3188,6 +3188,14 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[rho_dry]
standard_name = dry_air_density
long_name = dry air density
units = kg m-3
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[uspdavg]
standard_name = mean_wind_speed_in_boundary_layer
long_name = average wind speed within the boundary layer
Expand Down Expand Up @@ -4860,6 +4868,12 @@
units = flag
dimensions = ()
type = logical
[add_fire_moist_flux]
standard_name = flag_for_fire_moisture_flux
long_name = flag to add fire moisture flux
units = flag
dimensions = ()
type = logical
[isncond_opt]
standard_name = control_for_soil_thermal_conductivity_option_in_ruc_lsm
long_name = control for soil thermal conductivity option in RUC land surface model
Expand Down Expand Up @@ -5550,6 +5564,12 @@
units = none
dimensions = ()
type = integer
[conv_cf_opt]
standard_name = option_for_convection_scheme_cloud_fraction_computation
long_name = option for convection scheme cloud fraction computation
units = flag
dimensions = ()
type = integer
[nmtvr]
standard_name = number_of_statistical_measures_of_subgrid_orography
long_name = number of topographic variables in GWD
Expand Down Expand Up @@ -6766,6 +6786,14 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[plume_alpha]
standard_name = alpha_for_plumerise_scheme
long_name = alpha paramter for plumerise scheme
units = none
dimensions = ()
type = real
kind = kind_phys
active = (do_smoke_coupling)
[ebb_dcycle]
standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions
long_name = rrfs smoke diurnal cycle option
Expand Down
33 changes: 23 additions & 10 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,32)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'csdsf'
ExtDiag(idx)%desc = 'Clear Sky Instantateous Downward Short Wave Flux'
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,32)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'csulf_ave'
Expand Down Expand Up @@ -4773,6 +4785,17 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fhist
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'ebu_smoke'
ExtDiag(idx)%desc = 'smoke emission'
ExtDiag(idx)%unit = 'ug/m2/s'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Coupling(nb)%ebu_smoke(:,:)
enddo

if (Model%ebb_dcycle == 2 ) then

idx = idx + 1
Expand Down Expand Up @@ -4852,16 +4875,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop

endif smoke_forecast_mode

idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'ebu_smoke'
ExtDiag(idx)%desc = 'smoke emission'
ExtDiag(idx)%unit = 'ug/m2/s'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Coupling(nb)%ebu_smoke(:,:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 3
Expand Down
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
4 changes: 3 additions & 1 deletion io/fv3atm_rrfs_sd_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module fv3atm_rrfs_sd_io
integer, private :: nvar_dust12m = 5
integer, private :: nvar_emi = 1
integer, private :: nvar_fire = 2
integer, private :: nvar_fire2d = 4
integer, private :: nvar_fire2d = 5

character(len=32), pointer, dimension(:), private :: dust12m_name => null()
character(len=32), pointer, dimension(:), private :: emi_name => null()
Expand Down Expand Up @@ -572,6 +572,7 @@ subroutine rrfs_sd_emissions_register_fire(data, Model, restart, Atm_block)
data%fire_name2d(2) = 'frp_davg'
data%fire_name2d(3) = 'fire_end_hr'
data%fire_name2d(4) = 'hwp_davg'
data%fire_name2d(5) = 'totprcp_24hrs'

!--- register axis
call register_axis(restart, 'lon', 'X')
Expand Down Expand Up @@ -630,6 +631,7 @@ subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block)
Sfcprop(nb)%smoke2d_RRFS(ix,2) = data%fire_var2d(i,j,2)
Sfcprop(nb)%smoke2d_RRFS(ix,3) = data%fire_var2d(i,j,3)
Sfcprop(nb)%smoke2d_RRFS(ix,4) = data%fire_var2d(i,j,4)
Sfcprop(nb)%smoke2d_RRFS(ix,5) = data%fire_var2d(i,j,5)
else
! -- user define their own fire emission
endif
Expand Down

0 comments on commit f9a1759

Please sign in to comment.